fixes
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
/// Stamina buffer regen multiplier while in combat mode
|
||||
#define STAMINA_BUFFER_REGEN_PER_SECOND_COMBAT 3
|
||||
/// percent of regen to take away at stamcrit
|
||||
#define STAMINA_BUFFER_STAMCRIT_REGEN_PENALTY_PERCENT 0.5
|
||||
#define STAMINA_BUFFER_STAMCRIT_REGEN_PERCENT_PENALTY 0.5
|
||||
/// percent of capacity to take away at stamcrit
|
||||
#define STAMINA_BUFFER_STAMCRIT_CAPACITY_PENALTY_PERCENT 0.5
|
||||
#define STAMINA_BUFFER_STAMCRIT_CAPACITY_PERCENT_PENALTY 0.5
|
||||
|
||||
// Standard amounts for stamina usage
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"COMBAT_FLAG_SPRINT_TOGGLED" = COMBAT_FLAG_SPRINT_TOGGLED,
|
||||
"COMBAT_FLAG_SPRINT_ACTIVE" = COMBAT_FLAG_SPRINT_ACTIVE,
|
||||
"COMBAT_FLAG_ATTEMPTING_CRAWL" = COMBAT_FLAG_ATTEMPTING_CRAWL,
|
||||
"COMBAT_FLAG_SOFT_STAMCRIT" = COMBAT_FLAG_SOFT_STAMCRIT,
|
||||
"COMBAT_FLAG_HARD_STAMCRIT" = COMBAT_FLAG_HARD_STAMCRIT,
|
||||
"COMBAT_FLAG_INTENTIONALLY_RESTING" = COMBAT_FLAG_INTENTIONALLY_RESTING,
|
||||
"COMBAT_FLAG_RESISTING_REST" = COMBAT_FLAG_RESISTING_REST,
|
||||
"COMBAT_FLAG_SPRINT_FORCED" = COMBAT_FLAG_SPRINT_FORCED
|
||||
|
||||
@@ -11,7 +11,11 @@
|
||||
/obj/screen/staminas/Click(location,control,params)
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
to_chat(L, "<span class='notice'>You have <b>[L.getStaminaLoss()]</b> stamina loss.<br>Your stamina buffer can take <b>[L.stambuffer]</b> stamina loss, and recharges at no cost.<br>Your stamina buffer is <b>[(L.stambuffer*(100/L.stambuffer))-(L.bufferedstam*(100/L.stambuffer))]%</b> full.</span>")
|
||||
to_chat(L, "<span class='notice'>You have <b>[L.getStaminaLoss()]</b> stamina loss.<br>\
|
||||
Your stamina buffer is currently [L.stamina_buffer]/[L.stamina_buffer_max], and recharges at [L.stamina_buffer_regen] and [L.stamina_buffer_regen_combat] (combat mode on) per second.<br>\
|
||||
Your stamina buffer will have its capacity reduced by up to [STAMINA_BUFFER_STAMCRIT_CAPACITY_PERCENT_PENALTY * 100] from stamina damage, up until stamcrit, and similarly will be impacted in regeneration by\
|
||||
[STAMINA_BUFFER_STAMCRIT_REGEN_PERCENT_PENALTY]% from said damage.\
|
||||
<br>Your stamina buffer is <b>[round((L.stamina_buffer / L.stamina_buffer_max) * 100, 0.1)]%</b> full.</span>")
|
||||
|
||||
/obj/screen/staminas/update_icon_state()
|
||||
var/mob/living/carbon/user = hud?.mymob
|
||||
@@ -42,13 +46,17 @@
|
||||
else if(user.hal_screwyhud == 5)
|
||||
icon_state = "stambuffer29"
|
||||
else
|
||||
icon_state = "stambuffer[FLOOR((stamina_buffer / stamina_buffer_max) * 29, 1)]"
|
||||
icon_state = "stambuffer[FLOOR((user.stamina_buffer / user.stamina_buffer_max) * 29, 1)]"
|
||||
|
||||
/obj/screen/staminabuffer/update_overlays()
|
||||
var/level = FLOOR((stamina_buffer / stamina_buffer_max) * 29, 1)
|
||||
. = ..()
|
||||
var/mob/living/carbon/user = hud?.mymob
|
||||
if(!user)
|
||||
return
|
||||
var/level = FLOOR((user.stamina_buffer / user.stamina_buffer_max) * 29, 1)
|
||||
if((user.stat == DEAD) || (user.combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (user.hal_screwyhud in 1 to 2) || (level <= 5))
|
||||
. = list("stamina_alert3")
|
||||
. += list("stamina_alert3")
|
||||
else if(level <= 8)
|
||||
. = list("stamina_alert2")
|
||||
. += list("stamina_alert2")
|
||||
else if(level <= 12)
|
||||
. = list("stamina_alert1")
|
||||
. += list("stamina_alert1")
|
||||
|
||||
Reference in New Issue
Block a user