Fix ruins being added to station grid (#23865)

This commit is contained in:
metalgearsloth
2024-01-10 23:44:09 +11:00
committed by GitHub
parent cd1ef71e31
commit a46f6f3f85
3 changed files with 17 additions and 6 deletions

View File

@@ -88,6 +88,15 @@ public sealed partial class ShuttleSystem
if (_loader.TryLoad(mapId, path.ToString(), out var ent) && ent.Count == 1)
{
if (TryComp<ShuttleComponent>(ent[0], out var shuttle))
{
TryFTLProximity(ent[0], shuttle, targetGrid.Value);
}
else
{
valid = false;
}
if (group.Hide)
{
var iffComp = EnsureComp<IFFComponent>(ent[0]);
@@ -95,15 +104,10 @@ public sealed partial class ShuttleSystem
Dirty(ent[0], iffComp);
}
if (TryComp<ShuttleComponent>(ent[0], out var shuttle))
if (group.StationGrid)
{
TryFTLProximity(ent[0], shuttle, targetGrid.Value);
_station.AddGridToStation(uid, ent[0]);
}
else
{
valid = false;
}
if (group.NameGrid)
{