Who said complex code?andythenorth wrote:the production code is already quite complex, and going to get more so. For example, some industries will produce a little more if supplied with multiple cargos. Handling that with some cargos enabled/disabled might be hideous.
Just make your industries in the way independent of defined cargoes, and where would be no problem.
First should go the cargo code, defining the combination of cargoes. Then goes the cargo translation table and later the industries.
Because some cargoes would be not defined, the industry would simply not produce/accept it. All you need to change in your code is the producing code that would work without the cargo. ECS is done that way and it works with any combination of vectors and NO industry checks for other Vectors being loaded. The only checks are the checks for cargo availability. For example, ECS Factory can process any combination of glass, steel, dyes and even none of the them into goods.