ChrisViral / RealChute

Realistic parachutes for KSP
47 stars 38 forks source link

PodEngine from RoverDude's Survivability Pack has "exploding" part preview when used with RealChute config. #19

Closed jdmj closed 9 years ago

jdmj commented 9 years ago

Not sure if it's an RC or stock bug, but if I revert this change:

-    public class RealChuteModule : PartModule, IPartCostModifier
+    public class RealChuteModule : PartModule, IPartCostModifier, IModuleInfo

+        //Sets part info field
+        public string GetPrimaryField()
+        {
+            return "<b>Parachute count:</b> " + this.parachutes.Count;
+        }

the problem disappears. PodEngine already has ModuleEngines and ModuleDecouple, both of which add their info into the tooltip without problems.

ChrisViral commented 9 years ago

Well if THIS is causing bugs, this is on Squad's side and I can't do shit about it, I'm not taking out IModuleInfo.

Else, as I said before, if RoverDude has problems with RealChute, he should come forth to me to get help. If this is the problem, that's too bad.

jdmj commented 9 years ago

I'm not a coder, but it seems to be the intended (by Squad) behavior. Assembly Browser gives a lot of unreadable crap, but in this case it's straightforward. in PartListTooltips.ShowTooltip:

    this.
= PartListTooltips.GetPrimaryInfo (aPart, 3);

and in AvailablePart there's persistent moduleInfo field. I guess it's there (empty) even if there isn't one in part config, which leaves 2 rows for modules. Adding the third one raises ArgumentOutOfRangeException. Crap. Sorry for the useless report.

ChrisViral commented 9 years ago

No worries, I'll try to push on my side to get Squad to fix it's broken crap, thanks for finding that