]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Extend shuttle dock time if the shuttle doesn't dock at evac. (#31496)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Mon, 9 Sep 2024 18:10:28 +0000 (20:10 +0200)
committerGitHub <noreply@github.com>
Mon, 9 Sep 2024 18:10:28 +0000 (20:10 +0200)
commit5a6a3371dc63d20ddad925e2c6d0b2b6d8aee5bc
tree5bd6897533e42e41404b79e47f5695e669a69f81
parent3b2fc5463b95e1750643bea892345e67e53e56a7
Extend shuttle dock time if the shuttle doesn't dock at evac. (#31496)

* Extend shuttle dock time if the shuttle doesn't dock at evac.

If the shuttle can't dock at evac for *some reason*, it will instead try to dock at another port on the station. And if that fails it goes somewhere random on the station.

Because of the chaos and confusion caused by this, many people will frequently not get to the shuttle in time under these circumstances. This sucks for everybody.

To alleviate this, the shuttle launch timer will now be extended if the station doesn't dock at its ideal spot. The default values (controlled via CVar) are 1.667x and 2x respectively for "wrong dock" and "no dock at all" scenarios.

The code around here was a mess, so I fixed that too. "CallEmergencyShuttle" has been renamed to "DockEmergencyShuttle", the overload that did the actual docking has been renamed to DockSingleEmergencyShuttle. Code has been split into separate dock -> announce methods so we can calculate shuttle delay in between the case of multiple stations.

Also made the "shuttle couldn't find a dock" text announce the time until it launches and fix the shuttle timers not triggering for it.

* Minor review

---------
Content.Server/RoundEnd/RoundEndSystem.cs
Content.Server/Shuttles/Commands/DockEmergencyShuttleCommand.cs
Content.Server/Shuttles/Systems/DockingSystem.Shuttle.cs
Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Content.Shared/CCVar/CCVars.cs
Resources/Locale/en-US/shuttles/emergency.ftl