mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
adding the ability for the stylesheet to be modified on a live server
+ timestamps
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/datum/configuration
|
/datum/configuration
|
||||||
var/server_name = null // server name (for world name / status)
|
var/server_name = null // server name (for world name / status)
|
||||||
var/server_suffix = 0 // generate numeric suffix based on server port
|
var/server_suffix = 0 // generate numeric suffix based on server port
|
||||||
|
var/world_style_config = world_style
|
||||||
|
|
||||||
var/nudge_script_path = "nudge.py" // where the nudge.py script is located
|
var/nudge_script_path = "nudge.py" // where the nudge.py script is located
|
||||||
|
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ var/list/admin_verbs_debug = list(
|
|||||||
/client/proc/qdel_toggle, // /vg/
|
/client/proc/qdel_toggle, // /vg/
|
||||||
/client/proc/cmd_admin_dump_instances, // /vg/
|
/client/proc/cmd_admin_dump_instances, // /vg/
|
||||||
/client/proc/disable_bloodvirii, // /vg/
|
/client/proc/disable_bloodvirii, // /vg/
|
||||||
|
/client/proc/reload_style_sheet,
|
||||||
|
/client/proc/reset_style_sheet,
|
||||||
/client/proc/configFood,
|
/client/proc/configFood,
|
||||||
/client/proc/debug_reagents,
|
/client/proc/debug_reagents,
|
||||||
/client/proc/make_invulnerable,
|
/client/proc/make_invulnerable,
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
|||||||
if(!mob) return //this doesn't happen
|
if(!mob) return //this doesn't happen
|
||||||
|
|
||||||
var/ref_mob = "\ref[mob]"
|
var/ref_mob = "\ref[mob]"
|
||||||
msg = "\blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
msg = "\[[time_stamp()]] \blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||||
|
|
||||||
//send this msg to all admins
|
//send this msg to all admins
|
||||||
var/admin_number_afk = 0
|
var/admin_number_afk = 0
|
||||||
@@ -104,7 +104,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
|||||||
|
|
||||||
//show it to the person adminhelping too
|
//show it to the person adminhelping too
|
||||||
if(src.prefs.special_popup)
|
if(src.prefs.special_popup)
|
||||||
src << output("<span class='info'>PM to - <b>Admins</b>: [original_msg]</span>", "window1.msay_output")
|
src << output("\[[time_stamp()]] <span class='info'>PM to - <b>Admins</b>: [original_msg]</span>", "window1.msay_output")
|
||||||
else
|
else
|
||||||
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
|
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
|
||||||
|
|
||||||
|
|||||||
@@ -111,13 +111,13 @@
|
|||||||
adminhelp(reply) //sender has left, adminhelp instead
|
adminhelp(reply) //sender has left, adminhelp instead
|
||||||
return
|
return
|
||||||
|
|
||||||
recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, C.holder ? 1 : 0)]</b>: [msg]</font>"
|
recieve_message = "\[[time_stamp()]] <font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, C.holder ? 1 : 0)]</b>: [msg]</font>"
|
||||||
if(C.prefs.special_popup)
|
if(C.prefs.special_popup)
|
||||||
C << output(recieve_message, "window1.msay_output")
|
C << output(recieve_message, "window1.msay_output")
|
||||||
else
|
else
|
||||||
C << recieve_message
|
C << recieve_message
|
||||||
if(src.prefs.special_popup)
|
if(src.prefs.special_popup)
|
||||||
src << output("<font color='blue'>[send_pm_type]PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>", "window1.msay_output")
|
src << output("\[[time_stamp()]] <font color='blue'>[send_pm_type]PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>", "window1.msay_output")
|
||||||
else
|
else
|
||||||
src << "<font color='blue'>[send_pm_type]PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
|
src << "<font color='blue'>[send_pm_type]PM to-<b>[key_name(C, src, holder ? 1 : 0)]</b>: [msg]</font>"
|
||||||
|
|
||||||
@@ -189,4 +189,7 @@
|
|||||||
if(X == C || X == src)
|
if(X == C || X == src)
|
||||||
continue
|
continue
|
||||||
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
|
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
|
||||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
if(X.prefs.special_popup)
|
||||||
|
X << output("\[[time_stamp()]] <B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>", "window1.msay_output") //inform X
|
||||||
|
else
|
||||||
|
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||||
|
|||||||
@@ -43,6 +43,6 @@
|
|||||||
for(var/client/C in admins)
|
for(var/client/C in admins)
|
||||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||||
if(C.prefs.special_popup)
|
if(C.prefs.special_popup)
|
||||||
C << output("<span class='[color]'>[key_name(src,1)] (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>", "window1.msay_output")
|
C << output("\[[time_stamp()]] <span style='color:[color];'><b>[key_name(src,1)]</b> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='modooc'>[msg]</span></span>", "window1.msay_output")
|
||||||
else
|
else
|
||||||
C << "<span class='prefix'>MOD: </span><span class='[color]'><EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
C << "<span class='prefix'>MOD: </span><span class='[color]'><EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||||
@@ -1162,6 +1162,24 @@ var/global/blood_virus_spreading_disabled = 0
|
|||||||
else
|
else
|
||||||
message_admins("[src.ckey] enabled findAirborneVirii.")
|
message_admins("[src.ckey] enabled findAirborneVirii.")
|
||||||
|
|
||||||
|
/client/proc/reload_style_sheet()
|
||||||
|
set category = "Server"
|
||||||
|
set name = "Reload Style Sheet"
|
||||||
|
set desc = "Reload the Style Sheet (be careful)."
|
||||||
|
|
||||||
|
for(var/client/C in clients)
|
||||||
|
winset(C, null, "outputwindow.output.style=[config.world_style_config];")
|
||||||
|
message_admins("The style sheet has been reloaded by [src.ckey]")
|
||||||
|
|
||||||
|
/client/proc/reset_style_sheet()
|
||||||
|
set category = "Server"
|
||||||
|
set name = "Reset Style Sheet"
|
||||||
|
set desc = "Reset the Style Sheet (restore to default)."
|
||||||
|
|
||||||
|
for(var/client/C in clients)
|
||||||
|
winset(C, null, "outputwindow.output.style=[world_style];")
|
||||||
|
message_admins("The style sheet has been reset by [src.ckey]")
|
||||||
|
|
||||||
/client/proc/cmd_admin_cluwneize(var/mob/M in mob_list)
|
/client/proc/cmd_admin_cluwneize(var/mob/M in mob_list)
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
set name = "Make Cluwne"
|
set name = "Make Cluwne"
|
||||||
|
|||||||
@@ -65,11 +65,11 @@
|
|||||||
if(config.automute_on && !holder && src.last_message == message)
|
if(config.automute_on && !holder && src.last_message == message)
|
||||||
src.last_message_count++
|
src.last_message_count++
|
||||||
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
|
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
|
||||||
src << "\red You have exceeded the spam filter limit for identical messages. An auto-mute was applied."
|
src << "<span class='warning'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>"
|
||||||
cmd_admin_mute(src.mob, mute_type, 1)
|
cmd_admin_mute(src.mob, mute_type, 1)
|
||||||
return 1
|
return 1
|
||||||
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
|
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
|
||||||
src << "\red You are nearing the spam filter limit for identical messages."
|
src << "<span class='warning'>You are nearing the spam filter limit for identical messages.</span>"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
last_message = message
|
last_message = message
|
||||||
@@ -95,6 +95,11 @@
|
|||||||
//CONNECT//
|
//CONNECT//
|
||||||
///////////
|
///////////
|
||||||
/client/New(TopicData)
|
/client/New(TopicData)
|
||||||
|
if(config)
|
||||||
|
winset(src, null, "outputwindow.output.style=[config.world_style_config];")
|
||||||
|
winset(src, null, "window1.msay_output.style=[config.world_style_config];") // it isn't possible to set two window elements in the same winset so we need to call it for each element we're assigning a stylesheet.
|
||||||
|
else
|
||||||
|
src << "<span class='warning'>The stylesheet wasn't properly setup call an administrator to reload the stylesheet or relog.</span>"
|
||||||
TopicData = null //Prevent calls to client.Topic from connect
|
TopicData = null //Prevent calls to client.Topic from connect
|
||||||
|
|
||||||
if(connection != "seeker") //Invalid connection type.
|
if(connection != "seeker") //Invalid connection type.
|
||||||
@@ -112,7 +117,7 @@
|
|||||||
src.preload_rsc = pick(config.resource_urls)
|
src.preload_rsc = pick(config.resource_urls)
|
||||||
else src.preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
|
else src.preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
|
||||||
|
|
||||||
src << "\red If the title screen is black, resources are still downloading. Please be patient until the title screen appears."
|
src << "<span class='warning'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</span>"
|
||||||
|
|
||||||
clients += src
|
clients += src
|
||||||
directory[ckey] = src
|
directory[ckey] = src
|
||||||
|
|||||||
@@ -1,28 +1,19 @@
|
|||||||
client/script = {"<style>
|
#define world_style {"\"body {font-family: Verdana, sans-serif;}
|
||||||
body {font-family: Verdana, sans-serif;}
|
h1, h2, h3, h4, h5, h6 {color: #0000ff;font-family: Georgia, Verdana, sans-serif;}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {color: #0000ff; font-family: Georgia, Verdana, sans-serif;}
|
|
||||||
|
|
||||||
em {font-style: normal; font-weight: bold;}
|
em {font-style: normal; font-weight: bold;}
|
||||||
|
|
||||||
.motd {color: #638500; font-family: Verdana, sans-serif;}
|
.motd {color: #638500; font-family: Verdana, sans-serif;}
|
||||||
.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6
|
.motd h1, .motd h2, .motd h3, .motd h4, .motd h5, .motd h6
|
||||||
{color: #638500; text-decoration: underline;}
|
{color: #638500; text-decoration: underline;}
|
||||||
.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover
|
.motd a, .motd a:link, .motd a:visited, .motd a:active, .motd a:hover
|
||||||
{color: #638500;}
|
{color: #638500;}
|
||||||
|
|
||||||
.prefix { font-weight: bold;}
|
.prefix { font-weight: bold;}
|
||||||
|
|
||||||
.ooc { font-weight: bold;}
|
.ooc { font-weight: bold;}
|
||||||
.adminobserverooc {color: #0099cc; font-weight: bold;}
|
.adminobserverooc {color: #0099cc; font-weight: bold;}
|
||||||
.adminooc {color: #b82e00; font-weight: bold;}
|
.adminooc {color: #b82e00; font-weight: bold;}
|
||||||
|
|
||||||
.adminobserver {color: #996600; font-weight: bold;}
|
.adminobserver {color: #996600; font-weight: bold;}
|
||||||
.admin {color: #386aff; font-weight: bold;}
|
.admin {color: #386aff; font-weight: bold;}
|
||||||
.adminsay {color: #9611D4; font-weight: bold;}
|
.adminsay {color: #9611D4; font-weight: bold;}
|
||||||
|
|
||||||
.name { font-weight: bold;}
|
.name { font-weight: bold;}
|
||||||
|
|
||||||
.say {}
|
.say {}
|
||||||
.deadsay {color: #5c00e6;}
|
.deadsay {color: #5c00e6;}
|
||||||
.radio {color: #008000;}
|
.radio {color: #008000;}
|
||||||
@@ -30,27 +21,21 @@ em {font-style: normal; font-weight: bold;}
|
|||||||
.comradio {color: #193A7A;}
|
.comradio {color: #193A7A;}
|
||||||
.syndradio {color: #6D3F40;}
|
.syndradio {color: #6D3F40;}
|
||||||
.centradio {color: #5C5C8A;}
|
.centradio {color: #5C5C8A;}
|
||||||
|
|
||||||
.secradio {color: #A30000;}
|
.secradio {color: #A30000;}
|
||||||
.engradio {color: #A66300;}
|
.engradio {color: #A66300;}
|
||||||
.medradio {color: #008160;}
|
.medradio {color: #008160;}
|
||||||
.sciradio {color: #993399;}
|
.sciradio {color: #993399;}
|
||||||
.supradio {color: #5F4519;}
|
.supradio {color: #5F4519;}
|
||||||
.serradio {color: #3399CC;}
|
.serradio {color: #3399CC;}
|
||||||
|
|
||||||
.mommi {color: navy;}
|
.mommi {color: navy;}
|
||||||
|
|
||||||
.alert {color: #ff0000;}
|
.alert {color: #ff0000;}
|
||||||
h1.alert, h2.alert {color: #000000;}
|
h1.alert, h2.alert {color: #000000;}
|
||||||
|
|
||||||
.emote { font-style: italic;}
|
.emote { font-style: italic;}
|
||||||
.selecteddna {color: #FFFFFF; background-color: #001B1B}
|
.selecteddna {color: #FFFFFF; background-color: #001B1B}
|
||||||
|
|
||||||
.attack {color: #ff0000;}
|
.attack {color: #ff0000;}
|
||||||
.moderate {color: #CC0000;}
|
.moderate {color: #CC0000;}
|
||||||
.disarm {color: #990000;}
|
.disarm {color: #990000;}
|
||||||
.passive {color: #660000;}
|
.passive {color: #660000;}
|
||||||
|
|
||||||
.danger {color: #ff0000; font-weight: bold;}
|
.danger {color: #ff0000; font-weight: bold;}
|
||||||
.warning {color: #ff0000; font-style: italic;}
|
.warning {color: #ff0000; font-style: italic;}
|
||||||
.sinister {color: #800080; font-weight: bold; font-style: italic;} /* /vg/ */
|
.sinister {color: #800080; font-weight: bold; font-style: italic;} /* /vg/ */
|
||||||
@@ -61,10 +46,8 @@ h1.alert, h2.alert {color: #000000;}
|
|||||||
.notice {color: #000099;}
|
.notice {color: #000099;}
|
||||||
.bnotice {color: #000099; font-weight: bold;}
|
.bnotice {color: #000099; font-weight: bold;}
|
||||||
.sans {font-family: "Comic Sans MS", cursive, sans-serif;}
|
.sans {font-family: "Comic Sans MS", cursive, sans-serif;}
|
||||||
|
|
||||||
.alien {color: #543354;}
|
.alien {color: #543354;}
|
||||||
.newscaster {color: #800000;}
|
.newscaster {color: #800000;}
|
||||||
|
|
||||||
.mod {color: #735638; font-weight: bold;}
|
.mod {color: #735638; font-weight: bold;}
|
||||||
.modooc {color: #184880; font-weight: bold;}
|
.modooc {color: #184880; font-weight: bold;}
|
||||||
.adminmod {color: #402A14; font-weight: bold;}
|
.adminmod {color: #402A14; font-weight: bold;}
|
||||||
@@ -74,15 +57,7 @@ h1.alert, h2.alert {color: #000000;}
|
|||||||
.vox {color: #AA00AA;}
|
.vox {color: #AA00AA;}
|
||||||
.rough {font-family: "Trebuchet MS", cursive, sans-serif;}
|
.rough {font-family: "Trebuchet MS", cursive, sans-serif;}
|
||||||
.say_quote {font-family: Georgia, Verdana, sans-serif;}
|
.say_quote {font-family: Georgia, Verdana, sans-serif;}
|
||||||
|
|
||||||
.interface {color: #330033;}
|
.interface {color: #330033;}
|
||||||
|
|
||||||
/* /vg/ */
|
/* /vg/ */
|
||||||
|
|
||||||
/* Recruiting stuff */
|
/* Recruiting stuff */
|
||||||
.recruit {
|
.recruit {color: #5c00e6; font-weight: bold; font-style: italic;}\""}
|
||||||
color: #5c00e6;
|
|
||||||
font-weight: bold;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
</style>"}
|
|
||||||
@@ -1352,7 +1352,7 @@ window "outputwindow"
|
|||||||
on-size = ""
|
on-size = ""
|
||||||
link-color = #0000ff
|
link-color = #0000ff
|
||||||
visited-color = #ff00ff
|
visited-color = #ff00ff
|
||||||
style = ".system {color:#ff0000;}"
|
style = ""
|
||||||
enable-http-images = false
|
enable-http-images = false
|
||||||
max-lines = 1000
|
max-lines = 1000
|
||||||
image = ""
|
image = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user