summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-27 18:24:38 +0100
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-03-27 18:24:38 +0100
commit6ca8f6fbb8083db156c906e848173e827de838ef (patch)
tree3e887472de809bf8a2210a28e892c9d8782d75b8 /src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm
parent4dcb831ddc1f30251b302b129a18c4e08b276989 (diff)
It compiles again!
Diffstat (limited to 'src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm')
-rw-r--r--src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm b/src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm
index 4cadc6b..9a86fb4 100644
--- a/src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm
+++ b/src/shared/battle-characters/BattleCharacters/Struct/Glyph.elm
@@ -2,6 +2,7 @@ module BattleCharacters.Struct.Glyph exposing
(
Type,
Ref,
+ find,
get_name,
get_id,
get_omnimods,
@@ -11,6 +12,8 @@ module BattleCharacters.Struct.Glyph exposing
)
-- Elm -------------------------------------------------------------------------
+import Dict
+
import Json.Decode
import Json.Decode.Pipeline
@@ -36,6 +39,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 -> Ref
get_id g = g.id