summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/roster-editor/src/Struct/Model.elm')
-rw-r--r--src/roster-editor/src/Struct/Model.elm36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/roster-editor/src/Struct/Model.elm b/src/roster-editor/src/Struct/Model.elm
index 4a5b5bf..65bce6e 100644
--- a/src/roster-editor/src/Struct/Model.elm
+++ b/src/roster-editor/src/Struct/Model.elm
@@ -7,6 +7,9 @@ module Struct.Model exposing
update_character_fun,
add_weapon,
add_armor,
+ add_portrait,
+ add_glyph,
+ add_glyph_board,
invalidate,
clear_error
)
@@ -119,6 +122,39 @@ add_armor ar model =
)
}
+add_portrait : Struct.Portrait.Type -> Type -> Type
+add_portrait pt model =
+ {model |
+ portraits =
+ (Dict.insert
+ (Struct.Portrait.get_id pt)
+ pt
+ model.portraits
+ )
+ }
+
+add_glyph : Struct.Glyph.Type -> Type -> Type
+add_glyph gl model =
+ {model |
+ glyphs =
+ (Dict.insert
+ (Struct.Glyph.get_id gl)
+ gl
+ model.glyphs
+ )
+ }
+
+add_glyph_board : Struct.GlyphBoard.Type -> Type -> Type
+add_glyph_board glb model =
+ {model |
+ glyph_boards =
+ (Dict.insert
+ (Struct.GlyphBoard.get_id glb)
+ glb
+ model.glyph_boards
+ )
+ }
+
update_character : Int -> Struct.Character.Type -> Type -> Type
update_character ix new_val model =
{model |