Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some trading post oopsies #956

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading