From 0b5cedf893c6d0fbe023ac3861f38908d712347a Mon Sep 17 00:00:00 2001 From: keronshb Date: Sat, 20 Mar 2021 20:40:51 -0400 Subject: [PATCH 1/2] patches out a radioactive microlaser tech, makes radioactive microlasers not knock out rad-immune creatures (#57380) --- .../objects/items/devices/traitordevices.dm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 70edd3f43d..dfa81df01f 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -69,8 +69,9 @@ effective or pretty fucking useless. */ /obj/item/healthanalyzer/rad_laser - custom_materials = list(/datum/material/iron=400) - var/irradiate = 1 + var/irradiate = TRUE + var/stealth = FALSE + var/used = FALSE // is it cooling down? var/intensity = 10 // how much damage the radiation does var/wavelength = 10 // time it takes for the radiation to kick in, in seconds var/used = 0 // is it cooling down? @@ -92,16 +93,16 @@ effective or pretty fucking useless. addtimer(VARSET_CALLBACK(src, used, FALSE), cooldown) addtimer(VARSET_CALLBACK(src, icon_state, "health"), cooldown) to_chat(user, "Successfully irradiated [M].") - addtimer(CALLBACK(src, .proc/radiation_aftereffect, M), (wavelength+(intensity*4))*5) + addtimer(CALLBACK(src, .proc/radiation_aftereffect, M, intensity), (wavelength+(intensity*4))*5) else to_chat(user, "The radioactive microlaser is still recharging.") -/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M) - if(QDELETED(M)) +/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M, passed_intensity) + if(QDELETED(M) || !ishuman(M) || HAS_TRAIT(M, TRAIT_RADIMMUNE)) return - if(intensity >= 5) - M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS) - M.rad_act(intensity*10) + if(passed_intensity >= 5) + M.apply_effect(round(passed_intensity/0.075), EFFECT_UNCONSCIOUS) //to save you some math, this is a round(intensity * (4/3)) second long knockout + M.rad_act(passed_intensity*10) /obj/item/healthanalyzer/rad_laser/proc/get_cooldown() return round(max(10, (stealth*30 + intensity*5 - wavelength/4))) From b06c15ab30377dc13f2beafac56698a97cf25fba Mon Sep 17 00:00:00 2001 From: keronshb <54602815+keronshb@users.noreply.github.com> Date: Wed, 24 Mar 2021 21:32:31 -0400 Subject: [PATCH 2/2] Update traitordevices.dm Fixed --- code/game/objects/items/devices/traitordevices.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index dfa81df01f..8c36703855 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -70,8 +70,6 @@ effective or pretty fucking useless. /obj/item/healthanalyzer/rad_laser var/irradiate = TRUE - var/stealth = FALSE - var/used = FALSE // is it cooling down? var/intensity = 10 // how much damage the radiation does var/wavelength = 10 // time it takes for the radiation to kick in, in seconds var/used = 0 // is it cooling down?