Sorry for the late answer. I'm kinda occupied.
Pffftooabbb..."Why" is what you are asking? That's 6 months ago. Frankly, all that is left in my mind of the reasoning behind "Why did I write the code, the way I did?" by now, is a faint blur of a memorysmear.
I remember, that there were compatibility issues. My Single-Use Witchdrive
should only be installable onto ships without an own standardfitted witchdrive, such as a Krait or a Gecko. To check this I first used
, but that didn't work well, as
was able to flip that value. I needed a reliable way to check if a given ship has a drive fitted.
!(Ship.shipDataForKey(player.ship.dataKey)["hyperspace_motor"] === "no"
does a good job to determine, if one is installed per shipdata.plist.
As far As I remember vsfc's Breakable Whitchdrive
, was written to break the Standarddrive (called Throudrive in the OXP). My S-U Witchdrive
OXP was new and interfered with the way Breakable Whitchdrive
worked. It made the Throudrive somehow purchasable for exsample. Another thing it messed up was, that SUWitchdrive
set the hyperspace capability of a ship to
, which Breakable Whitchdrive
would interpret as if a standard Throudrive is installed (which wasn't the case) as it only checked for
being true (, if I recall correctly).
I believed I changed
for that later reason, so that my OXP and no other OXP messing with the hyperspace capability of a ship might break the Breakable Whitchdrive
I've had a very brief look at the code changes you've made to the other OXP, but I'm not sure I understand the reason behind it. You've essentially changed "player.ship.hasHyperspaceMotor" with "Ship.shipDataForKey(player.ship.dataKey)["hyperspace_motor"]". Is this because you want to distinguish between a witchspace drive that comes with the ship to one that is installed via the single-use drive, in order to restrict the damage control options to one or the other, so the Breakable witchdrive OXP doesn't break and/or repair the Single-use witchdrive?
ÖÖhhh...Yah. Yah. Exactly. That sounds good. I go with that.