mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Merge pull request #10996 from Couls/toggle_karma2
[Ready to Merge]Toggle Karma
This commit is contained in:
@@ -379,7 +379,10 @@
|
||||
if(establish_db_connection())
|
||||
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
|
||||
update_changelog_button()
|
||||
|
||||
|
||||
if(prefs.toggles & DISABLE_KARMA) // activates if karma is disabled
|
||||
if(establish_db_connection())
|
||||
to_chat(src,"<span class='notice'>You have disabled karma gains.") // reminds those who have it disabled
|
||||
|
||||
if(!void)
|
||||
void = new()
|
||||
@@ -670,7 +673,7 @@
|
||||
|
||||
/client/proc/on_varedit()
|
||||
var_edited = TRUE
|
||||
|
||||
|
||||
/////////////////
|
||||
// DARKMODE UI //
|
||||
/////////////////
|
||||
@@ -707,7 +710,7 @@
|
||||
/* Infowindow */
|
||||
winset(src, "infowindow", "background-color=#272727;text-color=#FFFFFF")
|
||||
winset(src, "infowindow.info", "background-color=#272727;text-color=#FFFFFF;highlight-color=#009900;tab-text-color=#FFFFFF;tab-background-color=#272727")
|
||||
// NOTIFY USER
|
||||
// NOTIFY USER
|
||||
to_chat(src, "<span class='notice'>Darkmode Enabled</span>")
|
||||
|
||||
/client/proc/deactivate_darkmode()
|
||||
@@ -748,15 +751,15 @@
|
||||
// Better changelog button handling
|
||||
/client/proc/update_changelog_button()
|
||||
if(establish_db_connection())
|
||||
if(prefs.lastchangelog != changelog_hash)
|
||||
if(prefs.lastchangelog != changelog_hash)
|
||||
winset(src, "rpane.changelog", "background-color=#bb7700;text-color=#FFFFFF;font-style=bold")
|
||||
else
|
||||
if(prefs.toggles & UI_DARKMODE)
|
||||
if(prefs.toggles & UI_DARKMODE)
|
||||
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
else
|
||||
if(prefs.toggles & UI_DARKMODE)
|
||||
if(prefs.toggles & UI_DARKMODE)
|
||||
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style))
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, 262143, initial(toggles))
|
||||
toggles = sanitize_integer(toggles, 0, 524287, initial(toggles))
|
||||
sound = sanitize_integer(sound, 0, 65535, initial(sound))
|
||||
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
||||
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
|
||||
|
||||
@@ -218,4 +218,16 @@
|
||||
activate_darkmode()
|
||||
else
|
||||
deactivate_darkmode()
|
||||
feedback_add_details("admin_verb","TDarkmode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
feedback_add_details("admin_verb","TDarkmode") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_karma()
|
||||
set name = "Toggle Karma Gains"
|
||||
set category = "Special Verbs"
|
||||
set desc = "This button will allow you to stop other people giving you karma."
|
||||
if (prefs.toggles & DISABLE_KARMA)
|
||||
to_chat(usr, "<span class='notice'>You have disabled karma gains.")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You have enabled karma gains.")
|
||||
prefs.toggles ^= DISABLE_KARMA
|
||||
prefs.save_preferences(src)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user