1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00
This commit is contained in:
Jayefuu 2020-11-25 21:19:35 +00:00
parent fa70f1e832
commit 2dffbba928

View File

@ -235,6 +235,10 @@ local function strike(args, player)
local xpos=coords[1] local xpos=coords[1]
local ypos=coords[2] 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 -- 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 inv = dropbox.get_inventory(defines.inventory.chest)
local capCount = inv.get_item_count("poison-capsule") local capCount = inv.get_item_count("poison-capsule")