Page 1 of 1

Document behavior of LuaItemStack::grid inside on_robot_built_entity event

Posted: Mon Nov 25, 2024 3:40 pm
by robot256
Referencing my "bug" report on_robot_built_entity event ItemStack provides wrong grid.

The actual behavior in the on_robot_built_entity event is that before the event fires, the equipment grid in the item is moved to the new entity, and the equipment grid from the ghost entity is moved to the item. It would be good to mention that in the on_robot_built_entity event in the behavior of the "LuaItemStack stack" parameter.

I suspect the same thing might happen with the on_built_entity event and the items contained in the "LuaInventory consumed_items" parameter.