SS3D icon indicating copy to clipboard operation
SS3D copied to clipboard

Child Container doesn't display name

Open cosmiccoincidence opened this issue 2 years ago • 2 comments

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.

cosmiccoincidence avatar Mar 12 '22 18:03 cosmiccoincidence

Looking at the current GetName() method for containers in AttachedContainers.cs I see that it gets a name based on a IExaminable component: image

The fridge body has such a component the door how ever does not : image

Adding one to the door: image

Voilà: image

Disclaimer Sorry if this comment is not formatted correctly please tell me if anything should be formatted differently thanks.

80sVectorz avatar Apr 29 '22 08:04 80sVectorz

@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.

cosmiccoincidence avatar Jun 26 '22 20:06 cosmiccoincidence