Files
Bubberstation/code/datums/elements/reagent_scoopable_atom.dm
Tad HardestyandGitHub 4d7b9be4a2 Fix a variety of grammar errors (#94707)
* 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
2026-01-03 21:34:59 -07:00

38 lines
1.7 KiB
Plaintext

/datum/element/reagent_scoopable_atom
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH_ON_HOST_DESTROY
argument_hash_start_idx = 2
var/datum/reagent/reagent_to_extract
/datum/element/reagent_scoopable_atom/Attach(datum/target, reagent_to_extract)
. = ..()
if(!isatom(target))
return ELEMENT_INCOMPATIBLE
if(!reagent_to_extract)
CRASH("[type] added to [target] without any reagent specified.")
src.reagent_to_extract = reagent_to_extract
RegisterSignal(target, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
RegisterSignal(target, COMSIG_ATOM_ITEM_INTERACTION, PROC_REF(on_item_interaction))
/datum/element/reagent_scoopable_atom/Detach(datum/source, ...)
UnregisterSignal(source, list(COMSIG_ATOM_EXAMINE, COMSIG_ATOM_ITEM_INTERACTION))
return ..()
/datum/element/reagent_scoopable_atom/proc/on_examine(atom/source, mob/user, list/examine_list)
SIGNAL_HANDLER
examine_list += span_info("Some <b>[reagent_to_extract::name]</b> could probably be scooped up with a <b>container</b>.")
/datum/element/reagent_scoopable_atom/proc/on_item_interaction(atom/source, mob/living/user, obj/item/tool, list/modifiers)
SIGNAL_HANDLER
if(tool.is_open_container())
return extract_reagents(source, tool, user)
/datum/element/reagent_scoopable_atom/proc/extract_reagents(atom/source, obj/item/container, mob/living/user)
if(!reagent_to_extract)
return ITEM_INTERACT_BLOCKING
if(!container.reagents.add_reagent(reagent_to_extract, rand(5, 10)))
to_chat(user, span_warning("[container] is full."))
user.visible_message(span_notice("[user] scoops [reagent_to_extract::name] from [source] with [container]."), span_notice("You scoop out [reagent_to_extract::name] from [source] using [container]."))
return ITEM_INTERACT_SUCCESS