[MIRROR] Implementing tgchat to replace old VChat (#7371)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
CHOMPStation2
2023-12-09 13:03:57 +01:00
committed by GitHub
co-authored by Heroman3003 Selis
parent a5c370fb85
commit c2bc0f78c8
46 changed files with 3204 additions and 1622 deletions
+6 -29
View File
@@ -135,7 +135,6 @@
if("usr") hsrc = mob
if("prefs") return prefs.process_link(usr,href_list)
if("vars") return view_var_Topic(href,href_list,hsrc)
if("chat") return chatOutput.Topic(href, href_list)
switch(href_list["action"])
if("openLink")
@@ -174,11 +173,6 @@
del(src)
return
chatOutput = new /datum/chatOutput(src) //veechat
chatOutput.send_resources()
spawn()
chatOutput.start()
//Only show this if they are put into a new_player mob. Otherwise, "what title screen?"
if(isnewplayer(src.mob))
to_chat(src, "<font color='red'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</font>")
@@ -186,6 +180,9 @@
GLOB.clients += src
GLOB.directory[ckey] = src
// Instantiate tgui panel
tgui_panel = new(src, "browseroutput")
GLOB.tickets.ClientLogin(src) // CHOMPedit - Tickets System
//Admin Authorisation
@@ -214,6 +211,9 @@
if(prefs)
prefs.selecting_slots = FALSE
// Initialize tgui panel
tgui_panel.initialize()
connection_time = world.time
connection_realtime = world.realtime
connection_timeofday = world.timeofday
@@ -492,29 +492,6 @@
return FALSE
return ..()
/client/verb/reload_vchat()
set name = "Reload VChat"
set category = "OOC"
//Timing
if(src.chatOutputLoadedAt > (world.time - 10 SECONDS))
tgui_alert_async(src, "You can only try to reload VChat every 10 seconds at most.")
return
// YW EDIT: disabled until we can fix the lag: verbs -= /client/proc/vchat_export_log
//Log, disable
log_debug("[key_name(src)] reloaded VChat.")
winset(src, null, "outputwindow.htmloutput.is-visible=false;outputwindow.oldoutput.is-visible=false;outputwindow.chatloadlabel.is-visible=true")
//The hard way
qdel_null(src.chatOutput)
chatOutput = new /datum/chatOutput(src) //veechat
chatOutput.send_resources()
spawn()
chatOutput.start()
//This is for getipintel.net.
//You're welcome to replace this proc with your own that does your own cool stuff.
//Just set the client's ip_reputation var and make sure it makes sense with your config settings (higher numbers are worse results)