mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +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
155 lines
5.0 KiB
Plaintext
155 lines
5.0 KiB
Plaintext
|
|
//All devices that link into the R&D console fall into thise type for easy identification and some shared procs.
|
|
|
|
|
|
/obj/machinery/rnd
|
|
name = "R&D Device"
|
|
icon = 'icons/obj/machines/research.dmi'
|
|
density = TRUE
|
|
use_power = IDLE_POWER_USE
|
|
|
|
///Are we currently printing a machine
|
|
var/busy = FALSE
|
|
///Is this machne hacked via wires
|
|
var/hacked = FALSE
|
|
///Is this machine disabled via wires
|
|
var/disabled = FALSE
|
|
///Ref to global science techweb.
|
|
var/datum/techweb/stored_research
|
|
///The item loaded inside the machine, used by experimentors and destructive analyzers only.
|
|
var/obj/item/loaded_item
|
|
|
|
/obj/machinery/rnd/Initialize(mapload)
|
|
. = ..()
|
|
set_wires(new /datum/wires/rnd(src))
|
|
register_context()
|
|
|
|
/obj/machinery/rnd/post_machine_initialize()
|
|
. = ..()
|
|
if(!CONFIG_GET(flag/no_default_techweb_link) && !stored_research)
|
|
CONNECT_TO_RND_SERVER_ROUNDSTART(stored_research, src)
|
|
if(stored_research)
|
|
on_connected_techweb()
|
|
|
|
/obj/machinery/rnd/Destroy()
|
|
if(stored_research)
|
|
log_research("[src] disconnected from techweb [stored_research] (destroyed).")
|
|
stored_research = null
|
|
return ..()
|
|
|
|
/obj/machinery/rnd/examine(mob/user)
|
|
. = ..()
|
|
if(!in_range(user, src) && !isobserver(user))
|
|
return
|
|
|
|
. += span_notice("A [EXAMINE_HINT("multitool")] with techweb designs can be uploaded here.")
|
|
. += span_notice("Its maintenance panel can be [EXAMINE_HINT("screwed")] [panel_open ? "closed" : "open"].")
|
|
if(panel_open)
|
|
. += span_notice("Use a [EXAMINE_HINT("multitool")] or [EXAMINE_HINT("wirecutters")] to interact with wires.")
|
|
. += span_notice("The machine can be [EXAMINE_HINT("pried")] apart.")
|
|
|
|
/obj/machinery/rnd/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
|
. = NONE
|
|
if(isnull(held_item))
|
|
return
|
|
|
|
if(held_item.tool_behaviour == TOOL_SCREWDRIVER)
|
|
context[SCREENTIP_CONTEXT_LMB] = "[panel_open ? "Close" : "Open"] Panel"
|
|
context[SCREENTIP_CONTEXT_RMB] = "[panel_open ? "Close" : "Open"] Panel"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
if(panel_open)
|
|
var/msg
|
|
if(held_item.tool_behaviour == TOOL_CROWBAR)
|
|
msg = "Deconstruct"
|
|
else if(is_wire_tool(held_item))
|
|
msg = "Open Wires"
|
|
|
|
if(msg)
|
|
context[SCREENTIP_CONTEXT_LMB] = msg
|
|
context[SCREENTIP_CONTEXT_RMB] = msg
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
else
|
|
if(held_item.tool_behaviour == TOOL_MULTITOOL)
|
|
var/obj/item/multitool/tool = held_item.get_proxy_attacker_for(src, user)
|
|
if(!QDELETED(tool.buffer) && istype(tool.buffer, /datum/techweb))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Upload Techweb"
|
|
context[SCREENTIP_CONTEXT_RMB] = "Upload Techweb"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
///Called when attempting to connect the machine to a techweb, forgetting the old.
|
|
/obj/machinery/rnd/proc/connect_techweb(datum/techweb/new_techweb)
|
|
if(stored_research)
|
|
log_research("[src] disconnected from techweb [stored_research] when connected to [new_techweb].")
|
|
stored_research = new_techweb
|
|
if(!isnull(stored_research))
|
|
on_connected_techweb()
|
|
|
|
///Called post-connection to a new techweb.
|
|
/obj/machinery/rnd/proc/on_connected_techweb()
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
|
|
///Reset the state of this machine
|
|
/obj/machinery/rnd/proc/reset_busy()
|
|
busy = FALSE
|
|
|
|
/obj/machinery/rnd/crowbar_act(mob/living/user, obj/item/tool)
|
|
return default_deconstruction_crowbar(tool)
|
|
|
|
/obj/machinery/rnd/crowbar_act_secondary(mob/living/user, obj/item/tool)
|
|
return crowbar_act(user, tool)
|
|
|
|
/obj/machinery/rnd/screwdriver_act(mob/living/user, obj/item/tool)
|
|
return default_deconstruction_screwdriver(user, "[initial(icon_state)]_t", initial(icon_state), tool)
|
|
|
|
/obj/machinery/rnd/screwdriver_act_secondary(mob/living/user, obj/item/tool)
|
|
return screwdriver_act(user, tool)
|
|
|
|
/obj/machinery/rnd/multitool_act(mob/living/user, obj/item/multitool/tool)
|
|
if(panel_open)
|
|
wires.interact(user)
|
|
return ITEM_INTERACT_SUCCESS
|
|
if(!QDELETED(tool.buffer) && istype(tool.buffer, /datum/techweb))
|
|
connect_techweb(tool.buffer)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/machinery/rnd/multitool_act_secondary(mob/living/user, obj/item/tool)
|
|
return multitool_act(user, tool)
|
|
|
|
/obj/machinery/rnd/wirecutter_act(mob/living/user, obj/item/tool)
|
|
. = ITEM_INTERACT_BLOCKING
|
|
if(panel_open)
|
|
wires.interact(user)
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/machinery/rnd/wirecutter_act_secondary(mob/living/user, obj/item/tool)
|
|
return wirecutter_act(user, tool)
|
|
|
|
//whether the machine can have an item inserted in its current state.
|
|
/obj/machinery/rnd/proc/is_insertion_ready(mob/user)
|
|
if(panel_open)
|
|
balloon_alert(user, "panel open!")
|
|
return FALSE
|
|
if(disabled)
|
|
balloon_alert(user, "belts disabled!")
|
|
return FALSE
|
|
if(busy)
|
|
balloon_alert(user, "still busy!")
|
|
return FALSE
|
|
if(machine_stat & BROKEN)
|
|
balloon_alert(user, "machine broken!")
|
|
return FALSE
|
|
if(machine_stat & NOPOWER)
|
|
balloon_alert(user, "no power!")
|
|
return FALSE
|
|
if(loaded_item)
|
|
balloon_alert(user, "item already loaded!")
|
|
return FALSE
|
|
return TRUE
|
|
|
|
//we eject the loaded item when deconstructing the machine
|
|
/obj/machinery/rnd/on_deconstruction(disassembled)
|
|
if(loaded_item)
|
|
loaded_item.forceMove(drop_location())
|
|
..()
|