Fix ruins being added to station grid (#23865)
This commit is contained in:
@@ -33,6 +33,11 @@ public record struct GridSpawnGroup
|
||||
/// </summary>
|
||||
public bool NameGrid = false;
|
||||
|
||||
/// <summary>
|
||||
/// Should we add this to the station's grids (if possible / relevant).
|
||||
/// </summary>
|
||||
public bool StationGrid = true;
|
||||
|
||||
public GridSpawnGroup()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
nameGrid: true
|
||||
minCount: 2
|
||||
maxCount: 2
|
||||
stationGrid: false
|
||||
paths:
|
||||
- /Maps/Ruins/derelict.yml
|
||||
- /Maps/Ruins/djstation.yml
|
||||
@@ -83,6 +84,7 @@
|
||||
nameGrid: true
|
||||
minCount: 2
|
||||
maxCount: 2
|
||||
stationGrid: false
|
||||
paths:
|
||||
- /Maps/Ruins/derelict.yml
|
||||
- /Maps/Ruins/djstation.yml
|
||||
|
||||
Reference in New Issue
Block a user