mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
GC radio stuffs
This commit is contained in:
@@ -42,6 +42,12 @@
|
||||
id_tag = num2text(uid)
|
||||
icon = null
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/dp_vent_pump/initialize()
|
||||
..()
|
||||
if(frequency)
|
||||
|
||||
@@ -21,6 +21,12 @@
|
||||
if(frequency)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/update_icon()
|
||||
icon_state = "[on ? "on" : "off"]"
|
||||
|
||||
|
||||
@@ -28,6 +28,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/highcap
|
||||
name = "High capacity gas pump"
|
||||
desc = "A high capacity pump"
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
update_icon()
|
||||
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
@@ -60,7 +60,7 @@
|
||||
close()
|
||||
else
|
||||
open()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital // can be controlled by AI
|
||||
name = "digital valve"
|
||||
desc = "A digitally controlled valve."
|
||||
@@ -71,6 +71,12 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
settagwhitelist = list("id_tag")
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
@@ -28,6 +28,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/on
|
||||
on = 1
|
||||
icon_state = "map_on"
|
||||
|
||||
@@ -22,6 +22,13 @@ Filter types:
|
||||
var/frequency = 0
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/flipped
|
||||
icon_state = "mmap"
|
||||
flipped = 1
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
name = "manual switching valve"
|
||||
desc = "A pipe valve"
|
||||
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
var/state = TVALVE_STATE_STRAIGHT
|
||||
@@ -15,16 +15,16 @@
|
||||
/obj/machinery/atmospherics/trinary/tvalve/bypass
|
||||
icon_state = "map_tvalve1"
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/flipped
|
||||
icon_state = "map_tvalvem0"
|
||||
flipped = 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/flipped/bypass
|
||||
icon_state = "map_tvalvem1"
|
||||
flipped = 1
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/update_icon(animation)
|
||||
var/flipstate = ""
|
||||
if(flipped)
|
||||
@@ -40,7 +40,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
|
||||
add_underlay(T, node1, turn(dir, -180))
|
||||
|
||||
if(flipped)
|
||||
@@ -49,7 +49,7 @@
|
||||
add_underlay(T, node2, turn(dir, -90))
|
||||
|
||||
add_underlay(T, node3, dir)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/proc/switch_side()
|
||||
if(state == TVALVE_STATE_STRAIGHT)
|
||||
go_to_side()
|
||||
@@ -57,7 +57,7 @@
|
||||
go_straight()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/proc/go_to_side()
|
||||
if(state == TVALVE_STATE_SIDE)
|
||||
if(state == TVALVE_STATE_SIDE)
|
||||
return 0
|
||||
|
||||
state = TVALVE_STATE_SIDE
|
||||
@@ -74,7 +74,7 @@
|
||||
/obj/machinery/atmospherics/trinary/tvalve/proc/go_straight()
|
||||
if(state == TVALVE_STATE_STRAIGHT)
|
||||
return 0
|
||||
|
||||
|
||||
state = TVALVE_STATE_STRAIGHT
|
||||
update_icon()
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
parent2.update = 0
|
||||
parent3.update = 0
|
||||
parent1.reconcile_air()
|
||||
|
||||
|
||||
investigate_log("was set to straight by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
@@ -108,14 +108,20 @@
|
||||
var/id = null
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/bypass
|
||||
icon_state = "map_tvalve1"
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/flipped
|
||||
icon_state = "map_tvalvem0"
|
||||
flipped = 1
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/flipped/bypass
|
||||
icon_state = "map_tvalvem1"
|
||||
flipped = 1
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
if(id && !id_tag)//I'm not dealing with any more merge conflicts
|
||||
id_tag = id
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
|
||||
if(!powered())
|
||||
icon_state = "off"
|
||||
|
||||
@@ -433,4 +433,7 @@
|
||||
if(initial_loc)
|
||||
initial_loc.air_vent_info -= id_tag
|
||||
initial_loc.air_vent_names -= id_tag
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
@@ -53,6 +53,9 @@
|
||||
if(initial_loc && frequency == 1439)
|
||||
initial_loc.air_scrub_info -= id_tag
|
||||
initial_loc.air_scrub_names -= id_tag
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
|
||||
|
||||
Reference in New Issue
Block a user