blob: 387164f704931f18aee24da2b083c4f7969f3dd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
module Data.Weapon exposing (generate_dict, shim_none)
-- Elm -------------------------------------------------------------------------
import Dict
-- Battlemap -------------------------------------------------------------------
import Struct.Weapon
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
dataset : (List (Int, Struct.Weapon.Type))
dataset =
[
-- TODO: have those in separate text files, and put them here only at
-- compilation.
(
0,
(Struct.Weapon.new
0
"None"
Struct.Weapon.Melee
Struct.Weapon.Short
Struct.Weapon.Blunt
Struct.Weapon.Light
)
)
]
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
generate_dict : (Dict.Dict Int Struct.Weapon.Type)
generate_dict = (Dict.fromList dataset)
-- Let's not handle the dict just yet.
shim_none : (Struct.Weapon.Type)
shim_none =
(Struct.Weapon.new
0
"None"
Struct.Weapon.Melee
Struct.Weapon.Short
Struct.Weapon.Blunt
Struct.Weapon.Light
)
|