Fix ruins being added to station grid (#23865)
This commit is contained in:
@@ -33,6 +33,11 @@ public record struct GridSpawnGroup
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool NameGrid = false;
|
public bool NameGrid = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should we add this to the station's grids (if possible / relevant).
|
||||||
|
/// </summary>
|
||||||
|
public bool StationGrid = true;
|
||||||
|
|
||||||
public GridSpawnGroup()
|
public GridSpawnGroup()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ public sealed partial class ShuttleSystem
|
|||||||
|
|
||||||
if (_loader.TryLoad(mapId, path.ToString(), out var ent) && ent.Count == 1)
|
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)
|
if (group.Hide)
|
||||||
{
|
{
|
||||||
var iffComp = EnsureComp<IFFComponent>(ent[0]);
|
var iffComp = EnsureComp<IFFComponent>(ent[0]);
|
||||||
@@ -95,15 +104,10 @@ public sealed partial class ShuttleSystem
|
|||||||
Dirty(ent[0], iffComp);
|
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]);
|
_station.AddGridToStation(uid, ent[0]);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
valid = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (group.NameGrid)
|
if (group.NameGrid)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
nameGrid: true
|
nameGrid: true
|
||||||
minCount: 2
|
minCount: 2
|
||||||
maxCount: 2
|
maxCount: 2
|
||||||
|
stationGrid: false
|
||||||
paths:
|
paths:
|
||||||
- /Maps/Ruins/derelict.yml
|
- /Maps/Ruins/derelict.yml
|
||||||
- /Maps/Ruins/djstation.yml
|
- /Maps/Ruins/djstation.yml
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
nameGrid: true
|
nameGrid: true
|
||||||
minCount: 2
|
minCount: 2
|
||||||
maxCount: 2
|
maxCount: 2
|
||||||
|
stationGrid: false
|
||||||
paths:
|
paths:
|
||||||
- /Maps/Ruins/derelict.yml
|
- /Maps/Ruins/derelict.yml
|
||||||
- /Maps/Ruins/djstation.yml
|
- /Maps/Ruins/djstation.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user