Merge pull request #14506 from timothyteakettle/loadout-tab-defines
fixes character previews but does it using defines (thanks zero)
This commit is contained in:
@@ -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("<center>")
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=0' [current_tab == 0 ? "class='linkOn'" : ""]>Character Settings</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=2' [current_tab == 2 ? "class='linkOn'" : ""]>Character Appearance</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=3' [current_tab == 3 ? "class='linkOn'" : ""]>Character Speech</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=4' [current_tab == 4 ? "class='linkOn'" : ""]>Loadout</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>Game Preferences</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=5' [current_tab == 5 ? "class='linkOn'" : ""]>Content Preferences</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=6' [current_tab == 6 ? "class='linkOn'" : ""]>Keybindings</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[SETTINGS_TAB]' [current_tab == SETTINGS_TAB ? "class='linkOn'" : ""]>Character Settings</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[APPEARANCE_TAB]' [current_tab == APPEARANCE_TAB ? "class='linkOn'" : ""]>Character Appearance</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[SPEECH_TAB]' [current_tab == SPEECH_TAB ? "class='linkOn'" : ""]>Character Speech</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[LOADOUT_TAB]' [current_tab == LOADOUT_TAB ? "class='linkOn'" : ""]>Loadout</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[GAME_PREFERENCES_TAB]' [current_tab == GAME_PREFERENCES_TAB ? "class='linkOn'" : ""]>Game Preferences</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[CONTENT_PREFERENCES_TAB]' [current_tab == CONTENT_PREFERENCES_TAB ? "class='linkOn'" : ""]>Content Preferences</a>"
|
||||
dat += "<a href='?_src_=prefs;preference=tab;tab=[KEYBINDINGS_TAB]' [current_tab == KEYBINDINGS_TAB ? "class='linkOn'" : ""]>Keybindings</a>"
|
||||
|
||||
if(!path)
|
||||
dat += "<div class='notice'>Please create an account to save your preferences</div>"
|
||||
@@ -290,7 +290,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<HR>"
|
||||
|
||||
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 += "</tr></table>"
|
||||
|
||||
//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 += "</td>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
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 += "</td>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
if (1) // Game Preferences
|
||||
if(GAME_PREFERENCES_TAB) // Game Preferences
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>General Settings</h2>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;task=input;preference=ui'>[UI_style]</a><br>"
|
||||
@@ -871,7 +871,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
|
||||
dat += "<br>"
|
||||
|
||||
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 += "</td><td><font size=2><i>[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]</i></font></td></tr>"
|
||||
|
||||
dat += "</table>"
|
||||
if(5) // Content preferences
|
||||
if(CONTENT_PREFERENCES_TAB) // Content preferences
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>Fetish content prefs</h2>"
|
||||
dat += "<b>Arousal:</b><a href='?_src_=prefs;preference=arousable'>[arousable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
|
||||
@@ -1014,7 +1014,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
dat += "<b>Automatic Wagging:</b> <a href='?_src_=prefs;preference=auto_wag'>[(cit_toggles & NO_AUTO_WAG) ? "Disabled" : "Enabled"]</a><br>"
|
||||
dat += "</tr></table>"
|
||||
dat += "<br>"
|
||||
if(6) // Custom keybindings
|
||||
if(KEYBINDINGS_TAB) // Custom keybindings
|
||||
dat += "<b>Keybindings:</b> <a href='?_src_=prefs;preference=hotkeys'>[(hotkeys) ? "Hotkeys" : "Input"]</a><br>"
|
||||
dat += "Keybindings mode controls how the game behaves with tab and map/input focus.<br>If it is on <b>Hotkeys</b>, 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.<br>\
|
||||
@@ -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"])
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user