mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-06 06:10:03 +00:00
* 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>
40 lines
1.5 KiB
Plaintext
40 lines
1.5 KiB
Plaintext
// Define a place to save in character setup
|
|
/datum/preferences
|
|
var/persistence_settings = PERSIST_DEFAULT // Control what if anything is persisted for this character between rounds.
|
|
|
|
// Definition of the stuff for Sizing
|
|
/datum/category_item/player_setup_item/general/persistence
|
|
name = "Persistence"
|
|
sort_order = 10
|
|
|
|
/datum/category_item/player_setup_item/general/persistence/load_character(list/save_data)
|
|
pref.persistence_settings = save_data["persistence_settings"]
|
|
sanitize_character() // Don't let new characters start off with nulls
|
|
|
|
/datum/category_item/player_setup_item/general/persistence/save_character(list/save_data)
|
|
save_data["persistence_settings"] = pref.persistence_settings
|
|
|
|
/datum/category_item/player_setup_item/general/persistence/sanitize_character()
|
|
pref.persistence_settings = sanitize_integer(pref.persistence_settings, 0, (1<<(PERSIST_COUNT+1)-1), initial(pref.persistence_settings))
|
|
|
|
/datum/category_item/player_setup_item/general/persistence/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
|
|
var/list/data = ..()
|
|
|
|
data["persistence_settings"] = pref.persistence_settings
|
|
|
|
return data
|
|
|
|
/datum/category_item/player_setup_item/general/persistence/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
switch(action)
|
|
if("toggle_persist")
|
|
var/bit = text2num(params["bit"])
|
|
if(pref.persistence_settings & bit)
|
|
pref.persistence_settings &= ~bit
|
|
else
|
|
pref.persistence_settings |= bit
|
|
return TOPIC_REFRESH
|