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

@@ -284,7 +284,7 @@ $BULLET Music:
- music/discs/welded.ogg
℗ 2021, 2022, 2023, 2024 Orstphone
Check out the original tracks at:
Check out the original tracks on:
Apple Music: <https://music.apple.com/kr/artist/orstphone/1587723053>
Bandcamp: <https://orstphone.bandcamp.com/>
YouTube: <https://www.youtube.com/@Orstphone>

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) {