[1.1.74] Cloned item-on-ground loses to_be_looted = true
Posted: Thu Jan 05, 2023 12:57 am
If an item on the ground is to_be_looted, it loses the status when cloned:
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))