-
Notifications
You must be signed in to change notification settings - Fork 31
/
data.lua
87 lines (71 loc) · 2.6 KB
/
data.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
-- I created a few custom entities for making it clear that the shared power poles and chests are special.
local oarc_linked_chest=table.deepcopy(data.raw["container"]["wooden-chest"])
oarc_linked_chest.type="linked-container"
oarc_linked_chest.name="oarc-linked-chest"
oarc_linked_chest.inventory_type="with_filters_and_bar"
oarc_linked_chest.inventory_size=settings.startup["oarc-mod-linked-chest-size"].value --[[@as integer]]
oarc_linked_chest.picture.layers[1].filename = "__oarc-mod__/graphics/hr-oarc-linked-chest.png"
local oarc_linked_power=table.deepcopy(data.raw["electric-pole"]["small-electric-pole"])
oarc_linked_power.name="oarc-linked-power"
oarc_linked_power.pictures.layers[1].filename = "__oarc-mod__/graphics/hr-oarc-electric-pole.png"
data:extend({
{
type = "sprite",
name = "oarc-mod-sprite-40",
filename = "__oarc-mod__/icon_40x40.png",
width = 40,
height = 40
},
oarc_linked_chest, oarc_linked_power,
})
-- See control.lua for the event type defs to see what each event provides you.
data:extend({
-- A player was presented with the spawn options
{
type = "custom-event",
name = "oarc-mod-on-spawn-choices-gui-displayed",
},
-- A spawn area was created (and is finished generating)
{
type = "custom-event",
name = "oarc-mod-on-spawn-created",
},
-- A spawn area was REQUESTED to be removed. (Not that it has been removed already.)
{
type = "custom-event",
name = "oarc-mod-on-spawn-remove-request",
},
-- A player was reset (also called when a player is removed)
-- If you want just player removed, use native on_player_removed and/or on_pre_player_removed
{
type = "custom-event",
name = "oarc-mod-on-player-reset",
},
-- A player was spawned (sent to a new spawn OR joined a shared spawn)
{
type = "custom-event",
name = "oarc-mod-on-player-spawned",
},
-- A player moved from surface to space platform
{
type = "custom-event",
name = "oarc-mod-character-surface-changed",
},
-- A chunk was generated near a unique spawn
{
type = "custom-event",
name = "oarc-mod-on-chunk-generated-near-spawn",
},
-- An entry in storage.ocfg was changed
{
type = "custom-event",
name = "oarc-mod-on-config-changed",
},
-- A player's custom GUI panel (top right special button) was created
{
type = "custom-event",
name = "oarc-mod-on-mod-top-left-gui-created",
},
})
-- Make coins not hidden
data.raw["item"]["coin"].hidden = false