limit bush duping (#33)

only allow a chance of getting a 2nd bush from bushes with fruit, to prevent instant bush duping.
This commit is contained in:
fluxionary 2022-11-04 09:28:33 -07:00 committed by GitHub
parent e159b843d2
commit 438a1adb32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ plantlife_bushes.after_dig_node = function(pos, oldnode, oldmetadata, digger)
-- with a chance of 1/3, return 2 bushes
local amount
if math.random(1,3) == 1 then
if can_harvest and math.random(1,3) == 1 then
amount = "2"
else
amount = "1"