Skip to content

Commit

Permalink
add: selected tab for loadout (#4678)
Browse files Browse the repository at this point in the history
* bugfix: loadout day 0 update

* add: selected tab
  • Loading branch information
ROdenFL authored Mar 28, 2024
1 parent 9c67d07 commit 4f53a3f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code/modules/client/preference/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -611,18 +611,22 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
dat += "<tr><td colspan=4><center><b>"

var/firstcat = 1
for(var/category in GLOB.loadout_categories)
var/list/own_categories = GLOB.loadout_categories.Copy()
var/datum/loadout_category/choosen = new("Selected")
choosen.gear = choosen_gears
own_categories[choosen.category] = choosen
for(var/category in own_categories)
if(firstcat)
firstcat = 0
else
dat += " |"
if(category == gear_tab)
dat += " <span class='linkOff'>[category]</span> "
else
dat += " <a href='?_src_=prefs;preference=gear;select_category=[category]'>[category]</a> "
dat += " <a style=[category == choosen.category ? "'background: steelblue'" : "''"] href='?_src_=prefs;preference=gear;select_category=[category]'>[category]</a> "
dat += "</b></center></td></tr>"

var/datum/loadout_category/LC = GLOB.loadout_categories[gear_tab]
var/datum/loadout_category/LC = own_categories[gear_tab]
dat += "<tr><td colspan=4><b><center>[LC.category]</center></b></td></tr>"
for(var/gear_name in LC.gear)
var/datum/gear/G = LC.gear[gear_name]
Expand Down

0 comments on commit 4f53a3f

Please sign in to comment.