mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Goonchat (#4744)
* bicon regex run * Remove all \black * Goonchat from /vg/ / Goon Whoo! Special thanks to @Tastyfish for the macro2html thing so all of our horrible color macros keep working and don't fail horribly <3 * Fixes and changes n stuff - Made ping sane again (the fuck PJ) - Updated chat CSS - Fixed like one problem with a color macro * whoops * Restore /vg/'s pingloop stuff (used to avoid fucking up is_afk) * Strip problematic tags from tcomm scripts - <audio> - <video> - <iframe> - <script> * Fix human examine icon * Name hotkey elements * Removed old stylesheet
This commit is contained in:
committed by
Fox McCloud
parent
b8c1418b57
commit
732c3b4ae5
@@ -167,7 +167,7 @@ mob
|
||||
|
||||
Output_Icon()
|
||||
set name = "2. Output Icon"
|
||||
to_chat(src, "Icon is: \icon[getFlatIcon(src)]")
|
||||
to_chat(src, "Icon is: [bicon(getFlatIcon(src))]")
|
||||
|
||||
Label_Icon()
|
||||
set name = "3. Label Icon"
|
||||
|
||||
@@ -239,7 +239,7 @@ var/syndicate_code_response//Code response for traitors.
|
||||
set name = "Generate Code Phrase"
|
||||
set category = "Debug"
|
||||
|
||||
to_chat(world, "\red Code Phrase is: \black [generate_code_phrase()]")
|
||||
to_chat(world, "<span class='warning'>Code Phrase is:</span> [generate_code_phrase()]")
|
||||
return
|
||||
|
||||
|
||||
|
||||
+19
-1
@@ -371,4 +371,22 @@ proc/checkhtml(var/t)
|
||||
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
|
||||
//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()!
|
||||
/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
|
||||
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
|
||||
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
|
||||
|
||||
|
||||
//Replaces \red \blue \green \b etc with span classes for to_chat
|
||||
/proc/replace_text_macro(match, code, rest)
|
||||
var/regex/text_macro = new("(\\xFF.)(.*)$")
|
||||
switch(code)
|
||||
if("\red")
|
||||
return "<span class='warning'>[text_macro.Replace(rest, /proc/replace_text_macro)]</span>"
|
||||
if("\blue", "\green")
|
||||
return "<span class='notice'>[text_macro.Replace(rest, /proc/replace_text_macro)]</span>"
|
||||
if("\b")
|
||||
return "<b>[text_macro.Replace(rest, /proc/replace_text_macro)]</b>"
|
||||
else
|
||||
return text_macro.Replace(rest, /proc/replace_text_macro)
|
||||
|
||||
/proc/macro2html(text)
|
||||
var/static/regex/text_macro = new("(\\xFF.)(.*)$")
|
||||
return text_macro.Replace(text, /proc/replace_text_macro)
|
||||
@@ -248,7 +248,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
var/pressure = air_contents.return_pressure()
|
||||
var/total_moles = air_contents.total_moles()
|
||||
|
||||
to_chat(user, "<span class='notice'>Results of analysis of \icon[icon] [target].</span>")
|
||||
to_chat(user, "<span class='notice'>Results of analysis of [bicon(icon)] [target].</span>")
|
||||
if(total_moles>0)
|
||||
var/o2_concentration = air_contents.oxygen/total_moles
|
||||
var/n2_concentration = air_contents.nitrogen/total_moles
|
||||
@@ -1733,10 +1733,6 @@ var/global/list/g_fancy_list_of_types = null
|
||||
matches[key] = value
|
||||
return matches
|
||||
|
||||
// Use this to send to a client's chat, no exceptions (except this proc itself).
|
||||
/proc/to_chat(var/thing, var/output)
|
||||
thing << output
|
||||
|
||||
//Key thing that stops lag. Cornerstone of performance in ss13, Just sitting here, in unsorted.dm.
|
||||
/proc/stoplag()
|
||||
. = 1
|
||||
|
||||
Reference in New Issue
Block a user