[187] PB API: GetInventory() returns null for refinery (and probably others)

Digi shared this bug 6 years ago
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}");
}

Replies (1)

photo
1

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

Leave a Comment
 
Attach a file