linuxgurugamer / KCT

Kerbal Construction Time - An addon for Kerbal Space Program
GNU General Public License v3.0
11 stars 15 forks source link

[Bug] Rush Build button in Sandbox cases NRE #97

Closed GlitchHound closed 1 year ago

GlitchHound commented 1 year ago

Understandably you can't spend nonexistent funds in sandbox mode so when KCT_BuildListVessel.DoRushBuild() is called it generates a NullReferenceException.

I know what you're thinking... "Frankly, if you're in sandbox and have a reason to rush a build, why are you even using KCT?" Good question. I'm only raising this as it seems like it's probably easy to fix if anyone ever finds themselves working on "real" bugs; I hit this because I was assessing how EVARepair and KCT work together (decently but not perfectly) and didn't want to wade far enough through career to get to a good test case.

Expected behavior: Quite literally I was expecting the button to actually rush a build, I was going to spam it a few times because I don't like how warping comes to a stop and figured I might be able to move things along a few frames faster.

Acceptable behavior: The button not existing or being unclickable in Sandbox also makes complete sense.

linuxgurugamer commented 1 year ago

Thanks, I'm going to hide it when not in career or SCIENCE_SANDBOX Fix will be out soon