Ports Goonchat from Baystation. (#9635)

changes:

    rscadd: "Ported a new chat system, Goonchat, that allows for cool things like changing font style, size, spacing, highlighting up to 5 strings in the chat, and DARK MODE."
    rscadd: "Repeated chat messages can now get compacted. You can disable this in goonchat settings."
    rscadd: "You can change icon style to any font on your system."
    tweak: "The game window has been altered a bit to adjust for this."
    rscdel: "Removed skin style prefs as they are no longer used."
This commit is contained in:
Matt Atlas
2020-09-24 23:06:04 +03:00
committed by GitHub
parent a7401aeb1d
commit d4666caaac
277 changed files with 4057 additions and 2955 deletions
+6 -6
View File
@@ -1157,7 +1157,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS)) // src.client is so that ghosts don't have to listen to rats
if(istype(M, /mob/abstract/new_player))
continue
M.show_message("<span class='game say'>PDA Message - <span class='name'>[owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t]</span></span>")
M.show_message("<span class='game say'>PDA Message - <span class='name'>[owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message linkify'>[t]</span></span>")
if(!conversations.Find("\ref[P]"))
conversations.Add("\ref[P]")
@@ -1173,7 +1173,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (!beep_silent)
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(2, loc))
O.show_message(text("\icon[src] *[message_tone]*"))
O.show_message(text("[icon2html(src, O)] *[message_tone]*"))
//Search for holder of the PDA.
var/mob/living/L = null
if(loc && isliving(loc))
@@ -1188,7 +1188,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message
/obj/item/device/pda/proc/new_news(var/message)
new_info(news_silent, newstone, news_silent ? "" : "\icon[src] <b>[message]</b>")
new_info(news_silent, newstone, news_silent ? "" : "[icon2html(src, viewers(get_turf(src)))] <b>[message]</b>")
if(!news_silent)
new_news = 1
@@ -1201,7 +1201,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
new_message(sending_device, sending_device.owner, sending_device.ownjob, message)
/obj/item/device/pda/proc/new_message(var/sending_unit, var/sender, var/sender_job, var/message)
var/reception_message = "\icon[src] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>)"
var/reception_message = "[icon2html(src, viewers(get_turf(src)))] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>)"
new_info(message_silent, ttone, reception_message)
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]",ckey=key_name(usr),ckey_target=key_name(name))
@@ -1213,7 +1213,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(ismob(sending_unit.loc) && isAI(loc))
track = "(<a href='byond://?src=\ref[loc];track=\ref[sending_unit.loc];trackname=[html_encode(sender)]'>Follow</a>)"
var/reception_message = "\icon[src] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>) [track]"
var/reception_message = "[icon2html(src, viewers(get_turf(src)))] <b>Message from [sender] ([sender_job]), </b>\"[message]\" (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[sending_unit]'>Reply</a>) [track]"
new_info(message_silent, newstone, reception_message)
log_pda("[usr] (PDA: [sending_unit]) sent \"[message]\" to [name]",ckey=key_name(usr),ckey_target=key_name(name))
@@ -1534,7 +1534,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/CouldUseTopic(var/mob/user)
..()
if(iscarbon(user))
playsound(src, 'sound/machines/pda_click.ogg', 20)
playsound(loc, 'sound/machines/pda_click.ogg', 20)
//Some spare PDAs in a box
/obj/item/storage/box/PDAs
+1 -1
View File
@@ -36,7 +36,7 @@
if(!user || !M) return //sanity
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [src.name] to flash [M.name] ([M.ckey])</span>")
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
+1 -1
View File
@@ -57,7 +57,7 @@
to_chat(user, SPAN_WARNING("You are already hacking this door!"))
return 0
if(!is_type_in_list(target, supported_types))
to_chat(user, "\icon[src] <span class='warning'>Unable to hack this target!</span>")
to_chat(user, "[icon2html(src, user)] <span class='warning'>Unable to hack this target!</span>")
return 0
if(istype(target, /obj/machinery/door/airlock))
var/obj/machinery/door/airlock/door = target
@@ -205,7 +205,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/CouldUseTopic(var/mob/user)
..()
if(clicksound && iscarbon(user))
playsound(src, clicksound, clickvol)
playsound(loc, clicksound, clickvol)
/obj/item/device/radio/Topic(href, href_list)
if(..())
+6 -6
View File
@@ -565,14 +565,14 @@ BREATH ANALYZER
if(0 to 25)
to_chat(user,"Subject oxygen levels nominal.")
if(25 to 50)
to_chat(user,"<font color='blue'>Subject oxygen levels abnormal.</font>")
to_chat(user,"<span class='notice'>Subject oxygen levels abnormal.</span>")
if(50 to INFINITY)
to_chat(user,"<font color='blue'><b>Severe oxygen deprivation detected.</b></font>")
to_chat(user,"<span class='notice'><b>Severe oxygen deprivation detected.</b></span>")
var/obj/item/organ/internal/L = H.internal_organs_by_name[BP_LUNGS]
if(istype(L))
if(L.is_bruised())
to_chat(user,"<font color='red'><b>Ruptured lung detected.</b></font>")
to_chat(user,"<span class='warning'><b>Ruptured lung detected.</b></span>")
else if(L.is_damaged())
to_chat(user,"<b>Damaged lung detected.</b>")
else
@@ -588,11 +588,11 @@ BREATH ANALYZER
if(INTOX_MUSCLEIMP to INTOX_VOMIT)
additional_string = "\[MODERATELY INTOXICATED\]"
if(INTOX_VOMIT to INTOX_BALANCE)
additional_string = "<font color='red'>\[HEAVILY INTOXICATED\]</font>"
additional_string = "<span class='warning'>\[HEAVILY INTOXICATED\]</span>"
if(INTOX_BALANCE to INTOX_DEATH)
additional_string = "<font color='red'>\[ALCOHOL POISONING LIKELY\]</font>"
additional_string = "<span class='warning'>\[ALCOHOL POISONING LIKELY\]</span>"
if(INTOX_DEATH to INFINITY)
additional_string = "<font color='red'>\[DEATH IMMINENT\]</font>"
additional_string = "<span class='warning'>\[DEATH IMMINENT\]</span>"
to_chat(user,"<span class='normal'>Blood Alcohol Content: [round(bac,0.01)] <b>[additional_string]</b></span>")
if(H.breathing && H.breathing.total_volume)
@@ -35,7 +35,7 @@ effective or pretty fucking useless.
to_chat(user, "<span class='warning'>The mind batterer has been burnt out!</span>")
return
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [src] to knock down people in the area.</font>")
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used [src] to knock down people in the area.</span>")
for(var/mob/living/carbon/human/M in orange(10, user))
spawn()