1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

added collapse alert #229

This commit is contained in:
Maik Wild 2018-10-16 16:38:58 +02:00
parent 1ea0f7018c
commit 91d6d8acc3

View File

@ -105,11 +105,20 @@ local function create_collapse_template(positions, surface)
return entities
end
local function create_collapse_alert(surface, position)
local target = surface.create_entity{position = position, name = "sand-rock-big"}
for _,player in pairs(game.connected_players) do
player.add_custom_alert(target, {type="item", name="stone"}, "Cave collapsed!", true)
end
target.destroy()
end
local function collapse(args)
local position = args.position
local surface = args.surface
local positions = {}
local strength = config.collapse_threshold_total_strength
create_collapse_alert(surface, position)
mask_disc_blur(
position.x, position.y,
strength,