Salvage expeditions (#12745)

This commit is contained in:
metalgearsloth
2023-04-20 10:43:13 +10:00
committed by GitHub
parent 486d7c179e
commit 122350f19c
79 changed files with 2764 additions and 662 deletions

View File

@@ -125,7 +125,10 @@ public sealed partial class DungeonJob
}
var tiles = new List<(Vector2i, Tile)>();
var dungeon = new Dungeon();
var dungeon = new Dungeon()
{
Position = _position
};
var availablePacks = new List<DungeonRoomPackPrototype>();
var chosenPacks = new DungeonRoomPackPrototype?[gen.RoomPacks.Count];
var packTransforms = new Matrix3[gen.RoomPacks.Count];
@@ -424,6 +427,16 @@ public sealed partial class DungeonJob
}
}
// Calculate center
var dungeonCenter = Vector2.Zero;
foreach (var room in dungeon.Rooms)
{
dungeonCenter += room.Center;
}
dungeon.Center = (Vector2i) (dungeonCenter / dungeon.Rooms.Count);
return dungeon;
}
}