Skip to content

Commit

Permalink
trade station markers and debug assert fix (DeltaV-Station#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanedas authored Apr 11, 2024
1 parent 438a7bc commit 3d09479
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private void InitializeShuttle()
SubscribeLocalEvent<CargoPalletConsoleComponent, BoundUIOpenedEvent>(OnPalletUIOpen);

SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
SubscribeLocalEvent<StationInitializedEvent>(OnStationInitialize);
SubscribeLocalEvent<StationInitializedEvent>(OnStationInitialize); // DeltaV - trade station map

Subs.CVar(_cfgManager, CCVars.GridFill, SetGridFill);
}
Expand Down Expand Up @@ -370,6 +370,7 @@ private void OnRoundRestart(RoundRestartCleanupEvent ev)
CleanupTradeStation();
}

// DeltaV - begin trade station map
private void OnStationInitialize(StationInitializedEvent args)
{
if (!HasComp<StationCargoOrderDatabaseComponent>(args.Station)) // No cargo, L
Expand All @@ -378,6 +379,7 @@ private void OnStationInitialize(StationInitializedEvent args)
if (_cfgManager.GetCVar(CCVars.GridFill))
SetupTradePost();
}
// DeltaV - end trade station map

private void CleanupTradeStation()
{
Expand All @@ -392,6 +394,7 @@ private void CleanupTradeStation()
CargoMap = null;
}

// DeltaV - begin trade station map
private void SetupTradePost()
{
if (CargoMap != null && _mapManager.MapExists(CargoMap.Value))
Expand Down Expand Up @@ -421,7 +424,6 @@ private void SetupTradePost()
var shuttleComponent = EnsureComp<ShuttleComponent>(grid);
shuttleComponent.AngularDamping = 10000;
shuttleComponent.LinearDamping = 10000;
Dirty(shuttleComponent);
}

var mapUid = _mapManager.GetMapEntityId(CargoMap.Value);
Expand All @@ -438,6 +440,7 @@ private void SetupTradePost()

_console.RefreshShuttleConsoles();
}
// DeltaV - end trade station map
}

/// <summary>
Expand Down

0 comments on commit 3d09479

Please sign in to comment.