| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/roster-editor/src/Struct/Omnimods.elm | 2 | ||||
| -rw-r--r-- | src/roster-editor/src/View/CharacterCard.elm | 43 | 
2 files changed, 33 insertions, 12 deletions
| diff --git a/src/roster-editor/src/Struct/Omnimods.elm b/src/roster-editor/src/Struct/Omnimods.elm index 68f5233..4b43ec4 100644 --- a/src/roster-editor/src/Struct/Omnimods.elm +++ b/src/roster-editor/src/Struct/Omnimods.elm @@ -50,7 +50,7 @@ type alias GenericMod =  generic_mods_decoder : (Json.Decode.Decoder (Dict.Dict String Int))  generic_mods_decoder =     (Json.Decode.map -      (Dict.fromList) +      ((Dict.fromList) >> (Dict.remove "none"))        (Json.Decode.list           (Json.Decode.map              (\gm -> (gm.t, gm.v)) diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm index 877fe8d..7def8ae 100644 --- a/src/roster-editor/src/View/CharacterCard.elm +++ b/src/roster-editor/src/View/CharacterCard.elm @@ -13,6 +13,7 @@ import Html.Events  -- Roster Editor ---------------------------------------------------------------  import Struct.Armor +import Struct.Attributes  import Struct.Character  import Struct.Event  import Struct.GlyphBoard @@ -297,17 +298,6 @@ get_glyph_board_details board =              [                 (Html.text (Struct.GlyphBoard.get_name board))              ] -         ), -         (Html.div -            [ -               (Html.Attributes.class "info-card-omnimods-listing") -            ] -            (List.map -               (get_mod_html) -               (Struct.Omnimods.get_all_mods -                  (Struct.GlyphBoard.get_omnimods board) -               ) -            )           )        ]     ) @@ -373,6 +363,36 @@ get_relevant_stats stats =        ]     ) +get_attributes : ( +      Struct.Attributes.Type -> +      (Html.Html Struct.Event.Type) +   ) +get_attributes atts = +   (Html.div +      [ +         (Html.Attributes.class "character-card-stats"), +         (Html.Attributes.class "clickable"), +         (Html.Events.onClick +            (Struct.Event.TabSelected Struct.UI.GlyphManagementTab) +         ) +      ] +      [ +         (stat_name "Con"), +         (stat_val (Struct.Attributes.get_constitution atts) False), +         (stat_name "Dex"), +         (stat_val (Struct.Attributes.get_dexterity atts) False), +         (stat_name "Int"), +         (stat_val (Struct.Attributes.get_intelligence atts) False), +         (stat_name "Min"), +         (stat_val (Struct.Attributes.get_mind atts) False), +         (stat_name "Spe"), +         (stat_val (Struct.Attributes.get_speed atts) False), +         (stat_name "Str"), +         (stat_val (Struct.Attributes.get_strength atts) False) +      ] +   ) + +  --------------------------------------------------------------------------------  -- EXPORTED --------------------------------------------------------------------  -------------------------------------------------------------------------------- @@ -461,6 +481,7 @@ get_full_html char =              (get_armor_details omnimods armor),              (get_glyph_board_details (Struct.Character.get_glyph_board char)),              (get_relevant_stats char_statistics), +            (get_attributes (Struct.Character.get_attributes char)),              (get_weapon_summary damage_modifier secondary_weapon)           ]        ) | 


