[0.18.19] rail duplication when building curved rail with some damaged rail items
Posted: Wed Apr 22, 2020 12:21 am
What and How
When- Having 1 undamaged rail
- At least 3 damaged rails
- Using the undamaged rail to build a curved rail
- The undamaged rail is used to place the whole curved rail
- The damaged rails remain unused
"the total item count of an item is used to determin if it's possible to place, but there are not enough items in all identical item stacks"
Reproduce
Code: Select all
/c
game.player.insert{name = "rail", count = 2}
game.player.insert{name = "rail", count = 3, health = 0.9}
(1 additional to place the starting rail)
Expected
It should not be possible to place the entity in this case.Whenever there is any kind of mismatch in identity between stacks, there is no way to know how to merge them.
Especially when the item is an item-with-tags.
Or well in this case specific case i guess it could use the average health value of all items used.
Up to you how to deal with it