why am i doing this

This commit is contained in:
silicons
2020-08-03 13:37:37 -07:00
parent 3d741218c1
commit 42db990836
21 changed files with 119 additions and 102 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* Attempts to use an amount of stamina from our stamina buffer.
* Does not use anything if we don't have enough.
*
* Returns TRUE or FALSE based on if we have it.
*/
/mob/living/proc/UseStaminaBuffer(amount, warn = FALSE)
if(!(combat_flags & COMBAT_FLAG_STAMINA_BUFFER))
return TRUE
if(stamina_buffer < amount)
if(warn)
to_chat(src, "<span class='warning'>You do not have enough action stamina to do that!</span>")
return
return FALSE
stamina_buffer -= amount
return TRUE
/**
* Updates our stamina buffer amount.
*/
/mob/living/proc/UpdateStaminaBuffer(updating_hud = TRUE)
var/time = world.time - stamina_buffer_regen_last
if(time <= 0)
return
stamina_buffer_regen_last = time
var/penalized