diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 818e50c731d..dce777a43c4 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -30437,6 +30437,10 @@ /obj/item/assembly/flash/handheld, /obj/item/assembly/flash/handheld, /obj/effect/turf_decal/bot, +/obj/machinery/ecto_sniffer{ + pixel_x = -6; + pixel_y = 6 + }, /turf/open/floor/iron, /area/science/robotics/lab) "dCq" = ( diff --git a/_maps/map_files/IceBoxStation/IceBoxStation.dmm b/_maps/map_files/IceBoxStation/IceBoxStation.dmm index 35379dd4260..4d46957f720 100644 --- a/_maps/map_files/IceBoxStation/IceBoxStation.dmm +++ b/_maps/map_files/IceBoxStation/IceBoxStation.dmm @@ -11736,6 +11736,10 @@ /obj/structure/table, /obj/machinery/cell_charger, /obj/item/stock_parts/cell/high/plus, +/obj/machinery/ecto_sniffer{ + pixel_x = 6; + pixel_y = 6 + }, /turf/open/floor/iron, /area/science/robotics/lab) "bpX" = ( diff --git a/_maps/map_files/KiloStation/KiloStation.dmm b/_maps/map_files/KiloStation/KiloStation.dmm index 29b2104ff99..f53bfb2b99f 100644 --- a/_maps/map_files/KiloStation/KiloStation.dmm +++ b/_maps/map_files/KiloStation/KiloStation.dmm @@ -15349,8 +15349,13 @@ dir = 8 }, /obj/structure/table, -/obj/item/paper_bin, -/obj/item/pen, +/obj/item/paper_bin{ + pixel_x = 6; + pixel_y = 5 + }, +/obj/machinery/ecto_sniffer{ + pixel_x = -6 + }, /turf/open/floor/iron/dark, /area/science/robotics/lab) "aXj" = ( diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 3cecaf05258..c8288e72a29 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -34360,12 +34360,6 @@ pixel_x = 5; pixel_y = 7 }, -/obj/machinery/requests_console/directional/north{ - department = "Robotics"; - departmentType = 5; - name = "Robotics Requests Console"; - receive_ore_updates = 1 - }, /turf/open/floor/iron, /area/science/robotics/lab) "jmL" = ( @@ -77549,26 +77543,6 @@ "xwa" = ( /obj/structure/table/reinforced, /obj/effect/turf_decal/bot, -/obj/effect/turf_decal/stripes/line{ - dir = 4 - }, -/obj/item/assembly/flash/handheld{ - pixel_x = -1; - pixel_y = -1 - }, -/obj/item/assembly/flash/handheld{ - pixel_x = 3; - pixel_y = 2 - }, -/obj/item/assembly/flash/handheld{ - pixel_x = 1; - pixel_y = 4 - }, -/obj/item/assembly/flash/handheld{ - pixel_x = -4; - pixel_y = 5 - }, -/obj/item/assembly/flash/handheld, /obj/item/bodypart/r_arm/robot{ pixel_x = 3 }, @@ -77577,6 +77551,30 @@ }, /obj/structure/extinguisher_cabinet/directional/north, /obj/machinery/firealarm/directional/west, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/machinery/ecto_sniffer{ + pixel_x = -6; + pixel_y = 6 + }, /turf/open/floor/iron, /area/science/robotics/lab) "xwd" = ( diff --git a/_maps/map_files/tramstation/tramstation.dmm b/_maps/map_files/tramstation/tramstation.dmm index 9321ab6f1d3..52ca8ef12f9 100644 --- a/_maps/map_files/tramstation/tramstation.dmm +++ b/_maps/map_files/tramstation/tramstation.dmm @@ -49846,12 +49846,33 @@ /area/medical/medbay/central) "pjl" = ( /obj/structure/table, -/obj/item/assembly/flash/handheld, -/obj/item/assembly/flash/handheld, -/obj/item/assembly/flash/handheld, -/obj/item/assembly/flash/handheld, -/obj/item/assembly/flash/handheld, -/obj/item/assembly/flash/handheld, +/obj/machinery/ecto_sniffer{ + pixel_x = -4 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, +/obj/item/assembly/flash/handheld{ + pixel_x = 6; + pixel_y = 13 + }, /turf/open/floor/iron/dark, /area/science/robotics/lab) "pjm" = ( diff --git a/code/datums/wires/ecto_sniffer.dm b/code/datums/wires/ecto_sniffer.dm new file mode 100644 index 00000000000..d4dcae6fb00 --- /dev/null +++ b/code/datums/wires/ecto_sniffer.dm @@ -0,0 +1,17 @@ +/datum/wires/ecto_sniffer + proper_name = "Ectoscopic Sniffer" + randomize = TRUE //Only one wire don't need blueprints + holder_type = /obj/machinery/ecto_sniffer + +/datum/wires/ecto_sniffer/New(atom/holder) + wires = list(WIRE_ACTIVATE) + ..() + +/datum/wires/ecto_sniffer/on_pulse(wire) + var/obj/machinery/ecto_sniffer/our_sniffer = holder + our_sniffer.activate() + ..() + +/datum/wires/ecto_sniffer/on_cut(wire, mend) + var/obj/machinery/ecto_sniffer/our_sniffer = holder + our_sniffer.sensor_enabled = mend diff --git a/code/game/machinery/ecto_sniffer.dm b/code/game/machinery/ecto_sniffer.dm new file mode 100644 index 00000000000..210e0b7a17b --- /dev/null +++ b/code/game/machinery/ecto_sniffer.dm @@ -0,0 +1,82 @@ +/obj/machinery/ecto_sniffer + name = "ectoscopic sniffer" + desc = "A highly sensitive parascientific instrument calibrated to detect the slightest whiff of ectoplasm." + icon = 'icons/obj/machines/research.dmi' + icon_state = "ecto_sniffer" + density = FALSE + anchored = FALSE + pass_flags = PASSTABLE + circuit = /obj/item/circuitboard/machine/ecto_sniffer + ///determines if the device if the power switch is turned on or off. Useful if the ghosts are too annoying. + var/on = TRUE + ///If this var set to false the ghosts will not be able interact with the machine, say if the machine is silently disabled by cutting the internal wire. + var/sensor_enabled = TRUE + ///List of ckeys containing players who have recently activated the device, players on this list are prohibited from activating the device untill their residue decays. + var/list/ectoplasmic_residues = list() + +/obj/machinery/ecto_sniffer/Initialize() + . = ..() + wires = new/datum/wires/ecto_sniffer(src) + +/obj/machinery/ecto_sniffer/attack_ghost(mob/user) + . = ..() + if(!is_operational || !on || !sensor_enabled) + return + + for(var/spirit_key in ectoplasmic_residues) + if(spirit_key == user.ckey) + return + activate(user) + +/obj/machinery/ecto_sniffer/proc/activate(mob/activator) + flick("ecto_sniffer_flick", src) + playsound(loc, 'sound/machines/ectoscope_beep.ogg', 25) + use_power(10) + if(activator?.ckey) + ectoplasmic_residues += activator.ckey + addtimer(CALLBACK(src, .proc/clear_residue, activator.ckey), 15 SECONDS) + +/obj/machinery/ecto_sniffer/attack_hand(mob/living/user, list/modifiers) + . = ..() + add_fingerprint(user) + on = !on + balloon_alert(user, "sniffer turned [on ? "on" : "off"]") + update_appearance() + +/obj/machinery/ecto_sniffer/update_icon_state() + . = ..() + if(panel_open) + icon_state = "[initial(icon_state)]_open" + else + icon_state = "[initial(icon_state)][(is_operational && on) ? null : "-p"]" + +/obj/machinery/ecto_sniffer/update_overlays() + . = ..() + if(is_operational && on) + . += emissive_appearance(icon, "[initial(icon_state)]-light-mask") + +/obj/machinery/ecto_sniffer/wrench_act(mob/living/user, obj/item/tool) + tool.play_tool_sound(src, 15) + set_anchored(!anchored) + balloon_alert(user, "sniffer [anchored ? "anchored" : "unanchored"]") + +/obj/machinery/ecto_sniffer/screwdriver_act(mob/living/user, obj/item/I) + . = ..() + if(!.) + return default_deconstruction_screwdriver(user, "ecto_sniffer_open", "ecto_sniffer", I) + +/obj/machinery/ecto_sniffer/crowbar_act(mob/living/user, obj/item/tool) + if(!default_deconstruction_crowbar(tool)) + return ..() + +/obj/machinery/ecto_sniffer/Destroy() + ectoplasmic_residues = null + . = ..() + +///Removes the ghost from the ectoplasmic_residues list and lets them know they are free to activate the sniffer again. +/obj/machinery/ecto_sniffer/proc/clear_residue(ghost_ckey) + ectoplasmic_residues -= ghost_ckey + var/mob/ghost = get_mob_by_ckey(ghost_ckey) + if(!ghost || isliving(ghost)) + return + to_chat(ghost, "[FOLLOW_LINK(ghost, src)] The coating of ectoplasmic residue you left on [src]'s sensors has decayed.") diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 0b8b2bf175c..42cf87151c8 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1357,3 +1357,10 @@ req_components = list( /obj/item/stock_parts/micro_laser = 4, /obj/item/stock_parts/scanning_module = 4) + +/obj/item/circuitboard/machine/ecto_sniffer + name = "Ectoscopic Sniffer (Machine Board)" + greyscale_colors = CIRCUIT_COLOR_SCIENCE + build_path = /obj/machinery/ecto_sniffer + req_components = list( + /obj/item/stock_parts/scanning_module = 1) diff --git a/icons/obj/machines/research.dmi b/icons/obj/machines/research.dmi index ac6eb0eb9f6..d7ba433ce3e 100644 Binary files a/icons/obj/machines/research.dmi and b/icons/obj/machines/research.dmi differ diff --git a/sound/machines/ectoscope_beep.ogg b/sound/machines/ectoscope_beep.ogg new file mode 100644 index 00000000000..c95af9fcaf3 Binary files /dev/null and b/sound/machines/ectoscope_beep.ogg differ diff --git a/tgstation.dme b/tgstation.dme index a7617fe9972..449171a7ade 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -852,6 +852,7 @@ #include "code\datums\wires\apc.dm" #include "code\datums\wires\autolathe.dm" #include "code\datums\wires\conveyor.dm" +#include "code\datums\wires\ecto_sniffer.dm" #include "code\datums\wires\emitter.dm" #include "code\datums\wires\explosive.dm" #include "code\datums\wires\microwave.dm" @@ -931,6 +932,7 @@ #include "code\game\machinery\dna_scanner.dm" #include "code\game\machinery\doppler_array.dm" #include "code\game\machinery\droneDispenser.dm" +#include "code\game\machinery\ecto_sniffer.dm" #include "code\game\machinery\electrolyzer.dm" #include "code\game\machinery\fat_sucker.dm" #include "code\game\machinery\firealarm.dm"