Reboots the CNS implant (#23813)

* Reboots the CNS implant

* Update code/modules/surgery/organs/augments_internal.dm

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* contra you nerd you forgot a bracket

* Apply suggestions from code review

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* requested changes

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2024-02-04 16:45:10 -05:00
committed by GitHub
parent a2ff8ada2d
commit e2bdc3bfb9
7 changed files with 46 additions and 18 deletions
@@ -254,6 +254,7 @@
update_stamina()
if(staminaloss)
setStaminaLoss(0, FALSE)
SEND_SIGNAL(src, COMSIG_CARBON_STAMINA_REGENERATED)
update_health_hud()
// Keep SSD people asleep
@@ -8,6 +8,8 @@
return
if(!IsWeakened())
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
SEND_SIGNAL(src, COMSIG_CARBON_ENTER_STAMINACRIT)
stam_regen_start_time = world.time + (STAMINA_REGEN_BLOCK_TIME * stamina_regen_block_modifier)
var/prev = stam_paralyzed
stam_paralyzed = TRUE
ADD_TRAIT(src, TRAIT_IMMOBILIZED, "stam_crit") // make defines later
@@ -24,6 +24,7 @@
if(stam > DAMAGE_PRECISION && (maxHealth - stam) <= HEALTH_THRESHOLD_CRIT && !stat)
enter_stamcrit()
else if(stam_paralyzed)
SEND_SIGNAL(src, COMSIG_CARBON_EXIT_STAMINACRIT)
stam_paralyzed = FALSE
REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, "stam_crit") // make defines later
REMOVE_TRAIT(src, TRAIT_FLOORED, "stam_crit")
+2 -2
View File
@@ -284,7 +284,7 @@
else
. = STATUS_UPDATE_STAMINA
if(amount > 0)
stam_regen_start_time = world.time + STAMINA_REGEN_BLOCK_TIME
stam_regen_start_time = world.time + (STAMINA_REGEN_BLOCK_TIME * stamina_regen_block_modifier)
if(updating)
update_health_hud()
update_stamina()
@@ -300,7 +300,7 @@
else
. = STATUS_UPDATE_STAMINA
if(amount > 0)
stam_regen_start_time = world.time + STAMINA_REGEN_BLOCK_TIME
stam_regen_start_time = world.time + (STAMINA_REGEN_BLOCK_TIME * stamina_regen_block_modifier)
if(updating)
update_health_hud()
update_stamina()
@@ -71,6 +71,8 @@
var/stun_absorption = null //converted to a list of stun absorption sources this mob has when one is added
var/stam_regen_start_time = 0 //used to halt stamina regen temporarily
/// A multiplier for the ammount of time it takes for someone to regenerate stamina damage.
var/stamina_regen_block_modifier = 1
var/stam_paralyzed = FALSE //knocks you down
/// Number of degrees of rotation of a mob. 0 means no rotation, up-side facing NORTH. 90 means up-side rotated to face EAST, and so on.