mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +09:00
increased a random chance for records to 1/4096
This commit is contained in:
@@ -111,8 +111,13 @@ object PickaxeCore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// temporary: spawn random record on prob 1/65536 when digging dirts
|
// temporary: spawn random record on prob 1/4096 when digging dirts/sands/gravels
|
||||||
if (ItemCodex[tileBroken]?.hasTag("CULTIVABLE") == true && Math.random() < 1.0 / 65536.0) {
|
val itemprop = ItemCodex[tileBroken]
|
||||||
|
if (Math.random() < 1.0 / 4096.0 &&
|
||||||
|
(itemprop?.hasTag("CULTIVABLE") == true ||
|
||||||
|
itemprop?.hasTag("SAND") == true ||
|
||||||
|
itemprop?.hasTag("GRAVEL") == true)
|
||||||
|
) {
|
||||||
val drop = "item@basegame:${32769 + Math.random().times(9).toInt()}"
|
val drop = "item@basegame:${32769 + Math.random().times(9).toInt()}"
|
||||||
dropItem(drop, x, y)
|
dropItem(drop, x, y)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user