Files
2024-12-23 16:22:00 -07:00

41 lines
1.1 KiB
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/machinery/power/terminal
name = "terminal"
icon_state = "term"
desc = "It's an underfloor wiring terminal for power equipment."
var/obj/machinery/power/master = null
anchored = 1
plane = TURF_PLANE
layer = EXPOSED_WIRE_TERMINAL_LAYER
hides_underfloor = OBJ_UNDERFLOOR_ACTIVE
/obj/machinery/power/terminal/Destroy()
if(master)
master.disconnect_terminal()
master = null
return ..()
/obj/machinery/power/terminal/update_hiding_underfloor(new_value)
. = ..()
update_icon()
/obj/machinery/power/terminal/update_icon_state()
if(is_hidden_underfloor())
icon_state = "term-f"
else
icon_state = "term"
return ..()
// Needed so terminals are not removed from machines list.
// Powernet rebuilds need this to work properly.
/obj/machinery/power/terminal/process(delta_time)
return 1
/obj/machinery/power/terminal/overload(var/obj/machinery/power/source)
if(master)
master.overload(source)