Protects living damage variables (#26892)

This commit is contained in:
Contrabang
2024-09-25 11:09:56 +00:00
committed by GitHub
parent bc6a2fb593
commit 8fd62f8702
7 changed files with 15 additions and 15 deletions
@@ -144,7 +144,7 @@
return
var/obj/tgvehicle/scooter/skateboard/S = parent
for(var/mob/living/L in S.return_occupants()) // Only one on a skateboard unless an admin var edits it. If an admin var edits it, that is on them.
if((L.staminaloss >= 60 || L.health <= 40) && !L.absorb_stun(0)) // Only injured people can be shot off. Hulks and people on stimulants can not be shot off.
if((L.getStaminaLoss() >= 60 || L.health <= 40) && !L.absorb_stun(0)) // Only injured people can be shot off. Hulks and people on stimulants can not be shot off.
S.unbuckle_mob(L)
L.KnockDown(2 SECONDS)
L.visible_message("<span class='warning'>[L] gets shot off [S] by [projectile]!</span>",
+2 -2
View File
@@ -550,7 +550,7 @@
return TRUE
/datum/status_effect/speedlegs/tick()
if(owner.stat || owner.staminaloss >= 90 || cling.chem_charges <= (stacks + 1) * 3)
if(owner.stat || owner.getStaminaLoss() >= 90 || cling.chem_charges <= (stacks + 1) * 3)
to_chat(owner, "<span class='danger'>Our muscles relax without the energy to strengthen them.</span>")
owner.Weaken(6 SECONDS)
qdel(src)
@@ -561,7 +561,7 @@
to_chat(owner, "<span class='warning'>Our legs are really starting to hurt...</span>")
/datum/status_effect/speedlegs/before_remove()
if(stacks < 3 && !(owner.stat || owner.staminaloss >= 90 || cling.chem_charges <= (stacks + 1) * 3)) //We don't want people to turn it on and off fast, however, we need it forced off if the 3 later conditions are met.
if(stacks < 3 && !(owner.stat || owner.getStaminaLoss() >= 90 || cling.chem_charges <= (stacks + 1) * 3)) //We don't want people to turn it on and off fast, however, we need it forced off if the 3 later conditions are met.
to_chat(owner, "<span class='notice'>Our muscles just tensed up, they will not relax so fast.</span>")
return FALSE
return TRUE