Page 1 of 1

[1.1.74] Cloned item-on-ground loses to_be_looted = true

Posted: Thu Jan 05, 2023 12:57 am
by Honktown
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))


Re: [1.1.74] Cloned item-on-ground loses to_be_looted = true

Posted: Thu Jan 05, 2023 12:59 am
by Honktown
result:

Re: [1.1.74] Cloned item-on-ground loses to_be_looted = true

Posted: Thu Jan 05, 2023 1:31 am
by Rseding91
Thanks for the report. It's now fixed for the next release.