Closed hlqkj closed 5 months ago
You probably meant to use math.random(ndef.min_time, ndef.max_time) here:
math.random(ndef.min_time, ndef.max_time)
https://github.com/BluebirdGreycoat/musttest_game/blob/2e047e91cbd90d497ceddd671bfbaf1cecb12b5d/mods/dirtspread/init.lua#L95
and here:
https://github.com/BluebirdGreycoat/musttest_game/blob/2e047e91cbd90d497ceddd671bfbaf1cecb12b5d/mods/dirtspread/init.lua#L136
Right now, I think it would only use the min_time value instead.
min_time
Also, this case is actually always ignored (the timer is not actually restarted):
https://github.com/BluebirdGreycoat/musttest_game/blob/2e047e91cbd90d497ceddd671bfbaf1cecb12b5d/mods/dirtspread/init.lua#L82-L87
because the return value of the "hook" function is always ignored when it's actually called:
https://github.com/BluebirdGreycoat/musttest_game/blob/2e047e91cbd90d497ceddd671bfbaf1cecb12b5d/mods/dirtspread/init.lua#L232-L246
Thanks for the finds!
You probably meant to use
math.random(ndef.min_time, ndef.max_time)
here:https://github.com/BluebirdGreycoat/musttest_game/blob/2e047e91cbd90d497ceddd671bfbaf1cecb12b5d/mods/dirtspread/init.lua#L95
and here:
https://github.com/BluebirdGreycoat/musttest_game/blob/2e047e91cbd90d497ceddd671bfbaf1cecb12b5d/mods/dirtspread/init.lua#L136
Right now, I think it would only use the
min_time
value instead.