mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +01:00
[MIRROR] Upports fridge, tcomm, and shield_gen soundloops (#12710)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
30edee13f5
commit
e17e7d9fd7
@@ -69,11 +69,10 @@
|
||||
//Messages having theese tokens will be rejected by server. Case sensitive
|
||||
var/spamfilter_limit = MESSAGE_SERVER_DEFAULT_SPAM_LIMIT //Maximal amount of tokens
|
||||
|
||||
var/datum/looping_sound/tcomms/soundloop // CHOMPStation Add: Hummy noises
|
||||
var/noisy = FALSE // CHOMPStation Add: Hummy noises
|
||||
var/datum/looping_sound/tcomms/soundloop
|
||||
var/noisy = FALSE
|
||||
|
||||
/obj/machinery/message_server/Initialize(mapload)
|
||||
// CHOMPAdd: PDA Messaging Server humming
|
||||
soundloop = new(list(src), FALSE)
|
||||
if(prob(60)) // 60% chance to change the midloop
|
||||
if(prob(40))
|
||||
@@ -85,7 +84,6 @@
|
||||
else
|
||||
soundloop.mid_sounds = list('sound/machines/tcomms/tcomms_04.ogg' = 1)
|
||||
soundloop.mid_length = 30
|
||||
// CHOMPAdd End
|
||||
. = ..()
|
||||
GLOB.message_servers += src
|
||||
decryptkey = GenerateKey()
|
||||
@@ -93,7 +91,7 @@
|
||||
|
||||
/obj/machinery/message_server/Destroy()
|
||||
GLOB.message_servers -= src
|
||||
QDEL_NULL(soundloop) // CHOMPStation Add: Hummy noises
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/message_server/examine(mob/user, distance, infix, suffix)
|
||||
@@ -113,12 +111,12 @@
|
||||
// decryptkey = generateKey()
|
||||
if(active && (stat & (BROKEN|NOPOWER)))
|
||||
active = 0
|
||||
soundloop.stop() // CHOMPStation Add: Hummy noises
|
||||
noisy = FALSE // CHOMPStation Add: Hummy noises
|
||||
soundloop.stop()
|
||||
noisy = FALSE
|
||||
return
|
||||
if(!noisy && active) // CHOMPStation Add: Hummy noises
|
||||
soundloop.start() // CHOMPStation Add: Hummy noises
|
||||
noisy = TRUE // CHOMPStation Add: Hummy noises
|
||||
if(!noisy && active)
|
||||
soundloop.start()
|
||||
noisy = TRUE
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -388,7 +386,7 @@ GLOBAL_DATUM(blackbox, /obj/machinery/blackbox_recorder)
|
||||
query_insert.Execute()
|
||||
qdel(query_insert)
|
||||
|
||||
// Sanitize inputs to avoid SQL injection attacks //CHOMPEdit NOTE: This is not secure. Basic filters like this are pretty easy to bypass. Use the format for arguments used in the above.
|
||||
// Sanitize inputs to avoid SQL injection attacks. This is not secure. Basic filters like this are pretty easy to bypass. Use the format for arguments used in the above.
|
||||
/proc/sql_sanitize_text(var/text)
|
||||
text = replacetext(text, "'", "''")
|
||||
text = replacetext(text, ";", "")
|
||||
|
||||
Reference in New Issue
Block a user