mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
radio-emp
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "aicard" // aicard-full
|
||||
item_state = "electronic"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
flags = NOBLUDGEON
|
||||
var/flush = null
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
|
||||
//moved these here from code/defines/obj/weapon.dm
|
||||
//please preference put stuff where it's easy to find - C
|
||||
|
||||
/obj/item/weapon/autopsy_scanner
|
||||
name = "autopsy scanner"
|
||||
desc = "Extracts information on wounds."
|
||||
icon = 'icons/obj/autopsy_scanner.dmi'
|
||||
icon_state = ""
|
||||
flags = CONDUCT
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "materials=1;biotech=1"
|
||||
var/list/datum/autopsy_data_scanner/wdata = list()
|
||||
var/list/datum/autopsy_data_scanner/chemtraces = list()
|
||||
var/list/chemtraces = list()
|
||||
var/target_name = null
|
||||
var/timeofdeath = null
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/Destroy()
|
||||
QDEL_LIST_ASSOC_VAL(wdata)
|
||||
return ..()
|
||||
|
||||
/datum/autopsy_data_scanner
|
||||
var/weapon = null // this is the DEFINITE weapon type that was used
|
||||
var/list/organs_scanned = list() // this maps a number of scanned organs to
|
||||
// the wounds to those organs with this data's weapon type
|
||||
var/organ_names = ""
|
||||
|
||||
/datum/autopsy_data_scanner/Destroy()
|
||||
QDEL_LIST_ASSOC_VAL(organs_scanned)
|
||||
return ..()
|
||||
|
||||
/datum/autopsy_data
|
||||
var/weapon = null
|
||||
var/pretend_weapon = null
|
||||
@@ -28,28 +32,23 @@
|
||||
var/hits = 0
|
||||
var/time_inflicted = 0
|
||||
|
||||
proc/copy()
|
||||
var/datum/autopsy_data/W = new()
|
||||
W.weapon = weapon
|
||||
W.pretend_weapon = pretend_weapon
|
||||
W.damage = damage
|
||||
W.hits = hits
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
/datum/autopsy_data/proc/copy()
|
||||
var/datum/autopsy_data/W = new()
|
||||
W.weapon = weapon
|
||||
W.pretend_weapon = pretend_weapon
|
||||
W.damage = damage
|
||||
W.hits = hits
|
||||
W.time_inflicted = time_inflicted
|
||||
return W
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
|
||||
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
|
||||
/obj/item/weapon/autopsy_scanner/proc/add_data(obj/item/organ/external/O)
|
||||
if(!O.autopsy_data.len && !O.trace_chemicals.len)
|
||||
return
|
||||
|
||||
for(var/V in O.autopsy_data)
|
||||
var/datum/autopsy_data/W = O.autopsy_data[V]
|
||||
|
||||
if(!W.pretend_weapon)
|
||||
/*
|
||||
// the more hits, the more likely it is that we get the right weapon type
|
||||
if(prob(50 + W.hits * 10 + W.damage))
|
||||
*/
|
||||
|
||||
// Buffing this stuff up for now!
|
||||
if(1)
|
||||
W.pretend_weapon = W.weapon
|
||||
else
|
||||
@@ -75,11 +74,8 @@
|
||||
if(O.trace_chemicals[V] > 0 && !chemtraces.Find(V))
|
||||
chemtraces += V
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/verb/print_data()
|
||||
set src in view(usr, 1)
|
||||
set name = "Print Data"
|
||||
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
|
||||
to_chat(usr, "No.")
|
||||
/obj/item/weapon/autopsy_scanner/attack_self(mob/user)
|
||||
if(!wdata.len && !chemtraces.len)
|
||||
return
|
||||
|
||||
var/scan_data = ""
|
||||
@@ -101,8 +97,10 @@
|
||||
|
||||
var/wname = W.pretend_weapon
|
||||
|
||||
if(wname in weapon_chances) weapon_chances[wname] += W.damage
|
||||
else weapon_chances[wname] = max(W.damage, 1)
|
||||
if(wname in weapon_chances)
|
||||
weapon_chances[wname] += W.damage
|
||||
else
|
||||
weapon_chances[wname] = max(W.damage, 1)
|
||||
total_score+=W.damage
|
||||
|
||||
|
||||
@@ -126,7 +124,8 @@
|
||||
if(30 to 1000)
|
||||
damage_desc = "<font color='red'>severe</font>"
|
||||
|
||||
if(!total_score) total_score = D.organs_scanned.len
|
||||
if(!total_score)
|
||||
total_score = D.organs_scanned.len
|
||||
|
||||
scan_data += "<b>Weapon #[n]</b><br>"
|
||||
if(damaging_weapon)
|
||||
@@ -147,36 +146,19 @@
|
||||
for(var/chemID in chemtraces)
|
||||
scan_data += chemID
|
||||
scan_data += "<br>"
|
||||
user.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
|
||||
|
||||
for(var/mob/O in viewers(usr))
|
||||
O.show_message("\red \the [src] rattles and prints out a sheet of paper.", 1)
|
||||
|
||||
playsound(loc, "sound/goonstation/machines/printer_thermal.ogg", 50, 1)
|
||||
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
sleep(10)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(usr.loc)
|
||||
var/obj/item/weapon/paper/P = new(user.loc)
|
||||
P.name = "Autopsy Data ([target_name])"
|
||||
P.info = "<tt>[scan_data]</tt>"
|
||||
P.overlays += "paper_words"
|
||||
|
||||
if(istype(usr,/mob/living/carbon))
|
||||
// place the item in the usr's hand if possible
|
||||
if(!usr.r_hand)
|
||||
P.loc = usr
|
||||
usr.r_hand = P
|
||||
P.layer = 20
|
||||
P.plane = HUD_PLANE
|
||||
else if(!usr.l_hand)
|
||||
P.loc = usr
|
||||
usr.l_hand = P
|
||||
P.layer = 20
|
||||
P.plane = HUD_PLANE
|
||||
user.put_in_hands(P)
|
||||
|
||||
if(istype(usr,/mob/living/carbon/human))
|
||||
usr:update_inv_l_hand()
|
||||
usr:update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return
|
||||
|
||||
@@ -185,23 +167,18 @@
|
||||
|
||||
if(target_name != M.name)
|
||||
target_name = M.name
|
||||
src.wdata = list()
|
||||
src.chemtraces = list()
|
||||
src.timeofdeath = null
|
||||
to_chat(user, "\red A new patient has been registered.. Purging data for previous patient.")
|
||||
wdata.Cut()
|
||||
chemtraces.Cut()
|
||||
timeofdeath = null
|
||||
to_chat(user, "<span class='warning'>A new patient has been registered. Purging data for previous patient.</span>")
|
||||
|
||||
src.timeofdeath = M.timeofdeath
|
||||
timeofdeath = M.timeofdeath
|
||||
|
||||
var/obj/item/organ/external/S = M.get_organ(user.zone_sel.selecting)
|
||||
if(!S)
|
||||
to_chat(usr, "<b>You can't scan this body part.</b>")
|
||||
to_chat(user, "<span class='warning'>You can't scan this body part.</span>")
|
||||
return
|
||||
if(!S.open)
|
||||
to_chat(usr, "<b>You have to cut the limb open first!</b>")
|
||||
return
|
||||
for(var/mob/O in viewers(M))
|
||||
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.name] with \the [src.name]", 1)
|
||||
M.visible_message("<span class='warning'>[user] scans the wounds on [M]'s [S] with [src]</span>")
|
||||
|
||||
src.add_data(S)
|
||||
|
||||
return 1
|
||||
add_data(S)
|
||||
return 1
|
||||
@@ -9,7 +9,7 @@
|
||||
desc = "For illicit snooping through the camera network."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "camera_bug"
|
||||
w_class = 1.0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
item_state = "camera_bug"
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
throwforce = 5.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "syndicate=4;magnets=4"
|
||||
var/can_use = 1
|
||||
var/obj/effect/dummy/chameleon/active_dummy = null
|
||||
@@ -150,4 +150,4 @@
|
||||
|
||||
/obj/effect/dummy/chameleon/Destroy()
|
||||
master.disrupt(0)
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
/obj/item/device/debugger
|
||||
icon = 'icons/obj/hacktool.dmi'
|
||||
name = "debugger"
|
||||
desc = "Used to debug electronic equipment."
|
||||
icon_state = "hacktool-g"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
throw_speed = 3
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/device/debugger/is_used_on(obj/O, mob/user)
|
||||
if(istype(O, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = O
|
||||
if(A.emagged || A.malfhack)
|
||||
to_chat(user, "\red There is a software error with the device.")
|
||||
else
|
||||
to_chat(user, "\blue The device's software appears to be fine.")
|
||||
return 1
|
||||
if(istype(O, /obj/machinery/door))
|
||||
var/obj/machinery/door/D = O
|
||||
if(D.operating == -1)
|
||||
to_chat(user, "\red There is a software error with the device.")
|
||||
else
|
||||
to_chat(user, "\blue The device's software appears to be fine.")
|
||||
return 1
|
||||
else if(istype(O, /obj/machinery))
|
||||
var/obj/machinery/A = O
|
||||
if(A.emagged)
|
||||
to_chat(user, "\red There is a software error with the device.")
|
||||
else
|
||||
to_chat(user, "\blue The device's software appears to be fine.")
|
||||
return 1
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "flash"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
@@ -152,7 +152,7 @@
|
||||
if(M.stat == CONSCIOUS)
|
||||
M.mind_initialize() //give them a mind datum if they don't have one.
|
||||
var/resisted
|
||||
if(!isloyal(M))
|
||||
if(!ismindshielded(M))
|
||||
if(user.mind in ticker.mode.head_revolutionaries)
|
||||
if(ticker.mode.add_revolutionary(M.mind))
|
||||
times_used -- //Flashes less likely to burn out for headrevs when used for conversion
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "flashlight"
|
||||
item_state = "flashlight"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
return 0
|
||||
on = !on
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_brightness(user)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
@@ -54,8 +55,8 @@
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = M //mob has protective eyewear
|
||||
if(istype(M, /mob/living/carbon/human) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
|
||||
if(istype(H) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES)))
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask" : "glasses"] first.</span>")
|
||||
return
|
||||
|
||||
if(M == user) //they're using it on themselves
|
||||
@@ -70,12 +71,13 @@
|
||||
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
|
||||
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
|
||||
|
||||
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
|
||||
if(M.stat == DEAD || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='notice'>[M] pupils does not react to the light!</span>")
|
||||
else if(XRAY in M.mutations) //mob has X-RAY vision
|
||||
to_chat(user, "<span class='notice'>[M] pupils give an eerie glow!</span>")
|
||||
else //they're okay!
|
||||
if(istype(H)) //robots and aliens are unaffected
|
||||
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
|
||||
else if((XRAY in M.mutations) || (eyes.colourblind_darkview && eyes.colourblind_darkview == eyes.get_dark_view())) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
|
||||
else //they're okay!
|
||||
if(M.flash_eyes(visual = 1))
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils narrow.</span>")
|
||||
else
|
||||
@@ -86,7 +88,7 @@
|
||||
desc = "A pen-sized light, used by medical staff."
|
||||
icon_state = "penlight"
|
||||
item_state = ""
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
flags = CONDUCT
|
||||
brightness_on = 2
|
||||
@@ -107,7 +109,7 @@
|
||||
item_state = ""
|
||||
flags = CONDUCT
|
||||
brightness_on = 2
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/item/device/flashlight/lamp
|
||||
@@ -116,7 +118,7 @@
|
||||
icon_state = "lamp"
|
||||
item_state = "lamp"
|
||||
brightness_on = 5
|
||||
w_class = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
materials = list()
|
||||
on = 1
|
||||
@@ -151,7 +153,7 @@ obj/item/device/flashlight/lamp/bananalamp
|
||||
/obj/item/device/flashlight/flare
|
||||
name = "flare"
|
||||
desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'."
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
brightness_on = 8 // Made it brighter (from 7 to 8).
|
||||
light_color = "#ff0000" // changed colour to a more brighter red.
|
||||
icon_state = "flare"
|
||||
@@ -212,7 +214,7 @@ obj/item/device/flashlight/lamp/bananalamp
|
||||
/obj/item/device/flashlight/flare/torch
|
||||
name = "torch"
|
||||
desc = "A torch fashioned from some leaves and a log."
|
||||
w_class = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
brightness_on = 7
|
||||
icon_state = "torch"
|
||||
item_state = "torch"
|
||||
@@ -225,7 +227,7 @@ obj/item/device/flashlight/lamp/bananalamp
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "floor1" //not a slime extract sprite but... something close enough!
|
||||
item_state = "slime"
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
brightness_on = 6
|
||||
light_color = "#FFBF00"
|
||||
materials = list()
|
||||
|
||||
@@ -3,37 +3,37 @@
|
||||
/obj/item/device/floor_painter
|
||||
name = "floor painter"
|
||||
icon_state = "floor_painter"
|
||||
|
||||
|
||||
var/floor_icon
|
||||
var/floor_state = "floor"
|
||||
var/floor_dir = SOUTH
|
||||
|
||||
w_class = 1
|
||||
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
var/static/list/allowed_states = list("arrival", "arrivalcorner", "bar", "barber", "blackcorner", "blue", "bluecorner",
|
||||
|
||||
var/static/list/allowed_states = list("arrival", "arrivalcorner", "bar", "barber", "blackcorner", "blue", "bluecorner",
|
||||
"bluefull", "bluered", "blueyellow", "blueyellowfull", "bot", "brown", "browncorner", "browncornerold", "brownold",
|
||||
"cafeteria", "caution", "cautioncorner", "chapel", "cmo", "dark", "delivery", "escape", "escapecorner", "floor",
|
||||
"freezerfloor", "green", "greenblue", "greenbluefull", "greencorner", "greenfull", "greenyellow",
|
||||
"greenyellowfull", "grimy", "loadingarea", "neutral", "neutralcorner", "neutralfull", "orange", "orangecorner",
|
||||
"orangefull", "purple", "purplecorner", "purplefull", "rampbottom", "ramptop", "red", "redblue", "redbluefull",
|
||||
"redcorner", "redfull", "redgreen", "redgreenfull", "redyellow", "redyellowfull", "warning", "warningcorner", "warnwhite",
|
||||
"warnwhitecorner", "white", "whiteblue", "whitebluecorner", "whitebluefull", "whitebot", "whitecorner", "whitedelivery",
|
||||
"whitegreen", "whitegreencorner", "whitegreenfull", "whitehall", "whitepurple", "whitepurplecorner", "whitepurplefull",
|
||||
"whitered", "whiteredcorner", "whiteredfull", "whiteyellow", "whiteyellowcorner", "whiteyellowfull", "yellow",
|
||||
"redcorner", "redfull", "redgreen", "redgreenfull", "redyellow", "redyellowfull", "warning", "warningcorner", "warnwhite",
|
||||
"warnwhitecorner", "white", "whiteblue", "whitebluecorner", "whitebluefull", "whitebot", "whitecorner", "whitedelivery",
|
||||
"whitegreen", "whitegreencorner", "whitegreenfull", "whitehall", "whitepurple", "whitepurplecorner", "whitepurplefull",
|
||||
"whitered", "whiteredcorner", "whiteredfull", "whiteyellow", "whiteyellowcorner", "whiteyellowfull", "yellow",
|
||||
"yellowcorner", "yellowcornersiding", "yellowsiding")
|
||||
|
||||
/obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
|
||||
var/turf/simulated/floor/plasteel/F = A
|
||||
if(!istype(F))
|
||||
to_chat(user, "<span class='warning'>\The [src] can only be used on station flooring.</span>")
|
||||
return
|
||||
|
||||
|
||||
F.icon_state = floor_state
|
||||
F.icon_regular_floor = floor_state
|
||||
F.dir = floor_dir
|
||||
@@ -60,7 +60,7 @@
|
||||
<a href="?src=[UID()];choose_dir=1">Choose Direction</a>
|
||||
<div class='statusDisplay'>Direction: [dir2text(floor_dir)]</div>
|
||||
"}
|
||||
|
||||
|
||||
var/datum/browser/popup = new(user, "floor_painter", name, 225, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/item/device/floor_painter/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["choose_state"])
|
||||
var/state = input("Please select a style", "[src]") as null|anything in allowed_states
|
||||
if(state)
|
||||
@@ -92,7 +92,7 @@
|
||||
index = 1
|
||||
floor_state = allowed_states[index]
|
||||
floor_dir = SOUTH
|
||||
|
||||
|
||||
floor_icon = icon('icons/turf/floors.dmi', floor_state, floor_dir)
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
@@ -17,18 +17,14 @@
|
||||
song.instrumentExt = "ogg"
|
||||
|
||||
/obj/item/device/guitar/Destroy()
|
||||
qdel(song)
|
||||
song = null
|
||||
QDEL_NULL(song)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/guitar/attack_self(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/guitar/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
if(!isliving(user) || user.stat || user.restrained() || user.lying)
|
||||
if(!isliving(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
song.ui_interact(user, ui_key, ui, force_open)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=500, MAT_GLASS=500)
|
||||
w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter.
|
||||
w_class = WEIGHT_CLASS_SMALL //Increased to 2, because diodes are w_class 2. Conservation of matter.
|
||||
origin_tech = "combat=1"
|
||||
origin_tech = "magnets=2"
|
||||
var/energy = 5
|
||||
@@ -35,9 +35,7 @@
|
||||
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
|
||||
|
||||
/obj/item/device/laser_pointer/Destroy()
|
||||
if(diode)
|
||||
qdel(diode)
|
||||
diode = null
|
||||
QDEL_NULL(diode)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/laser_pointer/upgraded/New()
|
||||
@@ -128,8 +126,8 @@
|
||||
to_chat(S, "<span class='warning'>Your sensors were overloaded by a laser!</span>")
|
||||
outmsg = "<span class='notice'>You overload [S] by shining [src] at their sensors.</span>"
|
||||
|
||||
S.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
|
||||
S.create_attack_log("<font color='orange'>Has had a laser pointer shone in their eyes by [user.name] ([user.ckey])</font>")
|
||||
user.create_attack_log("<font color='orange'>Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
|
||||
log_attack("<font color='orange'>[user.name] ([user.ckey]) Shone a laser pointer in the eyes of [S.name] ([S.ckey])</font>")
|
||||
else
|
||||
outmsg = "<span class='notice'>You fail to overload [S] by shining [src] at their sensors.</span>"
|
||||
@@ -142,7 +140,7 @@
|
||||
outmsg = "<span class='notice'>You hit the lens of [C] with [src], temporarily disabling the camera!</span>"
|
||||
|
||||
log_admin("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
|
||||
user.attack_log += text("\[[time_stamp()]\] [user.name] ([user.ckey]) EMPd a camera with a laser pointer")
|
||||
user.create_attack_log("[user.name] ([user.ckey]) EMPd a camera with a laser pointer")
|
||||
else
|
||||
outmsg = "<span class='info'>You missed the lens of [C] with [src].</span>"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A device used to project your voice. Loudly."
|
||||
icon_state = "megaphone"
|
||||
item_state = "radio"
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
|
||||
var/spamcheck = 0
|
||||
@@ -12,24 +12,22 @@
|
||||
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
|
||||
|
||||
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
|
||||
if(user.client)
|
||||
if(user.client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "\red You cannot speak in IC (muted).")
|
||||
return
|
||||
if(!ishuman(user))
|
||||
to_chat(user, "\red You don't know how to use this!")
|
||||
if(user.client && (user.client.prefs.muted & MUTE_IC))
|
||||
to_chat(src, "<span class='warning'>You cannot speak in IC (muted).</span>")
|
||||
return
|
||||
if(user.silent)
|
||||
if(!ishuman(user))
|
||||
to_chat(user, "<span class='warning'>You don't know how to use this!</span>")
|
||||
return
|
||||
if(!user.can_speak())
|
||||
to_chat(user, "<span class='warning'>You find yourself unable to speak at all.</span>")
|
||||
return
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H && H.mind)
|
||||
if(H.mind.miming)
|
||||
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
|
||||
return
|
||||
if(H && H.mind && H.mind.miming)
|
||||
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
|
||||
return
|
||||
if(spamcheck)
|
||||
to_chat(user, "\red \The [src] needs to recharge!")
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
|
||||
return
|
||||
|
||||
var/message = input(user, "Shout a message:", "Megaphone") as text|null
|
||||
@@ -39,28 +37,27 @@
|
||||
if(!message)
|
||||
return
|
||||
message = capitalize(message)
|
||||
if((src.loc == user && usr.stat == 0))
|
||||
if((loc == user && !user.incapacitated()))
|
||||
if(emagged)
|
||||
if(insults)
|
||||
saymsg(user, pick(insultmsg))
|
||||
insults--
|
||||
else
|
||||
to_chat(user, "\red *BZZZZzzzzzt*")
|
||||
to_chat(user, "<span class='warning'>*BZZZZzzzzzt*</span>")
|
||||
else
|
||||
saymsg(user, message)
|
||||
|
||||
spamcheck = 1
|
||||
spawn(20)
|
||||
spamcheck = 0
|
||||
return
|
||||
|
||||
/obj/item/device/megaphone/proc/saymsg(mob/living/user as mob, message)
|
||||
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <FONT size=3>\"[message]\"</FONT></span>", hearing_distance = 14)
|
||||
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <span class='reallybig'>\"[message]\"</span></span>", hearing_distance = 14)
|
||||
for(var/obj/O in oview(14, get_turf(src)))
|
||||
O.hear_talk(user, "<FONT size=3>[message]</FONT>")
|
||||
O.hear_talk(user, "<span class='reallybig'>[message]</span>")
|
||||
|
||||
/obj/item/device/megaphone/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
to_chat(user, "\red You overload \the [src]'s voice synthesizer.")
|
||||
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
|
||||
emagged = 1
|
||||
insults = rand(1, 3)//to prevent dickflooding
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
#define MODKIT_HELMET 1
|
||||
#define MODKIT_SUIT 2
|
||||
#define MODKIT_FULL 3
|
||||
|
||||
/obj/item/device/modkit
|
||||
name = "hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
|
||||
icon_state = "modkit"
|
||||
var/parts = MODKIT_FULL
|
||||
var/target_species = "Human"
|
||||
|
||||
var/list/permitted_types = list(
|
||||
/obj/item/clothing/head/helmet/space/rig,
|
||||
/obj/item/clothing/suit/space/rig
|
||||
)
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(!target_species)
|
||||
return //it shouldn't be null, okay?
|
||||
|
||||
if(!parts)
|
||||
to_chat(user, "<span class='warning'>This kit has no parts for this modification left.</span>")
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/allowed = 0
|
||||
for(var/permitted_type in permitted_types)
|
||||
if(istype(O, permitted_type))
|
||||
allowed = 1
|
||||
|
||||
var/obj/item/clothing/I = O
|
||||
if(!istype(I) || !allowed)
|
||||
to_chat(user, "<span class='notice'>[src] is unable to modify that.</span>")
|
||||
return
|
||||
|
||||
var/excluding = ("exclude" in I.species_restricted)
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if(excluding ^ in_list)
|
||||
to_chat(user, "<span class='notice'>[I] is already modified.</span>")
|
||||
return
|
||||
|
||||
if(!isturf(O.loc))
|
||||
to_chat(user, "<span class='warning'>[O] must be safely placed on the ground for modification.</span>")
|
||||
return
|
||||
|
||||
playsound(user.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
|
||||
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
|
||||
|
||||
I.refit_for_species(target_species)
|
||||
|
||||
if(istype(I, /obj/item/clothing/head/helmet))
|
||||
parts &= ~MODKIT_HELMET
|
||||
if(istype(I, /obj/item/clothing/suit))
|
||||
parts &= ~MODKIT_SUIT
|
||||
|
||||
if(!parts)
|
||||
user.unEquip(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/modkit/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "It looks as though it modifies hardsuits to fit [target_species] users.")
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "Tajaran hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
|
||||
target_species = "Tajaran"
|
||||
|
||||
/obj/item/device/modkit/unathi
|
||||
name = "Unathi hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Unathi."
|
||||
target_species = "Unathi"
|
||||
|
||||
/obj/item/device/modkit/skrell
|
||||
name = "Skrell hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Skrell."
|
||||
target_species = "Skrell"
|
||||
|
||||
/obj/item/device/modkit/vox
|
||||
name = "Vox hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Vox."
|
||||
target_species = "Vox"
|
||||
@@ -1,3 +1,7 @@
|
||||
#define PROXIMITY_NONE ""
|
||||
#define PROXIMITY_ON_SCREEN "_red"
|
||||
#define PROXIMITY_NEAR "_yellow"
|
||||
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
@@ -10,13 +14,15 @@
|
||||
icon_state = "multitool"
|
||||
flags = CONDUCT
|
||||
force = 5.0
|
||||
w_class = 2
|
||||
throwforce = 5.0
|
||||
throw_range = 15
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
origin_tech = "magnets=1;engineering=2"
|
||||
toolspeed = 1
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
var/shows_wire_information = FALSE // shows what a wire does if set to TRUE
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
|
||||
/obj/item/device/multitool/proc/IsBufferA(var/typepath)
|
||||
@@ -26,40 +32,79 @@
|
||||
|
||||
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
||||
|
||||
/obj/item/device/multitool/Destroy()
|
||||
buffer = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/ai_detect
|
||||
var/track_delay = 0
|
||||
var/track_cooldown = 0
|
||||
var/track_delay = 10 //How often it checks for proximity
|
||||
var/detect_state = PROXIMITY_NONE
|
||||
var/rangealert = 8 //Glows red when inside
|
||||
var/rangewarning = 20 //Glows yellow when inside
|
||||
origin_tech = "magnets=1;engineering=2;syndicate=1"
|
||||
|
||||
/obj/item/device/multitool/ai_detect/New()
|
||||
..()
|
||||
processing_objects += src
|
||||
|
||||
|
||||
/obj/item/device/multitool/ai_detect/Destroy()
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/ai_detect/process()
|
||||
|
||||
if(track_delay > world.time)
|
||||
if(track_cooldown > world.time)
|
||||
return
|
||||
detect_state = PROXIMITY_NONE
|
||||
multitool_detect()
|
||||
icon_state = "[initial(icon_state)][detect_state]"
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
var/found_eye = 0
|
||||
|
||||
for(var/mob/camera/aiEye/A in living_mob_list)
|
||||
|
||||
var/turf/our_turf = get_turf(src)
|
||||
var/turf/eye_turf = get_turf(A)
|
||||
|
||||
if(get_dist(our_turf, eye_turf) < 9)
|
||||
found_eye = 1
|
||||
/obj/item/device/multitool/ai_detect/proc/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/living/silicon/ai/AI in ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
if(found_eye)
|
||||
icon_state = "[initial(icon_state)]_red"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
if(!detect_state && cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
var/datum/camerachunk/chunk = cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
|
||||
if(chunk)
|
||||
if(chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
var/turf/detect_turf = get_turf(A)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
if(get_dist(our_turf, detect_turf) < rangewarning)
|
||||
detect_state = PROXIMITY_NEAR
|
||||
break
|
||||
|
||||
track_delay = world.time + 10 // 1 second
|
||||
return
|
||||
/obj/item/device/multitool/ai_detect/admin
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
|
||||
track_delay = 5
|
||||
shows_wire_information = TRUE
|
||||
|
||||
/obj/item/device/multitool/ai_detect/admin/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/J in urange(rangewarning,our_turf))
|
||||
if(check_rights(R_ADMIN, 0, J))
|
||||
detect_state = PROXIMITY_NEAR
|
||||
var/turf/detect_turf = get_turf(J)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
/obj/item/device/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/device/multitool/abductor
|
||||
name = "alien multitool"
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "magnets=5;engineering=5;abductor=3"
|
||||
shows_wire_information = TRUE
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/aicards.dmi'
|
||||
icon_state = "pai"
|
||||
item_state = "electronic"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=2"
|
||||
var/request_cooldown = 5 // five seconds
|
||||
@@ -11,11 +11,16 @@
|
||||
var/obj/item/device/radio/radio
|
||||
var/looking_for_personality = 0
|
||||
var/mob/living/silicon/pai/pai
|
||||
var/list/faction = list("neutral") // The factions the pAI will inherit from the card
|
||||
|
||||
/obj/item/device/paicard/syndicate
|
||||
name = "syndicate personal AI device"
|
||||
faction = list("syndicate")
|
||||
|
||||
/obj/item/device/paicard/relaymove(var/mob/user, var/direction)
|
||||
if(user.stat || user.stunned)
|
||||
return
|
||||
var/obj/item/weapon/rig/rig = src.get_rig()
|
||||
var/obj/item/weapon/rig/rig = get_rig()
|
||||
if(istype(rig))
|
||||
rig.forced_move(direction, user)
|
||||
|
||||
@@ -26,11 +31,8 @@
|
||||
/obj/item/device/paicard/Destroy()
|
||||
if(pai)
|
||||
pai.ghostize()
|
||||
qdel(pai)
|
||||
pai = null
|
||||
if(radio)
|
||||
qdel(radio)
|
||||
radio = null
|
||||
QDEL_NULL(pai)
|
||||
QDEL_NULL(radio)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/paicard/attack_self(mob/user)
|
||||
@@ -257,10 +259,10 @@
|
||||
var/delta = (world.time / 10) - last_request
|
||||
if(request_cooldown > delta)
|
||||
var/cooldown_time = round(request_cooldown - ((world.time / 10) - last_request), 1)
|
||||
to_chat(usr, "\red The request system is currently offline. Please wait another [cooldown_time] seconds.")
|
||||
to_chat(usr, "<span class='warning'>The request system is currently offline. Please wait another [cooldown_time] seconds.</span>")
|
||||
return
|
||||
last_request = world.time / 10
|
||||
src.looking_for_personality = 1
|
||||
looking_for_personality = 1
|
||||
paiController.findPAI(src, usr)
|
||||
if(href_list["wipe"])
|
||||
var/confirm = input("Are you CERTAIN you wish to delete the current personality? This action cannot be undone.", "Personality Wipe") in list("Yes", "No")
|
||||
@@ -297,35 +299,35 @@
|
||||
// WIRE_TRANSMIT = 4
|
||||
|
||||
/obj/item/device/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
|
||||
src.pai = personality
|
||||
src.overlays += "pai-happy"
|
||||
pai = personality
|
||||
overlays += "pai-happy"
|
||||
|
||||
/obj/item/device/paicard/proc/removePersonality()
|
||||
src.pai = null
|
||||
src.overlays.Cut()
|
||||
src.overlays += "pai-off"
|
||||
pai = null
|
||||
overlays.Cut()
|
||||
overlays += "pai-off"
|
||||
|
||||
/obj/item/device/paicard
|
||||
var/current_emotion = 1
|
||||
/obj/item/device/paicard/proc/setEmotion(var/emotion)
|
||||
if(pai)
|
||||
src.overlays.Cut()
|
||||
overlays.Cut()
|
||||
switch(emotion)
|
||||
if(1) src.overlays += "pai-happy"
|
||||
if(2) src.overlays += "pai-cat"
|
||||
if(3) src.overlays += "pai-extremely-happy"
|
||||
if(4) src.overlays += "pai-face"
|
||||
if(5) src.overlays += "pai-laugh"
|
||||
if(6) src.overlays += "pai-off"
|
||||
if(7) src.overlays += "pai-sad"
|
||||
if(8) src.overlays += "pai-angry"
|
||||
if(9) src.overlays += "pai-what"
|
||||
if(1) overlays += "pai-happy"
|
||||
if(2) overlays += "pai-cat"
|
||||
if(3) overlays += "pai-extremely-happy"
|
||||
if(4) overlays += "pai-face"
|
||||
if(5) overlays += "pai-laugh"
|
||||
if(6) overlays += "pai-off"
|
||||
if(7) overlays += "pai-sad"
|
||||
if(8) overlays += "pai-angry"
|
||||
if(9) overlays += "pai-what"
|
||||
current_emotion = emotion
|
||||
|
||||
/obj/item/device/paicard/proc/alertUpdate()
|
||||
var/turf/T = get_turf_or_move(src.loc)
|
||||
var/turf/T = get_turf_or_move(loc)
|
||||
for(var/mob/M in viewers(T))
|
||||
M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
|
||||
M.show_message("<span class='notice'>[src] flashes a message across its screen, \"Additional personalities available for download.\"</span>", 3, "<span class='notice'>[src] bleeps electronically.</span>", 2)
|
||||
|
||||
/obj/item/device/paicard/emp_act(severity)
|
||||
for(var/mob/M in src)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
var/chosen_wire = input(user, "OH GOD OH GOD", "WHAT WIRE?!") in wires
|
||||
if(!in_range(src, usr) || issilicon(usr) || !usr.canmove || usr.restrained())
|
||||
return
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
|
||||
playsound(src, I.usesound, 50, 1, 1)
|
||||
user.visible_message("<span class='warning'>[user] cuts the [chosen_wire] wire!</span>", "<span class='danger'>You cut the [chosen_wire] wire!</span>")
|
||||
sleep(5)
|
||||
if(chosen_wire == correct_wire)
|
||||
@@ -84,8 +84,8 @@
|
||||
to_chat(user, "<span class='warning'>You can't see the box well enough to cut the wires out.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] starts removing the payload and wires from \the [src].</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
|
||||
if(do_after(user, 40 * I.toolspeed, target = src))
|
||||
playsound(src, I.usesound, 50, 1, 1)
|
||||
user.unEquip(src)
|
||||
user.visible_message("<span class='notice'>[user] removes the insides of \the [src]!</span>")
|
||||
var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(src.loc)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
desc = "A nulling power sink which drains energy from electrical systems."
|
||||
icon_state = "powersink0"
|
||||
item_state = "electronic"
|
||||
w_class = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
flags = CONDUCT
|
||||
throwforce = 5
|
||||
throw_speed = 1
|
||||
@@ -13,7 +13,7 @@
|
||||
materials = list(MAT_METAL=750)
|
||||
origin_tech = "powerstorage=3;syndicate=5"
|
||||
var/drain_rate = 1600000 // amount of power to drain per tick
|
||||
var/apc_drain_rate = 5000 // Max. amount drained from single APC. In Watts.
|
||||
var/apc_drain_rate = 50 // Max. amount drained from single APC. In Watts.
|
||||
var/dissipation_rate = 20000 // Passive dissipation of drained power. In Watts.
|
||||
var/power_drained = 0 // Amount of power drained.
|
||||
var/max_power = 1e10 // Detonation point.
|
||||
@@ -27,6 +27,8 @@
|
||||
/obj/item/device/powersink/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
processing_power_items.Remove(src)
|
||||
PN = null
|
||||
attached = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
|
||||
@@ -110,10 +112,10 @@
|
||||
if(istype(T.master, /obj/machinery/power/apc))
|
||||
var/obj/machinery/power/apc/A = T.master
|
||||
if(A.operating && A.cell)
|
||||
var/cur_charge = A.cell.charge / CELLRATE
|
||||
var/drain_val = min(apc_drain_rate, cur_charge)
|
||||
A.cell.use(drain_val * CELLRATE)
|
||||
drained += drain_val
|
||||
A.cell.charge = max(0, A.cell.charge - apc_drain_rate)
|
||||
drained += apc_drain_rate
|
||||
if(A.charging == 2) // If the cell was full
|
||||
A.charging = 1 // It's no longer full
|
||||
power_drained += drained
|
||||
return 1
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
if(!emagged)
|
||||
emagged = 1
|
||||
syndicate = 1
|
||||
to_chat(user, "\blue The This beacon now only be locked on to by emagged teleporters!")
|
||||
to_chat(user, "<span class='notice'>The This beacon now only be locked on to by emagged teleporters!</span>")
|
||||
|
||||
/obj/item/device/radio/beacon/hear_talk()
|
||||
return
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/obj/item/device/radio/beacon/syndicate/attack_self(mob/user as mob)
|
||||
if(user)
|
||||
to_chat(user, "\blue Locked In")
|
||||
to_chat(user, "<span class='notice'>Locked In</span>")
|
||||
new /obj/machinery/power/singularity_beacon/syndicate( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
qdel(src)
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
/obj/item/device/radio/beacon/syndicate/bomb/attack_self(mob/user as mob)
|
||||
if(user)
|
||||
to_chat(user, "\blue Locked In")
|
||||
to_chat(user, "<span class='notice'>Locked In</span>")
|
||||
new /obj/machinery/syndicatebomb( user.loc )
|
||||
playsound(src, 'sound/effects/pop.ogg', 100, 1, 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
frequency = 1449
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 5
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
materials = list(MAT_METAL=10000, MAT_GLASS=2500)
|
||||
var/code = 2
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon = 'icons/obj/radio.dmi'
|
||||
icon_state = "cypherkey"
|
||||
item_state = ""
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/translate_binary = 0
|
||||
var/translate_hive = 0
|
||||
var/syndie = 0
|
||||
@@ -147,4 +148,4 @@
|
||||
name = "AI Integrated Encryption Key"
|
||||
desc = "Integrated encryption key"
|
||||
icon_state = "cap_cypherkey"
|
||||
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1, "AI Private" = 1)
|
||||
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1, "AI Private" = 1)
|
||||
|
||||
@@ -32,12 +32,8 @@
|
||||
recalculateChannels(1)
|
||||
|
||||
/obj/item/device/radio/headset/Destroy()
|
||||
if(keyslot1)
|
||||
qdel(keyslot1)
|
||||
if(keyslot2)
|
||||
qdel(keyslot2)
|
||||
keyslot1 = null
|
||||
keyslot2 = null
|
||||
QDEL_NULL(keyslot1)
|
||||
QDEL_NULL(keyslot2)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/list_channels(var/mob/user)
|
||||
@@ -64,17 +60,15 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
|
||||
if(aiOverride)
|
||||
return ..(freq, level)
|
||||
/obj/item/device/radio/headset/is_listening()
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.l_ear == src || H.r_ear == src)
|
||||
return ..(freq, level)
|
||||
else if(isanimal(loc))
|
||||
// frankly, all the ones with inventory are small enough to not warrant snowflaking the slot check somehow
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
return ..()
|
||||
else if(isanimal(loc) || isAI(loc))
|
||||
return ..()
|
||||
|
||||
return FALSE
|
||||
|
||||
/obj/item/device/radio/headset/alt
|
||||
name = "bowman headset"
|
||||
@@ -304,10 +298,10 @@
|
||||
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
|
||||
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
|
||||
|
||||
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
|
||||
/obj/item/device/radio/headset/heads/ai_integrated/is_listening()
|
||||
if(disabledAi)
|
||||
return -1 //Transciever Disabled.
|
||||
return ..(freq, level, 1)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Talk through this."
|
||||
icon_state = "intercom"
|
||||
anchored = 1
|
||||
w_class = 4
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
canhear_range = 2
|
||||
flags = CONDUCT
|
||||
var/number = 0
|
||||
@@ -120,15 +120,13 @@
|
||||
attack_self(user)
|
||||
|
||||
/obj/item/device/radio/intercom/receive_range(freq, level)
|
||||
if(!on)
|
||||
if(!is_listening())
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
// TODO: Integrate radio with the space manager
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if(!src.listening)
|
||||
return -1
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))
|
||||
return -1//Prevents broadcast of messages over devices lacking the encryption
|
||||
@@ -140,8 +138,8 @@
|
||||
if(3)
|
||||
if(iswirecutter(W) && b_stat && wires.IsAllCut())
|
||||
to_chat(user, "<span class='notice'>You cut out the intercoms wiring and disconnect its electronics.</span>")
|
||||
playsound(get_turf(src), 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
if(buildstage != 3)
|
||||
return
|
||||
new /obj/item/stack/cable_coil(get_turf(src),5)
|
||||
@@ -154,8 +152,8 @@
|
||||
else return ..()
|
||||
if(2)
|
||||
if(isscrewdriver(W))
|
||||
playsound(get_turf(src), 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
update_icon()
|
||||
on = 1
|
||||
b_stat = 0
|
||||
@@ -172,15 +170,15 @@
|
||||
if(coil.amount < 5)
|
||||
to_chat(user, "<span class='warning'>You need more cable for this!</span>")
|
||||
return
|
||||
if(do_after(user, 10, target = src))
|
||||
if(do_after(user, 10 * coil.toolspeed, target = src))
|
||||
coil.use(5)
|
||||
to_chat(user, "<span class='notice'>You wire \the [src]!</span>")
|
||||
buildstage = 2
|
||||
return 1
|
||||
if(iscrowbar(W))
|
||||
to_chat(user, "<span class='notice'>You begin removing the electronics...</span>")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
if(buildstage != 1)
|
||||
return
|
||||
new /obj/item/weapon/intercom_electronics(get_turf(src))
|
||||
@@ -189,19 +187,19 @@
|
||||
return 1
|
||||
if(0)
|
||||
if(istype(W,/obj/item/weapon/intercom_electronics))
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 10, target = src))
|
||||
playsound(get_turf(src), W.usesound, 50, 1)
|
||||
if(do_after(user, 10 * W.toolspeed, target = src))
|
||||
qdel(W)
|
||||
to_chat(user, "<span class='notice'>You insert \the [W] into \the [src]!</span>")
|
||||
buildstage = 1
|
||||
return 1
|
||||
if(iswelder(W))
|
||||
var/obj/item/weapon/weldingtool/WT=W
|
||||
playsound(get_turf(src), 'sound/items/Welder.ogg', 50, 1)
|
||||
playsound(get_turf(src), WT.usesound, 50, 1)
|
||||
if(!WT.remove_fuel(3, user))
|
||||
to_chat(user, "<span class='warning'>You're out of welding fuel.</span>")
|
||||
return 1
|
||||
if(do_after(user, 10, target = src))
|
||||
if(do_after(user, 10 * WT.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You cut the intercom frame from the wall!</span>")
|
||||
new /obj/item/mounted/frame/intercom(get_turf(src))
|
||||
qdel(src)
|
||||
@@ -233,8 +231,10 @@
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
/obj/item/device/radio/intercom/locked
|
||||
var/locked_frequency
|
||||
|
||||
@@ -30,7 +30,6 @@ var/global/list/default_medbay_channels = list(
|
||||
var/frequency = PUB_FREQ //common chat
|
||||
var/traitor_frequency = 0 //tune to frequency to unlock traitor supplies
|
||||
var/canhear_range = 3 // the range which mobs can hear this radio from
|
||||
var/obj/item/device/radio/patch_link = null
|
||||
var/datum/wires/radio/wires = null
|
||||
var/b_stat = 0
|
||||
var/broadcasting = 0
|
||||
@@ -45,7 +44,7 @@ var/global/list/default_medbay_channels = list(
|
||||
slot_flags = SLOT_BELT
|
||||
throw_speed = 2
|
||||
throw_range = 9
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
materials = list(MAT_METAL=75)
|
||||
|
||||
@@ -54,32 +53,31 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
var/list/internal_channels
|
||||
|
||||
/obj/item/device/radio
|
||||
var/datum/radio_frequency/radio_connection
|
||||
var/list/datum/radio_frequency/secure_radio_connections = new
|
||||
|
||||
proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
/obj/item/device/radio/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT)
|
||||
|
||||
|
||||
/obj/item/device/radio/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
if(radio_controller)
|
||||
initialize()
|
||||
|
||||
internal_channels = default_internal_channels.Copy()
|
||||
global_radios |= src
|
||||
|
||||
/obj/item/device/radio/Destroy()
|
||||
qdel(wires)
|
||||
wires = null
|
||||
QDEL_NULL(wires)
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for(var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
patch_link = null
|
||||
global_radios -= src
|
||||
follow_target = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -92,7 +90,7 @@ var/global/list/default_medbay_channels = list(
|
||||
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
|
||||
|
||||
/obj/item/device/radio/attack_ghost(mob/user)
|
||||
return ui_interact(user)
|
||||
return interact(user)
|
||||
|
||||
/obj/item/device/radio/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
@@ -178,11 +176,6 @@ var/global/list/default_medbay_channels = list(
|
||||
/mob/dead/observer/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses)
|
||||
return can_admin_interact()
|
||||
|
||||
/obj/item/device/radio/proc/text_wires()
|
||||
if(b_stat)
|
||||
return wires.GetInteractWindow()
|
||||
return
|
||||
|
||||
/obj/item/device/radio/proc/ToggleBroadcast()
|
||||
broadcasting = !broadcasting && !(wires.IsIndexCut(WIRE_TRANSMIT) || wires.IsIndexCut(WIRE_SIGNAL))
|
||||
|
||||
@@ -240,7 +233,6 @@ var/global/list/default_medbay_channels = list(
|
||||
var/datum/radio_frequency/connection = null
|
||||
if(channel && channels && channels.len > 0)
|
||||
if(channel == "department")
|
||||
// to_chat(world, "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"")
|
||||
channel = channels[1]
|
||||
connection = secure_radio_connections[channel]
|
||||
else
|
||||
@@ -257,9 +249,8 @@ var/global/list/default_medbay_channels = list(
|
||||
Broadcast_Message(connection, A,
|
||||
0, "*garbled automated announcement*", src,
|
||||
message, from, "Automated Announcement", from, "synthesized voice",
|
||||
4, 0, zlevel, connection.frequency, follow_target=follow_target)
|
||||
4, 0, zlevel, connection.frequency, follow_target = follow_target)
|
||||
qdel(A)
|
||||
return
|
||||
|
||||
// Just a dummy mob used for making announcements, so we don't create AIs to do this
|
||||
// I'm not sure who thought that was a good idea. -- Crazylemon
|
||||
@@ -276,7 +267,8 @@ var/global/list/default_medbay_channels = list(
|
||||
/mob/living/automatedannouncer/Destroy()
|
||||
if(lifetime_timer)
|
||||
deltimer(lifetime_timer)
|
||||
..()
|
||||
lifetime_timer = null
|
||||
return ..()
|
||||
|
||||
/mob/living/automatedannouncer/proc/autocleanup()
|
||||
log_runtime(EXCEPTION("An announcer somehow managed to outlive the radio! Deleting!"), src, list("Message: '[message]'"))
|
||||
@@ -320,7 +312,7 @@ var/global/list/default_medbay_channels = list(
|
||||
actually transmit large mass. Headsets are the only radio devices capable
|
||||
of sending subspace transmissions to the Communications Satellite.
|
||||
|
||||
A headset sends a signal to a subspace listener/reciever elsewhere in space,
|
||||
A headset sends a signal to a subspace listener/receiver elsewhere in space,
|
||||
the signal gets processed and logged, and an audible transmission gets sent
|
||||
to each individual headset.
|
||||
*/
|
||||
@@ -401,6 +393,7 @@ var/global/list/default_medbay_channels = list(
|
||||
// Identity-associated tags:
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"race" = signal.get_race(M),
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = displayname, // the mob's display name
|
||||
"job" = jobname, // the mob's job
|
||||
@@ -462,6 +455,7 @@ var/global/list/default_medbay_channels = list(
|
||||
|
||||
"mob" = M, // store a reference to the mob
|
||||
"mobtype" = M.type, // the mob's type
|
||||
"race" = signal.get_race(M), // text to show next to mob in comms log console
|
||||
"realname" = real_name, // the mob's real name
|
||||
"name" = displayname, // the mob's display name
|
||||
"job" = jobname, // the mob's job
|
||||
@@ -532,19 +526,15 @@ var/global/list/default_medbay_channels = list(
|
||||
// what the range is in which mobs will hear the radio
|
||||
// returns: -1 if can't receive, range otherwise
|
||||
|
||||
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
|
||||
return -1
|
||||
if(!listening)
|
||||
if(!is_listening())
|
||||
return -1
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(!position || !(position.z in level))
|
||||
return -1
|
||||
if(freq in ANTAG_FREQS)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
if(!(syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
return -1
|
||||
if(!on)
|
||||
return -1
|
||||
if(!freq) //recieved on main frequency
|
||||
if(!listening)
|
||||
return -1
|
||||
@@ -561,19 +551,34 @@ var/global/list/default_medbay_channels = list(
|
||||
return canhear_range
|
||||
|
||||
/obj/item/device/radio/proc/send_hear(freq, level)
|
||||
|
||||
var/range = receive_range(freq, level)
|
||||
if(range > -1)
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
/obj/item/device/radio/proc/is_listening()
|
||||
var/is_listening = TRUE
|
||||
if(!on)
|
||||
is_listening = FALSE
|
||||
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
|
||||
is_listening = FALSE
|
||||
if(!listening)
|
||||
is_listening = FALSE
|
||||
|
||||
return is_listening
|
||||
|
||||
/obj/item/device/radio/proc/send_announcement()
|
||||
if(is_listening())
|
||||
return get_mobs_in_view(canhear_range, src)
|
||||
|
||||
return null
|
||||
|
||||
/obj/item/device/radio/examine(mob/user, var/distance = -1)
|
||||
. = ..(user, distance)
|
||||
if((in_range(src, user) || loc == user))
|
||||
if(b_stat)
|
||||
user.show_message("\blue \the [src] can be attached and modified!")
|
||||
user.show_message("<span class='notice'>\the [src] can be attached and modified!</span>")
|
||||
else
|
||||
user.show_message("\blue \the [src] can not be modified or attached!")
|
||||
user.show_message("<span class='notice'>\the [src] can not be modified or attached!</span>")
|
||||
return .
|
||||
|
||||
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
@@ -584,9 +589,9 @@ var/global/list/default_medbay_channels = list(
|
||||
b_stat = !( b_stat )
|
||||
if(!istype(src, /obj/item/device/radio/beacon))
|
||||
if(b_stat)
|
||||
user.show_message("\blue The radio can now be attached and modified!")
|
||||
user.show_message("<span class='notice'>The radio can now be attached and modified!</span>")
|
||||
else
|
||||
user.show_message("\blue The radio can no longer be modified or attached!")
|
||||
user.show_message("<span class='notice'>The radio can no longer be modified or attached!</span>")
|
||||
updateDialog()
|
||||
//Foreach goto(83)
|
||||
add_fingerprint(user)
|
||||
@@ -594,12 +599,20 @@ var/global/list/default_medbay_channels = list(
|
||||
else return
|
||||
|
||||
/obj/item/device/radio/emp_act(severity)
|
||||
frequency = get_random_freq()
|
||||
if(listening == 1)
|
||||
visible_message("<span class='warning'>\The [src] screeches violently!</span>")
|
||||
|
||||
broadcasting = 0
|
||||
listening = 0
|
||||
for(var/ch_name in channels)
|
||||
channels[ch_name] = 0
|
||||
..()
|
||||
|
||||
/obj/item/device/radio/proc/get_random_freq()
|
||||
var/rand_freq = round(rand(1440, 1480), 10) + pick(1, 3, 5, 9)
|
||||
return rand_freq
|
||||
|
||||
///////////////////////////////
|
||||
//////////Borg Radios//////////
|
||||
///////////////////////////////
|
||||
|
||||
@@ -14,7 +14,7 @@ REAGENT SCANNER
|
||||
icon_state = "t-ray0"
|
||||
var/on = 0
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
item_state = "electronic"
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
@@ -117,7 +117,7 @@ REAGENT SCANNER
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
materials = list(MAT_METAL=200)
|
||||
@@ -128,24 +128,24 @@ REAGENT SCANNER
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
|
||||
to_chat(user, text("\red You try to analyze the floor's vitals!"))
|
||||
to_chat(user, text("<span class='warning'>You try to analyze the floor's vitals!</span>"))
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1)
|
||||
user.show_message(text("\blue Analyzing Results for The floor:\n\t Overall Status: Healthy"), 1)
|
||||
user.show_message(text("\blue \t Damage Specifics: [0]-[0]-[0]-[0]"), 1)
|
||||
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
|
||||
user.show_message("\blue Body Temperature: ???", 1)
|
||||
O.show_message(text("<span class='warning'>[user] has analyzed the floor's vitals!</span>"), 1)
|
||||
user.show_message(text("<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy</span>"), 1)
|
||||
user.show_message(text("<span class='notice'>\t Damage Specifics: [0]-[0]-[0]-[0]</span>"), 1)
|
||||
user.show_message("<span class='notice'>Key: Suffocation/Toxin/Burns/Brute</span>", 1)
|
||||
user.show_message("<span class='notice'>Body Temperature: ???</span>", 1)
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>","<span class='notice'> You have analyzed [M]'s vitals.</span>")
|
||||
|
||||
if(!istype(M,/mob/living/carbon/human) || M.isSynthetic())
|
||||
//these sensors are designed for organic life
|
||||
user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR")
|
||||
user.show_message("<span class='notice'>Analyzing Results for ERROR:\n\t Overall Status: ERROR</span>")
|
||||
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='blue'>?</font> - <font color='green'>?</font> - <font color='#FFA500'>?</font> - <font color='red'>?</font>")
|
||||
user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
user.show_message("\red <b>Warning: Blood Level ERROR: --% --cl.\blue Type: ERROR")
|
||||
user.show_message("\blue Subject's pulse: <font color='red'>-- bpm.</font>")
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
user.show_message("<span class='warning'><b>Warning: Blood Level ERROR: --% --cl.</span><span class='notice'>Type: ERROR</span>")
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='red'>-- bpm.</font></span>")
|
||||
return
|
||||
|
||||
var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
|
||||
@@ -155,34 +155,34 @@ REAGENT SCANNER
|
||||
var/BR = M.getBruteLoss() > 50 ? "<b>[M.getBruteLoss()]</b>" : M.getBruteLoss()
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
OX = fake_oxy > 50 ? "<b>[fake_oxy]</b>" : fake_oxy
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: dead")
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: dead</span>")
|
||||
else
|
||||
user.show_message("\blue Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"]")
|
||||
user.show_message("<span class='notice'>Analyzing Results for [M]:\n\t Overall Status: [M.stat > 1 ? "dead" : "[M.health]% healthy"]</span>")
|
||||
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)
|
||||
user.show_message("\t Damage Specifics: <font color='blue'>[OX]</font> - <font color='green'>[TX]</font> - <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(M.timeofdeath && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("\blue Time of Death: [worldtime2text(M.timeofdeath)]")
|
||||
user.show_message("<span class='notice'>Time of Death: [worldtime2text(M.timeofdeath)]</span>")
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
user.show_message("\blue Localized Damage, Brute/Burn:",1)
|
||||
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
|
||||
if(length(damaged)>0)
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message(text("\blue \t []: [][]\blue - []", \
|
||||
user.show_message(text("<span class='notice'>\t []: [][] - []</span>", \
|
||||
capitalize(org.name), \
|
||||
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
|
||||
(org.brute_dam > 0) ? "<span class='warning'>[org.brute_dam]</span>" :0, \
|
||||
(org.status & ORGAN_BLEEDING)?"<span class='danger'>\[Bleeding\]</span>":"\t", \
|
||||
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
|
||||
else
|
||||
user.show_message("\blue \t Limbs are OK.",1)
|
||||
user.show_message("<span class='notice'>\t Limbs are OK.</span>",1)
|
||||
|
||||
OX = M.getOxyLoss() > 50 ? "<font color='blue'><b>Severe oxygen deprivation detected</b></font>" : "Subject bloodstream oxygen level normal"
|
||||
TX = M.getToxLoss() > 50 ? "<font color='green'><b>Dangerous amount of toxins detected</b></font>" : "Subject bloodstream toxin level minimal"
|
||||
BU = M.getFireLoss() > 50 ? "<font color='#FFA500'><b>Severe burn damage detected</b></font>" : "Subject burn injury status O.K"
|
||||
BR = M.getBruteLoss() > 50 ? "<font color='red'><b>Severe anatomical damage detected</b></font>" : "Subject brute-force injury status O.K"
|
||||
if(M.status_flags & FAKEDEATH)
|
||||
OX = fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal"
|
||||
OX = fake_oxy > 50 ? "<span class='danger'>Severe oxygen deprivation detected</span>" : "<span class='notice'>Subject bloodstream oxygen level normal</span>"
|
||||
user.show_message("[OX] | [TX] | [BU] | [BR]")
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(upgraded)
|
||||
@@ -195,36 +195,36 @@ REAGENT SCANNER
|
||||
if(M.getCloneLoss())
|
||||
user.show_message("<span class='warning'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
|
||||
if(M.has_brain_worms())
|
||||
user.show_message("\red Subject suffering from aberrant brain activity. Recommend further scanning.")
|
||||
user.show_message("<span class='warning'>Subject suffering from aberrant brain activity. Recommend further scanning.</span>")
|
||||
else if(M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain))
|
||||
user.show_message("\red Subject is brain dead.")
|
||||
user.show_message("<span class='warning'>Subject is brain dead.</span>")
|
||||
else if(M.getBrainLoss() >= 60)
|
||||
user.show_message("\red Severe brain damage detected. Subject likely to have mental retardation.")
|
||||
user.show_message("<span class='warning'>Severe brain damage detected. Subject likely to have mental retardation.</span>")
|
||||
else if(M.getBrainLoss() >= 10)
|
||||
user.show_message("\red Significant brain damage detected. Subject may have had a concussion.")
|
||||
user.show_message("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>")
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
for(var/name in H.organs_by_name)
|
||||
var/obj/item/organ/external/e = H.organs_by_name[name]
|
||||
for(var/name in H.bodyparts_by_name)
|
||||
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
|
||||
if(!e)
|
||||
continue
|
||||
var/limb = e.name
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED))
|
||||
user.show_message("\red Unsecured fracture in subject [limb]. Splinting recommended for transport.")
|
||||
user.show_message("<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>")
|
||||
if(e.has_infected_wound())
|
||||
user.show_message("\red Infected wound detected in subject [limb]. Disinfection recommended.")
|
||||
user.show_message("<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>")
|
||||
|
||||
for(var/name in H.organs_by_name)
|
||||
var/obj/item/organ/external/e = H.organs_by_name[name]
|
||||
for(var/name in H.bodyparts_by_name)
|
||||
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
|
||||
if(!e)
|
||||
continue
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
user.show_message(text("\red Bone fractures detected. Advanced scanner required for location."), 1)
|
||||
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
|
||||
break
|
||||
for(var/obj/item/organ/external/e in H.organs)
|
||||
for(var/obj/item/organ/external/e in H.bodyparts)
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
user.show_message(text("\red Internal bleeding detected. Advanced scanner required for location."), 1)
|
||||
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
|
||||
break
|
||||
if(H.vessel)
|
||||
var/blood_type = H.get_blood_name()
|
||||
@@ -232,17 +232,17 @@ REAGENT SCANNER
|
||||
var/blood_percent = blood_volume / BLOOD_VOLUME_NORMAL
|
||||
blood_percent *= 100
|
||||
if(blood_volume <= 500)
|
||||
user.show_message("\red <b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl")
|
||||
user.show_message("<span class='warning'><b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl</span>")
|
||||
else if(blood_volume <= 336)
|
||||
user.show_message("\red <b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl")
|
||||
user.show_message("<span class='warning'><b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl</span>")
|
||||
else
|
||||
user.show_message("\blue Blood Level Normal: [blood_percent]% [blood_volume]cl")
|
||||
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl</span>")
|
||||
if(H.species.exotic_blood)
|
||||
user.show_message("<span class='warning'>Subject possesses exotic blood.</span>")
|
||||
user.show_message("<span class='warning'>Exotic blood type: [blood_type].</span>")
|
||||
if(H.heart_attack && H.stat != DEAD)
|
||||
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
|
||||
user.show_message("<span class='userdanger'>Subject suffering from heart attack: Apply defibrillator immediately.</span>")
|
||||
user.show_message("\blue Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font>")
|
||||
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
|
||||
var/implant_detect
|
||||
for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs)
|
||||
if(CI.status == ORGAN_ROBOT)
|
||||
@@ -253,7 +253,7 @@ REAGENT SCANNER
|
||||
if(H.gene_stability < 40)
|
||||
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
|
||||
else if(H.gene_stability < 70)
|
||||
user.show_message("<span class='danger'>Subject's genes are showing signs of spontenous breakdown.</span>")
|
||||
user.show_message("<span class='danger'>Subject's genes are showing signs of spontaneous breakdown.</span>")
|
||||
else if(H.gene_stability < 85)
|
||||
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
|
||||
else
|
||||
@@ -279,7 +279,7 @@ REAGENT SCANNER
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You install the upgrade in the [src].</span>")
|
||||
overlays += "advanced"
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
upgraded = 1
|
||||
qdel(W)
|
||||
|
||||
@@ -294,15 +294,16 @@ REAGENT SCANNER
|
||||
name = "Health Analyzer Upgrade"
|
||||
icon_state = "healthupgrade"
|
||||
desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality."
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
origin_tech = "magnets=2;biotech=2"
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
/obj/item/device/analyzer
|
||||
desc = "A hand-held environmental scanner which reports current gas levels."
|
||||
name = "analyzer"
|
||||
icon_state = "atmos"
|
||||
item_state = "analyzer"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
@@ -368,7 +369,7 @@ REAGENT SCANNER
|
||||
name = "mass-spectrometer"
|
||||
icon_state = "spectrometer"
|
||||
item_state = "analyzer"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT | OPENCONTAINER
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 5
|
||||
@@ -378,6 +379,9 @@ REAGENT SCANNER
|
||||
origin_tech = "magnets=2;biotech=2"
|
||||
var/details = 0
|
||||
var/recent_fail = 0
|
||||
var/datatoprint = ""
|
||||
var/scanning = 1
|
||||
actions_types = list(/datum/action/item_action/print_report)
|
||||
|
||||
/obj/item/device/mass_spectrometer/New()
|
||||
..()
|
||||
@@ -408,13 +412,13 @@ REAGENT SCANNER
|
||||
else
|
||||
blood_traces = params2list(R.data["trace_chem"])
|
||||
break
|
||||
var/dat = "Trace Chemicals Found: "
|
||||
var/dat = ""
|
||||
for(var/R in blood_traces)
|
||||
if(prob(reliability))
|
||||
if(details)
|
||||
dat += "[R] ([blood_traces[R]] units) "
|
||||
else
|
||||
dat += "[R] "
|
||||
dat += "[R] <br>"
|
||||
recent_fail = 0
|
||||
else
|
||||
if(recent_fail)
|
||||
@@ -423,8 +427,14 @@ REAGENT SCANNER
|
||||
return
|
||||
else
|
||||
recent_fail = 1
|
||||
to_chat(user, "[dat]")
|
||||
reagents.clear_reagents()
|
||||
if(dat)
|
||||
to_chat(user, "Trace chemicals detected in blood sample: [dat]")
|
||||
datatoprint = dat
|
||||
scanning = 0
|
||||
reagents.clear_reagents()
|
||||
else
|
||||
reagents.clear_reagents()
|
||||
to_chat(user, "<span class='notice'>No trace chemicals detected in blood sample.</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/mass_spectrometer/adv
|
||||
@@ -433,12 +443,34 @@ REAGENT SCANNER
|
||||
details = 1
|
||||
origin_tech = "magnets=4;biotech=2"
|
||||
|
||||
/obj/item/device/mass_spectrometer/proc/print_report()
|
||||
if(!scanning)
|
||||
usr.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
|
||||
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
sleep(50)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "Mass Spectrometer Scanner Report: [worldtime2text()]"
|
||||
P.info = "<center><b>Mass Spectrometer</b></center><br><center>Data Analysis:</center><br><hr><br><b>Trace chemicals detected:</b><br>[datatoprint]<br><hr>"
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(P)
|
||||
to_chat(M, "<span class='notice'>Report printed. Log cleared.<span>")
|
||||
datatoprint = ""
|
||||
scanning = 1
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] has no logs or is already in use.</span>")
|
||||
|
||||
/obj/item/device/mass_spectrometer/ui_action_click()
|
||||
print_report()
|
||||
|
||||
/obj/item/device/reagent_scanner
|
||||
name = "reagent scanner"
|
||||
desc = "A hand-held reagent scanner which identifies chemical agents."
|
||||
icon_state = "spectrometer"
|
||||
item_state = "analyzer"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 5
|
||||
@@ -448,6 +480,9 @@ REAGENT SCANNER
|
||||
origin_tech = "magnets=2;biotech=2"
|
||||
var/details = 0
|
||||
var/recent_fail = 0
|
||||
var/datatoprint = ""
|
||||
var/scanning = 1
|
||||
actions_types = list(/datum/action/item_action/print_report)
|
||||
|
||||
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob)
|
||||
if(user.stat)
|
||||
@@ -460,7 +495,6 @@ REAGENT SCANNER
|
||||
if(crit_fail)
|
||||
to_chat(user, "<span class='warning'>This device has critically failed and is no longer functional!</span>")
|
||||
return
|
||||
|
||||
if(!isnull(O.reagents))
|
||||
var/dat = ""
|
||||
if(O.reagents.reagent_list.len > 0)
|
||||
@@ -477,11 +511,12 @@ REAGENT SCANNER
|
||||
recent_fail = 1
|
||||
if(dat)
|
||||
to_chat(user, "<span class='notice'>Chemicals found: [dat]</span>")
|
||||
datatoprint = dat
|
||||
scanning = 0
|
||||
else
|
||||
to_chat(user, "<span class='notice'>No active chemical agents found in [O].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>No significant chemical agents found in [O].</span>")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/device/reagent_scanner/adv
|
||||
@@ -490,12 +525,34 @@ REAGENT SCANNER
|
||||
details = 1
|
||||
origin_tech = "magnets=4;biotech=2"
|
||||
|
||||
/obj/item/device/reagent_scanner/proc/print_report()
|
||||
if(!scanning)
|
||||
usr.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
|
||||
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
sleep(50)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "Reagent Scanner Report: [worldtime2text()]"
|
||||
P.info = "<center><b>Reagent Scanner</b></center><br><center>Data Analysis:</center><br><hr><br><b>Chemical agents detected:</b><br> [datatoprint]<br><hr>"
|
||||
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.put_in_hands(P)
|
||||
to_chat(M, "<span class='notice'>Report printed. Log cleared.<span>")
|
||||
datatoprint = ""
|
||||
scanning = 1
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] has no logs or is already in use.</span>")
|
||||
|
||||
/obj/item/device/reagent_scanner/ui_action_click()
|
||||
print_report()
|
||||
|
||||
/obj/item/device/slime_scanner
|
||||
name = "slime scanner"
|
||||
icon_state = "adv_spectrometer_s"
|
||||
item_state = "analyzer"
|
||||
origin_tech = "biotech=1"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
flags = CONDUCT
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
@@ -530,5 +587,5 @@ REAGENT SCANNER
|
||||
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]", 1)
|
||||
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
|
||||
if(T.cores > 1)
|
||||
user.show_message("Anomalious slime core amount detected", 1)
|
||||
user.show_message("Anomalous slime core amount detected", 1)
|
||||
user.show_message("Growth progress: [T.amount_grown]/10", 1)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A miniature machine that tracks suit sensors across the station."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "scanner"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "biotech=3;materials=3;magnets=3"
|
||||
var/datum/nano_module/crew_monitor/crew_monitor
|
||||
@@ -12,12 +12,11 @@
|
||||
crew_monitor = new(src)
|
||||
|
||||
/obj/item/device/sensor_device/Destroy()
|
||||
qdel(crew_monitor)
|
||||
crew_monitor = null
|
||||
QDEL_NULL(crew_monitor)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/sensor_device/attack_self(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
crew_monitor.ui_interact(user, ui_key, ui, force_open)
|
||||
crew_monitor.ui_interact(user, ui_key, ui, force_open)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "A device that can record to cassette tapes, and play them. It automatically translates the content in playback."
|
||||
icon_state = "taperecorder_empty"
|
||||
item_state = "analyzer"
|
||||
w_class = 2
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=60, MAT_GLASS=30)
|
||||
force = 2
|
||||
@@ -21,9 +21,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/taperecorder/Destroy()
|
||||
if(mytape)
|
||||
qdel(mytape)
|
||||
mytape = null
|
||||
QDEL_NULL(mytape)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/taperecorder/examine(mob/user)
|
||||
@@ -157,8 +155,7 @@
|
||||
return
|
||||
else if(playing)
|
||||
playing = 0
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Playback stopped.</font>")
|
||||
atom_say("Playback stopped.")
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -187,19 +184,18 @@
|
||||
break
|
||||
if(mytape.storedinfo.len < i)
|
||||
break
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: [mytape.storedinfo[i]]</font>")
|
||||
atom_say("[mytape.storedinfo[i]]")
|
||||
if(mytape.storedinfo.len < i + 1)
|
||||
playsleepseconds = 1
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: End of recording.</font>")
|
||||
atom_say("End of recording.")
|
||||
else
|
||||
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
|
||||
if(playsleepseconds > 14)
|
||||
sleep(10)
|
||||
T = get_turf(src)
|
||||
T.visible_message("<font color=Maroon><B>Tape Recorder</B>: Skipping [playsleepseconds] seconds of silence</font>")
|
||||
atom_say("Skipping [playsleepseconds] seconds of silence.")
|
||||
playsleepseconds = 1
|
||||
i++
|
||||
|
||||
@@ -231,7 +227,7 @@
|
||||
return
|
||||
|
||||
to_chat(usr, "<span class='notice'>Transcript printed.</span>")
|
||||
playsound(loc, "sound/goonstation/machines/printer_thermal.ogg", 50, 1)
|
||||
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(get_turf(src))
|
||||
var/t1 = "<B>Transcript:</B><BR><BR>"
|
||||
for(var/i = 1, mytape.storedinfo.len >= i, i++)
|
||||
@@ -253,7 +249,7 @@
|
||||
desc = "A magnetic tape that can hold up to ten minutes of content."
|
||||
icon_state = "tape_white"
|
||||
item_state = "analyzer"
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=20, MAT_GLASS=5)
|
||||
force = 1
|
||||
throwforce = 0
|
||||
@@ -303,7 +299,7 @@
|
||||
/obj/item/device/tape/attackby(obj/item/I, mob/user)
|
||||
if(ruined && istype(I, /obj/item/weapon/screwdriver))
|
||||
to_chat(user, "<span class='notice'>You start winding the tape back in.</span>")
|
||||
if(do_after(user, 120, target = src))
|
||||
if(do_after(user, 120 * I.toolspeed, target = src))
|
||||
to_chat(user, "<span class='notice'>You wound the tape back in!</span>")
|
||||
fix()
|
||||
else if(istype(I, /obj/item/weapon/pen))
|
||||
@@ -316,4 +312,4 @@
|
||||
|
||||
//Random colour tapes
|
||||
/obj/item/device/tape/random/New()
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
|
||||
|
||||
@@ -19,7 +19,7 @@ effective or pretty fucking useless.
|
||||
desc = "A strange device with twin antennas."
|
||||
icon_state = "batterer"
|
||||
throwforce = 5
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
flags = CONDUCT
|
||||
@@ -79,7 +79,7 @@ effective or pretty fucking useless.
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
materials = list(MAT_METAL=400)
|
||||
|
||||
@@ -2,94 +2,93 @@
|
||||
icon = 'icons/obj/assemblies.dmi'
|
||||
name = "tank transfer valve"
|
||||
icon_state = "valve_1"
|
||||
item_state = "ttv"
|
||||
desc = "Regulates the transfer of air between two tanks"
|
||||
var/obj/item/weapon/tank/tank_one
|
||||
var/obj/item/weapon/tank/tank_two
|
||||
var/obj/item/device/attached_device
|
||||
var/mob/attacher = null
|
||||
var/obj/item/weapon/tank/tank_one = null
|
||||
var/obj/item/weapon/tank/tank_two = null
|
||||
var/obj/item/device/assembly/attached_device = null
|
||||
var/mob/living/attacher = null
|
||||
var/valve_open = 0
|
||||
var/toggle = 1
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
|
||||
/obj/item/device/transfer_valve/Destroy()
|
||||
if(tank_one)
|
||||
qdel(tank_one)
|
||||
tank_one = null
|
||||
if(tank_two)
|
||||
qdel(tank_two)
|
||||
tank_two = null
|
||||
if(attached_device)
|
||||
qdel(attached_device)
|
||||
attached_device = null
|
||||
QDEL_NULL(tank_one)
|
||||
QDEL_NULL(tank_two)
|
||||
QDEL_NULL(attached_device)
|
||||
attacher = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/transfer_valve/proc/process_activation(var/obj/item/device/D)
|
||||
|
||||
/obj/item/device/transfer_valve/IsAssemblyHolder()
|
||||
return 1
|
||||
|
||||
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user, params)
|
||||
if(istype(item, /obj/item/weapon/tank))
|
||||
/obj/item/device/transfer_valve/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weapon/tank))
|
||||
if(tank_one && tank_two)
|
||||
to_chat(user, "<span class='warning'>There are already two tanks attached, remove one first.</span>")
|
||||
return
|
||||
|
||||
if(!tank_one)
|
||||
tank_one = item
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
if(!user.unEquip(I))
|
||||
return
|
||||
tank_one = I
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
if(I.w_class > w_class)
|
||||
w_class = I.w_class
|
||||
else if(!tank_two)
|
||||
tank_two = item
|
||||
user.drop_item()
|
||||
item.loc = src
|
||||
if(!user.unEquip(I))
|
||||
return
|
||||
tank_two = I
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach the tank to the transfer valve.</span>")
|
||||
if(I.w_class > w_class)
|
||||
w_class = I.w_class
|
||||
|
||||
update_icon()
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
//TODO: Have this take an assemblyholder
|
||||
else if(isassembly(item))
|
||||
var/obj/item/device/assembly/A = item
|
||||
else if(isassembly(I))
|
||||
var/obj/item/device/assembly/A = I
|
||||
if(A.secured)
|
||||
to_chat(user, "<span class='notice'>The device is secured.</span>")
|
||||
return
|
||||
if(attached_device)
|
||||
to_chat(user, "<span class='warning'>There is already a device attached to the valve, remove it first.</span>")
|
||||
return
|
||||
user.remove_from_mob(item)
|
||||
user.remove_from_mob(A)
|
||||
attached_device = A
|
||||
A.loc = src
|
||||
to_chat(user, "<span class='notice'>You attach the [item] to the valve controls and secure it.</span>")
|
||||
A.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You attach the [A] to the valve controls and secure it.</span>")
|
||||
A.holder = src
|
||||
A.toggle_secure() //this calls update_icon(), which calls update_icon() on the holder (i.e. the bomb).
|
||||
|
||||
bombers += "[key_name(user)] attached a [item] to a transfer valve."
|
||||
msg_admin_attack("[key_name_admin(user)]attached [item] to a transfer valve.")
|
||||
log_game("[key_name_admin(user)] attached [item] to a transfer valve.")
|
||||
bombers += "[key_name(user)] attached a [A] to a transfer valve."
|
||||
msg_admin_attack("[key_name_admin(user)]attached [A] to a transfer valve.")
|
||||
log_game("[key_name_admin(user)] attached [A] to a transfer valve.")
|
||||
attacher = user
|
||||
nanomanager.update_uis(src) // update all UIs attached to src
|
||||
return
|
||||
|
||||
|
||||
/obj/item/device/transfer_valve/HasProximity(atom/movable/AM as mob|obj)
|
||||
if(!attached_device) return
|
||||
/obj/item/device/transfer_valve/HasProximity(atom/movable/AM)
|
||||
if(!attached_device)
|
||||
return
|
||||
attached_device.HasProximity(AM)
|
||||
return
|
||||
|
||||
/obj/item/device/transfer_valve/hear_talk(mob/living/M as mob, msg)
|
||||
/obj/item/device/transfer_valve/hear_talk(mob/living/M, msg)
|
||||
..()
|
||||
for(var/obj/O in contents)
|
||||
O.hear_talk(M, msg)
|
||||
|
||||
/obj/item/device/transfer_valve/hear_message(mob/living/M as mob, msg)
|
||||
/obj/item/device/transfer_valve/hear_message(mob/living/M, msg)
|
||||
..()
|
||||
for(var/obj/O in contents)
|
||||
O.hear_message(M, msg)
|
||||
|
||||
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
|
||||
/obj/item/device/transfer_valve/attack_self(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
@@ -113,36 +112,40 @@
|
||||
|
||||
/obj/item/device/transfer_valve/Topic(href, href_list)
|
||||
..()
|
||||
if( usr.stat || usr.restrained() )
|
||||
if(usr.incapacitated())
|
||||
return 0
|
||||
if(src.loc != usr)
|
||||
if(loc != usr)
|
||||
return 0
|
||||
if(tank_one && href_list["tankone"])
|
||||
split_gases()
|
||||
valve_open = 0
|
||||
tank_one.loc = get_turf(src)
|
||||
tank_one.forceMove(get_turf(src))
|
||||
tank_one = null
|
||||
update_icon()
|
||||
if((!tank_two || tank_two.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
else if(tank_two && href_list["tanktwo"])
|
||||
split_gases()
|
||||
valve_open = 0
|
||||
tank_two.loc = get_turf(src)
|
||||
tank_two.forceMove(get_turf(src))
|
||||
tank_two = null
|
||||
update_icon()
|
||||
if((!tank_one || tank_one.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL))
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
else if(href_list["open"])
|
||||
toggle_valve()
|
||||
else if(attached_device)
|
||||
if(href_list["rem_device"])
|
||||
attached_device.loc = get_turf(src)
|
||||
attached_device:holder = null
|
||||
attached_device.forceMove(get_turf(src))
|
||||
attached_device.holder = null
|
||||
attached_device = null
|
||||
update_icon()
|
||||
if(href_list["device"])
|
||||
attached_device.attack_self(usr)
|
||||
src.add_fingerprint(usr)
|
||||
add_fingerprint(usr)
|
||||
return 1 // Returning 1 sends an update to attached UIs
|
||||
|
||||
/obj/item/device/transfer_valve/process_activation(var/obj/item/device/D)
|
||||
/obj/item/device/transfer_valve/proc/process_activation(obj/item/device/D)
|
||||
if(toggle)
|
||||
toggle = 0
|
||||
toggle_valve()
|
||||
@@ -188,7 +191,7 @@
|
||||
*/
|
||||
|
||||
/obj/item/device/transfer_valve/proc/toggle_valve()
|
||||
if(valve_open==0 && (tank_one && tank_two))
|
||||
if(!valve_open && tank_one && tank_two)
|
||||
valve_open = 1
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
@@ -206,17 +209,12 @@
|
||||
log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]")
|
||||
merge_gases()
|
||||
spawn(20) // In case one tank bursts
|
||||
for(var/i=0,i<5,i++)
|
||||
src.update_icon()
|
||||
for(var/i in 1 to 5)
|
||||
update_icon()
|
||||
sleep(10)
|
||||
src.update_icon()
|
||||
update_icon()
|
||||
|
||||
else if(valve_open==1 && (tank_one && tank_two))
|
||||
else if(valve_open && tank_one && tank_two)
|
||||
split_gases()
|
||||
valve_open = 0
|
||||
src.update_icon()
|
||||
|
||||
// this doesn't do anything but the timer etc. expects it to be here
|
||||
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
|
||||
/obj/item/device/transfer_valve/proc/c_state()
|
||||
return
|
||||
update_icon()
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
song.instrumentExt = "ogg"
|
||||
|
||||
/obj/item/device/violin/Destroy()
|
||||
qdel(song)
|
||||
song = null
|
||||
QDEL_NULL(song)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/violin/initialize()
|
||||
@@ -30,10 +29,7 @@
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/device/violin/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(!user)
|
||||
return
|
||||
|
||||
if(!isliving(user) || user.stat || user.restrained() || user.lying)
|
||||
if(!isliving(user) || user.incapacitated())
|
||||
return
|
||||
|
||||
song.ui_interact(user, ui_key, ui, force_open)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "Used by obese officers to save their breath for running."
|
||||
icon_state = "voice0"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
w_class = 1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
flags = CONDUCT
|
||||
|
||||
var/spamcheck = 0
|
||||
@@ -26,6 +26,5 @@
|
||||
|
||||
/obj/item/device/hailer/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
to_chat(user, "\red You overload \the [src]'s voice synthesizer.")
|
||||
to_chat(user, "<span class='warning'>You overload \the [src]'s voice synthesizer.</span>")
|
||||
emagged = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user