ourMap = shuttleXform.MapID;
}
- while (mapComps.MoveNext(out var mapComp, out var mapXform, out var mapMetadata))
+ while (mapComps.MoveNext(out var mapUid, out var mapComp, out var mapXform, out var mapMetadata))
{
if (_console != null && !_shuttles.CanFTLTo(_shuttleEntity.Value, mapComp.MapId, _console.Value))
{
{
AddMapObject(mapComp.MapId, gridObj);
}
- else if (!_shuttles.IsBeaconMap(_mapManager.GetMapEntityId(mapComp.MapId)) && (iffComp == null ||
- (iffComp.Flags & IFFFlags.Hide) == 0x0))
+ // If we can show it then add it to pending.
+ else if (!_shuttles.IsBeaconMap(mapUid) && (iffComp == null ||
+ (iffComp.Flags & IFFFlags.Hide) == 0x0) &&
+ !gridObj.HideButton)
{
_pendingMapObjects.Add((mapComp.MapId, gridObj));
}
foreach (var (beacon, _) in _shuttles.GetExclusions(mapComp.MapId, _exclusions))
{
+ if (beacon.HideButton)
+ continue;
+
_pendingMapObjects.Add((mapComp.MapId, beacon));
}
foreach (var (beacon, _) in _shuttles.GetBeacons(mapComp.MapId, _beacons))
{
+ if (beacon.HideButton)
+ continue;
+
_pendingMapObjects.Add((mapComp.MapId, beacon));
}
var existing = _mapObjects.GetOrNew(mapId);
existing.Add(mapObj);
- if (mapObj.HideButton)
- return;
-
var gridContents = _mapHeadings[mapId];
var gridButton = new Button()