1
0
mirror of https://github.com/Sokomine/cottages.git synced 2025-07-16 06:30:25 +02:00

use staminoid if available

This commit is contained in:
flux
2023-04-08 15:19:43 -07:00
parent cb9a744a1b
commit 5443195296
8 changed files with 27 additions and 26 deletions

View File

@ -7,8 +7,8 @@ local FS = function(...)
end
local get_safe_short_description = cottages.util.get_safe_short_description
local exhaust_player = cottages.util.exhaust_player
local has_stamina = cottages.has.stamina
local stamina_use = cottages.settings.straw.quern_stamina
local quern_min_per_turn = cottages.settings.straw.quern_min_per_turn
local quern_max_per_turn = cottages.settings.straw.quern_max_per_turn
@ -125,9 +125,7 @@ function straw.use_quern(pos, player)
minetest.sound_play({ name = cottages.sounds.use_quern }, { pos = pos, gain = 1, pitch = 0.25 }, true)
if has_stamina then
stamina.exhaust_player(player, stamina_use, "cottages:quern")
end
exhaust_player(player, stamina_use, "cottages:quern")
return true
end

View File

@ -7,8 +7,8 @@ local FS = function(...)
end
local get_safe_short_description = cottages.util.get_safe_short_description
local exhaust_player = cottages.util.exhaust_player
local has_stamina = cottages.has.stamina
local stamina_use = cottages.settings.straw.threshing_stamina
local threshing_min_per_punch = cottages.settings.straw.threshing_min_per_punch
local threshing_max_per_punch = cottages.settings.straw.threshing_max_per_punch
@ -166,9 +166,7 @@ function straw.use_threshing(pos, player)
minetest.sound_play({ name = cottages.sounds.use_thresher }, { pos = particle_pos, gain = 1, pitch = 0.5 }, true)
if has_stamina then
stamina.exhaust_player(player, stamina_use, "cottages:quern")
end
exhaust_player(player, stamina_use, "cottages:threshing")
return true
end