From 42867b255dd1a752560aab8bafacfed6b2b4c477 Mon Sep 17 00:00:00 2001 From: Bone White Date: Sun, 26 Oct 2014 01:08:18 +0000 Subject: [PATCH] Added Radiation Laser Traitor item, cmo/doctor/virologist only. 3 TC cost, looks like a health analyzer but is a delayed radiation + stun effect on attack. Has recharge time and configurable settings. Fox did most of the work, I just fixed it. --- code/datums/uplink_item.dm | 17 ++++ code/game/objects/items.dm | 1 + .../objects/items/devices/traitordevices.dm | 87 ++++++++++++++++++ .../mob/living/carbon/human/human_defense.dm | 10 +- icons/obj/device.dmi | Bin 23837 -> 24146 bytes 5 files changed, 110 insertions(+), 5 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index cfd394f6202..104b29310c4 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -144,6 +144,23 @@ var/list/uplink_items = list() cost = 2 job = list("Janitor") +//Medical + + +/datum/uplink_item/jobspecific/rad_laser + name = "Radiation Laser" + desc = "A radiation laser concealed inside of a Health Analyser, After a moderate delay, causes temporary collapse and radiation. Has adjustable controls, but will not function as a regular health analyzer, only appears like one. May not function correctly on radiation resistent humanoids!" + item = /obj/item/device/rad_laser + cost = 3 + job = list( + "Chief Medical Officer", + "Medical Doctor", + //"Geneticist", + //"Psychiatrist", + //"Chemist", + //"Paramedic", + "Virologist" + ) //Assistant diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 37183aa7ff7..a4b8ea018dc 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1,6 +1,7 @@ /obj/item name = "item" icon = 'icons/obj/items.dmi' + var/discrete = 0 // used in item_attack.dm to make an item not show an attack message to viewers var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/blood_overlay_color = null var/abstract = 0 diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 95bab377c70..d9b0a32728b 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -60,5 +60,92 @@ effective or pretty fucking useless. icon_state = "battererburnt" +/* + The radioactive microlaser, a device disguised as a health analyzer used to irradiate people. + The strength of the radiation is determined by the 'intensity' setting, while the delay between + the scan and the irradiation kicking in is determined by the wavelength. + Each scan will cause the microlaser to have a brief cooldown period. Higher intensity will increase + the cooldown, while higher wavelength will decrease it. + + Wavelength is also slightly increased by the intensity as well. +*/ + +/obj/item/device/rad_laser + name = "Health Analyzer" + icon_state = "health" + item_state = "analyzer" + desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end." + flags = FPRINT | TABLEPASS | CONDUCT + slot_flags = SLOT_BELT + discrete = 1 // Makes the item not give an attack log message for viewers. + throwforce = 3 + w_class = 1.0 + throw_speed = 5 + throw_range = 10 + m_amt = 200 + origin_tech = "magnets=3;biotech=5;syndicate=3" + var/intensity = 5 // 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? + +/obj/item/device/rad_laser/attack(mob/living/M as mob, mob/living/user as mob) + if(!used) + ..() + user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") + var/cooldown = round(max(100,(((intensity*8)-(wavelength/2))+(intensity*2))*10)) + used = 1 + icon_state = "health1" + handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength + spawn((wavelength+(intensity*4))*10) + if(M) + if(intensity >= 5) + M.apply_effect(round(intensity/1.5), PARALYZE) + M.apply_effect(intensity*10, IRRADIATE) + else + user << "The radioactive microlaser is still recharging." + +/obj/item/device/rad_laser/proc/handle_cooldown(var/cooldown) + spawn(cooldown) + used = 0 + icon_state = "health" + +/obj/item/device/rad_laser/attack_self(mob/user as mob) + ..() + interact(user) + +/obj/item/device/rad_laser/interact(mob/user as mob) + user.set_machine(src) + + var/cooldown = round(max(10,((intensity*8)-(wavelength/2))+(intensity*2))) + var/dat = {" + Radiation Intensity: -- [intensity] ++
+ Radiation Wavelength: -- [(wavelength+(intensity*4))] ++
+ Laser Cooldown: [cooldown] Seconds
+ "} + + var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240) + popup.set_content(dat) + popup.open() + +/obj/item/device/rad_laser/Topic(href, href_list) + if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained()) + return 1 + + usr.set_machine(src) + + if(href_list["radint"]) + var/amount = text2num(href_list["radint"]) + amount += intensity + intensity = max(1,(min(10,amount))) + + else if(href_list["radwav"]) + var/amount = text2num(href_list["radwav"]) + amount += wavelength + wavelength = max(1,(min(120,amount))) + + //updateUsrDialog() + interact(usr) + add_fingerprint(usr) + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index e08a8dde3e5..03ad70ce3eb 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -239,11 +239,11 @@ emp_act emag.uses-- affecting.sabotaged = 1 return 1 - - if(I.attack_verb.len) - visible_message("\red [src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!") - else - visible_message("\red [src] has been attacked in the [hit_area] with [I.name] by [user]!") + if(! I.discrete) + if(I.attack_verb.len) + visible_message("\red [src] has been [pick(I.attack_verb)] in the [hit_area] with [I.name] by [user]!") + else + visible_message("\red [src] has been attacked in the [hit_area] with [I.name] by [user]!") var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") var/weapon_sharp = is_sharp(I) diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index 7a4fe676021f95249bb74968094781d1f180519b..3c076f84c89c5253af4fd45e2aac380defbaa8a8 100644 GIT binary patch delta 2762 zcmV;*3N`hex&hL>0gxmCm60Vge{1X%WuJZzfs&LOJ5>*DrSE4lo*(Bn|MT?s`89uh zdCrc=PLj#@`R>;`TfIx+yL_K-H`%H~*>-;X<2-oG_xTNYP3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