2024-09-21 03:39:01 +02:00
|
|
|
|
|
|
|
-- 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"
|
2024-09-23 04:18:22 +02:00
|
|
|
oarc_linked_chest.inventory_type="with_filters_and_bar"
|
|
|
|
oarc_linked_chest.inventory_size=settings.startup["oarc-mod-linked-chest-size"].value --[[@as integer]]
|
2024-10-21 19:48:42 +02:00
|
|
|
oarc_linked_chest.picture.layers[1].filename = "__oarc-mod__/graphics/hr-oarc-linked-chest.png"
|
2024-09-21 03:39:01 +02:00
|
|
|
|
|
|
|
|
|
|
|
local oarc_linked_power=table.deepcopy(data.raw["electric-pole"]["small-electric-pole"])
|
|
|
|
oarc_linked_power.name="oarc-linked-power"
|
2024-10-21 19:48:42 +02:00
|
|
|
oarc_linked_power.pictures.layers[1].filename = "__oarc-mod__/graphics/hr-oarc-electric-pole.png"
|
2024-09-21 03:39:01 +02:00
|
|
|
|
2024-09-10 17:40:19 +02:00
|
|
|
data:extend({
|
|
|
|
{
|
|
|
|
type = "sprite",
|
|
|
|
name = "oarc-mod-sprite-40",
|
|
|
|
filename = "__oarc-mod__/icon_40x40.png",
|
|
|
|
width = 40,
|
|
|
|
height = 40
|
2024-09-21 03:39:01 +02:00
|
|
|
},
|
2024-10-23 17:19:42 +02:00
|
|
|
oarc_linked_chest, oarc_linked_power,
|
2024-09-10 17:40:19 +02:00
|
|
|
})
|
2024-10-13 03:57:46 +02:00
|
|
|
|
2024-11-27 05:04:08 +02:00
|
|
|
-- See control.lua for the event type defs to see what each event provides you.
|
2024-10-23 17:19:42 +02:00
|
|
|
data:extend({
|
2024-11-27 05:04:08 +02:00
|
|
|
-- A player was presented with the spawn options
|
|
|
|
{
|
|
|
|
type = "custom-event",
|
|
|
|
name = "oarc-mod-on-spawn-choices-gui-displayed",
|
|
|
|
},
|
|
|
|
|
2024-10-23 17:19:42 +02:00
|
|
|
-- 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",
|
2024-10-28 00:04:55 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
-- A player moved from surface to space platform
|
|
|
|
{
|
|
|
|
type = "custom-event",
|
|
|
|
name = "oarc-mod-character-surface-changed",
|
2024-10-23 17:19:42 +02:00
|
|
|
},
|
2024-11-28 20:30:11 +02:00
|
|
|
|
|
|
|
-- 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",
|
|
|
|
},
|
2024-10-23 17:19:42 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
|
2024-10-13 03:57:46 +02:00
|
|
|
-- Make coins not hidden
|
2024-10-21 19:48:42 +02:00
|
|
|
data.raw["item"]["coin"].hidden = false
|