mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +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
@@ -13,6 +13,7 @@ var/list/preferences_datums = list()
|
||||
var/muted = 0
|
||||
var/last_ip
|
||||
var/last_id
|
||||
var/saved_notification = FALSE
|
||||
|
||||
//game-preferences
|
||||
var/be_special = 0 //Special role selection
|
||||
@@ -36,7 +37,6 @@ var/list/preferences_datums = list()
|
||||
var/list/alternate_languages = list() //Secondary language(s)
|
||||
var/list/language_prefixes = list() //Language prefix keys
|
||||
var/list/language_custom_keys = list() //Language custom call keys
|
||||
var/list/gear //Left in for Legacy reasons, will no longer save.
|
||||
var/list/gear_list = list() //Custom/fluff item loadouts.
|
||||
var/gear_slot = 1 //The current gear save slot
|
||||
var/list/traits //Traits which modifier characters for better or worse (mostly worse).
|
||||
@@ -61,7 +61,8 @@ var/list/preferences_datums = list()
|
||||
"4" = "character_preview_map:2,3",
|
||||
"8" = "character_preview_map:2,1",
|
||||
"BG" = "character_preview_map:1,1 to 3,8",
|
||||
"PMH" = "character_preview_map:2,7"
|
||||
"PMH" = "character_preview_map:2,7",
|
||||
"PMHjiggle" = "character_preview_map:102,7:107",
|
||||
)
|
||||
|
||||
//Jobs, uses bitflags
|
||||
@@ -97,8 +98,6 @@ var/list/preferences_datums = list()
|
||||
var/list/flavour_texts_robot = list()
|
||||
var/custom_link = null
|
||||
|
||||
var/list/body_descriptors = list()
|
||||
|
||||
var/med_record = ""
|
||||
var/sec_record = ""
|
||||
var/gen_record = ""
|
||||
@@ -128,8 +127,6 @@ var/list/preferences_datums = list()
|
||||
// WE JUST HAVE NOWHERE ELSE TO STORE IT
|
||||
var/list/action_button_screen_locs
|
||||
|
||||
var/list/volume_channels = list()
|
||||
|
||||
///If they are currently in the process of swapping slots, don't let them open 999 windows for it and get confused
|
||||
var/selecting_slots = FALSE
|
||||
|
||||
@@ -153,7 +150,6 @@ var/list/preferences_datums = list()
|
||||
load_savefile()
|
||||
|
||||
// Legacy code
|
||||
gear = list()
|
||||
gear_list = list()
|
||||
gear_slot = 1
|
||||
// End legacy code
|
||||
@@ -194,31 +190,9 @@ var/list/preferences_datums = list()
|
||||
update_preview_icon()
|
||||
show_character_previews()
|
||||
|
||||
var/dat = "<html><body><center>"
|
||||
|
||||
if(path)
|
||||
dat += "Slot - "
|
||||
dat += "<a href='byond://?src=\ref[src];load=1'>Load slot</a> - "
|
||||
dat += "<a href='byond://?src=\ref[src];save=1'>Save slot</a> - "
|
||||
dat += "<a href='byond://?src=\ref[src];reload=1'>Reload slot</a> - "
|
||||
dat += "<a href='byond://?src=\ref[src];resetslot=1'>Reset slot</a> - "
|
||||
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy slot</a>"
|
||||
|
||||
else
|
||||
dat += "Please create an account to save your preferences."
|
||||
|
||||
dat += "<br>"
|
||||
dat += player_setup.header()
|
||||
dat += "<br><HR></center>"
|
||||
dat += player_setup.content(user)
|
||||
|
||||
dat += "</body></html>"
|
||||
//user << browse(dat, "window=preferences;size=635x736")
|
||||
winshow(user, "preferences_window", TRUE)
|
||||
var/datum/browser/popup = new(user, "preferences_browser", "Character Setup", 800, 800)
|
||||
popup.set_content(dat)
|
||||
popup.open(FALSE) // Skip registring onclose on the browser pane
|
||||
onclose(user, "preferences_window", src) // We want to register on the window itself
|
||||
current_window = PREFERENCE_TAB_CHARACTER_PREFERENCES
|
||||
update_tgui_static_data(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/datum/preferences/proc/update_character_previews(var/mob/living/carbon/human/mannequin)
|
||||
if(!client)
|
||||
@@ -351,10 +325,6 @@ var/list/preferences_datums = list()
|
||||
character.update_underwear()
|
||||
character.update_hair()
|
||||
|
||||
if(LAZYLEN(character.descriptors))
|
||||
for(var/entry in body_descriptors)
|
||||
character.descriptors[entry] = body_descriptors[entry]
|
||||
|
||||
/datum/preferences/proc/open_load_dialog(mob/user)
|
||||
if(selecting_slots)
|
||||
to_chat(user, span_warning("You already have a slot selection dialog open!"))
|
||||
@@ -583,22 +553,6 @@ var/list/preferences_datums = list()
|
||||
O.markings[M] = list("color" = body_markings[M][BP]["color"], "datum" = mark_datum, "priority" = priority, "on" = body_markings[M][BP]["on"])
|
||||
character.markings_len = priority
|
||||
|
||||
var/list/last_descriptors = list()
|
||||
if(islist(body_descriptors))
|
||||
last_descriptors = body_descriptors.Copy()
|
||||
body_descriptors = list()
|
||||
|
||||
var/datum/species/mob_species = GLOB.all_species[species]
|
||||
if(LAZYLEN(mob_species.descriptors))
|
||||
for(var/entry in mob_species.descriptors)
|
||||
var/datum/mob_descriptor/descriptor = mob_species.descriptors[entry]
|
||||
if(istype(descriptor))
|
||||
if(isnull(last_descriptors[entry]))
|
||||
body_descriptors[entry] = descriptor.default_value // Species datums have initial default value.
|
||||
else
|
||||
body_descriptors[entry] = CLAMP(last_descriptors[entry], 1, LAZYLEN(descriptor.standalone_value_descriptors))
|
||||
character.descriptors = body_descriptors
|
||||
|
||||
if (copy_flavour)
|
||||
character.flavor_texts["general"] = flavor_texts["general"]
|
||||
character.flavor_texts["head"] = flavor_texts["head"]
|
||||
|
||||
Reference in New Issue
Block a user