goodbye noobtrap (#18469)

This commit is contained in:
Viz
2022-07-21 14:02:40 +01:00
committed by GitHub
parent 38f4445e26
commit 949b73acf2
7 changed files with 5 additions and 107 deletions
@@ -298,7 +298,6 @@
/obj/item/ammo_box/magazine/m10mm/ap = 1,
/obj/item/ammo_box/magazine/m10mm/fire = 1,
/obj/item/ammo_box/magazine/m10mm/hp = 1,
/obj/item/rad_laser = 1,
/obj/item/storage/box/syndie_kit/emp = 1,
/obj/item/toy/carpplushie/dehy_carp = 1,
/obj/item/clothing/glasses/hud/security/chameleon = 1)
@@ -1,93 +1,3 @@
/*
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/rad_laser
name = "health analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "health2"
item_state = "healthanalyzer"
belt_icon = "health_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 = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 3
w_class = WEIGHT_CLASS_TINY
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 = FALSE // is it cooling down?
/obj/item/rad_laser/attack(mob/living/M, mob/living/user)
if(!used)
add_attack_logs(user, M, "Irradiated by [src]")
user.visible_message("<span class='notice'>[user] analyzes [M]'s vitals.</span>")
var/cooldown = round(max(100,(((intensity*8)-(wavelength/2))+(intensity*2))*10))
used = TRUE
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.Paralyse(intensity * 40/3)
M.rad_act(intensity * 10)
else
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
/obj/item/rad_laser/proc/handle_cooldown(cooldown)
spawn(cooldown)
used = FALSE
icon_state = "health2"
/obj/item/rad_laser/attack_self(mob/user)
..()
interact(user)
/obj/item/rad_laser/interact(mob/user)
user.set_machine(src)
var/cooldown = round(max(10,((intensity*8)-(wavelength/2))+(intensity*2)))
var/dat = {"
Radiation Intensity: <A href='?src=[UID()];radint=-5'>-</A><A href='?src=[UID()];radint=-1'>-</A> [intensity] <A href='?src=[UID()];radint=1'>+</A><A href='?src=[UID()];radint=5'>+</A><BR>
Radiation Wavelength: <A href='?src=[UID()];radwav=-5'>-</A><A href='?src=[UID()];radwav=-1'>-</A> [(wavelength+(intensity*4))] <A href='?src=[UID()];radwav=1'>+</A><A href='?src=[UID()];radwav=5'>+</A><BR>
Laser Cooldown: [cooldown] Seconds<BR>
"}
var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240)
popup.set_content(dat)
popup.open()
/obj/item/rad_laser/Topic(href, href_list)
if(..())
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)))
attack_self(usr)
add_fingerprint(usr)
return
/obj/item/jammer
name = "radio jammer"
desc = "Device used to disrupt nearby radio communication."
@@ -134,7 +134,6 @@
/obj/item/reagent_containers/hypospray/autoinjector,
/obj/item/reagent_containers/hypospray/CMO,
/obj/item/reagent_containers/hypospray/safety,
/obj/item/rad_laser,
/obj/item/sensor_device,
/obj/item/wrench/medical,
/obj/item/handheld_defibrillator,