Loadout QoL - used items always at the top (#15011)

Co-authored-by: DreamySkrell <>
This commit is contained in:
DreamySkrell
2022-11-06 12:17:46 +01:00
committed by GitHub
parent 454714d99d
commit 32b1da5ee4
2 changed files with 15 additions and 2 deletions

View File

@@ -178,7 +178,8 @@ var/list/gear_datums = list()
. += "<tr><td colspan=3><b><center>[LC.category]</center></b></td></tr>"
. += "<tr><td colspan=3><hr></td></tr>"
var/available_items_html = "" // to be added to the top/beginning of the list
var/ticked_items_html = "" // to be added to the top/beginning of the list
var/available_items_html = "" // to be added to the middle of the list
var/unavailable_items_html = "" // to be added to the end/bottom of the list
var/list/player_valid_gear_choices = valid_gear_choices()
@@ -246,11 +247,15 @@ var/list/gear_datums = list()
for(var/datum/gear_tweak/tweak in G.gear_tweaks)
temp_html += " <a href='?src=\ref[src];gear=[G.display_name];tweak=\ref[tweak]'>[tweak.get_contents(get_tweak_metadata(G, tweak))]</a>"
temp_html += "</td></tr>"
if(!available)
if(ticked)
ticked_items_html += temp_html
else if(!available)
available_items_html += temp_html
else
unavailable_items_html += temp_html
. += ticked_items_html
. += unavailable_items_html
. += available_items_html
. += "</table>"