CessnaSkyhawk / SkyhawkScienceSystem

Other
12 stars 20 forks source link

Add generic patch for yet unsupported parts #10

Closed Gordon-Dry closed 2 years ago

Gordon-Dry commented 2 years ago

A patch that runs after the support patches and renames stockish and CTTish tech tree node IDs inside those parts to SkyhawkScienceSystem node IDs to have a basic compatibility.

To achieve that, all parts that are patched by the support patches should get a temporary variable, so the generic patch that comes afterwards only patches those parts without that variable.

Then it checks for all stock / CTT nodes and renames them to the according SkyhawkScienceSystem node IDs.

Finally it deletes all those temporary variables - or not, to avoid wasting MM patching time.

Gordon-Dry commented 2 years ago

Well, I assume the beforementioned approach is overcomplicated, because you create RDNode IDs with distinctive names, so it's easier and faster to create a patch that runs after the dedicated support patches and just checks for all parts with stockish and CTTish TechRequired names and renames them accordingly.

Like

@PART[*]:HAS[#TechRequired[spaceExploration]]:FINAL
{
    @TechRequired = logistics6
}

@PART[*]:HAS[#TechRequired[basicScience]]:FINAL
{
    @TechRequired = science2
}

etc.

Gordon-Dry commented 2 years ago

This would make the following patch obsolete GameData\SkyhawkScienceSystem\Tree\debugPatch.cfg

@PART[*]:FIRST { 
    @TechRequired = debug
} 
CessnaSkyhawk commented 2 years ago

I will look at doing this at some point in the future - for now though, I need to keep the current system as the debug patch is part of how I process new part mods (I use it to identify parts which haven't been supported/had errors in their patches). If you, or anyone else has any recommendations for where specific nodes should be patched to, feel free to mention it here, and I'll take it into account when I finally clean it all up.

CessnaSkyhawk commented 2 years ago

Will ideally look into this at some point