If you have an armor item and that item has a grid, then LuaItemStack.grid will return the grid even if it is a brand new item. The armor has nothing in the grid, yet it still returns the grid so things can be added to the grid via script.
The same thing does not hold true for a spidertron. On a new item LuaItemStack.grid will return nil, even though the spidertron should have a grid. If the entity is placed, has something added to the grid, then mined again, the LuaItemStack.grid will return the grid if there is something in it.
Steps to reproduce:
With power armor in cursor:
Code: Select all
/c game.print(game.player.cursor_stack.grid)
Code: Select all
/c game.print(game.player.cursor_stack.grid)
If this is not a bug then I will be making an interface request instead because currently it doesn't seem possible to automate grid equipment population before vehicle deployment.