mirror of
https://notabug.org/TenPlus1/lucky_block.git
synced 2024-10-05 23:03:05 +02:00
blocks more random
This commit is contained in:
parent
f6aa05e33f
commit
1385954025
3
init.lua
3
init.lua
@ -281,7 +281,8 @@ end
|
||||
-- this is what happens when you dig a lucky block
|
||||
local lucky_block = function(pos, digger)
|
||||
|
||||
math.randomseed(os.time()) -- make sure it's really random
|
||||
-- make sure it's really random
|
||||
math.randomseed(os.time() + minetest.get_timeofday())
|
||||
|
||||
local luck = math.random(1, #lucky_list) ; -- luck = 1
|
||||
local action = lucky_list[luck][1]
|
||||
|
Loading…
Reference in New Issue
Block a user