summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-21 15:54:23 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-21 15:54:23 +0200
commit7b9ac4352353203fd1422a93fc7ef3a0daf8a768 (patch)
treec665719fe4385ae6d985a1c5d48ad655e4ead9bf
parent1b72f37fc04cd7851bd2f289d7776a1c7c35f48d (diff)
Improves path indicators.
-rw-r--r--client/elm/battlemap/src/Battlemap/Navigator.elm14
1 files changed, 12 insertions, 2 deletions
diff --git a/client/elm/battlemap/src/Battlemap/Navigator.elm b/client/elm/battlemap/src/Battlemap/Navigator.elm
index d26a56a..e821ac0 100644
--- a/client/elm/battlemap/src/Battlemap/Navigator.elm
+++ b/client/elm/battlemap/src/Battlemap/Navigator.elm
@@ -64,7 +64,17 @@ go battlemap nav dir =
)
of
Nothing -> battlemap
- (Just bmap) -> bmap
+ (Just bmap0) ->
+ (case
+ (apply_to_tile
+ bmap0
+ next_location
+ (set_direction dir)
+ )
+ of
+ Nothing -> battlemap
+ (Just bmap1) -> bmap1
+ )
),
{nav |
current_location = next_location,
@@ -92,7 +102,7 @@ go battlemap nav dir =
(case
(apply_to_tile
battlemap
- next_location
+ nav.current_location
(set_direction None)
)
of