Skip to content

Commit

Permalink
fix loot drop bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzo committed Jul 20, 2024
1 parent 7a001ea commit 3a4137a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changesets/Boneworks_LootDropBugfix_Patch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a silly mistake I made in the algorithm which I didn't detect because I was testing on ammo boxes. 🤦
2 changes: 2 additions & 0 deletions projects/Boneworks/LootDropBugfix/src/Mod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using HarmonyLib;
using UnityEngine;
using StressLevelZero.Data;
using System.Linq;

namespace Sst.LootDropBugfix;

Expand Down Expand Up @@ -33,6 +34,7 @@ public static SpawnableObject GetLootItemFixed(LootTableData lootTable) {
if (lower <= n && n < upper) { // changed, used to be lower exclusive
return item.spawnable;
}
lower = upper;
}
return null;
}
Expand Down

0 comments on commit 3a4137a

Please sign in to comment.