Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generic patch for yet unsupported parts #10

Closed
Tracked by #1
Gordon-Dry opened this issue Nov 12, 2021 · 4 comments
Closed
Tracked by #1

Add generic patch for yet unsupported parts #10

Gordon-Dry opened this issue Nov 12, 2021 · 4 comments

Comments

@Gordon-Dry
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@PART[*]:FIRST { 
	@TechRequired = debug
} 

@CessnaSkyhawk
Copy link
Owner

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
Copy link
Owner

CessnaSkyhawk commented Dec 26, 2021

Will ideally look into this at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants