mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
First big chunk of the refactor
mid-refactor of `take_overall_damage` Fully refactors the (?:take|heal)_(?:overall|organ)_damage procs Allows the dead to examine Removes the `blinded` var Refactor cyborg components so vision loss is instant Robot life/death updates instantly Adds instant updates for damage overlays and HUD icons for humans Final reconciliation with the species refactor Adds a stat debugging system and debugging logs Also fixes instant death on species change "Debugging logs" are used for stuff an admin wouldn't care about but someone debugging would I used it to fix people dying instantly when changing species due to temporary deletion of the brain Fox's requests Adds a more careful updating system to our reagents system
This commit is contained in:
@@ -232,7 +232,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm")
|
||||
if(affecting && affecting.receive_damage(0, 5)) // 5 burn damage
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return
|
||||
else
|
||||
extinguish()
|
||||
@@ -554,4 +553,4 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
|
||||
return TRUE
|
||||
|
||||
/obj/item/attack_hulk(mob/living/carbon/human/user)
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
to_chat(AI, "Your core files are being wiped!")
|
||||
while(AI && AI.stat != DEAD)
|
||||
AI.adjustOxyLoss(2)
|
||||
AI.updatehealth()
|
||||
sleep(10)
|
||||
flush = 0
|
||||
|
||||
|
||||
@@ -302,14 +302,12 @@
|
||||
|
||||
if(cyborg.health < cyborg.maxHealth)
|
||||
if(cyborg.health < 0)
|
||||
repair_amount = -2.5
|
||||
repair_amount = 2.5
|
||||
powercost = 30
|
||||
else
|
||||
repair_amount = -1
|
||||
repair_amount = 1
|
||||
powercost = 10
|
||||
cyborg.adjustBruteLoss(repair_amount)
|
||||
cyborg.adjustFireLoss(repair_amount)
|
||||
cyborg.updatehealth()
|
||||
cyborg.heal_overall_damage(repair_amount, repair_amount)
|
||||
cyborg.cell.use(powercost)
|
||||
else
|
||||
cyborg.cell.use(5)
|
||||
|
||||
@@ -94,9 +94,7 @@
|
||||
|
||||
hp -= Proj.damage
|
||||
if(hp <= 0)
|
||||
for(var/mob/O in oviewers())
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, "<span class='warning'>[src] breaks into tiny pieces and collapses!</span>")
|
||||
visible_message("<span class='warning'>[src] breaks into tiny pieces and collapses!</span>")
|
||||
qdel(src)
|
||||
|
||||
// Create a temporary object to represent the damage
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
|
||||
else
|
||||
M.heal_organ_damage(heal_brute, heal_burn)
|
||||
M.updatehealth()
|
||||
user.visible_message("<span class='green'>[user] applies [src] on [M].</span>", \
|
||||
"<span class='green'>You apply [src] on [M].</span>")
|
||||
use(1)
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
if(istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.getBruteLoss() || R.getFireLoss() )
|
||||
R.adjustBruteLoss(-15)
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
R.heal_overall_damage(15, 15)
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applied some [src] at [R]'s damaged areas.</span>",\
|
||||
"<span class='notice'>You apply some [src] at [R]'s damaged areas.</span>")
|
||||
@@ -31,7 +29,6 @@
|
||||
if(S && S.is_robotic())
|
||||
if(S.get_damage())
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at[user != M ? " \the [M]'s" : " \the"][S.name] with \the [src].</span>",\
|
||||
"<span class='notice'>You apply some nanite paste at [user == M ? "your" : "[M]'s"] [S.name].</span>")
|
||||
|
||||
@@ -332,7 +332,6 @@
|
||||
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
|
||||
H.adjustStaminaLoss(50)
|
||||
H.Weaken(5)
|
||||
H.updatehealth() //forces health update before next life tick
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
H.emote("gasp")
|
||||
if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes.
|
||||
@@ -479,7 +478,6 @@
|
||||
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
|
||||
H.adjustStaminaLoss(50)
|
||||
H.Weaken(5)
|
||||
H.updatehealth() //forces health update before next life tick
|
||||
if(!H.undergoing_cardiac_arrest() && prob(10)) // Your heart explodes.
|
||||
H.set_heartattack(TRUE)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
if(affecting.receive_damage( 0, 5 )) //INFERNO
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], [user.p_they()] however burn[user.p_s()] [user.p_their()] finger in the process.</span>")
|
||||
|
||||
set_light(2)
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
|
||||
if(affecting.receive_damage(force*0.5))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
|
||||
/obj/item/shard/attackby(obj/item/I, mob/user, params)
|
||||
if(iswelder(I))
|
||||
@@ -87,7 +86,6 @@
|
||||
H.Weaken(3)
|
||||
if(affecting.receive_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
..()
|
||||
|
||||
/obj/item/shard/plasma
|
||||
@@ -126,4 +124,4 @@
|
||||
to_chat(usr, "You add the newly-formed plasma glass to the stack. It now contains [NG.amount] sheets.")
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -147,7 +147,6 @@
|
||||
H.adjustBruteLoss(damage)
|
||||
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
return
|
||||
|
||||
/obj/structure/proc/can_touch(var/mob/user)
|
||||
|
||||
@@ -60,9 +60,7 @@
|
||||
if(allowed(user))
|
||||
locked = !locked
|
||||
playsound(loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, "<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
|
||||
visible_message("<span class='notice'>The locker has been [locked ? null : "un"]locked by [user].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
|
||||
@@ -270,9 +270,7 @@
|
||||
return
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
for(var/mob/O in viewers(user, 3))
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, "<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>")
|
||||
visible_message("<span class='notice'>The crate has been [locked ? null : "un"]locked by [user].</span>")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Access Denied</span>")
|
||||
|
||||
@@ -69,10 +69,7 @@
|
||||
if(src.destroyed)
|
||||
return
|
||||
else
|
||||
to_chat(usr, text("<span class='notice'>You kick the lab cage.</span>"))
|
||||
for(var/mob/O in oviewers())
|
||||
if((O.client && !( O.blinded )))
|
||||
to_chat(O, text("<span class='warning'>[] kicks the lab cage.</span>", usr))
|
||||
user.visible_message("<span class='warning'>[user] kicks the lab cage.</span>", "<span class='notice'>You kick the lab cage.</span>")
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
@@ -82,4 +79,4 @@
|
||||
new /obj/item/clothing/mask/facehugger/lamarr(src.loc)
|
||||
occupied = 0
|
||||
update_icon()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -207,9 +207,7 @@
|
||||
return
|
||||
O.forceMove(loc)
|
||||
if(user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if((B.client && !( B.blinded )))
|
||||
to_chat(B, text("<span class='warning'>[] stuffs [] into []!</span>", user, O, src))
|
||||
user.visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/Destroy()
|
||||
@@ -440,9 +438,7 @@
|
||||
return
|
||||
O.forceMove(loc)
|
||||
if(user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if((B.client && !( B.blinded )))
|
||||
to_chat(B, text("<span class='warning'>[] stuffs [] into []!</span>", user, O, src))
|
||||
user.visible_message("<span class='warning'>[user] stuffs [O] into [src]!</span>")
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user