summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/shared/battle-map')
-rw-r--r-- | src/shared/battle-map/BattleMap/Struct/Map.elm | 8 | ||||
-rw-r--r-- | src/shared/battle-map/BattleMap/View/TileInfo.elm | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/shared/battle-map/BattleMap/Struct/Map.elm b/src/shared/battle-map/BattleMap/Struct/Map.elm index cb0143e..cbab5b2 100644 --- a/src/shared/battle-map/BattleMap/Struct/Map.elm +++ b/src/shared/battle-map/BattleMap/Struct/Map.elm @@ -15,7 +15,7 @@ module BattleMap.Struct.Map exposing new, set_tile_to, solve_tiles, - try_getting_tile_at + maybe_get_tile_at ) -- Elm ------------------------------------------------------------------------- @@ -159,12 +159,12 @@ new width height tiles = markers = (Dict.empty) } -try_getting_tile_at : ( +maybe_get_tile_at : ( BattleMap.Struct.Location.Type -> Type -> (Maybe BattleMap.Struct.TileInstance.Type) ) -try_getting_tile_at loc map = +maybe_get_tile_at loc map = if (has_location loc map) then (Array.get (location_to_index loc map) map.content) else Nothing @@ -185,7 +185,7 @@ get_omnimods_at : ( Battle.Struct.Omnimods.Type ) get_omnimods_at loc dataset map = - case (try_getting_tile_at loc map) of + case (maybe_get_tile_at loc map) of Nothing -> (Battle.Struct.Omnimods.none) (Just tile_inst) -> (BattleMap.Struct.Tile.get_omnimods diff --git a/src/shared/battle-map/BattleMap/View/TileInfo.elm b/src/shared/battle-map/BattleMap/View/TileInfo.elm index 0dc57ff..3067bcb 100644 --- a/src/shared/battle-map/BattleMap/View/TileInfo.elm +++ b/src/shared/battle-map/BattleMap/View/TileInfo.elm @@ -121,7 +121,7 @@ get_html : ( ) get_html dataset loc_ref map = let loc = (BattleMap.Struct.Location.from_ref loc_ref) in - case (BattleMap.Struct.Map.try_getting_tile_at loc map) of + case (BattleMap.Struct.Map.maybe_get_tile_at loc map) of (Just tile_instance) -> let tile_data = |