| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src/map-editor')
| -rw-r--r-- | src/map-editor/src/Comm/LoadMap.elm | 8 | ||||
| -rw-r--r-- | src/map-editor/src/Comm/Send.elm | 8 | ||||
| -rw-r--r-- | src/map-editor/src/Comm/SendMapUpdate.elm | 2 | ||||
| -rw-r--r-- | src/map-editor/src/Struct/Toolbox.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/Struct/UI.elm | 6 | ||||
| -rw-r--r-- | src/map-editor/src/Update/PrettifySelectedTiles.elm | 4 | ||||
| -rw-r--r-- | src/map-editor/src/Update/SelectTab.elm | 2 | ||||
| -rw-r--r-- | src/map-editor/src/View/SubMenu.elm | 2 | ||||
| -rw-r--r-- | src/map-editor/src/View/SubMenu/TileStatus.elm | 2 | 
9 files changed, 19 insertions, 19 deletions
| diff --git a/src/map-editor/src/Comm/LoadMap.elm b/src/map-editor/src/Comm/LoadMap.elm index fb6e597..7eb92c8 100644 --- a/src/map-editor/src/Comm/LoadMap.elm +++ b/src/map-editor/src/Comm/LoadMap.elm @@ -21,8 +21,8 @@ import Struct.Model  --------------------------------------------------------------------------------  -- LOCAL -----------------------------------------------------------------------  -------------------------------------------------------------------------------- -try_encoding : Struct.Model.Type -> (Maybe Json.Encode.Value) -try_encoding model = +maybe_encode : Struct.Model.Type -> (Maybe Json.Encode.Value) +maybe_encode model =     (Just        (Json.Encode.object           [ @@ -46,8 +46,8 @@ try_encoding model =  --------------------------------------------------------------------------------  try : Struct.Model.Type -> (Maybe (Cmd Struct.Event.Type))  try model = -   (Comm.Send.try_sending +   (Comm.Send.maybe_send        model        Constants.IO.map_loading_handler -      try_encoding +      maybe_encod     ) diff --git a/src/map-editor/src/Comm/Send.elm b/src/map-editor/src/Comm/Send.elm index 69e977d..1b4c9d9 100644 --- a/src/map-editor/src/Comm/Send.elm +++ b/src/map-editor/src/Comm/Send.elm @@ -1,4 +1,4 @@ -module Comm.Send exposing (try_sending, empty_request) +module Comm.Send exposing (maybe_send, empty_request)  -- Elm -------------------------------------------------------------------------  import Http @@ -56,14 +56,14 @@ decode =  --------------------------------------------------------------------------------  -- EXPORTED --------------------------------------------------------------------  -------------------------------------------------------------------------------- -try_sending : ( +maybe_send : (        Struct.Model.Type ->        String ->        (Struct.Model.Type -> (Maybe Json.Encode.Value)) ->        (Maybe (Cmd Struct.Event.Type))     ) -try_sending model recipient try_encoding_fun = -   case (try_encoding_fun model) of +maybe_send model recipient maybe_encod_fun = +   case (maybe_encod_fun model) of        (Just serial) ->           (Just              (Http.post diff --git a/src/map-editor/src/Comm/SendMapUpdate.elm b/src/map-editor/src/Comm/SendMapUpdate.elm index d7c149d..0dc65da 100644 --- a/src/map-editor/src/Comm/SendMapUpdate.elm +++ b/src/map-editor/src/Comm/SendMapUpdate.elm @@ -65,7 +65,7 @@ encode_map model =  try : Struct.Model.Type -> (Maybe (Cmd Struct.Event.Type))  try model = -   (Comm.Send.try_sending +   (Comm.Send.maybe_send        model        Constants.IO.map_update_handler        encode_map diff --git a/src/map-editor/src/Struct/Toolbox.elm b/src/map-editor/src/Struct/Toolbox.elm index fcd3b58..3cec795 100644 --- a/src/map-editor/src/Struct/Toolbox.elm +++ b/src/map-editor/src/Struct/Toolbox.elm @@ -145,7 +145,7 @@ get_filled_tiles : (        (List BattleMap.Struct.Location.Type)     )  get_filled_tiles selection map loc = -   case (BattleMap.Struct.Map.try_getting_tile_at loc map) of +   case (BattleMap.Struct.Map.maybe_get_tile_at loc map) of        Nothing -> []        (Just target) ->           let @@ -153,7 +153,7 @@ get_filled_tiles selection map loc =                 (BattleMap.Struct.TileInstance.get_class_id target)              map_match_fun =                 (\e -> -                  (case (BattleMap.Struct.Map.try_getting_tile_at e map) of +                  (case (BattleMap.Struct.Map.maybe_get_tile_at e map) of                       Nothing -> False                       (Just t) ->                          ( diff --git a/src/map-editor/src/Struct/UI.elm b/src/map-editor/src/Struct/UI.elm index f295e19..4d20171 100644 --- a/src/map-editor/src/Struct/UI.elm +++ b/src/map-editor/src/Struct/UI.elm @@ -9,7 +9,7 @@ module Struct.UI exposing        reset_zoom_level,        mod_zoom_level,        -- Tab -      try_getting_displayed_tab, +      maybe_get_displayed_tab,        set_displayed_tab,        reset_displayed_tab,        to_string, @@ -73,8 +73,8 @@ mod_zoom_level : Float -> Type -> Type  mod_zoom_level mod ui = {ui | zoom_level = (mod * ui.zoom_level)}  -- Tab ------------------------------------------------------------------------- -try_getting_displayed_tab : Type -> (Maybe Tab) -try_getting_displayed_tab ui = ui.displayed_tab +maybe_get_displayed_tab : Type -> (Maybe Tab) +maybe_get_displayed_tab ui = ui.displayed_tab  set_displayed_tab : Tab -> Type -> Type  set_displayed_tab tab ui = {ui | displayed_tab = (Just tab)} diff --git a/src/map-editor/src/Update/PrettifySelectedTiles.elm b/src/map-editor/src/Update/PrettifySelectedTiles.elm index a55eb67..c844ae2 100644 --- a/src/map-editor/src/Update/PrettifySelectedTiles.elm +++ b/src/map-editor/src/Update/PrettifySelectedTiles.elm @@ -31,7 +31,7 @@ neighborhood_tile_instances : (  neighborhood_tile_instances loc map =     (List.map        (\e -> -         case (BattleMap.Struct.Map.try_getting_tile_at e map) of +         case (BattleMap.Struct.Map.maybe_get_tile_at e map) of              Nothing -> (BattleMap.Struct.TileInstance.error -1 -1)              (Just t) -> t        ) @@ -106,7 +106,7 @@ apply_to_location : (        BattleMap.Struct.Map.Type     )  apply_to_location model loc map = -   case (BattleMap.Struct.Map.try_getting_tile_at loc map) of +   case (BattleMap.Struct.Map.maybe_get_tile_at loc map) of        Nothing -> map        (Just base) ->           let diff --git a/src/map-editor/src/Update/SelectTab.elm b/src/map-editor/src/Update/SelectTab.elm index 2a41303..86ef4e7 100644 --- a/src/map-editor/src/Update/SelectTab.elm +++ b/src/map-editor/src/Update/SelectTab.elm @@ -18,7 +18,7 @@ apply_to : (        (Struct.Model.Type, (Cmd Struct.Event.Type))     )  apply_to model tab = -   if ((Struct.UI.try_getting_displayed_tab model.ui) == (Just tab)) +   if ((Struct.UI.maybe_get_displayed_tab model.ui) == (Just tab))     then        (           {model | ui = (Struct.UI.reset_displayed_tab model.ui)}, diff --git a/src/map-editor/src/View/SubMenu.elm b/src/map-editor/src/View/SubMenu.elm index 7547e17..8717ac0 100644 --- a/src/map-editor/src/View/SubMenu.elm +++ b/src/map-editor/src/View/SubMenu.elm @@ -44,7 +44,7 @@ get_inner_html model tab =  --------------------------------------------------------------------------------  get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type)  get_html model = -   case (Struct.UI.try_getting_displayed_tab model.ui) of +   case (Struct.UI.maybe_get_displayed_tab model.ui) of        (Just tab) ->           (Html.div              [(Html.Attributes.class "sub-menu")] diff --git a/src/map-editor/src/View/SubMenu/TileStatus.elm b/src/map-editor/src/View/SubMenu/TileStatus.elm index eb61a2f..bc677f3 100644 --- a/src/map-editor/src/View/SubMenu/TileStatus.elm +++ b/src/map-editor/src/View/SubMenu/TileStatus.elm @@ -127,7 +127,7 @@ get_tile_info_html : (        (Html.Html Struct.Event.Type)     )  get_tile_info_html model loc = -   case (BattleMap.Struct.Map.try_getting_tile_at loc model.map) of +   case (BattleMap.Struct.Map.maybe_get_tile_at loc model.map) of        (Just tile) ->           (Html.div              [ | 


