diff --git a/code/__DEFINES/loadout.dm b/code/__DEFINES/loadout.dm
index 973457692e..c900a33d06 100644
--- a/code/__DEFINES/loadout.dm
+++ b/code/__DEFINES/loadout.dm
@@ -82,3 +82,12 @@
#define LOADOUT_CAN_NAME (1<<0) //renaming items
#define LOADOUT_CAN_DESCRIPTION (1<<1) //adding a custom description to items
#define LOADOUT_CAN_COLOR_POLYCHROMIC (1<<2)
+
+//the names of the customization tabs
+#define SETTINGS_TAB 0
+#define GAME_PREFERENCES_TAB 1
+#define APPEARANCE_TAB 2
+#define SPEECH_TAB 3
+#define LOADOUT_TAB 4
+#define CONTENT_PREFERENCES_TAB 5
+#define KEYBINDINGS_TAB 6
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 257a520af8..3e4b962bc4 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -148,11 +148,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//Job preferences 2.0 - indexed by job title , no key or value implies never
var/list/job_preferences = list()
- // Want randomjob if preferences already filled - Donkie
+ // Want randomjob if preferences already filled - Donkie
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
// 0 = character settings, 1 = game preferences
- var/current_tab = 0
+ var/current_tab = SETTINGS_TAB
var/unlock_content = 0
@@ -274,13 +274,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
update_preview_icon(current_tab)
var/list/dat = list("
")
- dat += "Character Settings"
- dat += "Character Appearance"
- dat += "Character Speech"
- dat += "Loadout"
- dat += "Game Preferences"
- dat += "Content Preferences"
- dat += "Keybindings"
+ dat += "Character Settings"
+ dat += "Character Appearance"
+ dat += "Character Speech"
+ dat += "Loadout"
+ dat += "Game Preferences"
+ dat += "Content Preferences"
+ dat += "Keybindings"
if(!path)
dat += "Please create an account to save your preferences
"
@@ -290,7 +290,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "
"
switch(current_tab)
- if (0) // Character Settings#
+ if(SETTINGS_TAB) // Character Settings#
if(path)
var/savefile/S = new /savefile(path)
if(S)
@@ -366,7 +366,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += ""
//Character Appearance
- if(2)
+ if(APPEARANCE_TAB)
if(path)
var/savefile/S = new /savefile(path)
if(S)
@@ -670,7 +670,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += ""
dat += ""
- if(3)
+ if(SPEECH_TAB)
if(path)
var/savefile/S = new /savefile(path)
if(S)
@@ -700,7 +700,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += ""
dat += ""
- if (1) // Game Preferences
+ if(GAME_PREFERENCES_TAB) // Game Preferences
dat += ""
dat += "General Settings"
dat += "UI Style: [UI_style] "
@@ -871,7 +871,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += " "
- if(4)
+ if(LOADOUT_TAB)
//calculate your gear points from the chosen item
gear_points = CONFIG_GET(number/initial_gear_points)
var/list/chosen_gear = loadout_data["SAVE_[loadout_slot]"]
@@ -990,7 +990,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += " | [loadout_item ? (loadout_item[LOADOUT_CUSTOM_DESCRIPTION] ? loadout_item[LOADOUT_CUSTOM_DESCRIPTION] : gear.description) : gear.description] Progress: [min(progress_made, unlockable.progress_required)]/[unlockable.progress_required] |
"
dat += "
"
- if(5) // Content preferences
+ if(CONTENT_PREFERENCES_TAB) // Content preferences
dat += ""
dat += "
"
- if(6) // Custom keybindings
+ if(KEYBINDINGS_TAB) // Custom keybindings
dat += "Keybindings: [(hotkeys) ? "Hotkeys" : "Input"]
"
dat += "Keybindings mode controls how the game behaves with tab and map/input focus.
If it is on Hotkeys, the game will always attempt to force you to map focus, meaning keypresses are sent \
directly to the map instead of the input. You will still be able to use the command bar, but you need to tab to do it every time you click on the game map.
\
@@ -2721,7 +2721,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
save_character()
if("tab")
- if (href_list["tab"])
+ if(href_list["tab"])
current_tab = text2num(href_list["tab"])
if(href_list["preference"] == "gear")
if(href_list["clear_loadout"])
diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm
index 2e1ffe718f..d198140c5f 100644
--- a/code/modules/mob/dead/new_player/preferences_setup.dm
+++ b/code/modules/mob/dead/new_player/preferences_setup.dm
@@ -27,7 +27,7 @@
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon(current_tab)
- var/equip_job = (current_tab != 2)
+ var/equip_job = (current_tab != APPEARANCE_TAB)
// Determine what job is marked as 'High' priority, and dress them up as such.
var/datum/job/previewJob = get_highest_job()
@@ -46,7 +46,7 @@
mannequin.add_overlay(mutable_appearance('modular_citadel/icons/ui/backgrounds.dmi', bgstate, layer = SPACE_LAYER))
copy_to(mannequin, initial_spawn = TRUE)
- if(current_tab == 3)
+ if(current_tab == LOADOUT_TAB)
//give it its loadout if not on the appearance tab
SSjob.equip_loadout(parent.mob, mannequin, FALSE, bypass_prereqs = TRUE, can_drop = FALSE)
else