Salvage magnet revamp (#23119)
* Generic offering window * More work * weh * Parity * Progression meter * magnet * rona * PG asteroid work * code red * Asteroid spawnings * clams * a * Marker fixes * More fixes * Workings of biome asteroids * A * Fix this loading code * a * Fix masking * weh * Fixes * Magnet claiming * toe * petogue * magnet * Bunch of fixes * Fix default * Fixes * asteroids * Fix offerings * Localisation and a bunch of fixes * a * Fixes * Preliminary draft * Announcement fixes * Fixes and bump spawn rate * Fix asteroid spawns and UI * More fixes * Expeditions fix * fix * Gravity * Fix announcement rounding * a * Offset tweak * sus * jankass * Fix merge
This commit is contained in:
@@ -27,6 +27,7 @@ public sealed partial class DungeonJob : Job<Dungeon>
|
||||
private readonly DecalSystem _decals;
|
||||
private readonly DungeonSystem _dungeon;
|
||||
private readonly EntityLookupSystem _lookup;
|
||||
private readonly SharedMapSystem _maps;
|
||||
private readonly SharedTransformSystem _transform;
|
||||
private EntityQuery<TagComponent> _tagQuery;
|
||||
|
||||
@@ -68,6 +69,7 @@ public sealed partial class DungeonJob : Job<Dungeon>
|
||||
_decals = decals;
|
||||
_dungeon = dungeon;
|
||||
_lookup = lookup;
|
||||
_maps = _entManager.System<SharedMapSystem>();
|
||||
_transform = transform;
|
||||
_tagQuery = _entManager.GetEntityQuery<TagComponent>();
|
||||
|
||||
@@ -86,15 +88,18 @@ public sealed partial class DungeonJob : Job<Dungeon>
|
||||
|
||||
switch (_gen.Generator)
|
||||
{
|
||||
case NoiseDunGen noise:
|
||||
dungeon = await GenerateNoiseDungeon(noise, _gridUid, _grid, _seed);
|
||||
break;
|
||||
case PrefabDunGen prefab:
|
||||
dungeon = await GeneratePrefabDungeon(prefab, _gridUid, _grid, _seed);
|
||||
DebugTools.Assert(dungeon.RoomExteriorTiles.Count > 0);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
DebugTools.Assert(dungeon.RoomTiles.Count > 0);
|
||||
DebugTools.Assert(dungeon.RoomExteriorTiles.Count > 0);
|
||||
|
||||
// To make it slightly more deterministic treat this RNG as separate ig.
|
||||
var random = new Random(_seed);
|
||||
@@ -108,6 +113,9 @@ public sealed partial class DungeonJob : Job<Dungeon>
|
||||
case AutoCablingPostGen cabling:
|
||||
await PostGen(cabling, dungeon, _gridUid, _grid, random);
|
||||
break;
|
||||
case BiomePostGen biome:
|
||||
await PostGen(biome, dungeon, _gridUid, _grid, random);
|
||||
break;
|
||||
case BoundaryWallPostGen boundary:
|
||||
await PostGen(boundary, dungeon, _gridUid, _grid, random);
|
||||
break;
|
||||
@@ -138,6 +146,9 @@ public sealed partial class DungeonJob : Job<Dungeon>
|
||||
case InternalWindowPostGen internalWindow:
|
||||
await PostGen(internalWindow, dungeon, _gridUid, _grid, random);
|
||||
break;
|
||||
case BiomeMarkerLayerPostGen markerPost:
|
||||
await PostGen(markerPost, dungeon, _gridUid, _grid, random);
|
||||
break;
|
||||
case RoomEntrancePostGen rEntrance:
|
||||
await PostGen(rEntrance, dungeon, _gridUid, _grid, random);
|
||||
break;
|
||||
@@ -154,6 +165,7 @@ public sealed partial class DungeonJob : Job<Dungeon>
|
||||
break;
|
||||
}
|
||||
|
||||
// Defer splitting so they don't get spammed and so we don't have to worry about tracking the grid along the way.
|
||||
_grid.CanSplit = true;
|
||||
_entManager.System<GridFixtureSystem>().CheckSplits(_gridUid);
|
||||
return dungeon;
|
||||
|
||||
Reference in New Issue
Block a user