mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
* Fix uncapitalized sentences, lack of "the", and singular/plural mixup when inserting items into lathes * Conform some job descriptions to the pattern used by the majority: bitrunner, chemist, coroner, janitor, RD, shaft miner * Remove extra colon from "Open Special Role Information" action buttons * Uncapitalize "no alerts" / "systems nominal" messages in atmos and station alert consoles * Fix incorrect feedback when wrenching down a freezer/heater with its panel open * Fix "Thank you for restocking the station!" appearing in the wrong place in the cargo export summary * Fix "pizza boxs" on cargo manifests * Fix mid-sentence capital "The" when: * Examining walls with mounted items * Inserting parts into machine frames * Fix "Pete's the udder" * Fix double-"the" and stringified datum typepath when scooping reagents * Fix missing spaces in door remote descriptions * Fix uncapitalized "Nanotrasen" in emergency respone drone ghost role poll * Fix double-space in canister opening admin log * Fix missing "the" when casting bear-form spell * Fix "auxiliry" in NebulaStation airlocks * Add `check_grep.sh` rules against "maintainance", "maintainence", and "maintenence" * Fix "maintainance" in NebulaStation airlocks, TCG cards, and in examines of netpod, byteforge, quantum server * Fix "maintainence" in examines of autolathe, flatpacker, cryo cell, ore silo, floodlight, power storage unit, turbine, chromatography machine, ChemMaster, all-in-one grinder, smoke machine, R&D machines, vending machines * Fix "maintenence" in Sulaco ruin terminal * Add missing periods to: * "That's X." examine block header * steal objective explanation text * atmospheric shield generator examine * autolathe examine * telescreen examine * accidentally stepping on a mousetrap * netpod examine * byteforge examine * hat/mask visor toggling * bizza box stack examine * ChemMaster 3000 examine * floodlight examine * power storage unit examine * ChemMaster interact messages * disposal bin animal eject message * techfab examine * vending machine examine * flatpacker examine * Fix name capitalization/propriety of: * big manipulator * DeForest first aid station * Christmas tree * Thunderdome plaque * commission plaque * chalkboard coffee menu * experimental destructive scanner * scanner array * prison cube * RaptorDex * atmospheric shield generator * high-performance liquid chromatography machine * all-in-one grinder * keycard authentication device * Fix plurality of: * fake stairs * HUDs * restaurant and bar seating * Fix misc grammar/typos in: * recharging station description * worm description * surgery tray description * access failure message of restaurant portal * mysterious pillar description * Pennywise painting description * floodlight examine * power storage unit examine * flatpacker examine * Remove extra newline from "Debug Z-Levels" verb
112 lines
4.1 KiB
Plaintext
112 lines
4.1 KiB
Plaintext
/**
|
|
* # Destructive scanner
|
|
*
|
|
* Placed machine that handles destructive experiments (but can also do the normal ones)
|
|
*/
|
|
/obj/machinery/destructive_scanner
|
|
name = "experimental destructive scanner"
|
|
desc = "A much larger version of the hand-held scanner. A charred label warns about its destructive capabilities."
|
|
icon = 'icons/obj/machines/destructive_scanner.dmi'
|
|
icon_state = "tube_open"
|
|
circuit = /obj/item/circuitboard/machine/destructive_scanner
|
|
layer = MOB_LAYER
|
|
var/scanning = FALSE
|
|
|
|
// Late load to ensure the component initialization occurs after the machines are initialized
|
|
/obj/machinery/destructive_scanner/post_machine_initialize()
|
|
. = ..()
|
|
|
|
var/static/list/destructive_signals = list(
|
|
COMSIG_MACHINERY_DESTRUCTIVE_SCAN = TYPE_PROC_REF(/datum/component/experiment_handler, try_run_destructive_experiment),
|
|
)
|
|
|
|
AddComponent(/datum/component/experiment_handler, \
|
|
allowed_experiments = list(/datum/experiment/scanning),\
|
|
config_mode = EXPERIMENT_CONFIG_CLICK, \
|
|
start_experiment_callback = CALLBACK(src, PROC_REF(activate)), \
|
|
experiment_signals = destructive_signals, \
|
|
)
|
|
|
|
///Activates the machine; checks if it can actually scan, then starts.
|
|
/obj/machinery/destructive_scanner/proc/activate()
|
|
var/atom/pickup_zone = drop_location()
|
|
var/aggressive = FALSE
|
|
for(var/mob/living/living_mob in pickup_zone)
|
|
if(!(obj_flags & EMAGGED) && ishuman(living_mob)) //Can only kill humans when emagged.
|
|
playsound(src, 'sound/machines/buzz/buzz-sigh.ogg', 25)
|
|
say("Cannot scan with humans inside.")
|
|
return
|
|
aggressive = TRUE
|
|
start_closing(aggressive)
|
|
use_energy(idle_power_usage)
|
|
|
|
///Closes the machine to kidnap everything in the turf into it.
|
|
/obj/machinery/destructive_scanner/proc/start_closing(aggressive)
|
|
if(scanning)
|
|
return
|
|
var/atom/pickup_zone = drop_location()
|
|
for(var/atom/movable/to_pickup in pickup_zone)
|
|
if(to_pickup == src)
|
|
continue
|
|
to_pickup.forceMove(src)
|
|
flick("tube_down", src)
|
|
scanning = TRUE
|
|
update_icon()
|
|
playsound(src, 'sound/machines/destructive_scanner/TubeDown.ogg', 100)
|
|
use_energy(idle_power_usage)
|
|
addtimer(CALLBACK(src, PROC_REF(start_scanning), aggressive), 1.2 SECONDS)
|
|
|
|
///Starts scanning the fancy scanning effects
|
|
/obj/machinery/destructive_scanner/proc/start_scanning(aggressive)
|
|
if(aggressive)
|
|
playsound(src, 'sound/machines/destructive_scanner/ScanDangerous.ogg', 100, extrarange = 5)
|
|
else
|
|
playsound(src, 'sound/machines/destructive_scanner/ScanSafe.ogg', 100)
|
|
use_energy(active_power_usage)
|
|
addtimer(CALLBACK(src, PROC_REF(finish_scanning), aggressive), 6 SECONDS)
|
|
|
|
|
|
///Performs the actual scan, happens once the tube effects are done
|
|
/obj/machinery/destructive_scanner/proc/finish_scanning(aggressive)
|
|
flick("tube_up", src)
|
|
scanning = FALSE
|
|
update_icon()
|
|
playsound(src, 'sound/machines/destructive_scanner/TubeUp.ogg', 100)
|
|
addtimer(CALLBACK(src, PROC_REF(open), aggressive), 1.2 SECONDS)
|
|
|
|
///Opens the machine to let out any contents. If the scan had mobs it'll gib them.
|
|
/obj/machinery/destructive_scanner/proc/open(aggressive)
|
|
var/turf/this_turf = get_turf(src)
|
|
var/list/scanned_atoms = list()
|
|
|
|
for(var/atom/movable/movable_atom in contents)
|
|
if(movable_atom in component_parts)
|
|
continue
|
|
scanned_atoms += movable_atom
|
|
movable_atom.forceMove(this_turf)
|
|
if(isliving(movable_atom))
|
|
var/mob/living/fucked_up_thing = movable_atom
|
|
fucked_up_thing.investigate_log("has been gibbed by [src].", INVESTIGATE_DEATHS)
|
|
fucked_up_thing.gib(DROP_ALL_REMAINS)
|
|
|
|
SEND_SIGNAL(src, COMSIG_MACHINERY_DESTRUCTIVE_SCAN, scanned_atoms)
|
|
|
|
|
|
/obj/machinery/destructive_scanner/emag_act(mob/user, obj/item/card/emag/emag_card)
|
|
if(obj_flags & EMAGGED)
|
|
return FALSE
|
|
obj_flags |= EMAGGED
|
|
playsound(src, SFX_SPARKS, 75, TRUE, SILENCED_SOUND_EXTRARANGE)
|
|
balloon_alert(user, "safety sensor BIOS disabled")
|
|
return TRUE
|
|
|
|
/obj/machinery/destructive_scanner/update_icon_state()
|
|
. = ..()
|
|
icon_state = scanning ? "tube_on" : "tube_open"
|
|
|
|
/obj/machinery/destructive_scanner/attackby(obj/item/object, mob/user, list/modifiers, list/attack_modifiers)
|
|
if (!scanning && default_deconstruction_screwdriver(user, "tube_open", "tube_open", object) || default_deconstruction_crowbar(object))
|
|
update_icon()
|
|
return
|
|
return ..()
|