[187] PB API: GetInventory() returns null for refinery (and probably others)
Solved
It seems the GetInvetory() method without an index doesn't work for blocks that have more than one inventory.
Steps to reproduce:
1. Place a PB, battery and refinery
2. Paste to PB and start:
public void Main(string argument, UpdateType updateSource) { var block = GridTerminalSystem.GetBlockWithName("Refinery"); Echo($"HasInventory={block.HasInventory}"); Echo($"GetInventory()={block.GetInventory() != null}"); Echo($"GetInventory(0)={block.GetInventory(0) != null}"); Echo($"GetInventory(1)={block.GetInventory(1) != null}"); }
Files:
Output.jpg
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!