mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Maps fixes
This commit is contained in:
parent
33719a2da3
commit
7f69b8fa0f
15 changed files with 64 additions and 17 deletions
|
|
@ -139,9 +139,11 @@ public partial class RogueliteRoomManager : Node2D
|
|||
AddRandomOffshootType(offshoots, CurrentFloorData.MinSecrets, CurrentFloorData.MaxSecrets, RoomType.Secret);
|
||||
AddRandomOffshootType(offshoots, CurrentFloorData.MinTreasures, CurrentFloorData.MaxTreasures, RoomType.Treasure);
|
||||
|
||||
var shuffledOffshoots = offshoots.Shuffle().ToList();
|
||||
|
||||
// Always add guaranteed treasure first
|
||||
var shuffledOffshoots = offshoots.Shuffle();
|
||||
|
||||
var offshootsQueue = new Queue<RoomType>();
|
||||
offshootsQueue.Enqueue(RoomType.Treasure); // Always add a guaranteed treasure first
|
||||
offshootsQueue.EnqueueRange(shuffledOffshoots);
|
||||
|
||||
int currentOffshoot = 0;
|
||||
|
|
@ -353,7 +355,6 @@ public partial class RogueliteRoomManager : Node2D
|
|||
var spawnedRoom = TrySpawnRoom(roomToSpawn, nextPos, direction);
|
||||
if (spawnedRoom is null)
|
||||
{
|
||||
GD.PrintErr($"Could not spawn room {roomToSpawn} at {nextPos}");
|
||||
roomsList.Enqueue(roomToSpawn);
|
||||
tries++;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue