ChrisViral / RealChute

Realistic parachutes for KSP
47 stars 38 forks source link

KSP 1.3.1 compatibility #72

Closed MOARdV closed 5 years ago

MOARdV commented 7 years ago

KSP 1.3.1 breaks the code that adds the custom parachute category to the editor.

It throws a null reference exception on this block of code in RCToolbarManager:AddFIlter()

PartCategorizer.Category filterByFunction = PartCategorizer.Instance.filters
    .Find(f => f.button.categoryName == "Filter by function");
PartCategorizer.AddCustomSubcategoryFilter(filterByFunction, "Parachutes", "Parachutes", icon,
    p => p.moduleInfos.Any(m => m.moduleName == "RealChute" || m.moduleName == "Parachute"));

If I wrap that code and the rest of the function in a try/catch block, that eliminates the NRE, and the mod functions as expected, other than the missing part category.

Likewise, the mod works fine with ships that have existing RealChute parts; however, parachute parts are mostly hidden by the MM patches that move those parts to the 'none' category.

Olympic1 commented 7 years ago

"Filter by function" was capitalized again in 1.3.1, so now its "Filter by Function". Or you can use #autoLOC_453547.

ChrisViral commented 6 years ago

... seriously jesus christ Squad. get a grip.

I'll try to release something in a timely fashion but I'm in the middle of my midterms right now so this is shitty timing.

@Starwaster think you could handle it?

jarosm commented 6 years ago

I made a PR #73 which fixes it.

ChrisViral commented 5 years ago

Old and fixed, closing