mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] tgui Preferences Menu + total rewrite of the preferences backend (#8153)
* tgui Preferences Menu + total rewrite of the preferences backend * nah, we dont need to ping those people * trying to remove the funny stuff * unmodularizing this * prefs reset * this may need to be reverted, who knows * okay, this part * perhaps * EEEEEEEEE * unsanitary * E * Stage 1 + loadout system * more fixes * E * I mean, it launches? * More fixes and reorganisation * E * customisation code is spaget. * disable ERP prefs * Update erp_preferences.dm * Update erp_preferences.dm * E * Slowly getting there * It may be time for help :) * tri...colors... help * preferences now pass preferences * Update dna.dm * Fuck this man * missing savefile return, set_species works, removed dumb stuff from updateappearance * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8199 * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8224 * https://github.com/tgstation/tgstation/pull/61519 * https://github.com/Skyrat-SS13/Skyrat-tg/pull/8278 * e * le butonAZARAK HELLO * hhh * Proper recognition where it's due, MrMelbert! * EEEE * examine block * Better gen hit sounds from whitedream * final loadout touches, more bug fixes im sure to come * i said there would be bugfixes * Update LoadoutManager.js * Missing preferences in the html menu * LIVE TESTING PHASE BABY * Update LoadoutManager.js * EEE * LAUNCH TEST FIRE * Update job.dm * Update new_player.dm * 50gb DAY ONE PATCH * EEE * Update preferences.dm * buggle fixes * Update examine.dm * >LOOC starts on Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com> Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
co-authored by
Mothblocks
jjpark-kb
Gandalf
Azarak
parent
a5bfc42228
commit
124ddd7cca
@@ -1,20 +0,0 @@
|
||||
/client/verb/toggle_tips()
|
||||
set name = "Toggle Examine Tooltips"
|
||||
set desc = "Toggles examine hover-over tooltips"
|
||||
set category = "Preferences"
|
||||
|
||||
prefs.enable_tips = !prefs.enable_tips
|
||||
prefs.save_preferences()
|
||||
to_chat(usr, span_danger("Examine tooltips [prefs.enable_tips ? "en" : "dis"]abled."))
|
||||
|
||||
/client/verb/change_tip_delay()
|
||||
set name = "Set Examine Tooltip Delay"
|
||||
set desc = "Sets the delay in milliseconds before examine tooltips appear"
|
||||
set category = "Preferences"
|
||||
|
||||
var/indelay = stripped_input(usr, "Enter the tooltip delay in milliseconds (default: 500)", "Enter tooltip delay", "", 10)
|
||||
indelay = text2num(indelay)
|
||||
if(usr)//is this what you mean?
|
||||
prefs.tip_delay = indelay
|
||||
prefs.save_preferences()
|
||||
to_chat(usr, span_danger("Tooltip delay set to [indelay] milliseconds."))
|
||||
@@ -58,7 +58,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
if(prefs.toggles & MEMBER_PUBLIC)
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : GLOB.normal_ooc_colour]'>[icon2html('icons/member_content.dmi', world, "blag")][keyname]</font>"
|
||||
keyname = "<font color='[prefs.read_preference(/datum/preference/color/ooc_color) || GLOB.normal_ooc_colour]'>[icon2html('icons/member_content.dmi', world, "blag")][keyname]</font>"
|
||||
if(prefs.hearted)
|
||||
var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/chat)
|
||||
keyname = "[sheet.icon_tag("emoji-heart")][keyname]"
|
||||
@@ -74,7 +74,8 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
if(holder)
|
||||
if(!holder.fakekey || receiver.holder)
|
||||
if(check_rights_for(src, R_ADMIN))
|
||||
to_chat(receiver, span_adminooc("[CONFIG_GET(flag/allow_admin_ooccolor) && prefs.ooccolor ? "<font color=[prefs.ooccolor]>" :"" ][span_prefix("OOC:")] <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message linkify'>[msg]</span>"), avoid_highlighting = avoid_highlight)
|
||||
var/ooc_color = prefs.read_preference(/datum/preference/color/ooc_color)
|
||||
to_chat(receiver, span_adminooc("[CONFIG_GET(flag/allow_admin_ooccolor) && ooc_color ? "<font color=[ooc_color]>" :"" ][span_prefix("OOC:")] <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message linkify'>[msg]</span>"), avoid_highlighting = avoid_highlight)
|
||||
else
|
||||
to_chat(receiver, span_adminobserverooc(span_prefix("OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message linkify'>[msg]")), avoid_highlighting = avoid_highlight)
|
||||
else
|
||||
@@ -123,7 +124,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
message_admins("[usr.key] has attempted to use the Set Player OOC Color verb!")
|
||||
log_admin("[key_name(usr)] tried to set player ooc color without authorization.")
|
||||
return
|
||||
var/new_color = sanitize_ooccolor(newColor)
|
||||
var/new_color = sanitize_color(newColor)
|
||||
message_admins("[key_name_admin(usr)] has set the players' ooc color to [new_color].")
|
||||
log_admin("[key_name_admin(usr)] has set the player ooc color to [new_color].")
|
||||
GLOB.OOC_COLOR = new_color
|
||||
@@ -145,36 +146,6 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
log_admin("[key_name_admin(usr)] has reset player ooc color.")
|
||||
GLOB.OOC_COLOR = null
|
||||
|
||||
|
||||
/client/verb/colorooc()
|
||||
set name = "Set Your OOC Color"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!holder || !check_rights_for(src, R_ADMIN))
|
||||
if(!is_content_unlocked())
|
||||
return
|
||||
|
||||
var/new_ooccolor = input(src, "Please select your OOC color.", "OOC color", prefs.ooccolor) as color|null
|
||||
if(isnull(new_ooccolor))
|
||||
return
|
||||
new_ooccolor = sanitize_ooccolor(new_ooccolor)
|
||||
prefs.ooccolor = new_ooccolor
|
||||
prefs.save_preferences()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Set OOC Color") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/resetcolorooc()
|
||||
set name = "Reset Your OOC Color"
|
||||
set desc = "Returns your OOC Color to default"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!holder || !check_rights_for(src, R_ADMIN))
|
||||
if(!is_content_unlocked())
|
||||
return
|
||||
|
||||
prefs.ooccolor = initial(prefs.ooccolor)
|
||||
prefs.save_preferences()
|
||||
|
||||
//Checks admin notice
|
||||
/client/verb/admin_notice()
|
||||
set name = "Adminnotice"
|
||||
|
||||
Reference in New Issue
Block a user