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/Armor.elm
parent4dcb831ddc1f30251b302b129a18c4e08b276989 (diff)
It compiles again!
Diffstat (limited to 'src/shared/battle-characters/BattleCharacters/Struct/Armor.elm')
-rw-r--r--src/shared/battle-characters/BattleCharacters/Struct/Armor.elm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/battle-characters/BattleCharacters/Struct/Armor.elm b/src/shared/battle-characters/BattleCharacters/Struct/Armor.elm
index 5cb99d6..93f768c 100644
--- a/src/shared/battle-characters/BattleCharacters/Struct/Armor.elm
+++ b/src/shared/battle-characters/BattleCharacters/Struct/Armor.elm
@@ -3,6 +3,7 @@ module BattleCharacters.Struct.Armor exposing
Type,
Ref,
new,
+ find,
get_id,
get_name,
get_image_id,
@@ -13,6 +14,8 @@ module BattleCharacters.Struct.Armor exposing
)
-- Elm -------------------------------------------------------------------------
+import Dict
+
import Json.Decode
import Json.Decode.Pipeline
@@ -38,6 +41,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
+
new : String -> String -> Battle.Struct.Omnimods.Type -> Type
new id name omnimods =
{