diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index a3127ca1cad..7f9566a6f9e 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -14,6 +14,7 @@ #define SOUND_ANNOUNCEMENTS 2048 #define DISABLE_DEATHRATTLE 4096 #define DISABLE_ARRIVALRATTLE 8192 +#define COMBOHUD_LIGHTING 16384 #define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 5c87293b731..778eb25d5af 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1036,10 +1036,11 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits for(var/datum/atom_hud/antag/H in GLOB.huds) // add antag huds (adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr) - if (adding_hud) - mob.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE - else - mob.lighting_alpha = initial(mob.lighting_alpha) + if(prefs.toggles & COMBOHUD_LIGHTING) + if(adding_hud) + mob.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE + else + mob.lighting_alpha = initial(mob.lighting_alpha) mob.update_sight() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 06e8815c1bd..2fb14328406 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -146,6 +146,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) menuoptions = list() return +#define APPEARANCE_CATEGORY_COLUMN "" +#define MAX_MUTANT_ROWS 4 + /datum/preferences/proc/ShowChoices(mob/user) if(!user || !user.client) return @@ -153,8 +156,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) user << browse_rsc(preview_icon, "previewicon.png") var/dat = "
" - dat += "Character Settings " + dat += "Character Settings" dat += "Game Preferences" + dat += "OOC Preferences" if(!path) dat += "
Please create an account to save your preferences
" @@ -170,7 +174,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(S) dat += "
" var/name + var/unspaced_slots = 0 for(var/i=1, i<=max_save_slots, i++) + unspaced_slots++ + if(unspaced_slots > 4) + dat += "
" + unspaced_slots = 0 S.cd = "/character[i]" S["real_name"] >> name if(!name) @@ -199,10 +208,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Special Names:
" dat += "Backup Human Name: [custom_names["human"]] " + dat += "
" dat += "Clown: [custom_names["clown"]] " - dat += "Mime:[custom_names["mime"]]
" + dat += "Mime: [custom_names["mime"]]" + dat += "
" dat += "AI: [custom_names["ai"]] " - dat += "Cyborg: [custom_names["cyborg"]]
" + dat += "Cyborg: [custom_names["cyborg"]]" + dat += "
" dat += "Chaplain religion: [custom_names["religion"]] " dat += "Chaplain deity: [custom_names["deity"]]
" @@ -229,19 +241,43 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Backpack:
[backbag]
" dat += "Uplink Spawn Location:
[uplink_spawn_loc]
" - if(pref_species.use_skintones) + var/use_skintones = pref_species.use_skintones + if(use_skintones) - dat += "" + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Skin Tone

" dat += "[skin_tone]
" + var/mutant_colors + if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits)) + + if(!use_skintones) + dat += APPEARANCE_CATEGORY_COLUMN + + dat += "

Mutant Color

" + + dat += "    Change
" + + mutant_colors = TRUE + + if((EYECOLOR in pref_species.species_traits) && !(NOEYES in pref_species.species_traits)) + + if(!use_skintones && !mutant_colors) + dat += APPEARANCE_CATEGORY_COLUMN + + dat += "

Eye Color

" + + dat += "    Change
" + + dat += "" + else if(use_skintones || mutant_colors) dat += "" if(HAIR in pref_species.species_traits) - dat += "" + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Hair Style

" @@ -249,9 +285,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "< >
" dat += "    Change
" - - dat += "" - dat += "

Facial Hair Style

" dat += "[facial_hair_style]
" @@ -260,127 +293,157 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "" - if((EYECOLOR in pref_species.species_traits) && !(NOEYES in pref_species.species_traits)) - - dat += "" - - dat += "

Eye Color

" - - dat += "    Change
" - - dat += "" - - - if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits)) - - dat += "" - - dat += "

Mutant Color

" - - dat += "    Change
" - - dat += "" + //Mutant stuff + var/mutant_category = 0 if("tail_lizard" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Tail

" dat += "[features["tail_lizard"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("snout" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Snout

" dat += "[features["snout"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("horns" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Horns

" dat += "[features["horns"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("frills" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Frills

" dat += "[features["frills"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("spines" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Spines

" dat += "[features["spines"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("body_markings" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Body Markings

" dat += "[features["body_markings"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 + if("legs" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Legs

" dat += "[features["legs"]]
" - dat += "" - if("moth_wings" in pref_species.mutant_bodyparts) + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 - dat += "" + if("moth_wings" in pref_species.mutant_bodyparts) + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Moth wings

" dat += "[features["moth_wings"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if(CONFIG_GET(flag/join_with_mutant_humans)) if("tail_human" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Tail

" dat += "[features["tail_human"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("ears" in pref_species.mutant_bodyparts) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Ears

" dat += "[features["ears"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 if("wings" in pref_species.mutant_bodyparts && GLOB.r_wings_list.len >1) - dat += "" + if(!mutant_category) + dat += APPEARANCE_CATEGORY_COLUMN dat += "

Wings

" dat += "[features["wings"]]
" - dat += "" + mutant_category++ + if(mutant_category >= MAX_MUTANT_ROWS) + dat += "" + mutant_category = 0 + if(mutant_category) + dat += "" + mutant_category = 0 dat += "" @@ -388,37 +451,24 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "
" dat += "

General Settings

" dat += "UI Style: [UI_style]
" - dat += "Keybindings: [(hotkeys) ? "Hotkeys" : "Default"]
" - dat += "Action Buttons: [(buttons_locked) ? "Locked In Place" : "Unlocked"]
" - dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"]
" - dat += "PDA Style: [pda_style]
" - dat += "PDA Color:     Change
" dat += "tgui Monitors: [(tgui_lock) ? "Primary" : "All"]
" - dat += "Window Flashing: [(windowflashing) ? "Yes" : "No"]
" - dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" - dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" - dat += "Ghost ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" - dat += "Ghost sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" - dat += "Ghost whispers: [(chat_toggles & CHAT_GHOSTWHISPER) ? "All Speech" : "Nearest Creatures"]
" - dat += "Ghost radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "Yes" : "No"]
" - dat += "Ghost pda: [(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]
" - dat += "Pull requests: [(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]
" - dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]
" - if(CONFIG_GET(flag/allow_metadata)) - dat += "OOC Notes: Edit
" + dat += "tgui Style: [(tgui_fancy) ? "Fancy" : "No Frills"]
" + dat += "
" + dat += "Action Buttons: [(buttons_locked) ? "Locked In Place" : "Unlocked"]
" + dat += "Keybindings: [(hotkeys) ? "Hotkeys" : "Default"]
" + dat += "
" + dat += "PDA Color:     Change
" + dat += "PDA Style: [pda_style]
" + dat += "
" + dat += "Ghost Ears: [(chat_toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" + dat += "Ghost Radio: [(chat_toggles & CHAT_GHOSTRADIO) ? "All Messages":"No Messages"]
" + dat += "Ghost Sight: [(chat_toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" + dat += "Ghost Whispers: [(chat_toggles & CHAT_GHOSTWHISPER) ? "All Speech" : "Nearest Creatures"]
" + dat += "Ghost PDA: [(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]
" - if(user.client) - if(user.client.holder) - dat += "Adminhelp Sound: [(toggles & SOUND_ADMINHELP)?"On":"Off"]
" - dat += "Announce Login: [(toggles & ANNOUNCE_LOGIN)?"On":"Off"]
" - - if(unlock_content || check_rights_for(user.client, R_ADMIN)) - dat += "OOC:     Change
" - - if(unlock_content) - dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" - dat += "Ghost Form: [ghost_form]
" - dat += "Ghost Orbit: [ghost_orbit]
" + if(unlock_content) + dat += "Ghost Form: [ghost_form]
" + dat += "Ghost Orbit: [ghost_orbit]
" var/button_name = "If you see this something went wrong." switch(ghost_accs) @@ -440,7 +490,23 @@ GLOBAL_LIST_EMPTY(preferences_datums) button_name = GHOST_OTHERS_SIMPLE_NAME dat += "Ghosts of Others: [button_name]
" + dat += "
" + dat += "FPS: [clientfps]
" + + dat += "Parallax (Fancy Space): " + switch (parallax) + if (PARALLAX_LOW) + dat += "Low" + if (PARALLAX_MED) + dat += "Medium" + if (PARALLAX_INSANE) + dat += "Insane" + if (PARALLAX_DISABLE) + dat += "Disabled" + else + dat += "High" + dat += "
" if (CONFIG_GET(flag/maprotation)) var/p_map = preferred_map if (!p_map) @@ -459,22 +525,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(CONFIG_GET(flag/allow_map_voting)) dat += "Preferred Map: [p_map]
" - dat += "FPS: [clientfps]
" - - dat += "Parallax (Fancy Space): " - switch (parallax) - if (PARALLAX_LOW) - dat += "Low" - if (PARALLAX_MED) - dat += "Medium" - if (PARALLAX_INSANE) - dat += "Insane" - if (PARALLAX_DISABLE) - dat += "Disabled" - else - dat += "High" - dat += "
" - dat += "
" dat += "

Special Role Settings

" @@ -497,10 +547,47 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(days_remaining) dat += "Be [capitalize(i)]: \[IN [days_remaining] DAYS]
" else - dat += "Be [capitalize(i)]: [(i in be_special) ? "Yes" : "No"]
" + dat += "Be [capitalize(i)]: [(i in be_special) ? "Enabled" : "Disabled"]
" + dat += "
" + dat += "Midround Antagonist: [(toggles & MIDROUND_ANTAG) ? "Enabled" : "Disabled"]
" dat += "
" + if(2) //OOC Preferences + dat += "" + + if(user.client.holder) + dat +="" + dat += "
" + dat += "

OOC Settings

" + dat += "Window Flashing: [(windowflashing) ? "Enabled":"Disabled"]
" + dat += "
" + dat += "Play Admin MIDIs: [(toggles & SOUND_MIDI) ? "Enabled":"Disabled"]
" + dat += "Play Lobby Music: [(toggles & SOUND_LOBBY) ? "Enabled":"Disabled"]
" + dat += "See Pull Requests: [(chat_toggles & CHAT_PULLR) ? "Enabled":"Disabled"]
" + dat += "
" + + + if(user.client) + if(unlock_content) + dat += "BYOND Membership Publicity: [(toggles & MEMBER_PUBLIC) ? "Public" : "Hidden"]
" + + if(unlock_content || check_rights_for(user.client, R_ADMIN)) + dat += "OOC Color:     Change
" + + if(CONFIG_GET(flag/allow_metadata)) + dat += "OOC Notes: Edit
" + + dat += "
" + + dat += "

Admin Settings

" + + dat += "Adminhelp Sounds: [(toggles & SOUND_ADMINHELP)?"Enabled":"Disabled"]
" + dat += "Announce Login: [(toggles & ANNOUNCE_LOGIN)?"Enabled":"Disabled"]
" + dat += "
" + dat += "Combo HUD Lighting: [(toggles & COMBOHUD_LIGHTING)?"Full-bright":"No Change"]
" + dat += "
" + dat += "
" if(!IsGuestKey(user.key)) @@ -514,6 +601,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) popup.set_content(dat) popup.open(0) +#undef APPEARANCE_CATEGORY_COLUMN +#undef MAX_MUTANT_ROWS + /datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620) if(!SSjob) return @@ -1330,6 +1420,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) toggles ^= SOUND_ADMINHELP if("announce_login") toggles ^= ANNOUNCE_LOGIN + if("combohud_lighting") + toggles ^= COMBOHUD_LIGHTING if("be_special") var/be_special_type = href_list["be_special_type"]