Open coavins opened 11 months ago
One notable issue is that for parts that hold or insert into another part, you have to define this relationship from both sides which leaves room for error. A refactor should fix this so you only have to define the relationship once.
It could be a good idea (for a start) to, if possible, move out the parts relationship in FirearmsHelper.lua into different files per weapon type, to clean that up. Then we could build something to build the rest of the content from these files.
Adding new models, parts, and Zomboid items involves way too many steps in too many separate files. There should be a way to define models and parts in one place (e.g. yaml files) and use those to generate the actual source files used by the game (e.g. CoavinsModels.lua and the parts list in FirearmsHelper.lua)
I think this could be easier to maintain as the list of models and parts grows larger.