Fix mystery items not spawning, adjust spawning rates, fix pause/unpausing for debug menu

This commit is contained in:
2026-06-13 01:26:38 -07:00
parent 8575cd6ddf
commit 3ab491e0af
13 changed files with 288 additions and 22 deletions
+1 -3
View File
@@ -53,11 +53,9 @@ public class ItemDatabase
if (itemsToExclude.Any())
validItems = [.. validItems.Except(itemsToExclude)];
validItems = [.. validItems.Where(x => x.ItemTag != ItemTag.MysteryItem)];
var weights = validItems.Select(x => x.SpawnRate).ToArray();
var index = rng.RandWeighted(weights);
GD.Print($"Item Spawn Index: {index}, Array Size: {validItems.Count()}");
GD.Print($"Item Spawn Index: {index}, Array Size: {validItems.Length}");
var selectedItem = validItems[index];
return selectedItem;
}