From d70c166109314ba634591e8db19906abee6102b0 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 9 Sep 2015 17:00:53 -0400 Subject: [PATCH 1/2] Rad Laser Fix --- .../objects/items/devices/traitordevices.dm | 24 +++++++++---------- .../objects/items/weapons/storage/belt.dm | 1 + code/modules/clothing/spacesuits/rig.dm | 2 +- code/modules/clothing/suits/jobs.dm | 6 ++--- code/modules/clothing/suits/labcoat.dm | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index cb7dc52d743..c49dba813f6 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -80,21 +80,20 @@ effective or pretty fucking useless. 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 = 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 + throw_speed = 3 + throw_range = 7 materials = list(MAT_METAL=400) 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) +/obj/item/device/rad_laser/attack(mob/living/M, mob/living/user) if(!used) - ..() - user.visible_message(" [user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.") + add_logs(M, user, "irradiated", src) + user.visible_message("[user] has analyzed [M]'s vitals.") var/cooldown = round(max(100,(((intensity*8)-(wavelength/2))+(intensity*2))*10)) used = 1 icon_state = "health1" @@ -105,18 +104,18 @@ effective or pretty fucking useless. M.apply_effect(round(intensity/1.5), PARALYZE) M.apply_effect(intensity*10, IRRADIATE) else - user << "The radioactive microlaser is still recharging." + user << "The radioactive microlaser is still recharging." -/obj/item/device/rad_laser/proc/handle_cooldown(var/cooldown) +/obj/item/device/rad_laser/proc/handle_cooldown(cooldown) spawn(cooldown) used = 0 icon_state = "health2" -/obj/item/device/rad_laser/attack_self(mob/user as mob) +/obj/item/device/rad_laser/attack_self(mob/user) ..() interact(user) -/obj/item/device/rad_laser/interact(mob/user as mob) +/obj/item/device/rad_laser/interact(mob/user) user.set_machine(src) var/cooldown = round(max(10,((intensity*8)-(wavelength/2))+(intensity*2))) @@ -131,7 +130,7 @@ effective or pretty fucking useless. popup.open() /obj/item/device/rad_laser/Topic(href, href_list) - if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained()) + if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) return 1 usr.set_machine(src) @@ -146,7 +145,6 @@ effective or pretty fucking useless. amount += wavelength wavelength = max(1,(min(120,amount))) - //updateUsrDialog() - interact(usr) + attack_self(usr) add_fingerprint(usr) return \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 8fc0a74cf9c..5d92705d1ed 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -98,6 +98,7 @@ "/obj/item/clothing/mask/surgical", "/obj/item/clothing/gloves/color/latex", "/obj/item/weapon/reagent_containers/hypospray/autoinjector", + "/obj/item/device/rad_laser", "/obj/item/device/sensor_device" ) diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index 49181471fe8..4778735adf6 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -450,7 +450,7 @@ desc = "A special helmet designed for work in a hazardous, low pressure environment. Built with lightweight materials for extra comfort." item_state = "medical_hardsuit" slowdown = 1 - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical) + allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical,/obj/item/device/rad_laser) armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50) //Security diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 4b754f9483c..097955805c2 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -8,7 +8,7 @@ icon_state = "paramedic-vest" item_state = "paramedic-vest" allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \ - /obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen) + /obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser) armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 10) species_fit = list("Vox") sprite_sheets = list( @@ -23,7 +23,7 @@ item_state = "brigphysician-vest" allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \ /obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, \ - /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen) + /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser) armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 10, rad = 0) //Botonist @@ -278,7 +278,7 @@ item_state = "fr_jacket" blood_overlay_type = "armor" allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \ - /obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen) + /obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser) verb/toggle() set name = "Toggle Jacket Buttons" diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 14aa7594855..bad3378da22 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -5,7 +5,7 @@ item_state = "labcoat" blood_overlay_type = "coat" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS - allowed = list(/obj/item/device/analyzer,/obj/item/device/antibody_scanner,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper) + allowed = list(/obj/item/device/analyzer,/obj/item/device/antibody_scanner,/obj/item/stack/medical,/obj/item/weapon/dnainjector,/obj/item/weapon/reagent_containers/dropper,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/hypospray,/obj/item/device/healthanalyzer,/obj/item/device/flashlight/pen,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/storage/pill_bottle,/obj/item/weapon/paper,/obj/item/device/rad_laser) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0) species_fit = list("Vox") sprite_sheets = list( From 5b160f78f466ecbcbb6499b7889a4d2262bd797a Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 9 Sep 2015 17:49:27 -0400 Subject: [PATCH 2/2] topic-fixup --- code/game/objects/items/devices/traitordevices.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index c49dba813f6..b90f987adf5 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -130,7 +130,7 @@ effective or pretty fucking useless. popup.open() /obj/item/device/rad_laser/Topic(href, href_list) - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(..()) return 1 usr.set_machine(src)