Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crew check/fighter bay (like limpet check/limpet controller) #2271

Closed
JamesRabe opened this issue Oct 11, 2021 · 2 comments
Closed

crew check/fighter bay (like limpet check/limpet controller) #2271

JamesRabe opened this issue Oct 11, 2021 · 2 comments
Labels
duplicate Please comment with the duplicate ID and close

Comments

@JamesRabe
Copy link

What happens now

There is no crew check if a fighter bay is equipped.

What I'd like to happen

Warning dialog similar to the limpet check when limpet controllers are equipped when a fighter bay is equipped but no crew member assigned as active.

How it can happen

EDDI Version

4.0.1

@Darkcyde13
Copy link

Darkcyde13 commented Oct 11, 2021

Hmm, thinking about this, you could set a state variable to false when you swap ships, or deactivate a crew member. Then set it to true when they are activated. You could then check the state of this variable on undocking, to give you that warning. The only downside to this, is that it won't be stored between sessions.

So, something like this in the 'Crew assigned' script:

{if event.role = "Active":
    {event.name} is now on active duty.
    {SetState('eddi_context_crew_assigned', true)}
|else:
    {event.name} standing down from active duty.
    {SetState('eddi_context_crew_assigned', false)}
}

Just set it to 'false' at the end of 'Ship swapped', as crew are automatically deactivated:
{SetState('eddi_context_crew_assigned', false)}

And then copy (and update) the last part of 'Ship swapped' into the end of 'Undocked':

{set fighterhangar to false}
{for compartment in ship.compartments:
    {if find(compartment.module.name, "Fighter Hangar") > -1:
        {set fighterhangar to true}
    }
}
{if fighterhangar = true && state.eddi_context_crew_assigned = false:
    Reminder: you need to assign a crew member to active duty.
}

This is all very rough, but it would work to some extent. Unfortunately, I've just realised it also wouldn't account for multiple NPC crew. That would take a bit more coding.

I think the best solution to this would be for EDDI to internally make a note of assigned crew, say under a 'status.crew_assigned' variable, or something like that. Then it would be stored between sessions, and be able to account for multiple crew members. I'm not sure how easy that would be to code though. Still, it's one possible idea. :)

@Tkael
Copy link
Member

Tkael commented Oct 12, 2021

Thanks for the suggestion. This is a bit of a duplicate of #2033 so we'll close it as a duplicate. The request has been heard.

In the meantime, Darkcyde's suggestions appear fairly viable and with VoiceAttack could even be extended to save the state to a file / recover the state from a file.

@Tkael Tkael added the duplicate Please comment with the duplicate ID and close label Oct 12, 2021
@Tkael Tkael closed this as completed Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Please comment with the duplicate ID and close
Projects
None yet
Development

No branches or pull requests

3 participants