summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-17 12:21:19 +0100 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-01-17 12:21:19 +0100 |
commit | 53e381b707550119afaed7bc956f3241a8208e5b (patch) | |
tree | 77c85c7f512f810e30f1ecf6a3b8a353ed027a82 | |
parent | 4e1381121b442b8861c9fca7ae98cccf7cde62fd (diff) |
...
-rw-r--r-- | src/main-menu/src/Struct/BattleSummary.elm | 2 | ||||
-rw-r--r-- | src/main-menu/src/Update/HandleNewBattle.elm | 2 | ||||
-rw-r--r-- | src/roster-editor/src/Comm/JoinBattle.elm | 12 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/main-menu/src/Struct/BattleSummary.elm b/src/main-menu/src/Struct/BattleSummary.elm index 772d52d..c62bd6c 100644 --- a/src/main-menu/src/Struct/BattleSummary.elm +++ b/src/main-menu/src/Struct/BattleSummary.elm @@ -118,7 +118,7 @@ decoder = "cat" (Json.Decode.map category_from_string (Json.Decode.string)) ) - |> (Json.Decode.Pipeline.required "ldt" Json.Decode.string) + |> (Json.Decode.Pipeline.required "dln" Json.Decode.string) |> (Json.Decode.Pipeline.required "ipt" Json.Decode.bool) |> (Json.Decode.Pipeline.required "ipd" Json.Decode.bool) ) diff --git a/src/main-menu/src/Update/HandleNewBattle.elm b/src/main-menu/src/Update/HandleNewBattle.elm index 396635e..609f62d 100644 --- a/src/main-menu/src/Update/HandleNewBattle.elm +++ b/src/main-menu/src/Update/HandleNewBattle.elm @@ -112,7 +112,7 @@ set_map model map = (Struct.UI.set_action (Struct.UI.NewBattle (Struct.BattleRequest.set_map_id - "" + (Struct.MapSummary.get_id map) (Struct.BattleRequest.set_size -- TODO: get from map summary Struct.BattleRequest.Small diff --git a/src/roster-editor/src/Comm/JoinBattle.elm b/src/roster-editor/src/Comm/JoinBattle.elm index 0175a12..470ea66 100644 --- a/src/roster-editor/src/Comm/JoinBattle.elm +++ b/src/roster-editor/src/Comm/JoinBattle.elm @@ -32,8 +32,16 @@ try_encoding model = ("pid", (Json.Encode.string model.player_id)), ( "six", - (Json.Encode.string - (Struct.Flags.force_get_param "six" model.flags) + (Json.Encode.int + ( + case + (String.toInt + (Struct.Flags.force_get_param "six" model.flags) + ) + of + (Just ix) -> ix + _ -> -1 + ) ) ), ( |