SS3D icon indicating copy to clipboard operation
SS3D copied to clipboard

Container System Redesign & Rework

Open cosmiccoincidence opened this issue 3 years ago • 2 comments

Goal

Once hidden and implicit containers ( #652 ) are added there should only be one thing left to add to the container system, which would be the non-item support ( #653 ) for use with the tilemap system. (NOTE: 652 should be merged soon but if 653 is not worked on by the time someone wants to attempt this design, then 653 can be implemented with this.)

From here we will be left with quite a mess of various container-related functions and scripts... That's where this task comes in to design this whole mess into something more manageable.

Looking at the power cell charger prefab visualizes this mess for you. As it has 6 different scripts related to the container system. This is not very intuitive for a contributor to add a new container.

Unity_2yxGpcdvAA

This should be reduced down to 1 or 2 scripts that have the option to enable/disable certain aspects, change the type of container, set values, etc. Maybe like a 'Container Controller' script. This can be done using the editor customizer to prevent displaying a bunch of unusable variables.

This design would likely need to be done with communication in the discord server with help from the contributors of the current container system.

Also, the system should allow for adding multiple containers even of different types to the same object.

cosmiccoincidence avatar Jun 01 '21 23:06 cosmiccoincidence

  • #652 has been merged now.

  • #653 is needed so we can add non-item support to containers and use the container system within the tilemap system. This may not be preferred to do literally. It may be better to stimulate or recreate a new container structure for the tilemap system. Actually we will need some basic non-item support for the container system regardless, because some furniture objects get delivered to the station in crates (containers) via cargo.

  • Still need to consolidate the container scripts as well.

cosmiccoincidence avatar Jun 21 '21 14:06 cosmiccoincidence

I agree with what's in the issue, that we should try and reduce the number of scripts related to containers.

Script such as OpenableContainer only have a reference to the gameObject they are on, so it makes it difficult and hacky to get the AttachedContainer they are connected to. It makes it worse if there's more than one AttachedContainer.

We're also lacking references to the respective UI of containers when they have one, that would solve a lot of headaches.

stilnat avatar Jun 21 '21 14:06 stilnat