mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
Disallow deconstruction requests for support beams
This commit is contained in:
parent
8a0838cddb
commit
93794d1591
@ -291,6 +291,12 @@ function DiggyCaveCollapse.register(cfg)
|
||||
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)
|
||||
if (nil ~= support_beam_entities[event.entity.name]) then
|
||||
event.entity.cancel_deconstruction(game.players[event.player_index].force)
|
||||
end
|
||||
end)
|
||||
|
||||
enable_stress_grid = config.enable_stress_grid
|
||||
|
||||
on_surface_created({surface_index = 1})
|
||||
@ -426,15 +432,6 @@ on_surface_created = function(event)
|
||||
map[3] = {}
|
||||
map[4] = {}
|
||||
end
|
||||
--[[--
|
||||
Creates a new stress map if it doesn't exist yet and returns it.
|
||||
|
||||
@param surface LuaSurface
|
||||
@return Table [1,2,3,4] containing the quadrants
|
||||
]]
|
||||
local function get_stress_map(surface)
|
||||
return
|
||||
end
|
||||
|
||||
--[[--
|
||||
Checks whether a tile's pressure is within a given threshold and calls the handler if not.
|
||||
|
@ -85,12 +85,6 @@ function DiggyHole.register(config)
|
||||
diggy_hole(event.entity)
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_marked_for_deconstruction, function (event)
|
||||
if ('sand-rock-big' == event.entity.name) then
|
||||
event.entity.cancel_deconstruction(game.players[event.player_index].force)
|
||||
end
|
||||
end)
|
||||
|
||||
Event.add(defines.events.on_robot_mined_tile, function(event)
|
||||
on_mined_tile(event.robot.surface, event.tiles)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user