Fix sales by making ATS station-owned (#3494)
This commit is contained in:
parent
b00a9a721b
commit
1ecd07319d
|
|
@ -6,6 +6,7 @@ using Content.Server.Station.Systems;
|
|||
using Content.Shared.Cargo.Components;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Shuttles.Components;
|
||||
using Content.Shared.Station.Components;
|
||||
using Content.Shared.Tiles;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Configuration;
|
||||
|
|
@ -46,7 +47,7 @@ public sealed partial class CargoSystem
|
|||
return;
|
||||
|
||||
if (_gridFillEnabled)
|
||||
SetupTradePost();
|
||||
SetupTradePost(args);
|
||||
}
|
||||
|
||||
private void SetGridFill(bool enabled)
|
||||
|
|
@ -54,11 +55,11 @@ public sealed partial class CargoSystem
|
|||
_gridFillEnabled = enabled;
|
||||
if (enabled && _ticker.RunLevel != GameRunLevel.PreRoundLobby) // Ensure run level is in game
|
||||
{
|
||||
SetupTradePost();
|
||||
SetupTradePost(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupTradePost()
|
||||
private void SetupTradePost(StationInitializedEvent? args)
|
||||
{
|
||||
if (Exists(CargoMap))
|
||||
return;
|
||||
|
|
@ -78,6 +79,10 @@ public sealed partial class CargoSystem
|
|||
var gridUid = grid.Value;
|
||||
EnsureComp<ProtectedGridComponent>(gridUid);
|
||||
EnsureComp<TradeStationComponent>(gridUid);
|
||||
if (args is { } arg)
|
||||
{
|
||||
EnsureComp<StationMemberComponent>(gridUid).Station = arg.Station;
|
||||
}
|
||||
|
||||
var shuttleComp = EnsureComp<ShuttleComponent>(gridUid);
|
||||
shuttleComp.AngularDamping = 10000;
|
||||
|
|
|
|||
Loading…
Reference in New Issue