TASK: Code a withdraw list of Parts, patchable by ModuleManager
Lisias opened this issue · 5 comments
Some part sets choose to code things in a way that TweakScale can't cope without help.
While this help is not provided by a Companion (or 3rd party), TweakScale needs to withdraw itself from these parts even if someone had patched it intentionally.
The withdraw list must be maintainable by a ModuleManager patch, so the Companions can update it as the support is implemented.
The thing must be able to withdraw TweakScale from a part:
- Based on the parentURL (see MM config cache) - with regex ✔︎
- Based on the parentURL (see MM config cache) - with prefix (simpler than regex) ✔︎
- Based on the partName - with regex ✔︎
- Based on the presence of modules - NO regex on this one. ✔︎
Must have an option telling if ANY or ALL conditions should be met.
This task will supersede the checks from
The requirement "Based on the presence of modules - NO regex on this one." was already implemented while closing #254
The ANY or ALL conditions was dropped, as it would add significant complexity on the code. The implemented behaviour is similar to ALL.
Just break the rule into many smaller ones - simple code, complex data structures rules!
Implemented on commits:
Tested. It works. :)
…
[LOG 00:23:42.709] [TweakScale.Sanitizer] INFO: ShowStoppers is checking KAXheavyGear (GT-580 Heavy Gear Assembly)...
[LOG 00:23:42.709] [TweakScale.Sanitizer] ERROR: **FATAL** Part KAXheavyGear (GT-580 Heavy Gear Assembly) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
[LOG 00:23:42.709] [TweakScale.Sanitizer] TRACE: KAXheavyGear was checked and it should stop the chain.
[LOG 00:23:42.709] [TweakScale.Sanitizer] INFO: CriticalFixes is checking KAXjumpJet (Jump Jet Engine)...
[LOG 00:23:42.709] [TweakScale.Sanitizer] DETAIL: KAXjumpJet (Jump Jet Engine) passed the sanity check Firespitter-Buoyancy
[LOG 00:23:42.709] [TweakScale.Sanitizer] DETAIL: KAXjumpJet (Jump Jet Engine) passed the sanity check B9PartSwitch-Conflicts
[LOG 00:23:42.709] [TweakScale.Sanitizer] ASSERT: Part KAXjumpJet (Jump Jet Engine) didn't passed the sanity check due . at error:0
[LOG 00:23:42.709] [TweakScale.Sanitizer] TRACE: KAXjumpJet was checked and it should not stop the chain.
[LOG 00:23:42.709] [TweakScale.Sanitizer] INFO: HotFixes is checking KAXjumpJet (Jump Jet Engine)...
[LOG 00:23:42.710] [TweakScale.Sanitizer] TRACE: KAXjumpJet was checked and it should not stop the chain.
[LOG 00:23:42.710] [TweakScale.Sanitizer] INFO: Overrules is checking KAXjumpJet (Jump Jet Engine)...
[LOG 00:23:42.710] [TweakScale.Sanitizer] TRACE: KAXjumpJet was checked and it should not stop the chain.
[LOG 00:23:42.710] [TweakScale.Sanitizer] INFO: ShowStoppers is checking KAXjumpJet (Jump Jet Engine)...
[LOG 00:23:42.710] [TweakScale.Sanitizer] ERROR: **FATAL** Part KAXjumpJet (Jump Jet Engine) has a fatal problem due having duplicated properties - see issue [#34]( https://github.com/net-lisias-ksp/TweakScale/issues/34 ). at error:0
...
[LOG 00:23:43.073] [TweakScale] INFO: WriteDryCost Concluded : 757 parts found; 0 DryCost failed; 0 parts with hotfixes; 16 Show Stoppers found; 0 parts with issues overruled; 0 critical fixes applied; 0 parts failed being checked; 236 unscalable parts.
Implemented by commit f9f7a84 .
NOW I can close this. :)