mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Turns Auto-Accent into a by-character Preference
Required SQL Change: ALTER TABLE `characters` ADD `autohiss` TINYINT(1) NOT NULL AFTER `gear`; Ingame changing of auto-accent level is no different. This peference can be different on each of your characters.
This commit is contained in:
@@ -147,6 +147,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/alt_head = "None" //Alt head style.
|
||||
var/species = "Human"
|
||||
var/language = "None" //Secondary language
|
||||
var/autohiss_mode = AUTOHISS_OFF //Species autohiss level. OFF, BASIC, FULL.
|
||||
|
||||
var/body_accessory = null
|
||||
|
||||
@@ -289,6 +290,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(species == "Grey")
|
||||
dat += "<b>Voice:</b> <a href ='?_src_=prefs;preference=speciesprefs;task=input'>[speciesprefs ? "Wingdings" : "Normal"]</a><BR>"
|
||||
dat += "<b>Secondary Language:</b> <a href='?_src_=prefs;preference=language;task=input'>[language]</a><br>"
|
||||
if(species in list("Unathi", "Tajaran", "Plasmaman", "Kidan"))
|
||||
dat += "<b>Auto-accent:</b> <a href='?_src_=prefs;preference=autohiss_mode;task=input'>[autohiss_mode == 2 ? "Full" : (autohiss_mode == 1 ? "Basic" : "Off")]</a><br>"
|
||||
dat += "<b>Blood Type:</b> <a href='?_src_=prefs;preference=b_type;task=input'>[b_type]</a><br>"
|
||||
if(species in list("Human", "Drask", "Vox"))
|
||||
dat += "<b>Skin Tone:</b> <a href='?_src_=prefs;preference=s_tone;task=input'>[species == "Vox" ? "[s_tone]" : "[-s_tone + 35]/220"]</a><br>"
|
||||
@@ -1342,6 +1345,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
//Reset prosthetics.
|
||||
organ_data = list()
|
||||
rlimb_data = list()
|
||||
|
||||
if(!(species in list("Unathi", "Tajaran", "Plasmaman", "Kidan")))
|
||||
autohiss_mode = 0
|
||||
if("speciesprefs")
|
||||
speciesprefs = !speciesprefs //Starts 0, so if someone clicks the button up top there, this won't be 0 anymore. If they click it again, it'll go back to 0.
|
||||
if("language")
|
||||
@@ -1366,6 +1372,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
language = input("Please select a secondary language", "Character Generation", null) in new_languages
|
||||
|
||||
if("autohiss_mode")
|
||||
if(species in list("Unathi", "Tajaran", "Plasmaman", "Kidan"))
|
||||
var/list/autohiss_choice = list("Off" = 0, "Basic" = 1, "Full" = 2)
|
||||
var/new_autohiss_pref = input(user, "Choose your character's auto-accent level:", "Character Preference") as null|anything in autohiss_choice
|
||||
autohiss_mode = autohiss_choice[new_autohiss_pref]
|
||||
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
|
||||
@@ -175,7 +175,8 @@
|
||||
speciesprefs,
|
||||
socks,
|
||||
body_accessory,
|
||||
gear
|
||||
gear,
|
||||
autohiss
|
||||
FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' AND slot='[slot]'"})
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
@@ -268,6 +269,7 @@
|
||||
socks = query.item[63]
|
||||
body_accessory = query.item[64]
|
||||
gear = params2list(query.item[65])
|
||||
autohiss_mode = text2num(query.item[66])
|
||||
|
||||
//Sanitize
|
||||
var/datum/species/SP = all_species[species]
|
||||
@@ -315,6 +317,7 @@
|
||||
undershirt = sanitize_text(undershirt, initial(undershirt))
|
||||
backbag = sanitize_text(backbag, initial(backbag))
|
||||
b_type = sanitize_text(b_type, initial(b_type))
|
||||
autohiss_mode = sanitize_integer(autohiss_mode, 0, 2, initial(autohiss_mode))
|
||||
|
||||
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))
|
||||
job_support_high = sanitize_integer(job_support_high, 0, 65535, initial(job_support_high))
|
||||
@@ -427,7 +430,8 @@
|
||||
speciesprefs='[speciesprefs]',
|
||||
socks='[socks]',
|
||||
body_accessory='[body_accessory]',
|
||||
gear='[gearlist]'
|
||||
gear='[gearlist]',
|
||||
autohiss='[autohiss_mode]'
|
||||
WHERE ckey='[C.ckey]'
|
||||
AND slot='[default_slot]'"}
|
||||
)
|
||||
@@ -467,7 +471,7 @@
|
||||
gen_record,
|
||||
player_alt_titles,
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, speciesprefs,
|
||||
socks, body_accessory, gear)
|
||||
socks, body_accessory, gear, autohiss)
|
||||
|
||||
VALUES
|
||||
('[C.ckey]', '[default_slot]', '[sanitizeSQL(metadata)]', '[sanitizeSQL(real_name)]', '[be_random_name]','[gender]',
|
||||
@@ -497,7 +501,7 @@
|
||||
'[sanitizeSQL(gen_record)]',
|
||||
'[playertitlelist]',
|
||||
'[disabilities]', '[organlist]', '[rlimblist]', '[nanotrasen_relation]', '[speciesprefs]',
|
||||
'[socks]', '[body_accessory]', '[gearlist]')
|
||||
'[socks]', '[body_accessory]', '[gearlist]', '[autohiss_mode]')
|
||||
|
||||
"}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user