Fix shuttle loading error (#22767)

This commit is contained in:
Leon Friedrich
2023-12-20 01:24:26 -05:00
committed by GitHub
parent ce1e4b8df5
commit 20595813b6
3 changed files with 9 additions and 15 deletions

View File

@@ -196,6 +196,7 @@ public sealed class PiratesRuleSystem : GameRuleSystem<PiratesRuleComponent>
var gridId = _map.LoadGrid(GameTicker.DefaultMap, map, new MapLoadOptions var gridId = _map.LoadGrid(GameTicker.DefaultMap, map, new MapLoadOptions
{ {
Offset = aabb.Center + new Vector2(a, a), Offset = aabb.Center + new Vector2(a, a),
LoadMap = false,
}); });
if (!gridId.HasValue) if (!gridId.HasValue)

View File

@@ -409,7 +409,10 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
} }
var mapId = _mapManager.CreateMap(); var mapId = _mapManager.CreateMap();
var grid = _map.LoadGrid(mapId, component.Map.ToString()); var grid = _map.LoadGrid(mapId, component.Map.ToString(), new MapLoadOptions()
{
LoadMap = false,
});
var map = _mapManager.GetMapEntityId(mapId); var map = _mapManager.GetMapEntityId(mapId);
if (!Exists(map)) if (!Exists(map))
@@ -469,7 +472,9 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
var shuttle = _map.LoadGrid(map.MapId, shuttlePath.ToString(), new MapLoadOptions() var shuttle = _map.LoadGrid(map.MapId, shuttlePath.ToString(), new MapLoadOptions()
{ {
// Should be far enough... right? I'm too lazy to bounds check CentCom rn. // Should be far enough... right? I'm too lazy to bounds check CentCom rn.
Offset = new Vector2(500f + centcomm.ShuttleIndex, 0f) Offset = new Vector2(500f + centcomm.ShuttleIndex, 0f),
// fun fact: if you just fucking yeet centcomm into nullspace anytime you try to spawn the shuttle, then any distance is far enough. so lets not do that
LoadMap = false,
}); });
if (shuttle == null) if (shuttle == null)

View File

@@ -23,7 +23,7 @@ entities:
- name: NT Evac Transit - name: NT Evac Transit
type: MetaData type: MetaData
- pos: -4.3957214,6.3308363 - pos: -4.3957214,6.3308363
parent: 161 parent: invalid
type: Transform type: Transform
- chunks: - chunks:
0,-2: 0,-2:
@@ -430,18 +430,6 @@ entities:
type: GridAtmosphere type: GridAtmosphere
- type: GasTileOverlay - type: GasTileOverlay
- type: GridPathfinding - type: GridPathfinding
- uid: 161
components:
- name: map 20
type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: LoadedMap
- proto: AirAlarm - proto: AirAlarm
entities: entities:
- uid: 3 - uid: 3