BluebirdGreycoat / musttest_game

Other
1 stars 1 forks source link

Perhaps, a small oversight...? #5

Closed hlqkj closed 5 months ago

hlqkj commented 5 months ago

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.

hlqkj commented 5 months ago

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

BluebirdGreycoat commented 5 months ago

Thanks for the finds!