[1.1.6] Spidertron item grid is not recognised
Posted: Thu Dec 17, 2020 2:15 am
I was originally going to post this as a modding interface request but after more investigation this might actually be a bug. The behaviour is at least inconsistent.
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:
With spidertron in cursor:
So it seems like a bug that the grid is not recognised from a fresh spidertron item.
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.
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.