DiscoveryGC / FLHook

FLHook for Discovery Freelancer
Other
28 stars 33 forks source link

Pob building crafting rework #253

Closed Aingar closed 1 year ago

Aingar commented 1 year ago

Moving #207 to a master branch PR

Copying previous, pretty outdated description. Will write a new one at a future date.

Heavy rewrite of the entire facmod and buildmod. Heavy de-hardcodifying of both modules.

-Allows defining new buildings and recipes purely via Config (any code functionality for new non-factory buildings would still need to be developed in, obviously) -The above allows us to dynamically define new Factory buildings with

Recipes are assigned to a 'crafting list', and factories can have access to any number of crafting lists as defined in their config. For example, we can have a codename gun EXCALIBUR recipe added to 'snubcode1' crafting list, and then a Snub Codename Factory defined which has two crafting lists defined for it, 'snubcode1' and 'snubcode2', making the recipe available to craft if a factory is built.

Buildings are also separated into categories to better support their growing numbers. They are also segregated into 'building lists'. Currently there are three of them: 'core' containing core upgrade, shield generator and bulk storage, 'defense' which contains defense platforms and 'factories' containing everything else.

Other changes:

'Smart' commands that automatically find the factory and recipe via name, one simply needs to type '/craft snubcode1 excalibur' to begin crafting of a recipe. Recipe numbers are still supported and are defined on per-craftlist basis
To support Smart Commands, no more than 1 factory of a given type is allowed per POB.

I realize this PR is overly massive and packed with features, I might make an attempt to break it down once I manage to establish it fully works as intended.