Papa_Joe

Papa_Joe

57.9k Downloads

Seats vs Crew Capacity issue

NathanKell opened this issue ยท 7 comments

commented

Not sure about what's going on here, or if you're already looking into this, but I hit a rather serious issue. In RO, we up the crew capacity of some parts, but their IVAs still have the original seat counts. If I manually board a craft with a kerbal that's fine, but if I use Ship Manifest to do a (CLS-enabled) transfer, and all IVA seats are full, the transfer results in someone in the target part being bumped back to the origin part. Can anything be done about this?

I can work around this (in the case of a 3-person pod with two IVA seats) by EVAing the third kerbal, but it's a right pain, and depends on EVA being available.

commented

Ok. added test for standing room available (Crew Capacity greater than seat count). Will be in next release.

I do recall the other event onCrewTransferPartListCreated. Looking it over now. Thanks!

commented

Rreleased v5.1.2.2 includes support for this issue. also added support for onCrewTransferPartListCreated.

commented

Awesome! Thanks! <3

commented

Oh, unrelatedly: have you had a chance to play with the new events system I added for you?

commented

I use the internal seat to determine whether or not a crew member requires swapping. so if the crew capacity and the internal seat count do not match that would cause issues... I have no provision for "standing room only". further, I do not use the board method when I transfer, I use. .addcrewmember and removecrewmember combined with spawn methods. Not sure why the crew capactiy and the seat cound would be different or where I can test for that...

And unrelatedly, I am taking advantage of onCrewTransferSelected in both SM and CLS. makes for a much cleaner stock crew transfer handling system. Thanks! Are there other changes I missed?

commented

You can test this merely by increasing the Mk1-2 pod's CrewCapacity to 4. It can be different because mods may want to change crew capacities on parts without replacing IVAs. I know you don't use the boarding method, I'm just saying KSP does support non-seated crew in a part.

Ah, no. For 1.1 I added onCrewTransferSelected - that fires during the creation of the crew transfer dialog and passes you the list of valid parts and the list of full parts:

//Event fired after set of valid and invalid parts for crew transfer is created but before they are used. First is valid, second is full parts.
static public EventData<FromToAction<List<Part>, List<Part>>> onCrewTransferPartListCreated = new EventData<FromToAction<List<Part>, List<Part>>>("onCrewTransferPartListCreated");

That means you can let the transfer dialog do the UI work for you rather than replacing the highlighting and the click constraining. You can also change the message given for the 'full' (i.e. crewable but invalid) parts, to just 'invalid' - i.e. either full or unreachable. The message is static:
CrewTransfer.fullMessage:
public static string fullMessage = "<color=orange>This module is full.</color>";

commented

This was added so SM/CLS no longer had to override and replace the stock crew transfer dialog, just change it. Let me know if you need anything else.