| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/map-editor')
| -rw-r--r-- | src/map-editor/src/Comm/LoadMap.elm | 6 | ||||
| -rw-r--r-- | src/map-editor/src/Comm/SendMapUpdate.elm | 6 | ||||
| -rw-r--r-- | src/map-editor/src/ElmModule/Init.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/Main.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/Struct/Model.elm | 8 | ||||
| -rw-r--r-- | src/map-editor/src/Struct/Toolbox.elm | 10 | ||||
| -rw-r--r-- | src/map-editor/src/Update/GoToMainMenu.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/Update/HandleServerReply.elm | 13 | ||||
| -rw-r--r-- | src/map-editor/src/Update/PrettifySelectedTiles.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/View/SubMenu.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/View/SubMenu/TileStatus.elm | 2 | 
11 files changed, 35 insertions, 30 deletions
| diff --git a/src/map-editor/src/Comm/LoadMap.elm b/src/map-editor/src/Comm/LoadMap.elm index e44612b..3f31595 100644 --- a/src/map-editor/src/Comm/LoadMap.elm +++ b/src/map-editor/src/Comm/LoadMap.elm @@ -4,7 +4,7 @@ module Comm.LoadMap exposing (try)  import Json.Encode  -- Shared ---------------------------------------------------------------------- -import Struct.Flags +import Shared.Struct.Flags  -- Local Module ----------------------------------------------------------------  import Comm.Send @@ -28,12 +28,12 @@ maybe_encode model =           [              ("stk",                 (Json.Encode.string -                  (Struct.Flags.get_session_token model.flags) +                  (Shared.Struct.Flags.get_session_token model.flags)                 )              ),              ("pid",                 (Json.Encode.string -                  (Struct.Flags.get_user_id model.flags) +                  (Shared.Struct.Flags.get_user_id model.flags)                 )              ),              ("mid", (Json.Encode.string model.map_id)) diff --git a/src/map-editor/src/Comm/SendMapUpdate.elm b/src/map-editor/src/Comm/SendMapUpdate.elm index 0dc65da..79091c3 100644 --- a/src/map-editor/src/Comm/SendMapUpdate.elm +++ b/src/map-editor/src/Comm/SendMapUpdate.elm @@ -6,7 +6,7 @@ import Array  import Json.Encode  -- Shared ---------------------------------------------------------------------- -import Struct.Flags +import Shared.Struct.Flags  -- Battle Map ------------------------------------------------------------------  import BattleMap.Struct.Map @@ -34,12 +34,12 @@ encode_map model =           [              ("stk",                 (Json.Encode.string -                  (Struct.Flags.get_session_token model.flags) +                  (Shared.Struct.Flags.get_session_token model.flags)                 )              ),              ("pid",                 (Json.Encode.string -                  (Struct.Flags.get_user_id model.flags) +                  (Shared.Struct.Flags.get_user_id model.flags)                 )              ),              ("mid", (Json.Encode.string model.map_id)), diff --git a/src/map-editor/src/ElmModule/Init.elm b/src/map-editor/src/ElmModule/Init.elm index eb1fd2a..abb6d0f 100644 --- a/src/map-editor/src/ElmModule/Init.elm +++ b/src/map-editor/src/ElmModule/Init.elm @@ -1,7 +1,7 @@  module ElmModule.Init exposing (init)  -- Shared ---------------------------------------------------------------------- -import Struct.Flags +import Shared.Struct.Flags  -- Local Module ----------------------------------------------------------------  import Comm.LoadTilePatterns @@ -18,7 +18,7 @@ import Struct.Model  --------------------------------------------------------------------------------  -- EXPORTED --------------------------------------------------------------------  -------------------------------------------------------------------------------- -init : Struct.Flags.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type)) +init : Shared.Struct.Flags.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))  init flags =     let model = (Struct.Model.new flags) in        ( diff --git a/src/map-editor/src/Main.elm b/src/map-editor/src/Main.elm index 761cf4a..4c1615b 100644 --- a/src/map-editor/src/Main.elm +++ b/src/map-editor/src/Main.elm @@ -4,7 +4,7 @@ module Main exposing (main)  import Browser  -- Shared ---------------------------------------------------------------------- -import Struct.Flags +import Shared.Struct.Flags  -- Local Module ----------------------------------------------------------------  import Struct.Model @@ -15,7 +15,7 @@ import ElmModule.Subscriptions  import ElmModule.View  import ElmModule.Update -main : (Program Struct.Flags.Type Struct.Model.Type Struct.Event.Type) +main : (Program Shared.Struct.Flags.Type Struct.Model.Type Struct.Event.Type)  main =     (Browser.element        { diff --git a/src/map-editor/src/Struct/Model.elm b/src/map-editor/src/Struct/Model.elm index f0a8708..54b6e2c 100644 --- a/src/map-editor/src/Struct/Model.elm +++ b/src/map-editor/src/Struct/Model.elm @@ -12,7 +12,7 @@ module Struct.Model exposing  import Dict  -- Shared ---------------------------------------------------------------------- -import Struct.Flags +import Shared.Struct.Flags  -- Battle ----------------------------------------------------------------------  import Battle.Struct.Omnimods @@ -35,7 +35,7 @@ import Struct.UI  --------------------------------------------------------------------------------  type alias Type =     { -      flags : Struct.Flags.Type, +      flags : Shared.Struct.Flags.Type,        toolbox : Struct.Toolbox.Type,        help_request : Struct.HelpRequest.Type,        map : BattleMap.Struct.Map.Type, @@ -59,10 +59,10 @@ type alias Type =  --------------------------------------------------------------------------------  -- EXPORTED --------------------------------------------------------------------  -------------------------------------------------------------------------------- -new : Struct.Flags.Type -> Type +new : Shared.Struct.Flags.Type -> Type  new flags =     let -      maybe_map_id = (Struct.Flags.maybe_get_parameter "id" flags) +      maybe_map_id = (Shared.Struct.Flags.maybe_get_parameter "id" flags)        model =           {              flags = flags, diff --git a/src/map-editor/src/Struct/Toolbox.elm b/src/map-editor/src/Struct/Toolbox.elm index 3cec795..b66a5d4 100644 --- a/src/map-editor/src/Struct/Toolbox.elm +++ b/src/map-editor/src/Struct/Toolbox.elm @@ -21,7 +21,7 @@ module Struct.Toolbox exposing     )  -- Shared ---------------------------------------------------------------------- -import Util.List +import Shared.Util.List  -- Battle Map ------------------------------------------------------------------  import BattleMap.Struct.Location @@ -112,7 +112,7 @@ get_filled_tiles_internals : (        (List BattleMap.Struct.Location.Type)     )  get_filled_tiles_internals match_fun candidates result = -   case (Util.List.pop candidates) of +   case (Shared.Util.List.pop candidates) of        Nothing -> result        (Just (loc, remaining_candidates)) ->           if (match_fun loc) @@ -190,7 +190,11 @@ get_square_tiles corner map new_loc =           then (List.range corner.y new_loc.y)           else (List.range new_loc.y corner.y)     in -      (Util.List.product_map (BattleMap.Struct.Location.new) x_range y_range) +      (Shared.Util.List.product_map +         (BattleMap.Struct.Location.new) +         x_range +         y_range +      )  --------------------------------------------------------------------------------  -- EXPORTED -------------------------------------------------------------------- diff --git a/src/map-editor/src/Update/GoToMainMenu.elm b/src/map-editor/src/Update/GoToMainMenu.elm index c22e18e..3c7ca10 100644 --- a/src/map-editor/src/Update/GoToMainMenu.elm +++ b/src/map-editor/src/Update/GoToMainMenu.elm @@ -1,7 +1,7 @@  module Update.GoToMainMenu exposing (apply_to)  -- Shared ---------------------------------------------------------------------- -import Action.Ports +import Shared.Action.Ports  -- Battle ----------------------------------------------------------------------  import Constants.IO @@ -20,5 +20,5 @@ apply_to : Struct.Model.Type -> (Struct.Model.Type, (Cmd Struct.Event.Type))  apply_to model =     (        model, -      (Action.Ports.go_to (Constants.IO.base_url ++"/main-menu/")) +      (Shared.Action.Ports.go_to (Constants.IO.base_url ++"/main-menu/"))     ) diff --git a/src/map-editor/src/Update/HandleServerReply.elm b/src/map-editor/src/Update/HandleServerReply.elm index 14feff8..026c092 100644 --- a/src/map-editor/src/Update/HandleServerReply.elm +++ b/src/map-editor/src/Update/HandleServerReply.elm @@ -6,11 +6,11 @@ import Http  import Url  -- Shared ---------------------------------------------------------------------- -import Action.Ports +import Shared.Action.Ports -import Struct.Flags +import Shared.Struct.Flags -import Util.Http +import Shared.Util.Http  -- Battle Map ------------------------------------------------------------------  import BattleMap.Struct.Map @@ -41,7 +41,7 @@ disconnected current_state =        (           model,           [ -            (Action.Ports.go_to +            (Shared.Action.Ports.go_to                 (                    Constants.IO.base_url                    ++ "/login/?action=disconnect&goto=" @@ -49,7 +49,8 @@ disconnected current_state =                    (Url.percentEncode                       (                          "/map-editor/?" -                        ++ (Struct.Flags.get_parameters_as_url model.flags) +                        ++ +                        (Shared.Struct.Flags.get_parameters_as_url model.flags)                       )                    )                 ) @@ -144,7 +145,7 @@ apply_to model query_result =              (Struct.Model.invalidate                 (Struct.Error.new                    Struct.Error.Networking -                  (Util.Http.error_to_string error) +                  (Shared.Util.Http.error_to_string error)                 )                 model              ), diff --git a/src/map-editor/src/Update/PrettifySelectedTiles.elm b/src/map-editor/src/Update/PrettifySelectedTiles.elm index c844ae2..74d9288 100644 --- a/src/map-editor/src/Update/PrettifySelectedTiles.elm +++ b/src/map-editor/src/Update/PrettifySelectedTiles.elm @@ -6,7 +6,7 @@ import Dict  import Set  -- Shared ---------------------------------------------------------------------- -import Util.List +import Shared.Util.List  -- Battle Map ------------------------------------------------------------------  import BattleMap.Struct.Location @@ -80,7 +80,7 @@ nigh_pattern_to_border model full_neighborhood nigh_pattern =        case (Dict.get pattern model.tile_patterns) of           Nothing ->              case -               (Util.List.get_first +               (Shared.Util.List.get_first                    (\e ->                       (Struct.TilePattern.patterns_match                          pattern diff --git a/src/map-editor/src/View/SubMenu.elm b/src/map-editor/src/View/SubMenu.elm index 8717ac0..29f1e72 100644 --- a/src/map-editor/src/View/SubMenu.elm +++ b/src/map-editor/src/View/SubMenu.elm @@ -5,7 +5,7 @@ import Html  import Html.Attributes  -- Shared ---------------------------------------------------------------------- -import Util.Html +import Shared.Util.Html  -- Local Module ----------------------------------------------------------------  import Struct.Event @@ -52,4 +52,4 @@ get_html model =           )        Nothing -> -         (Util.Html.nothing) +         (Shared.Util.Html.nothing) diff --git a/src/map-editor/src/View/SubMenu/TileStatus.elm b/src/map-editor/src/View/SubMenu/TileStatus.elm index bc677f3..ef42163 100644 --- a/src/map-editor/src/View/SubMenu/TileStatus.elm +++ b/src/map-editor/src/View/SubMenu/TileStatus.elm @@ -7,7 +7,7 @@ import Html  import Html.Attributes  -- Shared ---------------------------------------------------------------------- -import Util.Html +import Shared.Util.Html  -- Battle ----------------------------------------------------------------------  import Battle.View.Omnimods | 


