mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-21 07:42:21 +00:00
47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
/obj/machinery/atmospherics/unary/portables_connector
|
|
icon = 'icons/atmos/connector.dmi'
|
|
icon_state = "map_connector"
|
|
|
|
name = "connector port"
|
|
desc = "For connecting portables devices related to atmospherics control."
|
|
|
|
can_unwrench = 1
|
|
layer = 2.4
|
|
|
|
var/obj/machinery/portable_atmospherics/connected_device
|
|
|
|
var/on = 0
|
|
|
|
/obj/machinery/atmospherics/unary/portables_connector/Destroy()
|
|
if(connected_device)
|
|
connected_device.disconnect()
|
|
return ..()
|
|
|
|
/obj/machinery/atmospherics/unary/portables_connector/update_icon()
|
|
icon_state = "connector"
|
|
|
|
/obj/machinery/atmospherics/unary/portables_connector/update_underlays()
|
|
if(..())
|
|
underlays.Cut()
|
|
var/turf/T = get_turf(src)
|
|
if(!istype(T))
|
|
return
|
|
add_underlay(T, node, dir)
|
|
|
|
/obj/machinery/atmospherics/unary/portables_connector/process()
|
|
if(!..() || !connected_device)
|
|
return 0
|
|
parent.update = 1
|
|
|
|
/obj/machinery/atmospherics/unary/portables_connector/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
|
if(istype(W, /obj/item/weapon/wrench))
|
|
if(connected_device)
|
|
to_chat(user, "<span class='danger'>You cannot unwrench this [src], detach [connected_device] first.</span>")
|
|
return 1
|
|
return ..()
|
|
|
|
/obj/machinery/atmospherics/unary/portables_connector/portableConnectorReturnAir()
|
|
return connected_device.portableConnectorReturnAir()
|
|
|
|
/obj/proc/portableConnectorReturnAir()
|