drop random records when digging dirts but super-rarely

This commit is contained in:
minjaesong
2024-02-06 14:21:09 +09:00
parent 6d941a3841
commit a143887375
2 changed files with 9 additions and 1 deletions

View File

@@ -109,6 +109,14 @@ object PickaxeCore {
makeDust(tile, x, y, 9)
makeNoise(actor, tile)
}
// temporary: spawn random record on prob 1/65536 when digging dirts
if (ItemCodex[tileBroken]?.hasTag("CULTIVABLE") == true && Math.random() < 1.0 / 65536.0) {
val drop = "item@basegame:${32769 + Math.random().times(9).toInt()}"
dropItem(drop, x, y)
}
}
// tile not busted
if (Math.random() < actionInterval) {