summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-02 18:06:33 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-02 18:06:33 +0200
commitb985839577086b75a76d6e4647e806948af1fde8 (patch)
tree3c0cbffde61b2fb5258f1ccf6bbcc54385203a9f /src/battlemap/src/View/SubMenu/Timeline
parente045bdeec5ad17f43fbab7bde0ffe588dc0b90f0 (diff)
Separates player ID and player IX.
Diffstat (limited to 'src/battlemap/src/View/SubMenu/Timeline')
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline/Attack.elm8
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline/Movement.elm8
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm6
3 files changed, 11 insertions, 11 deletions
diff --git a/src/battlemap/src/View/SubMenu/Timeline/Attack.elm b/src/battlemap/src/View/SubMenu/Timeline/Attack.elm
index f41598b..875bc89 100644
--- a/src/battlemap/src/View/SubMenu/Timeline/Attack.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline/Attack.elm
@@ -121,11 +121,11 @@ get_attack_html attacker defender attack =
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.Attack ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id attack =
+get_html characters player_ix attack =
case
(
(Array.get attack.attacker_index characters),
@@ -140,8 +140,8 @@ get_html characters player_id attack =
]
(
[
- (View.Character.get_portrait_html player_id atkchar),
- (View.Character.get_portrait_html player_id defchar),
+ (View.Character.get_portrait_html player_ix atkchar),
+ (View.Character.get_portrait_html player_ix defchar),
(get_title_html atkchar defchar)
]
++
diff --git a/src/battlemap/src/View/SubMenu/Timeline/Movement.elm b/src/battlemap/src/View/SubMenu/Timeline/Movement.elm
index 36b0410..2f7acd3 100644
--- a/src/battlemap/src/View/SubMenu/Timeline/Movement.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline/Movement.elm
@@ -1,7 +1,7 @@
module View.SubMenu.Timeline.Movement exposing (get_html)
-- Elm -------------------------------------------------------------------------
-import Array
+import Array
import Html
import Html.Attributes
@@ -23,11 +23,11 @@ import View.Character
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.Movement ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id movement =
+get_html characters player_ix movement =
case (Array.get movement.character_index characters) of
(Just char) ->
(Html.div
@@ -36,7 +36,7 @@ get_html characters player_id movement =
(Html.Attributes.class "battlemap-timeline-movement")
]
[
- (View.Character.get_portrait_html player_id char),
+ (View.Character.get_portrait_html player_ix char),
(Html.text
(
(Struct.Character.get_name char)
diff --git a/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm b/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm
index 31d1a19..e66cfed 100644
--- a/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm
@@ -23,11 +23,11 @@ import View.Character
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.WeaponSwitch ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id weapon_switch =
+get_html characters player_ix weapon_switch =
case (Array.get weapon_switch.character_index characters) of
(Just char) ->
(Html.div
@@ -36,7 +36,7 @@ get_html characters player_id weapon_switch =
(Html.Attributes.class "battlemap-timeline-weapon-switch")
]
[
- (View.Character.get_portrait_html player_id char),
+ (View.Character.get_portrait_html player_ix char),
(Html.text
(
(Struct.Character.get_name char)