mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-05 15:05:57 +02:00
removed on_void_added #229
This commit is contained in:
parent
178920f394
commit
cf8a427ab0
@ -265,13 +265,6 @@ local function on_void_removed(event)
|
||||
Task.set_timeout(3, on_new_tile_timeout_finished, {x = x, y = y})
|
||||
end
|
||||
|
||||
local function on_void_added(event)
|
||||
local strength = support_beam_entities['out-of-map']
|
||||
if strength then
|
||||
stress_map_add(event.surface, event.old_tile.position, -1 * strength)
|
||||
end
|
||||
end
|
||||
|
||||
--[[--
|
||||
Registers all event handlers.]
|
||||
|
||||
@ -297,7 +290,6 @@ function DiggyCaveCollapse.register(cfg)
|
||||
Event.add(defines.events.on_entity_died, on_mined_entity)
|
||||
Event.add(defines.events.on_player_mined_entity, on_mined_entity)
|
||||
Event.add(Template.events.on_void_removed, on_void_removed)
|
||||
Event.add(Template.events.on_void_added, on_void_added)
|
||||
Event.add(defines.events.on_surface_created, on_surface_created)
|
||||
|
||||
Event.add(defines.events.on_marked_for_deconstruction, function (event)
|
||||
|
@ -20,13 +20,6 @@ Template.events = {
|
||||
]]
|
||||
on_placed_entity = script.generate_event_name(),
|
||||
|
||||
--[[--
|
||||
Triggers when an 'out-of-map' tile is placed on something else.
|
||||
|
||||
{surface, old_tile={name, position={x, y}}}
|
||||
]]
|
||||
on_void_added = script.generate_event_name(),
|
||||
|
||||
--[[--
|
||||
Triggers when an 'out-of-map' tile is replaced by something else.
|
||||
|
||||
@ -37,7 +30,6 @@ Template.events = {
|
||||
|
||||
local function insert_next_tiles(data)
|
||||
local void_removed = {}
|
||||
local void_added = {}
|
||||
local surface = data.surface
|
||||
local get_tile = surface.get_tile
|
||||
local tiles = {}
|
||||
@ -58,13 +50,6 @@ local function insert_next_tiles(data)
|
||||
{surface = surface, old_tile = {name = current_tile.name, position = current_tile.position}}
|
||||
)
|
||||
end
|
||||
|
||||
if (new_is_void and not current_is_void) then
|
||||
insert(
|
||||
void_added,
|
||||
{surface = surface, old_tile = {name = current_tile.name, position = current_tile.position}}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
@ -76,10 +61,6 @@ local function insert_next_tiles(data)
|
||||
for _, event in pairs(void_removed) do
|
||||
raise_event(Template.events.on_void_removed, event)
|
||||
end
|
||||
|
||||
for _, event in pairs(void_added) do
|
||||
raise_event(Template.events.on_void_added, event)
|
||||
end
|
||||
end
|
||||
|
||||
local function insert_next_entities(data)
|
||||
|
Loading…
x
Reference in New Issue
Block a user