]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Refactor FTL time tracking code to fix a UI bug (#26538)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Sat, 30 Mar 2024 01:40:55 +0000 (02:40 +0100)
committerGitHub <noreply@github.com>
Sat, 30 Mar 2024 01:40:55 +0000 (12:40 +1100)
commit3b791459c74c6b56c8ae6204a936f6de06674b93
treea2e414c183cb627a5f3ac0e85876c561b2fbc216
parent72c6a14d593ea6eafc7477292657166968c75401
Refactor FTL time tracking code to fix a UI bug (#26538)

The FTL UI on the shuttle console would reset the FTL progress bar every time you open it. This is because the server only sends "time until completion", not a start/end time. The FTL code now uses a separate start/end time so the exact same progress bar can be preserved.

For convenience, I made a StartEndTime record struct that stores the actual tuple. This is now used by the code and has some helpers.
Content.Client/Shuttles/UI/MapScreen.xaml.cs
Content.Server/Shuttles/Components/FTLComponent.cs
Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Content.Server/Shuttles/Systems/ShuttleSystem.cs
Content.Shared/Shuttles/BUIStates/ShuttleMapInterfaceState.cs
Content.Shared/Timing/StartEndTime.cs [new file with mode: 0644]