Files
Aurora.3/code/game/objects/structures/machinery/bluespace_relay.dm
T
BatrachophrenoandGitHub 4ecb0bc21c Repath obj/machinery to obj/structure/machinery [MDB Ignore] (#22500)
Repaths obj/machinery to obj/structure/machinery. **Note for
reviewers:** the only meaningful changed code exists within
**code/game/objects/structures.dm** and
**code/game/objects/structures/_machinery.dm**, largely concerning
damage procs. With the exception of moving airlock defines to their own
file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES.

Objects, _categorically_, are largely divided between those you can hold
in your hand/inventory and those you can't. Machinery objects are
already subtypes of Structures behaviorally, this PR just makes their
pathing reflect that, and allows for future work (tool actions, more
health/destruction functionality) to be developed without unnecessary
code duplication.

I have tested this PR by loading up the Horizon and dismantling various
machines and structures with tools, shooting guns of various types
throughout the ship, and detonating a bunch of explosions throughout the
ship.
2026-05-26 19:35:48 +00:00

49 lines
1.2 KiB
Plaintext

/obj/structure/machinery/bluespacerelay
name = "Emergency Bluespace Relay"
desc = "This sends messages through bluespace! Wow!"
icon = 'icons/obj/machinery/telecomms.dmi'
icon_state = "bspacerelay"
anchored = 1
density = 1
var/on = 1
idle_power_usage = 15000
active_power_usage = 15000
component_types = list(
/obj/item/circuitboard/bluespacerelay,
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/subspace/filter,
/obj/item/stock_parts/subspace/crystal,
/obj/item/stack/cable_coil
)
/obj/structure/machinery/bluespacerelay/process()
update_power()
update_icon()
/obj/structure/machinery/bluespacerelay/update_icon()
ClearOverlays()
if(on)
AddOverlays(emissive_appearance(icon, "[icon_state]_lights"))
AddOverlays("[icon_state]_lights")
/obj/structure/machinery/bluespacerelay/proc/update_power()
if(stat & (BROKEN|NOPOWER|EMPED))
on = 0
else
on = 1
/obj/structure/machinery/bluespacerelay/attackby(obj/item/attacking_item, mob/user)
if(default_deconstruction_screwdriver(user, attacking_item))
return TRUE
if(default_deconstruction_crowbar(user, attacking_item))
return TRUE
if(default_part_replacement(user, attacking_item))
return TRUE
return ..()