Skip to content

Thruster overrides are not cleared if batteries set to recharge on connect (event controller) #11

@Artorp

Description

@Artorp

Hi, thanks for this very useful script.

I had a weird interaction where thruster and gyro overrides would not be cleared on dock on some ships, causing the ship to be unable to be controlled when disconnected from the connector. With the new event controllers I have a listener on the connector set to change batteries to recharge when I connect. Since the ship connects and on the same frame tests for thisThruster.IsWorking, they will be skipped and override not cleared as they are not considered powered until they receive power from the base.

Connection sequence works as expected once the IsWorking checks on SafelyExit are removed

            if (systemsAnalyzer != null)
            {
                foreach (var thisGyro in systemsAnalyzer.gyros)
                    if (thisGyro != null)
-                        thisGyro .IsWorking
                            thisGyro.SetValue("Override", false);

                foreach (var thisThruster in systemsAnalyzer.thrusters)
                    if (thisThruster != null)
-                        thisThruster.IsWorking
                            thisThruster.SetValue("Override", 0f);
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions