Do not trigger exhaust for punches
Have to investigate this a bit but it fails in stamina/init.lua:81...
This commit is contained in:
parent
42ae3f4470
commit
0c7ea53572
@ -1,6 +1,6 @@
|
|||||||
local timestamp = {}
|
local timestamp = {}
|
||||||
stamina.register_on_exhaust_player(function(player, change)
|
stamina.register_on_exhaust_player(function(player, change, reason)
|
||||||
if type(player) ~= "userdata" or change < stamina.settings.exhaust_craft then return end
|
if type(player) ~= "userdata" or reason == "punch" or change < stamina.settings.exhaust_craft then return end
|
||||||
local now = minetest.get_us_time()
|
local now = minetest.get_us_time()
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if timestamp[name] then
|
if timestamp[name] then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user