mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +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)
|
||||
|
||||
@@ -212,6 +212,7 @@
|
||||
air_alarms -= src
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
air_alarm_repository.update_cache(src)
|
||||
QDEL_NULL(wires)
|
||||
if(alarm_area && alarm_area.master_air_alarm == src)
|
||||
|
||||
@@ -135,7 +135,8 @@ obj/machinery/air_sensor
|
||||
Destroy()
|
||||
SSair.atmos_machinery -= src
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -156,6 +157,12 @@ obj/machinery/air_sensor
|
||||
var/list/sensor_information = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
attack_hand(mob/user)
|
||||
if(..(user))
|
||||
return
|
||||
|
||||
@@ -48,13 +48,14 @@
|
||||
|
||||
/obj/machinery/driver_button/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/machinery/driver_button/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/driver_button/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
@@ -167,7 +168,7 @@
|
||||
|
||||
/obj/machinery/ignition_switch/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/ignition_switch/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -140,6 +140,7 @@ About the new airlock wires panel:
|
||||
/obj/machinery/door/airlock/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
QDEL_NULL(wires)
|
||||
QDEL_NULL(note)
|
||||
if(main_power_timer)
|
||||
deltimer(main_power_timer)
|
||||
main_power_timer = null
|
||||
@@ -149,7 +150,9 @@ About the new airlock wires panel:
|
||||
if(electrified_timer)
|
||||
deltimer(electrified_timer)
|
||||
electrified_timer = null
|
||||
qdel(note)
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/airlock/handle_atom_del(atom/A)
|
||||
|
||||
@@ -216,6 +216,12 @@
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/airlock_sensor/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/airlock_sensor/airlock_interior
|
||||
command = "cycle_interior"
|
||||
|
||||
@@ -279,6 +285,12 @@
|
||||
if(radio_controller)
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/access_button/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/access_button/airlock_interior
|
||||
frequency = 1379
|
||||
command = "cycle_interior"
|
||||
|
||||
@@ -58,6 +58,12 @@
|
||||
..()
|
||||
set_frequency(frequency)
|
||||
|
||||
/obj/machinery/embedded_controller/radio/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/embedded_controller/radio/update_icon()
|
||||
if(on && program)
|
||||
if(program.memory["processing"])
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
|
||||
/obj/machinery/light_switch/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light_switch/proc/updateicon()
|
||||
@@ -75,7 +76,7 @@
|
||||
/obj/machinery/light_switch/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/light_switch/attack_hand(mob/user)
|
||||
on = !on
|
||||
updateicon()
|
||||
|
||||
@@ -236,6 +236,12 @@
|
||||
filter_path() // renders rpath
|
||||
|
||||
|
||||
Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
process()
|
||||
if(magnets.len == 0 && autolink)
|
||||
for(var/obj/machinery/magnetic_module/M in world)
|
||||
|
||||
@@ -77,6 +77,7 @@ var/global/list/default_medbay_channels = list(
|
||||
radio_controller.remove_object(src, frequency)
|
||||
for(var/ch_name in channels)
|
||||
radio_controller.remove_object(src, radiochannels[ch_name])
|
||||
radio_connection = null
|
||||
global_radios -= src
|
||||
follow_target = null
|
||||
return ..()
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
/obj/item/device/assembly/signaler/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/assembly/signaler/describe()
|
||||
|
||||
@@ -62,7 +62,8 @@
|
||||
|
||||
/obj/machinery/logic_gate/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src,frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/logic_gate/process()
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
/obj/item/radio/integrated/signal/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
return ..()
|
||||
|
||||
/obj/item/radio/integrated/signal/initialize()
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/power/emitter/Destroy()
|
||||
if(radio_controller)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
radio_connection = null
|
||||
msg_admin_attack("Emitter deleted at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
|
||||
log_game("Emitter deleted at ([x],[y],[z])")
|
||||
investigate_log("<font color='red'>deleted</font> at ([x],[y],[z])","singulo")
|
||||
|
||||
Reference in New Issue
Block a user