Merge pull request #8830 from Ghommie/Ghommie-cit114

Ports the toggleable dark mode to the game!
This commit is contained in:
kevinz000
2019-07-20 11:57:13 -07:00
committed by GitHub
24 changed files with 821 additions and 228 deletions
+17 -17
View File
@@ -3,7 +3,7 @@
set category = "Mentor"
set name = "Mentor PM"
if(!is_mentor())
to_chat(src, "<font color='red'>Error: Mentor-PM-Panel: Only Mentors and Admins may use this command.</font>")
to_chat(src, "<span class='danger'>Error: Mentor-PM-Panel: Only Mentors and Admins may use this command.</span>")
return
var/list/client/targets[0]
for(var/client/T)
@@ -27,24 +27,24 @@
else if(istype(whom,/client))
C = whom
if(!C)
if(is_mentor()) to_chat(src, "<font color='red'>Error: Mentor-PM: Client not found.</font>")
if(is_mentor()) to_chat(src, "<span class='danger'>Error: Mentor-PM: Client not found.</span>")
else mentorhelp(msg) //Mentor we are replying to left. Mentorhelp instead(check below)
return
if(is_mentor(whom))
to_chat(GLOB.admins | GLOB.mentors, "<font color='purple'>[src] has started replying to [whom]'s mhelp.</font color>")
to_chat(GLOB.admins | GLOB.mentors, "<font color='purple'>[src] has started replying to [whom]'s mhelp.</font>")
//get message text, limit it's length.and clean/escape html
if(!msg)
msg = input(src,"Message:", "Private message") as text|null
if(!msg && is_mentor(whom))
to_chat(GLOB.admins | GLOB.mentors, "<font color='purple'>[src] has stopped their reply to [whom]'s mhelp.</font color>")
to_chat(GLOB.admins | GLOB.mentors, "<span class='purple'>[src] has stopped their reply to [whom]'s mhelp.</span>")
return
if(!C)
if(is_mentor())
to_chat(src, "<font color='red'>Error: Mentor-PM: Client not found.</font>")
to_chat(src, "<span class='danger'>Error: Mentor-PM: Client not found.</span>")
else
mentorhelp(msg) //Mentor we are replying to has vanished, Mentorhelp instead (how the fuck does this work?let's hope it works,shrug)
return
@@ -54,8 +54,8 @@
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg && is_mentor(whom))
to_chat(GLOB.admins | GLOB.mentors, "<font color='purple'>[src] has stopped their reply to [whom]'s mhelp.</font color>")
if(!msg && is_mentor(whom))
to_chat(GLOB.admins | GLOB.mentors, "<span class='purple'>[src] has stopped their reply to [whom]'s mhelp.</span>")
return
log_mentor("Mentor PM: [key_name(src)]->[key_name(C)]: [msg]")
@@ -65,21 +65,21 @@
var/show_char = CONFIG_GET(flag/mentors_mobname_only)
if(C.is_mentor())
if(is_mentor())//both are mentors
to_chat(C, "<font color='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</font>")
to_chat(src, "<font color='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>")
to_chat(C, "<span class='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</span>")
to_chat(src, "<span class='green'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>")
else //recipient is an mentor but sender is not
to_chat(C, "<font color='purple'>Reply PM from-<b>[key_name_mentor(src, C, 1, 0, show_char)]</b>: [msg]</font>")
to_chat(src, "<font color='brown'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</font>")
else //recipient is a mentor but sender is not
to_chat(C, "<span class='purple'>Reply PM from-<b>[key_name_mentor(src, C, 1, 0, show_char)]</b>: [msg]</span>")
to_chat(src, "<span class='pink'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, 0)]</b>: [msg]</span>")
else
if(is_mentor()) //sender is an mentor but recipient is not.
to_chat(C, "<font color='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</font>")
to_chat(src, "<font color='brown'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, show_char)]</b>: [msg]</font>")
if(is_mentor()) //sender is a mentor but recipient is not.
to_chat(C, "<span class='purple'>Mentor PM from-<b>[key_name_mentor(src, C, 1, 0, 0)]</b>: [msg]</span>")
to_chat(src, "<span class='pink'>Mentor PM to-<b>[key_name_mentor(C, C, 1, 0, show_char)]</b>: [msg]</span>")
//we don't use message_Mentors here because the sender/receiver might get it too
var/show_char_sender = !is_mentor() && CONFIG_GET(flag/mentors_mobname_only)
var/show_char_recip = !C.is_mentor() && CONFIG_GET(flag/mentors_mobname_only)
for(var/client/X in GLOB.mentors | GLOB.admins)
if(X.key!=key && X.key!=C.key) //check client/X is an Mentor and isn't the sender or recipient
to_chat(X, "<B><font color='brown'>Mentor PM: [key_name_mentor(src, X, 0, 0, show_char_sender)]-&gt;[key_name_mentor(C, X, 0, 0, show_char_recip)]:</B> <font color ='blue'> [msg]</font>") //inform X
to_chat(X, "<B><span class='pink'>Mentor PM: [key_name_mentor(src, X, 0, 0, show_char_sender)]-&gt;[key_name_mentor(C, X, 0, 0, show_char_recip)]:</span></B> <span class='blue'>[msg]</span>") //inform X
+17 -35
View File
@@ -54,7 +54,7 @@ window "mainwindow"
size = 640x440
anchor1 = none
anchor2 = none
background-color = #272727
background-color = #eeeeee
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
icon = 'icons\\ss13_64.png'
@@ -66,7 +66,7 @@ window "mainwindow"
size = 637x440
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
background-color = #eeeeee
saved-params = "splitter"
left = "mapwindow"
right = "infowindow"
@@ -78,7 +78,7 @@ window "mainwindow"
size = 200x200
anchor1 = none
anchor2 = none
background-color = #272727
background-color = #ffffff
is-visible = false
saved-params = ""
elem "tooltip"
@@ -87,7 +87,7 @@ window "mainwindow"
size = 999x999
anchor1 = none
anchor2 = none
background-color = #272727
background-color = #ffffff
is-visible = false
saved-params = ""
@@ -98,7 +98,6 @@ window "mapwindow"
size = 640x480
anchor1 = none
anchor2 = none
background-color = #272727
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "map"
@@ -120,7 +119,7 @@ window "infowindow"
size = 640x480
anchor1 = none
anchor2 = none
background-color = #272727
background-color = #eeeeee
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "info"
@@ -129,7 +128,6 @@ window "infowindow"
size = 640x445
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
saved-params = "splitter"
left = "statwindow"
right = "outputwindow"
@@ -140,8 +138,7 @@ window "infowindow"
size = 104x20
anchor1 = 3,0
anchor2 = 19,0
text-color = #ffffff
background-color = #40628a
background-color = #90b3dd
saved-params = "is-checked"
text = "Changelog"
command = "changelog"
@@ -151,8 +148,7 @@ window "infowindow"
size = 100x20
anchor1 = 19,0
anchor2 = 34,0
text-color = #ffffff
background-color = #40628a
background-color = #90b3dd
saved-params = "is-checked"
text = "Rules"
command = "rules"
@@ -162,8 +158,7 @@ window "infowindow"
size = 100x20
anchor1 = 34,0
anchor2 = 50,0
text-color = #ffffff
background-color = #40628a
background-color = #90b3dd
saved-params = "is-checked"
text = "Wiki"
command = "wiki"
@@ -173,8 +168,7 @@ window "infowindow"
size = 100x20
anchor1 = 50,0
anchor2 = 66,0
text-color = #ffffff
background-color = #40628a
background-color = #90b3dd
saved-params = "is-checked"
text = "Forum"
command = "forum"
@@ -184,8 +178,7 @@ window "infowindow"
size = 100x20
anchor1 = 66,0
anchor2 = 81,0
text-color = #ffffff
background-color = #40628a
background-color = #90b3dd
saved-params = "is-checked"
text = "GitHub"
command = "github"
@@ -196,8 +189,7 @@ window "infowindow"
anchor1 = 81,0
anchor2 = 97,0
font-size = 8
text-color = #ffffff
background-color = #40628a
background-color = #ef7f7f
saved-params = "is-checked"
text = "Report Issue"
command = "report-issue"
@@ -209,7 +201,7 @@ window "outputwindow"
size = 640x480
anchor1 = none
anchor2 = none
background-color = #272727
background-color = #eeeeee
saved-params = "pos;size;is-minimized;is-maximized"
titlebar = false
statusbar = false
@@ -223,9 +215,9 @@ window "outputwindow"
size = 595x20
anchor1 = 0,100
anchor2 = 100,100
font-size = 10
background-color = #d3b5b5
is-default = true
border = sunken
saved-params = "command"
elem "say"
type = BUTTON
@@ -233,8 +225,7 @@ window "outputwindow"
size = 37x20
anchor1 = 100,100
anchor2 = none
text-color = #ffffff
background-color = #272727
background-color = #eeeeee
saved-params = "is-checked"
text = "Chat"
command = ".winset \"say.is-checked=true ? input.command=\"!say \\\"\" : input.command=\""
@@ -246,7 +237,7 @@ window "outputwindow"
size = 640x456
anchor1 = 0,0
anchor2 = 100,100
background-color = #272727
background-color = #ffffff
is-visible = false
is-disabled = true
saved-params = ""
@@ -257,8 +248,6 @@ window "outputwindow"
size = 640x456
anchor1 = 0,0
anchor2 = 100,100
text-color = #40628a
background-color = #272727
is-default = true
saved-params = ""
@@ -269,7 +258,7 @@ window "statwindow"
size = 640x480
anchor1 = none
anchor2 = none
background-color = #272727
background-color = #eeeeee
saved-params = "pos;size;is-minimized;is-maximized"
is-pane = true
elem "stat"
@@ -278,14 +267,9 @@ window "statwindow"
size = 640x480
anchor1 = 0,0
anchor2 = 100,100
text-color = #ffffff
background-color = #383838
is-default = true
saved-params = ""
tab-text-color = #ffffff
tab-background-color = #272727
prefix-color = #ebebeb
suffix-color = #ebebeb
tab-background-color = #eeeeee
window "preferences_window"
elem "preferences_window"
@@ -294,7 +278,6 @@ window "preferences_window"
size = 1280x1000
anchor1 = none
anchor2 = none
background-color = none
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
@@ -304,7 +287,6 @@ window "preferences_window"
size = 960x1000
anchor1 = 0,0
anchor2 = 75,100
background-color = none
saved-params = ""
elem "character_preview_map"
type = MAP