getStaminaLoss()

This commit is contained in:
deathride58
2018-04-07 23:39:48 -04:00
parent 1800986125
commit 87365ee74b
15 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
if(5)
return "stamina0"
else
switch(100 - staminaloss)
switch(100 - getStaminaLoss())
if(100 to INFINITY)
return "stamina0"
if(80 to 100)
@@ -5,7 +5,7 @@
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return TRUE
if(user.staminaloss >= STAMINA_SOFTCRIT)
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")
return TRUE
var/mob/living/poordude = buckled_mobs[1]
@@ -19,7 +19,7 @@
return FALSE
/datum/species/proc/altdisarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.staminaloss >= STAMINA_SOFTCRIT)
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
return FALSE
else if(target.check_block())
@@ -72,11 +72,11 @@
return TRUE
else
var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
if(staminaloss >= STAMINA_SOFTCRIT)
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
to_chat(src, "<span class='warning'>You're too exhausted to get up!")
return FALSE
attemptingstandup = TRUE
var/health_deficiency = max((maxHealth - (health - staminaloss))*0.5, 0)
var/health_deficiency = max((maxHealth - (health - getStaminaLoss()))*0.5, 0)
if(!has_gravity())
health_deficiency = health_deficiency*0.2
totaldelay += health_deficiency
@@ -107,8 +107,8 @@
return FALSE
/mob/living/carbon/update_stamina()
var/total_health = (min(health*2,100) - staminaloss)
if(staminaloss)
var/total_health = (min(health*2,100) - getStaminaLoss())
if(getStaminaLoss())
if(!recoveringstam && total_health <= STAMINA_CRIT_TRADITIONAL && !stat)
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
resting = TRUE