Fix some more "CentCom" instances (#9970)

This commit is contained in:
Myctai
2022-07-26 14:00:38 +00:00
committed by GitHub
parent 47a5c98bd8
commit 43ec284318
4 changed files with 26 additions and 26 deletions

View File

@@ -38,8 +38,8 @@ public sealed partial class ShuttleSystem
[Dependency] private readonly DockingSystem _dockSystem = default!;
[Dependency] private readonly StationSystem _station = default!;
private MapId? _centcommMap;
private EntityUid? _centcomm;
private MapId? _centComMap;
private EntityUid? _centCom;
/// <summary>
/// Used for multiple shuttle spawn offsets.
@@ -367,8 +367,8 @@ public sealed partial class ShuttleSystem
_consoleAccumulator = _configManager.GetCVar(CCVars.EmergencyShuttleDockTime);
EmergencyShuttleArrived = true;
if (_centcommMap != null)
_mapManager.SetMapPaused(_centcommMap.Value, false);
if (_centComMap != null)
_mapManager.SetMapPaused(_centComMap.Value, false);
foreach (var comp in EntityQuery<StationDataComponent>(true))
{
@@ -415,21 +415,21 @@ public sealed partial class ShuttleSystem
private void SetupEmergencyShuttle()
{
if (!_emergencyShuttleEnabled || _centcommMap != null && _mapManager.MapExists(_centcommMap.Value)) return;
if (!_emergencyShuttleEnabled || _centComMap != null && _mapManager.MapExists(_centComMap.Value)) return;
_centcommMap = _mapManager.CreateMap();
_mapManager.SetMapPaused(_centcommMap.Value, true);
_centComMap = _mapManager.CreateMap();
_mapManager.SetMapPaused(_centComMap.Value, true);
// Load CentCom
var centcommPath = _configManager.GetCVar(CCVars.CentcommMap);
var centComPath = _configManager.GetCVar(CCVars.CentcommMap);
if (!string.IsNullOrEmpty(centcommPath))
if (!string.IsNullOrEmpty(centComPath))
{
var (_, centcomm) = _loader.LoadBlueprint(_centcommMap.Value, "/Maps/centcomm.yml");
_centcomm = centcomm;
var (_, centcomm) = _loader.LoadBlueprint(_centComMap.Value, "/Maps/centcomm.yml");
_centCom = centcomm;
if (_centcomm != null)
AddFTLDestination(_centcomm.Value, false);
if (_centCom != null)
AddFTLDestination(_centCom.Value, false);
}
else
{
@@ -444,10 +444,10 @@ public sealed partial class ShuttleSystem
private void AddEmergencyShuttle(StationDataComponent component)
{
if (!_emergencyShuttleEnabled || _centcommMap == null || component.EmergencyShuttle != null) return;
if (!_emergencyShuttleEnabled || _centComMap == null || component.EmergencyShuttle != null) return;
// Load escape shuttle
var (_, shuttle) = _loader.LoadBlueprint(_centcommMap.Value, component.EmergencyShuttlePath.ToString(), new MapLoadOptions()
var (_, shuttle) = _loader.LoadBlueprint(_centComMap.Value, component.EmergencyShuttlePath.ToString(), new MapLoadOptions()
{
// Should be far enough... right? I'm too lazy to bounds check CentCom rn.
Offset = new Vector2(500f + _shuttleIndex, 0f)
@@ -473,13 +473,13 @@ public sealed partial class ShuttleSystem
_shuttleIndex = 0f;
if (_centcommMap == null || !_mapManager.MapExists(_centcommMap.Value))
if (_centComMap == null || !_mapManager.MapExists(_centComMap.Value))
{
_centcommMap = null;
_centComMap = null;
return;
}
_mapManager.DeleteMap(_centcommMap.Value);
_mapManager.DeleteMap(_centComMap.Value);
}
/// <summary>