Skip to content

Commit

Permalink
Fix some trading post oopsies (#956)
Browse files Browse the repository at this point in the history
Fix 2 oopsies
  • Loading branch information
DebugOk authored Mar 11, 2024
1 parent b31c802 commit 6bd5092
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ private void OnPalletSale(EntityUid uid, CargoPalletConsoleComponent component,

private void OnRoundRestart(RoundRestartCleanupEvent ev)
{
Reset();
CleanupTradeStation();
}

Expand All @@ -383,19 +384,6 @@ private void CleanupTradeStation()

_mapManager.DeleteMap(CargoMap.Value);
CargoMap = null;

// Shuttle may not have been in the cargo dimension (e.g. on the station map) so need to delete.
var query = AllEntityQuery<CargoShuttleComponent>();

while (query.MoveNext(out var uid, out var _))
{
if (TryComp<StationCargoOrderDatabaseComponent>(uid, out var station))
{
station.Shuttle = null;
}

QueueDel(uid);
}
}

private void SetupTradePost()
Expand Down Expand Up @@ -426,7 +414,8 @@ private void SetupTradePost()

var shuttleComponent = EnsureComp<ShuttleComponent>(grid);
shuttleComponent.AngularDamping = 10000;
shuttleComponent.LinearDamping = 10000; // This shit ain't going nowhere
shuttleComponent.LinearDamping = 10000;
Dirty(shuttleComponent);
}

var mapUid = _mapManager.GetMapEntityId(CargoMap.Value);
Expand Down

0 comments on commit 6bd5092

Please sign in to comment.