1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-03-03 14:53:01 +02:00

Make spawn chest indestructible/unminable

This commit is contained in:
James Gillham 2020-11-19 19:30:41 +00:00
parent 473874be35
commit 1d0aaabf58
2 changed files with 16 additions and 1 deletions

View File

@ -1560,6 +1560,16 @@ Public.deactivate_callback =
end
)
Public.scenario_chest_callback = Token.register(function(chest)
if not chest or not chest.valid then
return
end
chest.destructible = false
chest.minable = false
end)
local function turret_died(event)
local entity = event.entity
if not entity or not entity.valid then

View File

@ -823,12 +823,17 @@ local function init(config)
)
}
local chest = {
callback = outpost_builder.scenario_chest_callback
}
local spawn = {
size = 2,
[1] = {
market = market,
chest = chest,
[15] = {entity = {name = 'market', force = 'neutral', callback = 'market'}},
[18] = {entity = {name = 'wooden-chest', force = 'player', destructible=false, minable=false}}
[18] = {entity = {name = 'wooden-chest', force = 'player', callback = 'chest'}}
},
[2] = {
force = 'player',