summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-26 19:13:04 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-26 19:13:04 +0200
commit33e57128d48a012533c42635f52037fcdedd4c56 (patch)
tree05deb83b77311d25168e5966c14c1bf20f17fb79 /client/elm/battlemap/src/Model.elm
parent9293fb062b0bf66995c72b30e037c762318be000 (diff)
Range indicators are now clickable.
Diffstat (limited to 'client/elm/battlemap/src/Model.elm')
-rw-r--r--client/elm/battlemap/src/Model.elm28
1 files changed, 19 insertions, 9 deletions
diff --git a/client/elm/battlemap/src/Model.elm b/client/elm/battlemap/src/Model.elm
index f5f57c0..4303b6f 100644
--- a/client/elm/battlemap/src/Model.elm
+++ b/client/elm/battlemap/src/Model.elm
@@ -1,4 +1,4 @@
-module Model exposing (Type, State(..))
+module Model exposing (Type, CharacterSelection, State(..))
import Dict
@@ -7,22 +7,32 @@ import Battlemap.Navigator
import Battlemap.Location
import Battlemap.RangeIndicator
+import Error
+
import Character
+type alias CharacterSelection =
+ {
+ character: Character.Ref,
+ navigator: Battlemap.Navigator.Type,
+ range_indicator:
+ (Dict.Dict
+ Battlemap.Location.Ref
+ Battlemap.RangeIndicator.Type
+ )
+ }
+
type State =
Default
- | MovingCharacter Character.Ref
+ | Error Error.Type
+ | MovingCharacterWithButtons
+ | MovingCharacterWithClick
+ | FocusingTile
--- MODEL
type alias Type =
{
state: State,
battlemap: Battlemap.Type,
- navigator: (Maybe Battlemap.Navigator.Type),
characters: (Dict.Dict Character.Ref Character.Type),
- range_indicator:
- (Dict.Dict
- Battlemap.Location.Ref
- Battlemap.RangeIndicator.Type
- )
+ selection: (Maybe CharacterSelection)
}