mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
fix
This commit is contained in:
@@ -4,19 +4,19 @@
|
||||
|
||||
/// Maximum stamina buffer
|
||||
/datum/config_entry/number/stamina_combat/buffer_max
|
||||
config_entry_value = 40
|
||||
config_entry_value = 30
|
||||
|
||||
/// Seconds until percent_regeneration_out_of_combat kicks in
|
||||
/datum/config_entry/number/stamina_combat/out_of_combat_timer
|
||||
config_entry_value = 10
|
||||
config_entry_value = 15
|
||||
|
||||
/// Base regeneration per second
|
||||
/datum/config_entry/number/stamina_combat/base_regeneration
|
||||
config_entry_value = 5
|
||||
config_entry_value = 0.5
|
||||
|
||||
/// Combat mode regeneration per second
|
||||
/datum/config_entry/number/stamina_combat/combat_regeneration
|
||||
config_entry_value = 12.5
|
||||
config_entry_value = 5
|
||||
|
||||
/// After out_of_combat_timer elapses, additionally regenerate this percent of total stamina per second. Unaffected by combat mode.
|
||||
/datum/config_entry/number/stamina_combat/percent_regeneration_out_of_combat
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
return TRUE
|
||||
if(stamina_buffer < amount)
|
||||
var/stamina_health = getStaminaLoss()
|
||||
if(stamina_health < STAMINA_NO_OVERDRAW_THRESHOLD)
|
||||
if(stamina_health > STAMINA_NO_OVERDRAW_THRESHOLD)
|
||||
if(warn)
|
||||
to_chat(src, "<span class='warning'>You do not have enough action stamina to do that!</span>")
|
||||
return FALSE
|
||||
@@ -41,7 +41,7 @@
|
||||
CONFIG_CACHE_ENTRY_AND_FETCH_VALUE(number/stamina_combat/post_action_penalty_factor, post_action_penalty_factor)
|
||||
var/base_regen = (SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))? base_regeneration : combat_regeneration
|
||||
var/time_since_last_action = world.time - stamina_buffer_last_use
|
||||
var/action_penalty = (((time_since_last_action) < (post_action_penalty_delay * 10)) && post_action_penalty_factor) || 1
|
||||
var/action_penalty = ((time_since_last_action) < (post_action_penalty_delay * 10))? post_action_penalty_factor : 1
|
||||
var/out_of_combat_bonus = (time_since_last_action < (out_of_combat_timer * 10))? 0 : ((buffer_max * percent_regeneration_out_of_combat * 0.01))
|
||||
var/regen = ((base_regen * action_penalty) + out_of_combat_bonus) * time * 0.1 * stamina_buffer_regen_mod
|
||||
stamina_buffer += min((buffer_max - stamina_buffer), regen)
|
||||
|
||||
Reference in New Issue
Block a user