mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
[TGUI] Loadout (#27026)
* [TGUI] Loadout * Loadout Tweaks * Cleanup * Almost there * Allow to sort alphabetical * UX tweaks * Note and remove tweaks from scarf * Oh fuck * Ooops * Sorting features * Global search * Rebuild * Sure * Rebuildo and some review changes * TGUI REBUILDO! --------- Co-authored-by: ROdenFL <ROdenFL@yandex.ru> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -85,34 +85,6 @@
|
||||
active_character.gen_record = genmsg
|
||||
active_character.SetRecords(user)
|
||||
|
||||
if(href_list["preference"] == "gear")
|
||||
if(href_list["toggle_gear"])
|
||||
var/datum/gear/TG = GLOB.gear_datums[text2path(href_list["toggle_gear"])]
|
||||
if(TG && (TG.type in active_character.loadout_gear))
|
||||
active_character.loadout_gear -= TG.type
|
||||
else
|
||||
if(TG.donator_tier && user.client.donator_level < TG.donator_tier)
|
||||
to_chat(user, "<span class='warning'>That gear is only available at a higher donation tier than you are on.</span>")
|
||||
return
|
||||
build_loadout(TG)
|
||||
|
||||
else if(href_list["gear"] && href_list["tweak"]) // NYI
|
||||
var/datum/gear/gear = GLOB.gear_datums[text2path(href_list["gear"])]
|
||||
var/datum/gear_tweak/tweak = locate(href_list["tweak"])
|
||||
if(!tweak || !istype(gear) || !(tweak in gear.gear_tweaks))
|
||||
return
|
||||
var/metadata = tweak.get_metadata(user, active_character.get_tweak_metadata(gear, tweak))
|
||||
if(!metadata)
|
||||
return
|
||||
active_character.set_tweak_metadata(gear, tweak, metadata)
|
||||
else if(href_list["select_category"])
|
||||
gear_tab = href_list["select_category"]
|
||||
else if(href_list["clear_loadout"])
|
||||
active_character.loadout_gear.Cut()
|
||||
|
||||
ShowChoices(user)
|
||||
return
|
||||
|
||||
switch(href_list["task"])
|
||||
if("random")
|
||||
var/datum/robolimb/robohead
|
||||
@@ -698,6 +670,11 @@
|
||||
if(new_backbag)
|
||||
active_character.backbag = new_backbag
|
||||
|
||||
if("loadout")
|
||||
var/datum/ui_module/loadout/loadout = new()
|
||||
loadout.ui_interact(user)
|
||||
return FALSE
|
||||
|
||||
if("nt_relation")
|
||||
var/new_relation = tgui_input_list(user, "Choose your relation to NT. Note that this represents what others can find out about your character by researching your background, not what your character actually thinks.", "Character Preference", list("Loyal", "Supportive", "Neutral", "Skeptical", "Opposed"))
|
||||
if(new_relation)
|
||||
|
||||
Reference in New Issue
Block a user