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 shipyard causing SpawnAndDeleteEntityCountTest to fail #2241

Merged
merged 1 commit into from
Oct 15, 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
6 changes: 3 additions & 3 deletions Content.Server/Shipyard/Systems/ShipyardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ private void OnShipyardStartup(EntityUid uid, ShipyardConsoleComponent component
if (!_enabled)
return;
InitializeConsole();
SetupShipyard();
}

private void OnRoundRestart(RoundRestartCleanupEvent ev)
Expand All @@ -101,7 +100,7 @@ private void SetShipyardEnabled(bool value)

if (value)
{
SetupShipyard();
SetupShipyardIfNeeded();
}
else
{
Expand Down Expand Up @@ -148,6 +147,7 @@ public bool TryPurchaseShuttle(EntityUid stationUid, string shuttlePath, [NotNul
private bool TryAddShuttle(string shuttlePath, [NotNullWhen(true)] out EntityUid? shuttleGrid)
{
shuttleGrid = null;
SetupShipyardIfNeeded();
if (ShipyardMap == null)
return false;

Expand Down Expand Up @@ -276,7 +276,7 @@ private void CleanupShipyard()
_mapManager.DeleteMap(ShipyardMap.Value);
}

private void SetupShipyard()
private void SetupShipyardIfNeeded()
{
if (ShipyardMap != null && _mapManager.MapExists(ShipyardMap.Value))
return;
Expand Down
Loading