From 5d77cdfd76be425181d218a2d5dd0e5e3a624304 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Mon, 14 Apr 2025 07:39:12 -0700 Subject: Removes space-age specific event handlers --- control.lua | 81 ------------------------------------------------------------- 1 file changed, 81 deletions(-) (limited to 'control.lua') 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) -- cgit v1.2.1