diff --git a/map_gen/maps/crash_site/commands.lua b/map_gen/maps/crash_site/commands.lua index 6af46a9f..08dae498 100644 --- a/map_gen/maps/crash_site/commands.lua +++ b/map_gen/maps/crash_site/commands.lua @@ -235,6 +235,10 @@ local function strike(args, player) local xpos=coords[1] local ypos=coords[2] + -- Check the chest is still there. Better than making destructible and mineable false because then players can upgrade the chest + local entities = s.find_entities_filtered {position = {-0.5, -3.5}, type = 'container', limit=1} + local dropbox = entities[1] + -- Check the contents of the chest by spawn for enough poison capsules to use as payment local inv = dropbox.get_inventory(defines.inventory.chest) local capCount = inv.get_item_count("poison-capsule")