[2.0.57] LuaSurface.create_entity for a configured Spidertron LuaItemStack does not preserve the Equipment Grid
Posted: Thu Jun 19, 2025 5:45 pm
What did you do?
While working on a mod that deploys Spidertrons via script, I deployed a configured Spidertron via game.surfaces.nauvis.create_entity().
What happened?
The Spidertron was correctly deployed, but the configured Equipment Grid was missing. Name, Inventory Filters and Logistics Sections were preserved.
What did you expect to happen instead?
The Spidertron would be deployed with the Equipment Grid intact, along with the other preserved parameters.
Reproduction Steps?
1) Load the attached save.
2) Mine the Spidertron
3) Run the following command:
While working on a mod that deploys Spidertrons via script, I deployed a configured Spidertron via game.surfaces.nauvis.create_entity().
What happened?
The Spidertron was correctly deployed, but the configured Equipment Grid was missing. Name, Inventory Filters and Logistics Sections were preserved.
What did you expect to happen instead?
The Spidertron would be deployed with the Equipment Grid intact, along with the other preserved parameters.
Reproduction Steps?
1) Load the attached save.
2) Mine the Spidertron
3) Run the following command:
Code: Select all
/c local spider = game.players[1].get_inventory(defines.inventory.character_main).find_item_stack("spidertron") game.players[1].surface.create_entity{name = spider.prototype.place_result.name, position = {0,0}, force = "player", raise_build = true, item = spider}