SS3D
SS3D copied to clipboard
Child Container doesn't display name
Summary
When opening a container that has a UI, the name of the container should be displayed at the top of the UI.
A recent PR (#875) added the functionality that allows for containers to be added to the child objects (instead of just the parent object) of prefabs. This works well but it was noticed that the UI for the container on the child object does not display a name even if given one within the "Container Descriptor" script on the child object.
Current Behavior
Containers on child objects don't display a container name.
Steps to Reproduce
Play the game. Open the fridge door. Right-click the fridge and open both containers. Notice the small one (the one on the child object (door)) does not display a name.
Expected Behavior
Possible Solution
All containers (that have a UI) should display a name.
Looking at the current GetName() method for containers in AttachedContainers.cs I see that it gets a name based on a IExaminable component:
The fridge body has such a component the door how ever does not :
Adding one to the door:
Voilà:
Disclaimer Sorry if this comment is not formatted correctly please tell me if anything should be formatted differently thanks.
@krijnlol sorry I or someone didn't get back to you sooner. I can't speak for everyone but I personally have been pretty busy the last few months. Anyway I see you found a fix for this issue, thanks! Feel free to make a PR for this change or maybe someone else will get around to it.