Code: Select all
/c
local player = game.player
local surface = player.surface
local position = player.position
position.x = position.x + 5
local spill_items = surface.spill_item_stack(
position, --[[position]]
{name = "iron-plate", count = 1}, --[[items]]
true --[[enable_looted]]
)
local original = spill_items[1]
game.print(game.tick.." original to be looted? "..tostring(original.to_be_looted))
position.y = position.y - 1
local clone = original.clone{
position = position
}
game.print(game.tick.." clone to be looted? "..tostring(clone.to_be_looted))