From 6ca8f6fbb8083db156c906e848173e827de838ef Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 27 Mar 2019 18:24:38 +0100 Subject: It compiles again! --- .../battle-characters/BattleCharacters/Struct/GlyphBoard.elm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/shared/battle-characters/BattleCharacters/Struct/GlyphBoard.elm') diff --git a/src/shared/battle-characters/BattleCharacters/Struct/GlyphBoard.elm b/src/shared/battle-characters/BattleCharacters/Struct/GlyphBoard.elm index 7d08ec0..e8fa0f6 100644 --- a/src/shared/battle-characters/BattleCharacters/Struct/GlyphBoard.elm +++ b/src/shared/battle-characters/BattleCharacters/Struct/GlyphBoard.elm @@ -2,6 +2,7 @@ module BattleCharacters.Struct.GlyphBoard exposing ( Type, Ref, + find, get_name, get_id, get_slots, @@ -15,6 +16,8 @@ module BattleCharacters.Struct.GlyphBoard exposing -- Elm ------------------------------------------------------------------------- import Array +import Dict + import List import Json.Decode @@ -46,6 +49,12 @@ type alias Ref = String -------------------------------------------------------------------------------- -- EXPORTED -------------------------------------------------------------------- -------------------------------------------------------------------------------- +find : (Dict.Dict Ref Type) -> Ref -> Type +find dict ref = + case (Dict.get ref dict) of + (Just e) -> e + Nothing -> none + get_id : Type -> String get_id g = g.id -- cgit v1.2.3-70-g09d2