RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
252 stars 139 forks source link

Define a clear folder structure for our code #1255

Open NuclearCreeperIII opened 12 months ago

NuclearCreeperIII commented 12 months ago

Summary

Currently code tend to be a bit everywhere, it'd be great to define a proper folder structure for most of it.

As an example, certain item interactions have been placed in Assets/Scripts/SS3D/Systems/Inventory/Items/Generic. Examples include HonkInteraction and NukeDetonateInteraction. These should be relocated to either Assets/Scripts/SS3D/Systems/Inventory/Interactions, or new folder Assets/Scripts/SS3D/Systems/Inventory/Interactions/ItemInteractions.

Idea of this issue is to suggest a good folder structure pattern to follow, and then change the current one. It should not be huge changes, but rather classifying things inside systems in a consistent manner.

Once defined and agreed upon, apply the new structure to the current code base, and add the doc to gitbook (you can ask for editing rights if necessary)

stilnat commented 12 months ago

So here's a suggestion at least for our Systems subfolder :

For all systems have the following subfolders when relevant :

cosmiccoincidence commented 11 months ago

The folders like "Assets/Scripts/SS3D/Systems/Inventory/Items/Generic" are named in parallel to the art and unity asset folders so that you can find related assets or just search the folders name and find all the folders of different assets for that thing.

We probably won't put all items or item-interactions in a single folder because of the sheer number of them that will be in the final game.

cosmiccoincidence commented 11 months ago

For more info on this see here: https://ss3d.gitbook.io/dev-guide/introduction/file-naming-and-organization

Feel free to discuss this further if you have any questions or concerns, but I'm closing this issue for now to reduce clutter.

stilnat commented 11 months ago

@cosmiccoincidence gitbook doesn't contain anything regarding the organisation in our scripts folder, we need to think about doing it properly. Maybe open a github discussion if you don't want that as an issue.

cosmiccoincidence commented 11 months ago

@cosmiccoincidence gitbook doesn't contain anything regarding the organisation in our scripts folder, we need to think about doing it properly. Maybe open a github discussion if you don't want that as an issue.

For some reason I was thinking this was handled and outdated. I'm fine with reopening it.