[2.0.20][scripting] Rocket silo get_output_inventory returns the modules inventory
Posted: Thu Nov 21, 2024 10:46 pm
I was trying to get a count of the number of rockets ready in the Rocket Silo and found out that `get_output_inventory` on a rocket silo seems to return the modules inventory instead.
Steps to reproduce:
1. create a rocket silo
2. add modules to the silo
3. mouse hover the silo
4. run the following script
Expected:
Either return the count of rockets ready to launch or `nil` (in this case fail as I'm trying to access an item on a `nil` array)
Actual:
Got the modules array, as verified in console output
Steps to reproduce:
1. create a rocket silo
2. add modules to the silo
3. mouse hover the silo
4. run the following script
Code: Select all
game.player.print(game.player.selected.get_output_inventory()[1])
Either return the count of rockets ready to launch or `nil` (in this case fail as I'm trying to access an item on a `nil` array)
Actual:
Got the modules array, as verified in console output
Code: Select all
[LuaItemStack: 4x {speed-module-3, normal}]