mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +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
@@ -3,16 +3,16 @@
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
|
||||
ghost_accs = client.prefs.ghost_accs
|
||||
ghost_others = client.prefs.ghost_others
|
||||
ghost_accs = client.prefs.read_preference(/datum/preference/choiced/ghost_accessories)
|
||||
ghost_others = client.prefs.read_preference(/datum/preference/choiced/ghost_others)
|
||||
var/preferred_form = null
|
||||
|
||||
if(isAdminGhostAI(src))
|
||||
has_unlimited_silicon_privilege = 1
|
||||
|
||||
if(client.prefs.unlock_content)
|
||||
preferred_form = client.prefs.ghost_form
|
||||
ghost_orbit = client.prefs.ghost_orbit
|
||||
preferred_form = client.prefs.read_preference(/datum/preference/choiced/ghost_form)
|
||||
ghost_orbit = client.prefs.read_preference(/datum/preference/choiced/ghost_orbit)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if (isturf(T))
|
||||
|
||||
@@ -191,8 +191,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
. = ..()
|
||||
|
||||
if(client) //We update our preferences in case they changed right before update_appearance was called.
|
||||
ghost_accs = client.prefs.ghost_accs
|
||||
ghost_others = client.prefs.ghost_others
|
||||
ghost_accs = client.prefs.read_preference(/datum/preference/choiced/ghost_accessories)
|
||||
ghost_others = client.prefs.read_preference(/datum/preference/choiced/ghost_others)
|
||||
|
||||
if(hair_overlay)
|
||||
cut_overlay(hair_overlay)
|
||||
@@ -210,7 +210,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
else
|
||||
ghostimage_default.icon_state = new_form
|
||||
|
||||
if(ghost_accs >= GHOST_ACCS_DIR && (icon_state in GLOB.ghost_forms_with_directions_list)) //if this icon has dirs AND the client wants to show them, we make sure we update the dir on movement
|
||||
if((ghost_accs == GHOST_ACCS_DIR || ghost_accs == GHOST_ACCS_FULL) && (icon_state in GLOB.ghost_forms_with_directions_list)) //if this icon has dirs AND the client wants to show them, we make sure we update the dir on movement
|
||||
updatedir = 1
|
||||
else
|
||||
updatedir = 0 //stop updating the dir in case we want to show accessories with dirs on a ghost sprite without dirs
|
||||
@@ -375,7 +375,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(mind.current.key && mind.current.key[1] != "@") //makes sure we don't accidentally kick any clients
|
||||
to_chat(usr, span_warning("Another consciousness is in your body...It is resisting you."))
|
||||
return
|
||||
client.view_size.setDefault(getScreenSize(client.prefs.widescreenpref))//Let's reset so people can't become allseeing gods
|
||||
client.view_size.setDefault(getScreenSize(client.prefs.read_preference(/datum/preference/toggle/widescreen)))//Let's reset so people can't become allseeing gods
|
||||
SStgui.on_transfer(src, mind.current) // Transfer NanoUIs.
|
||||
if(mind.current.stat == DEAD && SSlag_switch.measures[DISABLE_DEAD_KEYLOOP])
|
||||
to_chat(src, span_warning("To leave your body again use the Ghost verb."))
|
||||
@@ -414,8 +414,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(source)
|
||||
var/atom/movable/screen/alert/A = throw_alert("[REF(source)]_notify_cloning", /atom/movable/screen/alert/notify_cloning)
|
||||
if(A)
|
||||
if(client && client.prefs && client.prefs.UI_style)
|
||||
A.icon = ui_style2icon(client.prefs.UI_style)
|
||||
var/ui_style = client?.prefs?.read_preference(/datum/preference/choiced/ui_style)
|
||||
if(ui_style)
|
||||
A.icon = ui_style2icon(ui_style)
|
||||
A.desc = message
|
||||
var/old_layer = source.layer
|
||||
var/old_plane = source.plane
|
||||
@@ -601,7 +602,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
/mob/dead/observer/update_sight()
|
||||
if(client)
|
||||
ghost_others = client.prefs.ghost_others //A quick update just in case this setting was changed right before calling the proc
|
||||
ghost_others = client.prefs.read_preference(/datum/preference/choiced/ghost_others) //A quick update just in case this setting was changed right before calling the proc
|
||||
|
||||
if (!ghostvision)
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
@@ -629,11 +630,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
client.images -= GLOB.ghost_images_default
|
||||
if(GHOST_OTHERS_SIMPLE)
|
||||
client.images -= GLOB.ghost_images_simple
|
||||
lastsetting = client.prefs.ghost_others
|
||||
lastsetting = client.prefs.read_preference(/datum/preference/choiced/ghost_others)
|
||||
if(!ghostvision)
|
||||
return
|
||||
if(client.prefs.ghost_others != GHOST_OTHERS_THEIR_SETTING)
|
||||
switch(client.prefs.ghost_others)
|
||||
if(lastsetting != GHOST_OTHERS_THEIR_SETTING)
|
||||
switch(lastsetting)
|
||||
if(GHOST_OTHERS_DEFAULT_SPRITE)
|
||||
client.images |= (GLOB.ghost_images_default-ghostimage_default)
|
||||
if(GHOST_OTHERS_SIMPLE)
|
||||
@@ -798,10 +799,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
set_ghost_appearance()
|
||||
if(client?.prefs)
|
||||
deadchat_name = client.prefs.real_name
|
||||
var/real_name = client.prefs.read_preference(/datum/preference/name/real_name)
|
||||
deadchat_name = real_name
|
||||
if(mind)
|
||||
mind.ghostname = client.prefs.real_name
|
||||
name = client.prefs.real_name
|
||||
mind.ghostname = real_name
|
||||
name = real_name
|
||||
|
||||
/mob/dead/observer/proc/set_ghost_appearance()
|
||||
if(!client?.prefs)
|
||||
@@ -809,12 +811,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
client.prefs.apply_character_randomization_prefs()
|
||||
|
||||
if(HAIR in client.prefs.pref_species.species_traits)
|
||||
hairstyle = client.prefs.hairstyle
|
||||
hair_color = brighten_color(client.prefs.hair_color)
|
||||
if(FACEHAIR in client.prefs.pref_species.species_traits)
|
||||
facial_hairstyle = client.prefs.facial_hairstyle
|
||||
facial_hair_color = brighten_color(client.prefs.facial_hair_color)
|
||||
var/species_type = client.prefs.read_preference(/datum/preference/choiced/species)
|
||||
var/datum/species/species = new species_type
|
||||
|
||||
if(HAIR in species.species_traits)
|
||||
hairstyle = client.prefs.read_preference(/datum/preference/choiced/hairstyle)
|
||||
hair_color = brighten_color(client.prefs.read_preference(/datum/preference/color_legacy/hair_color))
|
||||
|
||||
if(FACEHAIR in species.species_traits)
|
||||
facial_hairstyle = client.prefs.read_preference(/datum/preference/choiced/facial_hairstyle)
|
||||
facial_hair_color = brighten_color(client.prefs.read_preference(/datum/preference/color_legacy/facial_hair_color))
|
||||
|
||||
qdel(species)
|
||||
|
||||
update_appearance()
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
to_follow = V.source
|
||||
var/link = FOLLOW_LINK(src, to_follow)
|
||||
// Create map text prior to modifying message for goonchat
|
||||
if (client?.prefs.chat_on_map && (client.prefs.see_chat_non_mob || ismob(speaker)))
|
||||
if (client?.prefs.read_preference(/datum/preference/toggle/enable_runechat) && (client.prefs.read_preference(/datum/preference/toggle/enable_runechat_non_mobs) || ismob(speaker)))
|
||||
create_chat_message(speaker, message_language, raw_message, spans)
|
||||
// Recompose the message, because it's scrambled by default
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mods)
|
||||
|
||||
Reference in New Issue
Block a user