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:
parent
473874be35
commit
1d0aaabf58
@ -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
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user