Removes debug messages.

This commit is contained in:
Miauw
2014-08-17 12:58:03 +02:00
parent 1fef6effc3
commit 433262e5e0
5 changed files with 11 additions and 66 deletions
+2 -3
View File
@@ -60,9 +60,8 @@
If receiving object don't know right key, it must ignore encrypted signal in its receive_signal.
*/
/* WELCOME TO MIAUW'S EMPORIUM OF "FUCK THIS FUCKING SHITCODE HOLY SHIT HOW DID ANYONE THINK UP SOMETHING THIS FUCKING AWFUL"
TODAY'S SPECIAL: FUCKING RADIO CODE. IT SIMPLY DOESNT WORK, AND I HAVE NO FUCKING IDEA WHY.
THAT IS WHY I REPLACED IT WITH A LIST, WHICH DOES WORK. THANK ME LATER.
/* the radio controller is a confusing piece of shit and didnt work
so i made radios not use the radio controller.
*/
var/list/all_radios = list()
/proc/add_radio(var/obj/item/radio, freq)
+1 -41
View File
@@ -26,9 +26,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
// Don't broadcast rejected signals
world << "[src] received signal"
if(signal.data["reject"])
world << "[src] signal rejected"
return
if(signal.data["message"])
@@ -58,7 +56,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(signal.data["type"] == 0)
/* ###### Broadcast a message using signal.data ###### */
world << "broadcaster normal broadcast"
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
@@ -83,7 +80,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
/* ###### Broadcast a message using signal.data ###### */
// Parameter "data" as 4: AI can't track this person/mob
world << "broadcaster artifical boradcast"
Broadcast_Message(signal.data["mob"],
signal.data["vmask"], signal.data["vmessage"],
signal.data["radio"], signal.data["message"],
@@ -143,10 +139,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
sleep(signal.data["slow"]) // simulate the network lag if necessary
/* ###### Broadcast a message using signal.data ###### */
world << "frequency:"
world << signal.frequency
if(signal.frequency == SYND_FREQ) // if syndicate broadcast, just
world << "syndicate broadcast from tcomms allinone"
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
@@ -154,7 +147,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
signal.data["realname"],, signal.data["compression"], list(0), signal.frequency)
else
if(intercept)
world << "normal broadcast from allinone"
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
@@ -223,34 +215,9 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
var/message, var/name, var/job, var/realname,
var/data, var/compression, var/list/level, var/freq)
world << "am = [AM]"
world << "vmask = [vmask]"
world << "radio = [radio]"
world << "message = [message]"
world << "name = [name]"
world << "job = [job]"
world << "realname = [realname]"
world << "data = [data]"
world << "compression = [compression]"
world << "freq = [freq]"
world << "level = [level]"
for(var/ASSHOLE in level)
world << ASSHOLE
var/list/obj/item/device/radio/radios = list()
// Cut down on the message sizes.
world << "broadcast_message() called"
message = copytext(message, 1, MAX_BROADCAST_LEN)
world << "<font size='10'>STUPID BULLSHIT:</font>"
var/i = 0
var/j = 0
for(var/list/FUCK in all_radios)
i++
for(var/atom/SHIT in FUCK)
j++
world << "[i].[j]"
world << SHIT
var/list/radios = list()
var/atom/movable/virtualspeaker/virt = new(null) //fuck this code.
virt.name = name
virt.job = job
@@ -306,12 +273,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
if(istype(R, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
receive -= R
world << "<b>Radios ([radios.len]):</b>"
for(var/atom/movable/df in radios)
world << df.name
world << "<b>Hearers ([receive.len]):</b>"
for(var/atom/movable/hearer in receive)
world << hearer.name
hearer.Hear(message, virt, AM.languages, message, freq)
/* // ###### Organize the receivers into categories for displaying the message ######
@@ -718,7 +680,5 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
sleep(rand(10,25))
//world.log << "Level: [signal.data["level"]] - Done: [signal.data["done"]]"
return signal
+5 -2
View File
@@ -89,19 +89,22 @@
race = "Artificial Life"
else if(mobtype in slimes) // NT knows a lot about slimes, but not aliens. Can identify slimes
race = "slime"
race = "Slime"
language = race
else if(mobtype in animals)
race = "Domestic Animal"
language = race
else if(istype(mobtype, /obj))
race = "Machinery"
else
race = "<i>Unidentifiable</i>"
language = race
// -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
// -- If the orator is a human, or universal translate is active, OR mob has universal speech on -- (NOTE: universal speech just means languages & HUMAN.)
if(language == "Human" || universal_translate || C.parameters["uspeech"])
dat += "<u><font color = #18743E>Data type</font color></u>: [C.input_type]<br>"
@@ -43,7 +43,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(!on)
return
//world << "[src] ([src.id]) - [signal.debug_print()]"
var/send_count = 0
//signal.data["slow"] == 0 // apply some lag based on integrity
@@ -278,7 +277,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
return
if(!check_receive_level(signal))
return
world << "[src] received signal]"
if(signal.transmission_method == 2)
if(is_freq_listening(signal)) // detect subspace signals
@@ -287,9 +285,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
signal.data["level"] = list()
var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub") // ideally relay the copied information to relays
world << "[src] attempting bus relay..."
if(!can_send)
world << "could not relay to hub, relaying to bus..."
relay_information(signal, "/obj/machinery/telecomms/bus") // Send it to a bus instead, if it's linked to one
/obj/machinery/telecomms/receiver/proc/check_receive_level(datum/signal/signal)
@@ -333,14 +329,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
world << "[src] received signal"
if(is_freq_listening(signal))
if(istype(machine_from, /obj/machinery/telecomms/receiver))
world << "[src] compressed signal, relaying to bus"
//If the signal is compressed, send it to the bus.
relay_information(signal, "/obj/machinery/telecomms/bus", 1) // ideally relay the copied information to bus units
else
world << "[src] uncompressed signal, relaying to broadcaster and relay"
// Get a list of relays that we're linked to, then send the signal to their levels.
relay_information(signal, "/obj/machinery/telecomms/relay", 1)
relay_information(signal, "/obj/machinery/telecomms/broadcaster", 1) // Send it to a broadcaster.
@@ -372,10 +365,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/receiving = 1
/obj/machinery/telecomms/relay/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
world << "[src] received signal"
// Add our level and send it back
if(can_send(signal))
world << "[src]: signal sent, level added"
signal.data["level"] |= listening_level
// Checks to see if it can send/receive.
@@ -425,25 +416,20 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(is_freq_listening(signal))
world << "[src] received signal"
if(change_frequency)
signal.frequency = change_frequency
if(!istype(machine_from, /obj/machinery/telecomms/processor) && machine_from != src) // Signal must be ready (stupid assuming machine), let's send it
// send to one linked processor unit
world << "[src] sending machine not a processor, sending signal"
var/send_to_processor = relay_information(signal, "/obj/machinery/telecomms/processor")
if(send_to_processor)
world << "[src] sending to processor succeeded, cancelling"
return
// failed to send to a processor, relay information anyway
world << "[src] sending to processor failed, relaying anyway"
signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
src.receive_information(signal, src)
// Try sending it!
world << "[src] attempting to send signal"
var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster", "/obj/machinery/telecomms/bus")
var/i = 0
for(var/send in try_send)
@@ -452,7 +438,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
i++
var/can_send = relay_information(signal, send)
if(can_send)
world << "[src] sending signal succeeded, breaking"
break
@@ -549,7 +534,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
..()
/obj/machinery/telecomms/server/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
world << "[src] received signal"
if(signal.data["message"])
if(is_freq_listening(signal))
@@ -574,7 +558,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
log.parameters["name"] = signal.data["name"]
log.parameters["realname"] = signal.data["realname"]
log.parameters["uspeech"] = 1 //*whistles*
log.parameters["uspeech"] = signal.data["languages"] & HUMAN //good enough
// If the signal is still compressed, make the log entry gibberish
if(signal.data["compression"] > 0)
@@ -598,10 +582,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(Compiler && autoruncode)
Compiler.Run(signal) // execute the code
world << "[src] attempting to relay signal to hub"
var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub")
if(!can_send)
world << "[src] relaying to hub failed, attempting to relay to broadcaster"
relay_information(signal, "/obj/machinery/telecomms/broadcaster")
@@ -330,7 +330,8 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
"type" = 0, // determines what type of radio input it is: normal broadcast
"server" = null, // the last server to log this signal
"reject" = 0, // if nonzero, the signal will not be accepted by any broadcasting machinery
"level" = position.z // The source's z level
"level" = position.z, // The source's z level
"languages" = M.languages //The languages M is talking in.
)
signal.frequency = freq