| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-07-12 17:49:31 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-07-12 17:49:31 +0200 | 
| commit | 559f46102c656ace81a262f0edff28b617a7ec88 (patch) | |
| tree | 34f7253b9858ca1260139b3b4ef6004420627488 | |
| parent | 93b51e71e7009a286b6cf168bb59bcea1c83bd89 (diff) | |
Got it to load the map (full of "error" tiles).
| -rw-r--r-- | src/battle/src/Constants/IO.elm.m4 | 2 | ||||
| -rw-r--r-- | src/map-editor/src/Comm/LoadMap.elm | 2 | ||||
| -rw-r--r-- | src/map-editor/src/Constants/IO.elm.m4 | 4 | ||||
| -rw-r--r-- | src/map-editor/src/Struct/Model.elm | 10 | 
4 files changed, 9 insertions, 9 deletions
| diff --git a/src/battle/src/Constants/IO.elm.m4 b/src/battle/src/Constants/IO.elm.m4 index e91cdc0..ab17c90 100644 --- a/src/battle/src/Constants/IO.elm.m4 +++ b/src/battle/src/Constants/IO.elm.m4 @@ -10,7 +10,7 @@ character_turn_handler : String  character_turn_handler = (map_handler_url ++ "/btl_character_turn")  map_loading_handler : String -map_loading_handler = (map_handler_url ++ "/btl_load_state") +map_loading_handler = (map_handler_url ++ "/btl_load")  tile_assets_url : String  tile_assets_url = (base_url ++ "/asset/svg/tile/") diff --git a/src/map-editor/src/Comm/LoadMap.elm b/src/map-editor/src/Comm/LoadMap.elm index 2907f3a..2d53e80 100644 --- a/src/map-editor/src/Comm/LoadMap.elm +++ b/src/map-editor/src/Comm/LoadMap.elm @@ -25,7 +25,7 @@ try_encoding model =           [              ("stk", (Json.Encode.string model.session_token)),              ("pid", (Json.Encode.string model.player_id)), -            ("mix", (Json.Encode.string model.map_ix)) +            ("mid", (Json.Encode.string model.map_id))           ]        )     ) diff --git a/src/map-editor/src/Constants/IO.elm.m4 b/src/map-editor/src/Constants/IO.elm.m4 index 07043dc..ed66c79 100644 --- a/src/map-editor/src/Constants/IO.elm.m4 +++ b/src/map-editor/src/Constants/IO.elm.m4 @@ -7,10 +7,10 @@ map_editor_handler_url : String  map_editor_handler_url = (base_url ++ "/handler/map-editor")  map_update_handler : String -map_update_handler = (map_editor_handler_url ++ "/me_update") +map_update_handler = (map_editor_handler_url ++ "/map_update")  map_loading_handler : String -map_loading_handler = (map_editor_handler_url ++ "/me_load_state") +map_loading_handler = (map_editor_handler_url ++ "/map_load")  tile_assets_url : String  tile_assets_url = (base_url ++ "/asset/svg/tile/") diff --git a/src/map-editor/src/Struct/Model.elm b/src/map-editor/src/Struct/Model.elm index 634867e..5e6eef7 100644 --- a/src/map-editor/src/Struct/Model.elm +++ b/src/map-editor/src/Struct/Model.elm @@ -35,7 +35,7 @@ type alias Type =        tiles: (Dict.Dict Struct.Tile.Ref Struct.Tile.Type),        error: (Maybe Struct.Error.Type),        player_id: String, -      map_ix: String, +      map_id: String,        session_token: String,        ui: Struct.UI.Type     } @@ -50,7 +50,7 @@ type alias Type =  new : Struct.Flags.Type -> Type  new flags =     let -      maybe_map_ix = (Struct.Flags.maybe_get_param "id" flags) +      maybe_map_id = (Struct.Flags.maybe_get_param "id" flags)        model =           {              toolbox = (Struct.Toolbox.default), @@ -58,7 +58,7 @@ new flags =              map = (Struct.Map.empty),              tiles = (Dict.empty),              error = Nothing, -            map_ix = "", +            map_id = "",              player_id =                 (                    if (flags.user_id == "") @@ -69,7 +69,7 @@ new flags =              ui = (Struct.UI.default)           }     in -      case maybe_map_ix of +      case maybe_map_id of           Nothing ->              (invalidate                 (Struct.Error.new @@ -79,7 +79,7 @@ new flags =                 model              ) -         (Just id) -> {model | map_ix = id} +         (Just id) -> {model | map_id = id}  add_tile : Struct.Tile.Type -> Type -> Type  add_tile tl model = | 


