mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 23:23:28 +01:00
Adds PDA ringtone to character preferences (#27365)
* Adds PDA ringtone to character preferences * Two fixes * Reset option * Contra request * DB update * linter fix * SQL update * file rename --------- Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,8 @@
|
||||
physique,
|
||||
height,
|
||||
cyborg_brain_type,
|
||||
body_type
|
||||
body_type,
|
||||
pda_ringtone
|
||||
FROM characters WHERE ckey=:ckey"}, list(
|
||||
"ckey" = C.ckey
|
||||
))
|
||||
|
||||
@@ -108,6 +108,8 @@
|
||||
var/list/custom_emotes = list()
|
||||
/// Runechat color
|
||||
var/runechat_color = "#FFFFFF"
|
||||
/// The ringtone their PDA should start with
|
||||
var/pda_ringtone
|
||||
|
||||
// Fuckery to prevent null characters
|
||||
/datum/character_save/New()
|
||||
@@ -199,7 +201,8 @@
|
||||
custom_emotes=:custom_emotes,
|
||||
runechat_color=:runechat_color,
|
||||
cyborg_brain_type=:cyborg_brain_type,
|
||||
body_type=:body_type
|
||||
body_type=:body_type,
|
||||
pda_ringtone=:pda_ringtone
|
||||
WHERE ckey=:ckey
|
||||
AND slot=:slot"}, list(
|
||||
// OH GOD SO MANY PARAMETERS
|
||||
@@ -262,6 +265,7 @@
|
||||
"custom_emotes" = json_encode(custom_emotes),
|
||||
"runechat_color" = runechat_color,
|
||||
"cyborg_brain_type" = cyborg_brain_type,
|
||||
"pda_ringtone" = pda_ringtone,
|
||||
"ckey" = C.ckey,
|
||||
"slot" = slot_number
|
||||
))
|
||||
@@ -302,7 +306,7 @@
|
||||
player_alt_titles,
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, physique, height, speciesprefs,
|
||||
socks, body_accessory, gear, autohiss,
|
||||
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type)
|
||||
hair_gradient, hair_gradient_offset, hair_gradient_colour, hair_gradient_alpha, custom_emotes, runechat_color, cyborg_brain_type, body_type, pda_ringtone)
|
||||
VALUES
|
||||
(:ckey, :slot, :metadata, :name, :be_random_name, :gender,
|
||||
:age, :species, :language,
|
||||
@@ -329,7 +333,7 @@
|
||||
:playertitlelist,
|
||||
:disabilities, :organ_list, :rlimb_list, :nanotrasen_relation, :physique, :height, :speciesprefs,
|
||||
:socks, :body_accessory, :gearlist, :autohiss_mode,
|
||||
:h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type)
|
||||
:h_grad_style, :h_grad_offset, :h_grad_colour, :h_grad_alpha, :custom_emotes, :runechat_color, :cyborg_brain_type, :body_type, :pda_ringtone)
|
||||
"}, list(
|
||||
// This has too many params for anyone to look at this without going insae
|
||||
"ckey" = C.ckey,
|
||||
@@ -392,7 +396,8 @@
|
||||
"h_grad_alpha" = h_grad_alpha,
|
||||
"custom_emotes" = json_encode(custom_emotes),
|
||||
"runechat_color" = runechat_color,
|
||||
"cyborg_brain_type" = cyborg_brain_type
|
||||
"cyborg_brain_type" = cyborg_brain_type,
|
||||
"pda_ringtone" = pda_ringtone
|
||||
))
|
||||
|
||||
if(!query.warn_execute())
|
||||
@@ -487,6 +492,7 @@
|
||||
height = query.item[58]
|
||||
cyborg_brain_type = query.item[59]
|
||||
body_type = query.item[60]
|
||||
pda_ringtone = query.item[61]
|
||||
|
||||
//Sanitize
|
||||
var/datum/species/SP = GLOB.all_species[species]
|
||||
@@ -574,6 +580,7 @@
|
||||
custom_emotes = init_custom_emotes(custom_emotes_tmp)
|
||||
runechat_color = sanitize_hexcolor(runechat_color)
|
||||
cyborg_brain_type = sanitize_inlist(cyborg_brain_type, GLOB.borg_brain_choices, initial(cyborg_brain_type))
|
||||
pda_ringtone = sanitize_inlist(pda_ringtone, GLOB.pda_ringtone_choices, initial(pda_ringtone))
|
||||
if(!player_alt_titles)
|
||||
player_alt_titles = new()
|
||||
if(!organ_data)
|
||||
|
||||
@@ -853,6 +853,13 @@
|
||||
if(!(brain_type in GLOB.borg_brain_choices))
|
||||
return
|
||||
active_character.cyborg_brain_type = brain_type
|
||||
if("pda_ringtone")
|
||||
var/ringtone = tgui_input_list(user, "What type of ringtone would you like to have on your PDA?", "PDA Ringtones", list("Reset Default Ringtone") + GLOB.pda_ringtone_choices, active_character.pda_ringtone)
|
||||
if(!(ringtone in GLOB.pda_ringtone_choices))
|
||||
if(ringtone == "Reset Default Ringtone")
|
||||
active_character.pda_ringtone = null
|
||||
return
|
||||
active_character.pda_ringtone = ringtone
|
||||
if("clientfps")
|
||||
var/version_message
|
||||
if(user.client && user.client.byond_version < 511)
|
||||
|
||||
@@ -238,6 +238,7 @@ GLOBAL_LIST_INIT(special_role_times, list(
|
||||
dat += "<b>Physique:</b> <a href='byond://?_src_=prefs;preference=physique;task=input'>[active_character.physique]</a><br>"
|
||||
dat += "<b>Height:</b> <a href='byond://?_src_=prefs;preference=height;task=input'>[active_character.height]</a><br>"
|
||||
dat += "<b>Cyborg Brain Type:</b> <a href='byond://?_src_=prefs;preference=cyborg_brain_type;task=input'>[active_character.cyborg_brain_type]</a><br>"
|
||||
dat += "<b>PDA Ringtone:</b> <a href='byond://?_src_=prefs;preference=pda_ringtone;task=input'>[active_character.pda_ringtone]</a><br>"
|
||||
dat += "<a href='byond://?_src_=prefs;preference=flavor_text;task=input'>Set Flavor Text</a><br>"
|
||||
if(length(active_character.flavor_text) <= 40)
|
||||
if(!length(active_character.flavor_text))
|
||||
|
||||
Reference in New Issue
Block a user