Refactors Organ Shocking To Use Signals (#15593)

* Refactors Organ Shocking To Use Signals

* proper source

* hush you
This commit is contained in:
Fox McCloud
2021-02-26 18:43:11 +00:00
committed by GitHub
parent b49a99d46e
commit c73cc5aa68
7 changed files with 21 additions and 18 deletions
@@ -67,7 +67,7 @@
H.AdjustWeakened(5)
H.AdjustStuttering(10)
to_chat(H, "<span class='danger'>You feel a powerful jolt!</span>")
H.shock_internal_organs(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
if(emagged && prob(10))
to_chat(user, "<span class='danger'>[src]'s on board scanner indicates that the target is undergoing a cardiac arrest!</span>")
+5 -5
View File
@@ -349,7 +349,7 @@
H.emote("gasp")
if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes.
H.set_heartattack(TRUE)
H.shock_internal_organs(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
add_attack_logs(user, M, "Stunned with [src]")
defib.deductcharge(revivecost)
cooldown = TRUE
@@ -400,7 +400,7 @@
update_icon()
return
H.set_heartattack(FALSE)
H.shock_internal_organs(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
@@ -435,7 +435,7 @@
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
H.shock_internal_organs(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
H.med_hud_set_health()
H.med_hud_set_status()
defib.deductcharge(revivecost)
@@ -498,7 +498,7 @@
H.Weaken(5)
if(!H.undergoing_cardiac_arrest() && prob(10)) // Your heart explodes.
H.set_heartattack(TRUE)
H.shock_internal_organs(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
H.emote("gasp")
add_attack_logs(user, M, "Stunned with [src]")
@@ -554,7 +554,7 @@
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
H.shock_internal_organs(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK, 100)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
+1 -3
View File
@@ -168,9 +168,7 @@
return
H.forcesay(GLOB.hit_appends)
if(iscarbon(L))
var/mob/living/carbon/C = L
C.shock_internal_organs(33)
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK, 33)
L.Stun(stunforce)
L.Weaken(stunforce)