Files
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

37 lines
932 B
Plaintext

/obj/structure/machinery/bluespace_beacon
name = "bluespace beacon"
desc = "A device that draws power from bluespace and creates a permanent tracking beacon."
icon = 'icons/obj/objects.dmi'
icon_state = "floor_beaconf"
/// Underfloor
level = 1
layer = 2.5
anchored = TRUE
idle_power_usage = 0
var/obj/item/radio/beacon/beacon
/obj/structure/machinery/bluespace_beacon/Initialize(mapload, d, populate_components, is_internal)
. = ..()
var/turf/T = loc
beacon = new /obj/item/radio/beacon/fixed(T)
hide(!T.is_plating())
/obj/structure/machinery/bluespace_beacon/Destroy()
QDEL_NULL(beacon)
return ..()
/**
* Update the invisibility and icon
*/
/obj/structure/machinery/bluespace_beacon/hide(var/intact)
set_invisibility(intact ? 101 : 0)
update_icon()
/obj/structure/machinery/bluespace_beacon/update_icon()
var/state="floor_beacon"
if(invisibility)
icon_state = "[state]f"
else
icon_state = "[state]"