summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/game
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-04-07 12:01:18 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-04-07 12:01:18 +0200
commit4712d9d3c617dbd146d4c84f65f64c1dd3c89750 (patch)
tree4e9a2f72350a6c3d721abf4461b5847487911d70 /core/src/ch/asynk/rustanddust/game
parente8b7e90a105a5d16eaba16d4faec406a129e1638 (diff)
downloadRustAndDust-4712d9d3c617dbd146d4c84f65f64c1dd3c89750.zip
RustAndDust-4712d9d3c617dbd146d4c84f65f64c1dd3c89750.tar.gz
Map: enable exit Zone when adding it to the map
Diffstat (limited to 'core/src/ch/asynk/rustanddust/game')
-rw-r--r--core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java1
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map0Hex.java1
-rw-r--r--core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java4
3 files changed, 3 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
index 975cc46..e88600c 100644
--- a/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
+++ b/core/src/ch/asynk/rustanddust/game/battles/BattleCommon.java
@@ -227,7 +227,6 @@ public abstract class BattleCommon implements Battle
protected void addExitZone(Zone exit)
{
map.addExitZone(exit);
- exit.enable(Hex.EXIT, true);
}
protected void addReinforcement(Player player, Zone entryZone, UnitCode unitCode)
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java b/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
index 95e56ae..9b44bed 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map0Hex.java
@@ -79,6 +79,7 @@ public abstract class Map0Hex extends Board
public void addExitZone(Zone zone)
{
exitZones.add(zone);
+ zone.enable(Hex.EXIT, true);
}
public void hexSelect(Hex hex) { selectedTile.set(hex); }
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java
index 38151b8..d73308f 100644
--- a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java
+++ b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java
@@ -342,10 +342,10 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal
}
a = v.get("e");
for (int i = 0; i < a.size; i++)
- entryZones.add(loadZone(a.get(i)));
+ addEntryZone(loadZone(a.get(i)));
a = v.get("x");
for (int i = 0; i < a.size; i++)
- exitZones.add(loadZone(a.get(i)));
+ addExitZone(loadZone(a.get(i)));
}
private Zone loadZone(JsonValue v)