Fox Fixes. Foxes?

This commit is contained in:
AffectedArc07
2020-05-23 11:44:14 +01:00
parent e52289d64b
commit 9a19d319e1
4 changed files with 46 additions and 16 deletions
+28 -10
View File
@@ -74,14 +74,14 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
// Attack overrides. These are needed so the UIs can be opened up //
/obj/machinery/tcomms/attack_ai(mob/user as mob)
/obj/machinery/tcomms/attack_ai(mob/user)
add_hiddenprint(user)
ui_interact(user)
/obj/machinery/tcomms/attack_ghost(mob/user as mob)
/obj/machinery/tcomms/attack_ghost(mob/user)
ui_interact(user)
/obj/machinery/tcomms/attack_hand(mob/user as mob)
/obj/machinery/tcomms/attack_hand(mob/user)
if(..(user))
return
ui_interact(user)
@@ -230,7 +230,7 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
bad_connection = is_bad_connection(tcm.connection.frequency, display_freq)
new_connection = SSradio.return_frequency(display_freq)
var/list/obj/item/radio/radios = list()
var/list/radios = list()
// --- Broadcast only to intercom devices ---
@@ -282,7 +282,10 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
for(var/mob/R in receive)
for(var/M in receive)
if(!istype(M, /mob))
return
var/mob/R = M
/* --- Loop through the receivers and categorize them --- */
@@ -372,33 +375,48 @@ GLOBAL_LIST_EMPTY(tcomms_machines)
/* --- Process all the mobs that heard a masked voice (understood) --- */
if(length(heard_masked))
for(var/mob/R in heard_masked)
for(var/M in heard_masked)
if(!istype(M, /mob))
return
var/mob/R = M
R.hear_radio(tcm.message_pieces, tcm.verbage, part_a, part_b, tcm.sender, 0, tcm.sender_name, follow_target=tcm.follow_target)
/* --- Process all the mobs that heard the voice normally (understood) --- */
if(length(heard_normal))
for(var/mob/R in heard_normal)
for(var/M in heard_normal)
if(!istype(M, /mob))
return
var/mob/R = M
R.hear_radio(tcm.message_pieces, tcm.verbage, part_a, part_b, tcm.sender, 0, tcm.sender_name, follow_target=tcm.follow_target)
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
if(length(heard_voice))
for(var/mob/R in heard_voice)
for(var/M in heard_voice)
if(!istype(M, /mob))
return
var/mob/R = M
R.hear_radio(tcm.message_pieces, tcm.verbage, part_a, part_b, tcm.sender,0, tcm.vname, follow_target=tcm.follow_target)
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
// Displays garbled message (ie "f*c* **u, **i*er!")
if(length(heard_garbled))
for(var/mob/R in heard_garbled)
for(var/M in heard_garbled)
if(!istype(M, /mob))
return
var/mob/R = M
R.hear_radio(tcm.message_pieces, tcm.verbage, part_a, part_b, tcm.sender, 1, tcm.vname, follow_target=tcm.follow_target)
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
if(length(heard_gibberish))
for(var/mob/R in heard_gibberish)
for(var/M in heard_gibberish)
if(!istype(M, /mob))
return
var/mob/R = M
R.hear_radio(tcm.message_pieces, tcm.verbage, part_a, part_b, tcm.sender, 1, follow_target=tcm.follow_target)
return TRUE
+2
View File
@@ -42,6 +42,8 @@
/obj/machinery/tcomms/core/Destroy()
for(var/obj/machinery/tcomms/relay/R in linked_relays)
R.Reset()
qdel(nttc) // Delete the NTTC datum
linked_relays.Cut() // Just to be sure
return ..()
/**
+5 -4
View File
@@ -70,10 +70,11 @@
* Resets the relay, removing its linkage status, and refreshing the core's list of z-levels
*/
/obj/machinery/tcomms/relay/proc/Reset()
linked_core.linked_relays -= src
linked_core.refresh_zlevels()
linked_core = null
linked = FALSE
if(linked_core)
linked_core.linked_relays -= src
linked_core.refresh_zlevels()
linked_core = null
linked = FALSE
/**
* Relay Enabler
+11 -2
View File
@@ -236,7 +236,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
add_fingerprint(usr)
/obj/item/radio/proc/autosay(var/message, var/from, var/channel, var/role = "Unknown") //BS12 EDIT
/obj/item/radio/proc/autosay(message, from, channel, role = "Unknown") //BS12 EDIT
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if(channel == "department")
@@ -283,6 +283,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
// Now put that through the stuff
for(var/obj/machinery/tcomms/core/C in GLOB.tcomms_machines)
C.handle_message(tcm)
qdel(tcm) // Delete the message datum
qdel(A)
// Just a dummy mob used for making announcements, so we don't create AIs to do this
@@ -341,7 +342,10 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
var/jammed = FALSE
var/turf/position = get_turf(src)
for(var/obj/item/jammer/jammer in GLOB.active_jammers)
for(var/J in GLOB.active_jammers)
if(!istype(J, /obj/item/jammer))
return
var/obj/item/jammer/jammer = J
if(get_dist(position, get_turf(jammer)) < jammer.range)
jammed = TRUE
break
@@ -427,10 +431,13 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
for(var/obj/machinery/tcomms/core/C in GLOB.tcomms_machines)
if(C.handle_message(tcm))
handled = TRUE
qdel(tcm) // Delete the message datum
return TRUE
// If we dont need tcomms and we have no connection
if(!requires_tcomms && !handled)
// If they dont need tcomms for their signal, set the type to intercoms
tcm.data = SIGNALTYPE_INTERCOM_SBR
tcm.zlevels = list(position.z)
if(!instant)
// Simulate two seconds of lag
@@ -438,9 +445,11 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
else
// Nukeops + Deathsquad headsets are instant and should work the same, whether there is comms or not
broadcast_message(tcm)
qdel(tcm) // Delete the message datum
return TRUE
// If we didnt get here, oh fuck
qdel(tcm) // Delete the message datum
return FALSE