Files
ShadowLarkens 31e8e009db 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>
2025-05-25 03:20:51 +02:00

82 lines
2.6 KiB
Plaintext

var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf
//some autodetection here.
// Change these to 0 if the equivalent mode is disabled for whatever reason!
"traitor" = 0, // 0
"operative" = 0, // 1
"changeling" = 0, // 2
"wizard" = 0, // 3
"malf AI" = 0, // 4
"revolutionary" = 0, // 5
"alien candidate" = 0, // 6
"positronic brain" = 1, // 7
"cultist" = 0, // 8
"renegade" = 0, // 9
"ninja" = 0, // 10
"raider" = 0, // 11
"diona" = 0, // 12
"mutineer" = 0, // 13
"loyalist" = 0, // 14
"pAI candidate" = 1, // 15
//VOREStation Add
"lost drone" = 1, // 16
"maint pred" = 1, // 17
"maint lurker" = 1, // 18
"morph" = 1, // 19
"corgi" = 1, // 20
"cursed sword" = 1, // 21
"Ship Survivor" = 1, // 22
//VOREStation Add End
)
/datum/category_item/player_setup_item/general/candidacy
name = "Candidacy"
sort_order = 8
/datum/category_item/player_setup_item/general/candidacy/load_character(list/save_data)
pref.be_special = save_data["be_special"]
/datum/category_item/player_setup_item/general/candidacy/save_character(list/save_data)
save_data["be_special"] = pref.be_special
/datum/category_item/player_setup_item/general/candidacy/sanitize_character()
pref.be_special = sanitize_integer(pref.be_special, 0, 16777215, initial(pref.be_special)) //VOREStation Edit - 24 bits of support
/datum/category_item/player_setup_item/general/candidacy/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
. = ..()
if(.)
return
switch(action)
if("be_special")
var/num = text2num(params["be_special"])
pref.be_special ^= (1<<num)
return TOPIC_REFRESH
/datum/category_item/player_setup_item/general/candidacy/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
data["syndicate_ban"] = FALSE
if(jobban_isbanned(user, JOB_SYNDICATE))
data["syndicate_ban"] = TRUE
return
var/list/special_data = list()
var/n = 0
for(var/i in special_roles)
if(special_roles[i])
var/banned = FALSE
if(jobban_isbanned(user, i) || (i == "positronic brain" && jobban_isbanned(user, JOB_AI) && jobban_isbanned(user, JOB_CYBORG)) || (i == "pAI candidate" && jobban_isbanned(user, JOB_PAI)))
banned = TRUE
UNTYPED_LIST_ADD(special_data, list(
"idx" = n,
"name" = "Be [i]",
"selected" = pref.be_special & (1<<n),
"banned" = banned
))
n++
data["special_roles"] = special_data
return data