Replace obsolete code in shuttle systems. (#31408)

* Format DockingSystem.Shuttle

* arrivals system

* docking system

* shuttle console system

* emergency shuttle system

* shuttle system

* thruster system

* Fix compile error

---------

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
Mervill
2024-08-26 08:48:37 -07:00
committed by GitHub
parent 6c66e8fe1f
commit c6d291968f
12 changed files with 298 additions and 297 deletions

View File

@@ -50,8 +50,8 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
[Dependency] private readonly IAdminManager _admin = default!;
[Dependency] private readonly IConfigurationManager _configManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
[Dependency] private readonly AccessReaderSystem _reader = default!;
[Dependency] private readonly ChatSystem _chatSystem = default!;
[Dependency] private readonly CommunicationsConsoleSystem _commsConsole = default!;
@@ -212,7 +212,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
{
[ShuttleTimerMasks.ShuttleMap] = uid,
[ShuttleTimerMasks.SourceMap] = args.FromMapUid,
[ShuttleTimerMasks.DestMap] = args.TargetCoordinates.GetMapUid(_entityManager),
[ShuttleTimerMasks.DestMap] = _transformSystem.GetMap(args.TargetCoordinates),
[ShuttleTimerMasks.ShuttleTime] = ftlTime,
[ShuttleTimerMasks.SourceTime] = ftlTime,
[ShuttleTimerMasks.DestTime] = ftlTime
@@ -289,7 +289,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
{
var angle = _dock.GetAngle(stationShuttle.EmergencyShuttle.Value, xform, targetGrid.Value, targetXform, xformQuery);
var direction = ContentLocalizationManager.FormatDirection(angle.GetDir());
var location = FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((stationShuttle.EmergencyShuttle.Value, xform)));
var location = FormattedMessage.RemoveMarkupPermissive(_navMap.GetNearestBeaconString((stationShuttle.EmergencyShuttle.Value, xform)));
_chatSystem.DispatchStationAnnouncement(stationUid, Loc.GetString("emergency-shuttle-docked", ("time", $"{_consoleAccumulator:0}"), ("direction", direction), ("location", location)), playDefaultSound: false);
}
@@ -320,7 +320,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
{
var angle = _dock.GetAngle(stationShuttle.EmergencyShuttle.Value, xform, targetGrid.Value, targetXform, xformQuery);
var direction = ContentLocalizationManager.FormatDirection(angle.GetDir());
var location = FormattedMessage.RemoveMarkup(_navMap.GetNearestBeaconString((stationShuttle.EmergencyShuttle.Value, xform)));
var location = FormattedMessage.RemoveMarkupPermissive(_navMap.GetNearestBeaconString((stationShuttle.EmergencyShuttle.Value, xform)));
_chatSystem.DispatchStationAnnouncement(stationUid, Loc.GetString("emergency-shuttle-nearby", ("time", $"{_consoleAccumulator:0}"), ("direction", direction), ("location", location)), playDefaultSound: false);
}
@@ -401,7 +401,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
private void AddCentcomm(EntityUid station, StationCentcommComponent component)
{
DebugTools.Assert(LifeStage(station)>= EntityLifeStage.MapInitialized);
DebugTools.Assert(LifeStage(station) >= EntityLifeStage.MapInitialized);
if (component.MapEntity != null || component.Entity != null)
{
Log.Warning("Attempted to re-add an existing centcomm map.");
@@ -434,12 +434,11 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
return;
}
var mapId = _mapManager.CreateMap();
var map = _mapSystem.CreateMap(out var mapId);
var grid = _map.LoadGrid(mapId, component.Map.ToString(), new MapLoadOptions()
{
LoadMap = false,
});
var map = _mapManager.GetMapEntityId(mapId);
if (!Exists(map))
{
@@ -492,7 +491,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
if (!_emergencyShuttleEnabled)
return;
if (ent.Comp1.EmergencyShuttle != null )
if (ent.Comp1.EmergencyShuttle != null)
{
if (Exists(ent.Comp1.EmergencyShuttle))
{