-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatatypes.lua
56 lines (51 loc) · 1.62 KB
/
datatypes.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
48
49
50
51
52
53
54
55
56
-- MODULE DATATYPES.LUA
-- by Garran Plum
--
-- Lua functions that return Foundation datatypes and built-in IDs for all GP mods.
--
-- FUNCTION ASSIGNMENTS
-- IMPORT GP OBJECT
local myMod, GP = ...
local datatypes = {
building = {
registrationType = "BUILDING",
part = "BUILDING_PART",
constructor = "BUILDING_CONSTRUCTOR_DEFAULT",
processor = "BUILDING_ASSET_PROCESSOR",
generatorFunction = "BUILDING_FUNCTION_RESOURCE_GENERATOR",
generator = "GENERATOR",
object = "GP_OBJECT_CLASS",
component = "COMPONENT"
},
part = {
registrationType = "COMP_BUILDING_PART",
type = "BUILDING_PART_TYPE",
costList = "BUILDING_PART_COST_LIST",
default = "BUILDING_CONSTRUCTOR_DEFAULT"
},
prefab = {registrationType = "PREFAB"},
workplace = {registrationType = "BUILDING_FUNCTION_WORKPLACE"},
job = {
registrationType = "JOB",
character = "CHARACTER_SETUP",
behavior = "BEHAVIOR_WORK"
},
action = {append = "APPEND"},
override = {balancing = "DEFAULT_BALANCING"},
resource = {container = "COMP_RESOURCE_CONTAINER"}
}
local datatype
ids = {
monumentPole = "BUILDING_PART_MONUMENT_POLE",
jobProgression = "DEFAULT_JOB_PROGRESSION",
serf = "SERF",
newcomer = "NEWCOMER"
}
-- GP FUNCTION Datatypes
-- Returns a copy of the Foundation built-in datatypes table.
-- FUNCTIONAL, CLOSURE
function GP:datatypes() return GP:copyTable(datatypes) end
-- GP FUNCTION IDs
-- Returns a copy of the Foundation built-in words table.
-- FUNCTIONAL, CLOSURE
function GP:ids() return GP:copyTable(ids) end