forked from jsb/Gatherer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.lua
47 lines (38 loc) · 1.05 KB
/
constants.lua
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
46
47
-- Here will be ~dragons~ all the constants, enums, types for type hinting, etc
--
-- Gatherer_EGatherType = {treasure=0, herb=1, ore=2}
Gatherer_EGatherType = {
[0] = "Treasure",
[1] = "Herb",
[2] = "Ore",
[3] = "Default",
["Treasure"] = 0,
["Herb"] = 1,
["Ore"] = 2,
["Default"] = 3,
};
function Gatherer_EGatherType_ensureIndex(gatherType)
-- type: (Gatherer_EGatherType) -> gatherTypeIndex
local gatherTypeIndex
if type(gatherType) == "string" then
return Gatherer_EGatherType[gatherType];
end
return gatherType;
end
-- EGatherEventType = {normal=0, no_skill=1, fishing=2}
-- Continent = int
-- Zone = int
-- ZoneName = Text
-- IconName = Text
-- IconIndex = int
-- Icon = Union[IconName, IconIndex]
-- GatherName = Text
-- NodeInfo = Dict[Text, Union[int,float]]
-- GathererDb = Dict[Continent, Dict[Zone, Dict[GatherName, List[NodeInfo]]]]
-- Color = Tuple[int, int, int] -- r, g, b
-- FloatColor = Tuple[float, float, float]
-- HexColor = Text
Gatherer_EBoolean = {
[true]='on',
[false]='off'
}