mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
world.js: Introduce World.VILLAGE_POS
This constant gets reused in a few places, so extract it out. Work will be required to migrate existing code away from hard coding World.RADIUS in places where we are talking about the village location.
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
var World = {
|
||||
|
||||
RADIUS: 30,
|
||||
VILLAGE_POS: [30, 30],
|
||||
TILE: {
|
||||
VILLAGE: 'A',
|
||||
IRON_MINE: 'I',
|
||||
@@ -810,7 +811,7 @@ var World = {
|
||||
World.starvation = false;
|
||||
World.thirst = false;
|
||||
World.usedOutposts = {};
|
||||
World.curPos = [World.RADIUS, World.RADIUS];
|
||||
World.curPos = World.copyPos(World.VILLAGE_POS);
|
||||
World.drawMap();
|
||||
World.setTitle();
|
||||
World.dead = false;
|
||||
|
||||
Reference in New Issue
Block a user