From 8a33afaff6fa4dc0d5f7013111502ab140fdff6a Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Fri, 27 Mar 2020 17:07:28 -0400 Subject: [PATCH 1/2] VChat: Redone chat output done in Vue.js --- code/__defines/misc.dm | 4 ++ code/defines/procs/announce.dm | 35 ++++++++++ code/game/gamemodes/game_mode.dm | 10 +-- code/game/machinery/requests_console.dm | 3 + code/game/verbs/advanced_who.dm | 1 + code/modules/admin/verbs/adminpm.dm | 64 +++++++++---------- code/modules/client/asset_cache.dm | 12 ++++ code/modules/vchat/css/ss13styles.css | 7 ++ code/modules/vchat/js/vchat.js | 15 +++++ code/modules/vchat/vchat_client.dm | 11 ++++ .../tools/ano_device_battery.dm | 2 +- code/stylesheet.dm | 2 +- interface/skin.dmf | 11 ++++ maps/RandomZLevels/wildwest.dm | 2 +- vorestation.dme | 3 + 15 files changed, 142 insertions(+), 40 deletions(-) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 49ee5887e8c..fec17087641 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -78,8 +78,12 @@ #define COLOR_RED_LIGHT "#FF3333" #define COLOR_DEEP_SKY_BLUE "#00e1ff" +<<<<<<< HEAD #define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (istype(I, /client) ? I : null)) +======= +#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (isclient(I) ? I : null)) +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) // Shuttles. diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index c68acc43a46..2ef33895826 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -49,6 +49,7 @@ Log(message, message_title) datum/announcement/proc/Message(message as text, message_title as text) +<<<<<<< HEAD global_announcer.autosay("[message_title]: [message]", announcer ? announcer : ANNOUNCER_NAME) datum/announcement/minor/Message(message as text, message_title as text) @@ -62,6 +63,40 @@ datum/announcement/priority/command/Message(message as text, message_title as te datum/announcement/priority/security/Message(message as text, message_title as text) global_announcer.autosay("[message_title]: [message]", ANNOUNCER_NAME) +======= + for(var/mob/M in player_list) + if(!istype(M,/mob/new_player) && !isdeaf(M)) + to_chat(M, "

[title]

") + to_chat(M, "[message]") + if (announcer) + to_chat(M, " -[html_encode(announcer)]") + +datum/announcement/minor/Message(message as text, message_title as text) + to_world("[message]") + +datum/announcement/priority/Message(message as text, message_title as text) + to_world("

[message_title]

") + to_world("[message]") + if(announcer) + to_world(" -[html_encode(announcer)]") + to_world("
") + +datum/announcement/priority/command/Message(message as text, message_title as text) + var/command + command += "

[command_name()] Update

" + if (message_title) + command += "

[message_title]

" + + command += "
[message]
" + command += "
" + for(var/mob/M in player_list) + if(!istype(M,/mob/new_player) && !isdeaf(M)) + to_chat(M, command) + +datum/announcement/priority/security/Message(message as text, message_title as text) + to_world("[message_title]") + to_world("[message]") +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) datum/announcement/proc/NewsCast(message as text, message_title as text) if(!newscast) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 05757c9b7db..d08c49d6a8d 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -538,15 +538,15 @@ proc/get_nt_opposed() set category = "OOC" if(!ticker || !ticker.mode) - to_chat(usr, "Something is terribly wrong; there is no gametype.") + to_chat(usr, "Something is terribly wrong; there is no gametype.") return if(master_mode != "secret") - to_chat(usr, "The roundtype is [capitalize(ticker.mode.name)]") + to_chat(usr, "The roundtype is [capitalize(ticker.mode.name)]") if(ticker.mode.round_description) - to_chat(usr, "[ticker.mode.round_description]") + to_chat(usr, "[ticker.mode.round_description]") if(ticker.mode.extended_round_description) - to_chat(usr, "[ticker.mode.extended_round_description]") + to_chat(usr, "[ticker.mode.extended_round_description]") else - to_chat(usr, "Shhhh. It's a secret.") + to_chat(usr, "Shhhh. It's a secret.") return diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index d3eec4057a9..9fa1bed9f94 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -177,6 +177,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() message_log += "Message sent to [recipient]
[message]" else audible_message(text("[bicon(src)] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4) +<<<<<<< HEAD //Handle printing if (href_list["print"]) @@ -187,6 +188,8 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/obj/item/weapon/paper/R = new(src.loc) R.name = "[department] Message" R.info = "

[department] Requests Console

[msg]
" +======= +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) //Handle screen switching if(href_list["setScreen"]) diff --git a/code/game/verbs/advanced_who.dm b/code/game/verbs/advanced_who.dm index bbde65fd07e..9f067054f25 100644 --- a/code/game/verbs/advanced_who.dm +++ b/code/game/verbs/advanced_who.dm @@ -71,4 +71,5 @@ msg += "[line]\n" msg += "Total Players: [length(Lines)]" + msg = "" + msg + "" to_chat(src, msg) \ No newline at end of file diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index 2bf3a1f5cc7..2bd7326b3b9 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -6,7 +6,7 @@ set category = null set name = "Admin PM Mob" if(!holder) - to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") + to_chat(src, "Error: Admin-PM-Context: Only administrators may use this command.") return if( !ismob(M) || !M.client ) return @@ -18,7 +18,7 @@ set category = "Admin" set name = "Admin PM" if(!holder) - to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") + to_chat(src, "Error: Admin-PM-Panel: Only administrators may use this command.") return var/list/client/targets[0] for(var/client/T) @@ -37,7 +37,7 @@ /client/proc/cmd_ahelp_reply(whom) if(prefs.muted & MUTE_ADMINHELP) - to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).") + to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).") return var/client/C if(istext(whom)) @@ -48,16 +48,16 @@ C = whom if(!C) if(holder) - to_chat(src, "Error: Admin-PM: Client not found.") + to_chat(src, "Error: Admin-PM: Client not found.") return var/datum/admin_help/AH = C.current_ticket if(AH) - message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.") + message_admins("[key_name_admin(src)] has started replying to [key_name(C, 0, 0)]'s admin help.") var/msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null if (!msg) - message_admins("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.") + message_admins("[key_name_admin(src)] has cancelled their reply to [key_name(C, 0, 0)]'s admin help.") return cmd_admin_pm(whom, msg, AH) @@ -65,12 +65,12 @@ //Fetching a message if needed. src is the sender and C is the target client /client/proc/cmd_admin_pm(whom, msg, datum/admin_help/AH) if(prefs.muted & MUTE_ADMINHELP) - to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).") + to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).") return if(!holder && !current_ticket) //no ticket? https://www.youtube.com/watch?v=iHSPf6x1Fdo - to_chat(src, "You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.") - to_chat(src, "Message: [msg]") + to_chat(src, "You can no longer reply to this ticket, please open another one by using the Adminhelp verb if need be.") + to_chat(src, "Message: [msg]") return var/client/recipient @@ -95,14 +95,14 @@ if(!msg) return if(holder) - to_chat(src, "Error: Use the admin IRC channel, nerd.") + to_chat(src, "Error: Use the admin IRC channel, nerd.") return else if(!recipient) if(holder) - to_chat(src, "Error: Admin-PM: Client not found.") + to_chat(src, "Error: Admin-PM: Client not found.") to_chat(src, msg) else current_ticket.MessageNoRecipient(msg) @@ -116,12 +116,12 @@ return if(prefs.muted & MUTE_ADMINHELP) - to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).") + to_chat(src, "Error: Admin-PM: You are unable to use admin PM-s (muted).") return if(!recipient) if(holder) - to_chat(src, "Error: Admin-PM: Client not found.") + to_chat(src, "Error: Admin-PM: Client not found.") else current_ticket.MessageNoRecipient(msg) return @@ -140,27 +140,27 @@ var/keywordparsedmsg = keywords_lookup(msg) if(irc) - to_chat(src, "PM to-Admins: [rawmsg]") - admin_ticket_log(src, "Reply PM from-[key_name(src, TRUE, TRUE)] to IRC: [keywordparsedmsg]") + to_chat(src, "PM to-Admins: [rawmsg]") + admin_ticket_log(src, "Reply PM from-[key_name(src, TRUE, TRUE)] to IRC: [keywordparsedmsg]") ircreplyamount-- send2irc("Reply: [ckey]",rawmsg) else if(recipient.holder) if(holder) //both are admins - to_chat(recipient, "Admin PM from-[key_name(src, recipient, 1)]: [keywordparsedmsg]") - to_chat(src, "Admin PM to-[key_name(recipient, src, 1)]: [keywordparsedmsg]") + to_chat(recipient, "Admin PM from-[key_name(src, recipient, 1)]: [keywordparsedmsg]") + to_chat(src, "Admin PM to-[key_name(recipient, src, 1)]: [keywordparsedmsg]") //omg this is dumb, just fill in both their tickets - var/interaction_message = "PM from-[key_name(src, recipient, 1)] to-[key_name(recipient, src, 1)]: [keywordparsedmsg]" + var/interaction_message = "PM from-[key_name(src, recipient, 1)] to-[key_name(recipient, src, 1)]: [keywordparsedmsg]" admin_ticket_log(src, interaction_message) if(recipient != src) //reeee admin_ticket_log(recipient, interaction_message) else //recipient is an admin but sender is not - var/replymsg = "Reply PM from-[key_name(src, recipient, 1)]: [keywordparsedmsg]" + var/replymsg = "Reply PM from-[key_name(src, recipient, 1)]: [keywordparsedmsg]" admin_ticket_log(src, replymsg) to_chat(recipient, replymsg) - to_chat(src, "PM to-Admins: [msg]") + to_chat(src, "PM to-Admins: [msg]") //play the recieving admin the adminhelp sound (if they have them enabled) if(recipient.is_preference_enabled(/datum/client_preference/holder/play_adminhelp_ping)) @@ -171,12 +171,12 @@ if(!recipient.current_ticket) new /datum/admin_help(msg, recipient, TRUE) - to_chat(recipient, "-- Administrator private message --") - to_chat(recipient, "Admin PM from-[key_name(src, recipient, 0)]: [msg]") - to_chat(recipient, "Click on the administrator's name to reply.") - to_chat(src, "Admin PM to-[key_name(recipient, src, 1)]: [msg]") + to_chat(recipient, "-- Administrator private message --") + to_chat(recipient, "Admin PM from-[key_name(src, recipient, 0)]: [msg]") + to_chat(recipient, "Click on the administrator's name to reply.") + to_chat(src, "Admin PM to-[key_name(recipient, src, 1)]: [msg]") - admin_ticket_log(recipient, "PM From [key_name_admin(src)]: [keywordparsedmsg]") + admin_ticket_log(recipient, "PM From [key_name_admin(src)]: [keywordparsedmsg]") //always play non-admin recipients the adminhelp sound recipient << 'sound/effects/adminhelp.ogg' @@ -195,19 +195,19 @@ return else //neither are admins - to_chat(src, "Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.") + to_chat(src, "Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.") return if(irc) log_admin("PM: [key_name(src)]->IRC: [rawmsg]") for(var/client/X in admins) - to_chat(X, "PM: [key_name(src, X, 0)]->IRC: [keywordparsedmsg]") + to_chat(X, "PM: [key_name(src, X, 0)]->IRC: [keywordparsedmsg]") else log_admin("PM: [key_name(src)]->[key_name(recipient)]: [rawmsg]") //we don't use message_admins here because the sender/receiver might get it too for(var/client/X in admins) if(X.key!=key && X.key!=recipient.key) //check client/X is an admin and isn't the sender or recipient - to_chat(X, "PM: [key_name(src, X, 0)]->[key_name(recipient, X, 0)]: [keywordparsedmsg]" ) + to_chat(X, "PM: [key_name(src, X, 0)]->[key_name(recipient, X, 0)]: [keywordparsedmsg]" ) /proc/IrcPm(target,msg,sender) var/client/C = GLOB.directory[target] @@ -256,11 +256,11 @@ message_admins("IRC message from [sender] to [key_name_admin(C)] : [msg]") log_admin("IRC PM: [sender] -> [key_name(C)] : [msg]") - to_chat(C, "-- Administrator private message --") - to_chat(C, "Admin PM from-[adminname]: [msg]") - to_chat(C, "Click on the administrator's name to reply.") + to_chat(C, "-- Administrator private message --") + to_chat(C, "Admin PM from-[adminname]: [msg]") + to_chat(C, "Click on the administrator's name to reply.") - admin_ticket_log(C, "PM From [irc_tagged]: [msg]") + admin_ticket_log(C, "PM From [irc_tagged]: [msg]") window_flash(C, ignorepref = TRUE) //always play non-admin recipients the adminhelp sound diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 8930a18811a..1f7525ca53b 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -29,6 +29,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the //This proc sends the asset to the client, but only if it needs it. //This proc blocks(sleeps) unless verify is set to false /proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE) +<<<<<<< HEAD if(!istype(client)) if(ismob(client)) var/mob/M = client @@ -40,6 +41,11 @@ You can set verify to TRUE if you want send() to sleep until the client has the else return 0 +======= + client = CLIENT_FROM_VAR(client) // Will get client from a mob, or accept a client, or return null + if(!istype(client)) + return 0 +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) if(client.cache.Find(asset_name) || client.sending.Find(asset_name)) return 0 @@ -73,6 +79,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the //This proc blocks(sleeps) unless verify is set to false /proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE) +<<<<<<< HEAD if(!istype(client)) if(ismob(client)) var/mob/M = client @@ -84,6 +91,11 @@ You can set verify to TRUE if you want send() to sleep until the client has the else return 0 +======= + client = CLIENT_FROM_VAR(client) // Will get client from a mob, or accept a client, or return null + if(!istype(client)) + return 0 +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) var/list/unreceived = asset_list - (client.cache + client.sending) if(!unreceived || !unreceived.len) diff --git a/code/modules/vchat/css/ss13styles.css b/code/modules/vchat/css/ss13styles.css index 375ebb5d808..00c05d865f4 100644 --- a/code/modules/vchat/css/ss13styles.css +++ b/code/modules/vchat/css/ss13styles.css @@ -124,7 +124,10 @@ body.inverted { .emote {} .alert {color: #ff0000;} h1.alert, h2.alert {color: #000000;} +<<<<<<< HEAD .nif {} /* VOREStation Add */ +======= +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) /* Game Messages */ @@ -157,7 +160,11 @@ h1.alert, h2.alert {color: #000000;} .soghun {color: #228B22;} .solcom {color: #22228B;} .changeling {color: #800080;} +<<<<<<< HEAD .sergal {color: #0077FF;} +======= +.sergal {color: #0077FF; font-family: "Comic Sans MS";} +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) .birdsongc {color: #CC9900;} .vulpkanin {color: #B97A57;} .enochian {color: #848A33; letter-spacing:-1pt; word-spacing:4pt; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;} diff --git a/code/modules/vchat/js/vchat.js b/code/modules/vchat/js/vchat.js index cca2d8d3c59..22f9f5719dc 100644 --- a/code/modules/vchat/js/vchat.js +++ b/code/modules/vchat/js/vchat.js @@ -152,7 +152,11 @@ function start_vue() { admin: false }, { +<<<<<<< HEAD matches: ".notice, .adminnotice, .info, .sinister, .cult", +======= + matches: ".notice:not(.pm), .adminnotice, .info, .sinister, .cult", +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) becomes: "vc_info", pretty: "Notices", tooltip: "Non-urgent messages from the game and items", @@ -160,7 +164,11 @@ function start_vue() { admin: false }, { +<<<<<<< HEAD matches: ".critical, .danger, .userdanger, .warning, .italics", +======= + matches: ".critical, .danger, .userdanger, .warning:not(.pm), .italics", +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) becomes: "vc_warnings", pretty: "Warnings", tooltip: "Urgent messages from the game and items", @@ -183,6 +191,7 @@ function start_vue() { required: false, admin: false }, +<<<<<<< HEAD //VOREStation Add Start { matches: ".nif", @@ -193,6 +202,8 @@ function start_vue() { admin: false }, //VOREStation Add End +======= +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) { matches: ".pm", becomes: "vc_adminpm", @@ -674,7 +685,11 @@ function start_vue() { hiddenElement.target = '_blank'; hiddenElement.download = filename; hiddenElement.click(); +<<<<<<< HEAD //Probably what will end up getting used +======= + //Probably what will end up getting used +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) } else { var blob = new Blob([textToSave], {type: 'text/html;charset=utf8;'}); saved = window.navigator.msSaveOrOpenBlob(blob, filename); diff --git a/code/modules/vchat/vchat_client.dm b/code/modules/vchat/vchat_client.dm index 23900f2d3c3..d52daab2e2e 100644 --- a/code/modules/vchat/vchat_client.dm +++ b/code/modules/vchat/vchat_client.dm @@ -103,7 +103,11 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic owner << browse(file2text("code/modules/vchat/html/vchat.html"), "window=htmloutput") //Check back later +<<<<<<< HEAD spawn(15 SECONDS) +======= + spawn(60 SECONDS) +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) if(!src) return if(!src.loaded) @@ -140,6 +144,13 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic /datum/chatOutput/proc/become_broken() broken = TRUE loaded = FALSE +<<<<<<< HEAD +======= + + if(!owner) + qdel(src) + return +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) update_vis() diff --git a/code/modules/xenoarcheaology/tools/ano_device_battery.dm b/code/modules/xenoarcheaology/tools/ano_device_battery.dm index 2f709c48d26..d698ccbbbd4 100644 --- a/code/modules/xenoarcheaology/tools/ano_device_battery.dm +++ b/code/modules/xenoarcheaology/tools/ano_device_battery.dm @@ -110,7 +110,7 @@ if(holder) to_chat(holder, "the [bicon(src)] [src] held by [holder] shudders in your grasp.") else - src.loc.visible_message("the \icon[src] [src] shudders.") + src.loc.visible_message("the [bicon(src)] [src] shudders.") //consume power inserted_battery.use_power(energy_consumed_on_touch) diff --git a/code/stylesheet.dm b/code/stylesheet.dm index a6b904fa8a8..06ed2760b68 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -16,10 +16,10 @@ em {font-style: normal;font-weight: bold;} /* OOC */ .ooc {font-weight: bold;} +.looc {color: #3A9696;} .ooc img.text_tag {width: 32px; height: 10px;} .ooc .everyone {color: #002eb8;} -.ooc .looc {color: #3A9696;} .ooc .elevated {color: #2e78d9;} .ooc .moderator {color: #184880;} .ooc .developer {color: #1b521f;} diff --git a/interface/skin.dmf b/interface/skin.dmf index 917ff0455e4..58d21914650 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -474,9 +474,12 @@ macro "hotkeymode" elem name = "5" command = ".me" +<<<<<<< HEAD elem name = "6" command = "subtle" +======= +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) elem name = "A+REP" command = ".moveleft" @@ -1251,6 +1254,10 @@ window "outputwindow" style = ".system {color:#FF0000;}" max-lines = 0 saved-params = "" +<<<<<<< HEAD +======= + enable-http-images = true +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) window "rpane" elem "rpane" @@ -1417,6 +1424,10 @@ window "infowindow" is-default = true saved-params = "" highlight-color = #00aa00 +<<<<<<< HEAD +======= + allow-html = true +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\"" diff --git a/maps/RandomZLevels/wildwest.dm b/maps/RandomZLevels/wildwest.dm index f2f48bf9fc0..83007c250e0 100644 --- a/maps/RandomZLevels/wildwest.dm +++ b/maps/RandomZLevels/wildwest.dm @@ -121,7 +121,7 @@ if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) for(var/mob/O in viewers(world.view, src.loc)) - to_chat(O, "[M] triggered the \icon[src] [src]") + to_chat(O, "[M] triggered the [bicon(src)] [src]") triggered = 1 call(src,triggerproc)(M) diff --git a/vorestation.dme b/vorestation.dme index c8b0c2b9166..2fdb53260af 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1654,7 +1654,10 @@ #include "code\modules\catalogue\catalogue_data_vr.dm" #include "code\modules\catalogue\cataloguer.dm" #include "code\modules\catalogue\cataloguer_visuals.dm" +<<<<<<< HEAD:vorestation.dme #include "code\modules\catalogue\cataloguer_vr.dm" +======= +>>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761):polaris.dme #include "code\modules\client\asset_cache.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" From b2605300f2437c1c2fb4830c2331273b95a1693b Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Sun, 29 Mar 2020 15:37:24 -0400 Subject: [PATCH 2/2] Mergey Merge Polaris VChat --- code/__defines/misc.dm | 5 ---- code/defines/procs/announce.dm | 35 ------------------------- code/game/machinery/requests_console.dm | 3 --- code/modules/client/asset_cache.dm | 28 -------------------- code/modules/vchat/css/ss13styles.css | 7 ----- code/modules/vchat/js/vchat.js | 15 ----------- code/modules/vchat/vchat_client.dm | 7 ----- interface/skin.dmf | 10 ------- vorestation.dme | 3 --- 9 files changed, 113 deletions(-) diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index fec17087641..c63b1fb54d5 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -78,12 +78,7 @@ #define COLOR_RED_LIGHT "#FF3333" #define COLOR_DEEP_SKY_BLUE "#00e1ff" -<<<<<<< HEAD - -#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (istype(I, /client) ? I : null)) -======= #define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (isclient(I) ? I : null)) ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) // Shuttles. diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index 2ef33895826..c68acc43a46 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -49,7 +49,6 @@ Log(message, message_title) datum/announcement/proc/Message(message as text, message_title as text) -<<<<<<< HEAD global_announcer.autosay("[message_title]: [message]", announcer ? announcer : ANNOUNCER_NAME) datum/announcement/minor/Message(message as text, message_title as text) @@ -63,40 +62,6 @@ datum/announcement/priority/command/Message(message as text, message_title as te datum/announcement/priority/security/Message(message as text, message_title as text) global_announcer.autosay("[message_title]: [message]", ANNOUNCER_NAME) -======= - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) - to_chat(M, "

[title]

") - to_chat(M, "[message]") - if (announcer) - to_chat(M, " -[html_encode(announcer)]") - -datum/announcement/minor/Message(message as text, message_title as text) - to_world("[message]") - -datum/announcement/priority/Message(message as text, message_title as text) - to_world("

[message_title]

") - to_world("[message]") - if(announcer) - to_world(" -[html_encode(announcer)]") - to_world("
") - -datum/announcement/priority/command/Message(message as text, message_title as text) - var/command - command += "

[command_name()] Update

" - if (message_title) - command += "

[message_title]

" - - command += "
[message]
" - command += "
" - for(var/mob/M in player_list) - if(!istype(M,/mob/new_player) && !isdeaf(M)) - to_chat(M, command) - -datum/announcement/priority/security/Message(message as text, message_title as text) - to_world("[message_title]") - to_world("[message]") ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) datum/announcement/proc/NewsCast(message as text, message_title as text) if(!newscast) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 9fa1bed9f94..d3eec4057a9 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -177,7 +177,6 @@ var/list/obj/machinery/requests_console/allConsoles = list() message_log += "Message sent to [recipient]
[message]" else audible_message(text("[bicon(src)] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4) -<<<<<<< HEAD //Handle printing if (href_list["print"]) @@ -188,8 +187,6 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/obj/item/weapon/paper/R = new(src.loc) R.name = "[department] Message" R.info = "

[department] Requests Console

[msg]
" -======= ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) //Handle screen switching if(href_list["setScreen"]) diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 1f7525ca53b..ef64cd4acd7 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -29,23 +29,9 @@ You can set verify to TRUE if you want send() to sleep until the client has the //This proc sends the asset to the client, but only if it needs it. //This proc blocks(sleeps) unless verify is set to false /proc/send_asset(var/client/client, var/asset_name, var/verify = TRUE) -<<<<<<< HEAD - if(!istype(client)) - if(ismob(client)) - var/mob/M = client - if(M.client) - client = M.client - - else - return 0 - - else - return 0 -======= client = CLIENT_FROM_VAR(client) // Will get client from a mob, or accept a client, or return null if(!istype(client)) return 0 ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) if(client.cache.Find(asset_name) || client.sending.Find(asset_name)) return 0 @@ -79,23 +65,9 @@ You can set verify to TRUE if you want send() to sleep until the client has the //This proc blocks(sleeps) unless verify is set to false /proc/send_asset_list(var/client/client, var/list/asset_list, var/verify = TRUE) -<<<<<<< HEAD - if(!istype(client)) - if(ismob(client)) - var/mob/M = client - if(M.client) - client = M.client - - else - return 0 - - else - return 0 -======= client = CLIENT_FROM_VAR(client) // Will get client from a mob, or accept a client, or return null if(!istype(client)) return 0 ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) var/list/unreceived = asset_list - (client.cache + client.sending) if(!unreceived || !unreceived.len) diff --git a/code/modules/vchat/css/ss13styles.css b/code/modules/vchat/css/ss13styles.css index 00c05d865f4..375ebb5d808 100644 --- a/code/modules/vchat/css/ss13styles.css +++ b/code/modules/vchat/css/ss13styles.css @@ -124,10 +124,7 @@ body.inverted { .emote {} .alert {color: #ff0000;} h1.alert, h2.alert {color: #000000;} -<<<<<<< HEAD .nif {} /* VOREStation Add */ -======= ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) /* Game Messages */ @@ -160,11 +157,7 @@ h1.alert, h2.alert {color: #000000;} .soghun {color: #228B22;} .solcom {color: #22228B;} .changeling {color: #800080;} -<<<<<<< HEAD .sergal {color: #0077FF;} -======= -.sergal {color: #0077FF; font-family: "Comic Sans MS";} ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) .birdsongc {color: #CC9900;} .vulpkanin {color: #B97A57;} .enochian {color: #848A33; letter-spacing:-1pt; word-spacing:4pt; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;} diff --git a/code/modules/vchat/js/vchat.js b/code/modules/vchat/js/vchat.js index 22f9f5719dc..634cbbfe90f 100644 --- a/code/modules/vchat/js/vchat.js +++ b/code/modules/vchat/js/vchat.js @@ -152,11 +152,7 @@ function start_vue() { admin: false }, { -<<<<<<< HEAD - matches: ".notice, .adminnotice, .info, .sinister, .cult", -======= matches: ".notice:not(.pm), .adminnotice, .info, .sinister, .cult", ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) becomes: "vc_info", pretty: "Notices", tooltip: "Non-urgent messages from the game and items", @@ -164,11 +160,7 @@ function start_vue() { admin: false }, { -<<<<<<< HEAD - matches: ".critical, .danger, .userdanger, .warning, .italics", -======= matches: ".critical, .danger, .userdanger, .warning:not(.pm), .italics", ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) becomes: "vc_warnings", pretty: "Warnings", tooltip: "Urgent messages from the game and items", @@ -191,7 +183,6 @@ function start_vue() { required: false, admin: false }, -<<<<<<< HEAD //VOREStation Add Start { matches: ".nif", @@ -202,8 +193,6 @@ function start_vue() { admin: false }, //VOREStation Add End -======= ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) { matches: ".pm", becomes: "vc_adminpm", @@ -685,11 +674,7 @@ function start_vue() { hiddenElement.target = '_blank'; hiddenElement.download = filename; hiddenElement.click(); -<<<<<<< HEAD //Probably what will end up getting used -======= - //Probably what will end up getting used ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) } else { var blob = new Blob([textToSave], {type: 'text/html;charset=utf8;'}); saved = window.navigator.msSaveOrOpenBlob(blob, filename); diff --git a/code/modules/vchat/vchat_client.dm b/code/modules/vchat/vchat_client.dm index d52daab2e2e..0e8f0051361 100644 --- a/code/modules/vchat/vchat_client.dm +++ b/code/modules/vchat/vchat_client.dm @@ -103,11 +103,7 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic owner << browse(file2text("code/modules/vchat/html/vchat.html"), "window=htmloutput") //Check back later -<<<<<<< HEAD spawn(15 SECONDS) -======= - spawn(60 SECONDS) ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) if(!src) return if(!src.loaded) @@ -144,13 +140,10 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic /datum/chatOutput/proc/become_broken() broken = TRUE loaded = FALSE -<<<<<<< HEAD -======= if(!owner) qdel(src) return ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) update_vis() diff --git a/interface/skin.dmf b/interface/skin.dmf index 58d21914650..2892676bcab 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -474,12 +474,9 @@ macro "hotkeymode" elem name = "5" command = ".me" -<<<<<<< HEAD elem name = "6" command = "subtle" -======= ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) elem name = "A+REP" command = ".moveleft" @@ -1254,10 +1251,7 @@ window "outputwindow" style = ".system {color:#FF0000;}" max-lines = 0 saved-params = "" -<<<<<<< HEAD -======= enable-http-images = true ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) window "rpane" elem "rpane" @@ -1424,10 +1418,6 @@ window "infowindow" is-default = true saved-params = "" highlight-color = #00aa00 -<<<<<<< HEAD -======= - allow-html = true ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761) on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\"" diff --git a/vorestation.dme b/vorestation.dme index 2fdb53260af..c8b0c2b9166 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1654,10 +1654,7 @@ #include "code\modules\catalogue\catalogue_data_vr.dm" #include "code\modules\catalogue\cataloguer.dm" #include "code\modules\catalogue\cataloguer_visuals.dm" -<<<<<<< HEAD:vorestation.dme #include "code\modules\catalogue\cataloguer_vr.dm" -======= ->>>>>>> 715de43... VChat: Redone chat output done in Vue.js (#6761):polaris.dme #include "code\modules\client\asset_cache.dm" #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm"