mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-12 08:27:13 +01:00
4ecb0bc21c
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.
32 lines
887 B
Plaintext
32 lines
887 B
Plaintext
// the underfloor wiring terminal for the APC
|
|
// autogenerated when an APC is placed
|
|
// all conduit connects go to this object instead of the APC
|
|
// using this solves the problem of having the APC in a wall yet also inside an area
|
|
|
|
/obj/structure/machinery/power/terminal
|
|
name = "terminal"
|
|
icon_state = "term"
|
|
desc = "It's an underfloor wiring terminal for power equipment."
|
|
level = 1
|
|
layer = EXPOSED_WIRE_TERMINAL_LAYER
|
|
var/obj/structure/machinery/power/master = null
|
|
anchored = 1
|
|
|
|
|
|
/obj/structure/machinery/power/terminal/Initialize()
|
|
. = ..()
|
|
var/turf/T = src.loc
|
|
if(level == 1)
|
|
hide(!T.is_plating())
|
|
return
|
|
|
|
/obj/structure/machinery/power/terminal/Destroy()
|
|
if(master)
|
|
master.disconnect_terminal()
|
|
master = null
|
|
return ..()
|
|
|
|
/obj/structure/machinery/power/terminal/hide(var/i)
|
|
set_invisibility(i ? 101 : initial(invisibility))
|
|
icon_state = i ? "term-f" : "term"
|