mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 11:38:12 +01:00
Character Setup Rework (#17576)
* Character Setup Rework Little tweaks Species selection done~ Merk randomize body button Body color and eye color Merk more replaced code Convert robolimbs to tgui Add a warning if flavor text/ooc notes are too short Custom preview icons for species selector! A sidequest that only took 8 hours. Also add digitigrade and blood type. Remove unused body_descriptor system completely Finish the general tab~ Reorganization to prepare for loadout page creation * Start of work on the loadout screen * Only send the data that's actually selected * Get rid of these ugly ../../../.. * Retype this to avoid conflicts * Holy shit why did this work this way * Finish loadout screen * Add copy loadout function * Finish occupation page * Move Special Roles into general tab * Fix path conflict * Move size prefs to general tab * Convert jukebox and volume settings to datum/preference * Fix a little mergery fuckery in loadout * Migrate jukebox to new range * Fix TabbedMenu tabs * Fix wordwrap for loadout screen * Kill the vore tab, just traits left to convert * Convert custom messages * Convert custom species name * Convert blood color and reagents * Move icobase to tgui * Finished * This can fuck off too * Fix a few bugs * Update index.tsx * initial for emote sound mode switch * Make show_roles actually work, hide fluff items * Fix not being able to select species * Add emote_sound_mode to body tab * Fix runtime when no active gear list is present * Add a save notification to character setup * Switch to floating * Add more search bars * Whoops forgot to add this --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
44d1ce470e
commit
31e8e009db
@@ -0,0 +1,90 @@
|
||||
/datum/preference_middleware/bay_adapter
|
||||
key = "legacy"
|
||||
|
||||
/datum/preference_middleware/bay_adapter/get_ui_data(mob/user)
|
||||
var/list/data = ..()
|
||||
|
||||
if(preferences.current_window != PREFERENCE_TAB_CHARACTER_PREFERENCES)
|
||||
return data
|
||||
|
||||
var/list/legacy = list()
|
||||
if(preferences.player_setup.selected_category)
|
||||
for(var/datum/category_item/player_setup_item/item as anything in preferences.player_setup.selected_category.items)
|
||||
legacy += item.tgui_data(user)
|
||||
data["selected_category"] = list(
|
||||
"name" = preferences.player_setup.selected_category.name,
|
||||
"items" = legacy,
|
||||
)
|
||||
|
||||
data["preview_loadout"] = preferences.equip_preview_mob & EQUIP_PREVIEW_LOADOUT
|
||||
data["preview_job_gear"] = preferences.equip_preview_mob & EQUIP_PREVIEW_JOB
|
||||
data["preview_animations"] = preferences.animations_toggle
|
||||
|
||||
return data
|
||||
|
||||
/datum/preference_middleware/bay_adapter/get_ui_static_data(mob/user)
|
||||
var/list/data = ..()
|
||||
|
||||
if(preferences.current_window != PREFERENCE_TAB_CHARACTER_PREFERENCES)
|
||||
return data
|
||||
|
||||
var/list/categories_data = list()
|
||||
for(var/datum/category_group/player_setup_category/category as anything in preferences.player_setup.categories)
|
||||
UNTYPED_LIST_ADD(categories_data, category.name)
|
||||
data["categories"] = categories_data
|
||||
|
||||
var/list/legacy = list()
|
||||
if(preferences.player_setup.selected_category)
|
||||
var/list/items = preferences.player_setup.selected_category.items
|
||||
for(var/datum/category_item/player_setup_item/item as anything in items)
|
||||
legacy += item.tgui_static_data(user)
|
||||
data["selected_category_static"] = legacy
|
||||
|
||||
return data
|
||||
|
||||
/datum/preference_middleware/bay_adapter/get_constant_data()
|
||||
var/list/data = list()
|
||||
|
||||
var/datum/category_collection/player_setup_collection/collection = new()
|
||||
|
||||
var/list/categories = collection.categories
|
||||
for(var/datum/category_group/player_setup_category/category as anything in categories)
|
||||
for(var/datum/category_item/player_setup_item/item as anything in category.items)
|
||||
data += item.tgui_constant_data()
|
||||
|
||||
return data
|
||||
|
||||
/datum/category_item/player_setup_item/proc/tgui_constant_data()
|
||||
return list()
|
||||
|
||||
|
||||
/datum/preference_middleware/bay_adapter/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("cycle_background")
|
||||
preferences.bgstate = next_in_list(preferences.bgstate, preferences.bgstate_options)
|
||||
preferences.update_preview_icon()
|
||||
return TRUE
|
||||
if("toggle_preview_loadout")
|
||||
preferences.equip_preview_mob ^= EQUIP_PREVIEW_LOADOUT
|
||||
preferences.update_preview_icon()
|
||||
return TRUE
|
||||
if("toggle_preview_job_gear")
|
||||
preferences.equip_preview_mob ^= EQUIP_PREVIEW_JOB
|
||||
preferences.update_preview_icon()
|
||||
return TRUE
|
||||
if("toggle_preview_animations")
|
||||
preferences.animations_toggle = !preferences.animations_toggle
|
||||
preferences.update_preview_icon()
|
||||
return TRUE
|
||||
|
||||
for(var/datum/category_group/player_setup_category/category as anything in preferences.player_setup.categories)
|
||||
for(var/datum/category_item/player_setup_item/item as anything in category.items)
|
||||
. = item.tgui_act(action, params, ui, state)
|
||||
if(.)
|
||||
if(. & TOPIC_UPDATE_PREVIEW)
|
||||
preferences.update_preview_icon()
|
||||
return
|
||||
Reference in New Issue
Block a user