aboutsummaryrefslogtreecommitdiff
path: root/control.lua
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2025-04-14 07:39:12 -0700
committerPaul Oliver <contact@pauloliver.dev>2025-04-14 07:39:12 -0700
commit5d77cdfd76be425181d218a2d5dd0e5e3a624304 (patch)
tree8f49150fced98e2dcf40488b0c92661cf4396e70 /control.lua
parentbbab8621a216d1bf5a1c329eca56cdfa43add3b6 (diff)
Removes space-age specific event handlers
Diffstat (limited to 'control.lua')
-rw-r--r--control.lua81
1 files changed, 0 insertions, 81 deletions
diff --git a/control.lua b/control.lua
index 6669beb..27e1190 100644
--- a/control.lua
+++ b/control.lua
@@ -305,85 +305,4 @@ script.on_init(function ()
script.on_event(defines.events.on_player_created, on_player_created)
script.on_configuration_changed(updateInventory)
-
- if(script.active_mods["space-age"]) then
- local filter_built = {{filter = "name", name = "cargo-landing-pad"}}
- storage = {
- power_interfaces = {},
- heat_intefaces = {}
- }
- script.on_event(defines.events.on_marked_for_deconstruction,on_deconstruction,{{filter = "name", name = "cargo-pod-container"}})
- script.on_event(defines.events.on_space_platform_changed_state, function (event)
- if(event.platform.state == defines.space_platform_state.waiting_at_station) then
- local surface = game.get_surface(event.platform.space_location.name)
- if(surface) then
- event.platform.force.chart(surface, {{-50, -50}, {50, 50}})
- end
- end
- end)
-
- script.on_event(defines.events.script_raised_built, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if (entity.name == "cargo-landing-pad") then
- create_power_source(entity)
- end
- end, filter_built)
- script.on_event(defines.events.on_built_entity, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if entity.name == "cargo-landing-pad" then
- create_power_source(entity)
- end
- end, filter_built)
- script.on_event(defines.events.on_robot_built_entity, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if entity.name == "cargo-landing-pad" then
- create_power_source(entity)
- end
- end, filter_built)
-
- script.on_event(defines.events.on_entity_died, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if entity.name == "cargo-landing-pad" then
- destroy_power_source(entity)
- end
- end, filter_built)
-
- ---@param event script_raised_destroy
- script.on_event(defines.events.script_raised_destroy, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if entity.name == "cargo-landing-pad" then
- destroy_power_source(entity)
- end
- end, filter_built)
-
- ---@param event on_player_mined_entity
- script.on_event(defines.events.on_player_mined_entity, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if entity.name == "cargo-landing-pad" then
- destroy_power_source(entity)
- end
- end, filter_built)
-
- ---@param event on_robot_mined_entity
- script.on_event(defines.events.on_robot_mined_entity, function(event)
- local entity = event.entity or event.created_entity
- if not entity or not entity.valid then return end
-
- if entity.name == "cargo-landing-pad" then
- destroy_power_source(entity)
- end
- end, filter_built)
- end
end)