This commit is contained in:
silicons
2020-09-21 19:08:21 -07:00
parent ddc7f10de7
commit 2c4dc4d1a9
2 changed files with 3 additions and 3 deletions

View File

@@ -4,11 +4,11 @@
/// Maximum stamina buffer /// Maximum stamina buffer
/datum/config_entry/number/stamina_combat/buffer_max /datum/config_entry/number/stamina_combat/buffer_max
config_entry_value = 45 config_entry_value = 75
/// Seconds until percent_regeneration_out_of_combat kicks in /// Seconds until percent_regeneration_out_of_combat kicks in
/datum/config_entry/number/stamina_combat/out_of_combat_timer /datum/config_entry/number/stamina_combat/out_of_combat_timer
config_entry_value = 5 config_entry_value = 8
/// Base regeneration per second /// Base regeneration per second
/datum/config_entry/number/stamina_combat/base_regeneration /datum/config_entry/number/stamina_combat/base_regeneration

View File

@@ -39,7 +39,7 @@
var/base_regen = (SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))? base_regeneration : combat_regeneration var/base_regen = (SEND_SIGNAL(src, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))? base_regeneration : combat_regeneration
var/time_since_last_action = world.time - last_action var/time_since_last_action = world.time - last_action
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 * missing_percent_regeneration_out_of_combat * 0.01)) 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 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) stamina_buffer += min((buffer_max - stamina_buffer), regen)
if(updating_hud) if(updating_hud)