These spill all the mags as expected...
Code: Select all
-- This spills mags and fills 'spilled' with the array of 50 entities as expected..
local spilled = player.surface.spill_item_stack(
player.position,
{ name = "firearm-magazine", count = 50 }
)
-- This spills mags as expected (but no return obviously)
player.surface.spill_item_stack(
player.position,
{ name = "firearm-magazine", count = 50 },
true
)
Code: Select all
local badspill = player.surface.spill_item_stack(
player.position,
{ name = "firearm-magazine", count = 50 },
true
)
Mine the furnace and error will happen.