diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-27 01:07:01 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-03-27 01:07:01 +0100 |
commit | 694a0da044be8a3e0ff6176bc71fc7eee8016956 (patch) | |
tree | 1360a5db222d3b9d19c80edc3dd2be3335e781b4 /core/src/ch/asynk/rustanddust | |
parent | 8c04bef05b21b012b5cdfd65bec5e8a9bb2fe32c (diff) | |
download | RustAndDust-694a0da044be8a3e0ff6176bc71fc7eee8016956.zip RustAndDust-694a0da044be8a3e0ff6176bc71fc7eee8016956.tar.gz |
Map5Marshal: load/unload Order.activable
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r-- | core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java index a12d463..af3cfe6 100644 --- a/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java +++ b/core/src/ch/asynk/rustanddust/game/map/Map5Marshal.java @@ -169,6 +169,12 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal unloadPromoteOrder(json, o.unit); break; } + if (o.activable.size() > 0) { + json.writeArrayStart("a"); + for(Unit u : o.activable) + json.writeValue(u.id); + json.writeArrayEnd(); + } json.writeObjectEnd(); } json.writeArrayEnd(); @@ -369,6 +375,12 @@ public abstract class Map5Marshal extends Map4Orders implements Marshal order = loadPromoteOrder(o); break; } + JsonValue a = o.get("a"); + if (a != null) { + for (int j = 0; j < a.size; j++) { + order.activable.add(findById(a.getInt(j))); + } + } orders.add(order); } } |