mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
usr to user part two (#16884)
* usr to user part two * this can be null * A few edits - Gets rid of src. in a few places that were edited - Gets rid of a few //VORESTATION comments - Removes an unneeded sanity check in sizegun_vr - Gets rid of a mind boggling !usr check in mob.dm - Changes usr to user in sizegun_vr.dm --------- Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
co-authored by
Heroman3003
C.L.
parent
49135cc6d5
commit
7be621e7c3
@@ -100,7 +100,7 @@
|
||||
return TOPIC_NOACTION
|
||||
|
||||
else if(href_list["reset_nickname"])
|
||||
var/nick_choice = tgui_alert(usr, "Wipe your Nickname? This will completely remove any chosen nickname(s).","Wipe Nickname",list("Yes","No"))
|
||||
var/nick_choice = tgui_alert(user, "Wipe your Nickname? This will completely remove any chosen nickname(s).","Wipe Nickname",list("Yes","No"))
|
||||
if(nick_choice == "Yes")
|
||||
pref.nickname = null
|
||||
return TOPIC_REFRESH
|
||||
@@ -187,17 +187,17 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["edit_ooc_notes"])
|
||||
var/new_metadata = strip_html_simple(tgui_input_text(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently unless you click save in the Character Setup panel!", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes)), multiline = TRUE, prevent_enter = TRUE))
|
||||
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently unless you click save in the Character Setup panel!", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes)), multiline = TRUE, prevent_enter = TRUE))
|
||||
if(new_metadata && CanUseTopic(user))
|
||||
pref.update_preference_by_type(/datum/preference/text/living/ooc_notes, new_metadata)
|
||||
else if(href_list["edit_ooc_note_likes"])
|
||||
var/new_metadata = strip_html_simple(tgui_input_text(usr, "Enter any information you'd like others to see relating to your LIKED roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_likes)), multiline = TRUE, prevent_enter = TRUE))
|
||||
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see relating to your LIKED roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_likes)), multiline = TRUE, prevent_enter = TRUE))
|
||||
if(new_metadata && CanUseTopic(user))
|
||||
if(new_metadata == "!clear")
|
||||
new_metadata = ""
|
||||
pref.update_preference_by_type(/datum/preference/text/living/ooc_notes_likes, new_metadata)
|
||||
else if(href_list["edit_ooc_note_dislikes"])
|
||||
var/new_metadata = strip_html_simple(tgui_input_text(usr, "Enter any information you'd like others to see relating to your DISLIKED roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_dislikes)), multiline = TRUE, prevent_enter = TRUE))
|
||||
var/new_metadata = strip_html_simple(tgui_input_text(user, "Enter any information you'd like others to see relating to your DISLIKED roleplay preferences. This will not be saved permanently unless you click save in the Character Setup panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(pref.read_preference(/datum/preference/text/living/ooc_notes_dislikes)), multiline = TRUE, prevent_enter = TRUE))
|
||||
if(new_metadata && CanUseTopic(user))
|
||||
if(new_metadata == "!clear")
|
||||
new_metadata = ""
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
if(new_lang && pref.alternate_languages.len < (S.num_alternate_languages + pref.extra_languages))
|
||||
var/datum/language/chosen_lang = GLOB.all_languages[new_lang]
|
||||
if(istype(chosen_lang))
|
||||
var/choice = tgui_alert(usr, "[chosen_lang.desc]",chosen_lang.name, list("Take","Cancel"))
|
||||
var/choice = tgui_alert(user, "[chosen_lang.desc]",chosen_lang.name, list("Take","Cancel"))
|
||||
if(choice != "Cancel" && pref.alternate_languages.len < (S.num_alternate_languages + pref.extra_languages))
|
||||
pref.alternate_languages |= new_lang
|
||||
return TOPIC_REFRESH
|
||||
@@ -131,7 +131,7 @@
|
||||
var/char
|
||||
var/keys[0]
|
||||
do
|
||||
char = tgui_input_text(usr, "Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining")
|
||||
char = tgui_input_text(user, "Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining")
|
||||
if(char)
|
||||
if(length(char) > 1)
|
||||
tgui_alert_async(user, "Only single characters allowed.", "Error")
|
||||
|
||||
@@ -344,7 +344,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
var/key = pref.rlimb_data[name]
|
||||
if(!istext(key))
|
||||
log_debug("Bad rlimb_data for [key_name(pref.client)], [name] was set to [key]")
|
||||
to_chat(usr, span_warning("Error loading robot limb data for `[name]`, clearing pref."))
|
||||
to_chat(user, span_warning("Error loading robot limb data for `[name]`, clearing pref."))
|
||||
pref.rlimb_data -= name
|
||||
else
|
||||
R = LAZYACCESS(all_robolimbs, key)
|
||||
@@ -513,7 +513,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
var/desc_id = href_list["change_descriptor"]
|
||||
if(pref.body_descriptors[desc_id])
|
||||
var/datum/mob_descriptor/descriptor = mob_species.descriptors[desc_id]
|
||||
var/choice = tgui_input_list(usr, "Please select a descriptor.", "Descriptor", descriptor.chargen_value_descriptors)
|
||||
var/choice = tgui_input_list(user, "Please select a descriptor.", "Descriptor", descriptor.chargen_value_descriptors)
|
||||
if(choice && mob_species.descriptors[desc_id]) // Check in case they sneakily changed species.
|
||||
pref.body_descriptors[desc_id] = descriptor.chargen_value_descriptors[choice]
|
||||
return TOPIC_REFRESH
|
||||
@@ -526,7 +526,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
else if(href_list["show_species"])
|
||||
// Actual whitelist checks are handled elsewhere, this is just for accessing the preview window.
|
||||
var/choice = tgui_input_list(usr, "Which species would you like to look at?", "Species Choice", GLOB.playable_species)
|
||||
var/choice = tgui_input_list(user, "Which species would you like to look at?", "Species Choice", GLOB.playable_species)
|
||||
if(!choice) return
|
||||
pref.species_preview = choice
|
||||
SetSpecies(preference_mob())
|
||||
@@ -555,7 +555,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
pref.set_biological_gender(mob_species.genders[1])
|
||||
pref.custom_species = null //VOREStation Edit - This is cleared on species changes
|
||||
//grab one of the valid hair styles for the newly chosen species
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles()
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
|
||||
|
||||
if(valid_hairstyles.len)
|
||||
if(!(pref.h_style in valid_hairstyles))
|
||||
@@ -607,7 +607,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["hair_style"])
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles()
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
|
||||
|
||||
var/new_h_style = tgui_input_list(user, "Choose your character's hair style:", "Character Preference", valid_hairstyles, pref.h_style)
|
||||
if(new_h_style && CanUseTopic(user))
|
||||
@@ -624,7 +624,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
else if(href_list["hair_style_left"])
|
||||
var/H = href_list["hair_style_left"]
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles()
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
|
||||
var/start = valid_hairstyles.Find(H)
|
||||
|
||||
if(start != 1) //If we're not the beginning of the list, become the previous element.
|
||||
@@ -635,7 +635,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
else if(href_list["hair_style_right"])
|
||||
var/H = href_list["hair_style_right"]
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles()
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
|
||||
var/start = valid_hairstyles.Find(H)
|
||||
|
||||
if(start != valid_hairstyles.len) //If we're not the end of the list, become the next element.
|
||||
@@ -1193,7 +1193,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
//vorestation edit end
|
||||
dat += "<td width = 200 align='center'>"
|
||||
if("preview" in cached_icon_states(current_species.icobase))
|
||||
usr << browse_rsc(icon(current_species.icobase,"preview"), "species_preview_[current_species.name].png")
|
||||
user << browse_rsc(icon(current_species.icobase,"preview"), "species_preview_[current_species.name].png")
|
||||
dat += "<img src='species_preview_[current_species.name].png' width='64px' height='64px'><br/><br/>"
|
||||
dat += span_bold("Language:") + " [current_species.species_language]<br/>"
|
||||
dat += "<small>"
|
||||
|
||||
@@ -194,7 +194,7 @@ var/global/list/valid_ringtones = list(
|
||||
var/datum/gear_tweak/gt = locate(href_list["tweak"])
|
||||
if(!gt)
|
||||
return TOPIC_NOACTION
|
||||
var/new_metadata = gt.get_metadata(usr, get_metadata(underwear, gt))
|
||||
var/new_metadata = gt.get_metadata(user, get_metadata(underwear, gt))
|
||||
if(new_metadata)
|
||||
set_metadata(underwear, gt, new_metadata)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
@@ -152,19 +152,19 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_medrecord"])
|
||||
var/resetmed_choice = tgui_alert(usr, "Wipe your Medical Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No"))
|
||||
var/resetmed_choice = tgui_alert(user, "Wipe your Medical Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No"))
|
||||
if(resetmed_choice == "Yes")
|
||||
pref.med_record = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_emprecord"])
|
||||
var/resetemp_choice = tgui_alert(usr, "Wipe your Employment Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No"))
|
||||
var/resetemp_choice = tgui_alert(user, "Wipe your Employment Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No"))
|
||||
if(resetemp_choice == "Yes")
|
||||
pref.gen_record = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_secrecord"])
|
||||
var/resetsec_choice = tgui_alert(usr, "Wipe your Security Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No"))
|
||||
var/resetsec_choice = tgui_alert(user, "Wipe your Security Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No"))
|
||||
if(resetsec_choice == "Yes")
|
||||
pref.sec_record = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
var/datum/job/job = locate(href_list["select_alt_title"])
|
||||
if (job)
|
||||
var/choices = list(job.title) + job.alt_titles
|
||||
var/choice = tgui_input_list(usr, "Choose a title for [job.title].", "Choose Title", choices, pref.GetPlayerAltTitle(job))
|
||||
var/choice = tgui_input_list(user, "Choose a title for [job.title].", "Choose Title", choices, pref.GetPlayerAltTitle(job))
|
||||
if(choice && CanUseTopic(user))
|
||||
SetPlayerAltTitle(job, choice)
|
||||
return (pref.equip_preview_mob ? TOPIC_REFRESH_UPDATE_PREVIEW : TOPIC_REFRESH)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/datum/category_item/player_setup_item/volume_sliders/media/OnTopic(var/href, var/list/href_list, var/mob/user)
|
||||
if(href_list["change_media_volume"])
|
||||
if(CanUseTopic(user))
|
||||
var/value = tgui_input_number(usr, "Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100), 100, 0)
|
||||
var/value = tgui_input_number(user, "Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100), 100, 0)
|
||||
if(isnum(value))
|
||||
value = CLAMP(value, 0, 100)
|
||||
pref.media_volume = value/100.0
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
else if(href_list["voice_freq"])
|
||||
var/list/preset_voice_freqs = list("high" = MAX_VOICE_FREQ, "middle-high" = 56250, "middle" = 42500, "middle-low"= 28750, "low" = MIN_VOICE_FREQ, "custom" = 1, "random" = 0)
|
||||
var/choice = tgui_input_list(usr, "What would you like to set your voice frequency to? ([MIN_VOICE_FREQ] - [MAX_VOICE_FREQ])", "Voice Frequency", preset_voice_freqs)
|
||||
var/choice = tgui_input_list(user, "What would you like to set your voice frequency to? ([MIN_VOICE_FREQ] - [MAX_VOICE_FREQ])", "Voice Frequency", preset_voice_freqs)
|
||||
if(!choice)
|
||||
return
|
||||
choice = preset_voice_freqs[choice]
|
||||
@@ -173,14 +173,14 @@
|
||||
"goon speak pugg",
|
||||
"goon speak roach",
|
||||
"goon speak skelly")
|
||||
var/choice = tgui_input_list(usr, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types)
|
||||
var/choice = tgui_input_list(user, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types)
|
||||
if(!choice)
|
||||
pref.voice_sound = "beep-boop"
|
||||
else
|
||||
pref.voice_sound = choice
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["customize_speech_bubble"])
|
||||
var/choice = tgui_input_list(usr, "What speech bubble style do you want to use? (default for automatic selection)", "Custom Speech Bubble", selectable_speech_bubbles)
|
||||
var/choice = tgui_input_list(user, "What speech bubble style do you want to use? (default for automatic selection)", "Custom Speech Bubble", selectable_speech_bubbles)
|
||||
if(!choice)
|
||||
pref.custom_speech_bubble = "default"
|
||||
else
|
||||
|
||||
@@ -361,13 +361,13 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
|
||||
else if(href_list["custom_base"])
|
||||
var/list/choices = pref.get_custom_bases_for_species()
|
||||
var/text_choice = tgui_input_list(usr, "Pick an icon set for your species:","Icon Base", choices)
|
||||
var/text_choice = tgui_input_list(user, "Pick an icon set for your species:","Icon Base", choices)
|
||||
if(text_choice in choices)
|
||||
pref.custom_base = text_choice
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["blood_color"])
|
||||
var/color_choice = input(usr, "Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) as color
|
||||
var/color_choice = input(user, "Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) as color
|
||||
if(color_choice)
|
||||
pref.blood_color = sanitize_hexcolor(color_choice, default="#A10808")
|
||||
return TOPIC_REFRESH
|
||||
@@ -375,7 +375,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
else if(href_list["blood_reset"])
|
||||
var/datum/species/spec = GLOB.all_species[pref.species]
|
||||
var/new_blood = spec.blood_color ? spec.blood_color : "#A10808"
|
||||
var/choice = tgui_alert(usr, "Reset blood color to species default ([new_blood])?","Reset Blood Color",list("Reset","Cancel"))
|
||||
var/choice = tgui_alert(user, "Reset blood color to species default ([new_blood])?","Reset Blood Color",list("Reset","Cancel"))
|
||||
if(choice == "Reset")
|
||||
pref.blood_color = new_blood
|
||||
return TOPIC_REFRESH
|
||||
@@ -388,7 +388,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
|
||||
else if(href_list["clicked_pos_trait"])
|
||||
var/datum/trait/trait = text2path(href_list["clicked_pos_trait"])
|
||||
var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel"))
|
||||
var/choice = tgui_alert(user, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel"))
|
||||
if(choice == "Remove")
|
||||
pref.pos_traits -= trait
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
@@ -397,7 +397,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
|
||||
else if(href_list["clicked_neu_trait"])
|
||||
var/datum/trait/trait = text2path(href_list["clicked_neu_trait"])
|
||||
var/choice = tgui_alert(usr, "Remove [initial(trait.name)]?","Remove Trait",list("Remove","Cancel"))
|
||||
var/choice = tgui_alert(user, "Remove [initial(trait.name)]?","Remove Trait",list("Remove","Cancel"))
|
||||
if(choice == "Remove")
|
||||
pref.neu_traits -= trait
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
@@ -406,7 +406,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
|
||||
else if(href_list["clicked_neg_trait"])
|
||||
var/datum/trait/trait = text2path(href_list["clicked_neg_trait"])
|
||||
var/choice = tgui_alert(usr, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel"))
|
||||
var/choice = tgui_alert(user, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel"))
|
||||
if(choice == "Remove")
|
||||
pref.neg_traits -= trait
|
||||
var/datum/trait/instance = all_traits[trait]
|
||||
@@ -419,25 +419,25 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_say"])
|
||||
var/say_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'says': [pref.real_name] says, \"Hi.\"", "Custom Say", pref.custom_say, 12), 12)
|
||||
var/say_choice = sanitize(tgui_input_text(user, "This word or phrase will appear instead of 'says': [pref.real_name] says, \"Hi.\"", "Custom Say", pref.custom_say, 12), 12)
|
||||
if(say_choice)
|
||||
pref.custom_say = say_choice
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_whisper"])
|
||||
var/whisper_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'whispers': [pref.real_name] whispers, \"Hi...\"", "Custom Whisper", pref.custom_whisper, 12), 12)
|
||||
var/whisper_choice = sanitize(tgui_input_text(user, "This word or phrase will appear instead of 'whispers': [pref.real_name] whispers, \"Hi...\"", "Custom Whisper", pref.custom_whisper, 12), 12)
|
||||
if(whisper_choice)
|
||||
pref.custom_whisper = whisper_choice
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_ask"])
|
||||
var/ask_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'asks': [pref.real_name] asks, \"Hi?\"", "Custom Ask", pref.custom_ask, 12), 12)
|
||||
var/ask_choice = sanitize(tgui_input_text(user, "This word or phrase will appear instead of 'asks': [pref.real_name] asks, \"Hi?\"", "Custom Ask", pref.custom_ask, 12), 12)
|
||||
if(ask_choice)
|
||||
pref.custom_ask = ask_choice
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["custom_exclaim"])
|
||||
var/exclaim_choice = sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [pref.real_name] exclaims, \"Hi!\"", "Custom Exclaim", pref.custom_exclaim, 12), 12)
|
||||
var/exclaim_choice = sanitize(tgui_input_text(user, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [pref.real_name] exclaims, \"Hi!\"", "Custom Exclaim", pref.custom_exclaim, 12), 12)
|
||||
if(exclaim_choice)
|
||||
pref.custom_exclaim = exclaim_choice
|
||||
return TOPIC_REFRESH
|
||||
@@ -445,7 +445,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
else if(href_list["custom_heat"])
|
||||
tgui_alert(user, "You are setting custom heat messages. These will overwrite your species' defaults. To return to defaults, click reset.")
|
||||
var/old_message = pref.custom_heat.Join("\n\n")
|
||||
var/new_message = sanitize(tgui_input_text(usr,"Use double enter between messages to enter a new one. Must be at least 3 characters long, 160 characters max and up to 10 messages are allowed.","Heat Discomfort messages",old_message, multiline= TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN,0,0,0)
|
||||
var/new_message = sanitize(tgui_input_text(user,"Use double enter between messages to enter a new one. Must be at least 3 characters long, 160 characters max and up to 10 messages are allowed.","Heat Discomfort messages",old_message, multiline= TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN,0,0,0)
|
||||
if(length(new_message) > 0)
|
||||
var/list/raw_list = splittext(new_message,"\n\n")
|
||||
if(raw_list.len > 10)
|
||||
@@ -462,7 +462,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
else if(href_list["custom_cold"])
|
||||
tgui_alert(user, "You are setting custom cold messages. These will overwrite your species' defaults. To return to defaults, click reset.")
|
||||
var/old_message = pref.custom_heat.Join("\n\n")
|
||||
var/new_message = sanitize(tgui_input_text(usr,"Use double enter between messages to enter a new one. Must be at least 3 characters long, 160 characters max and up to 10 messages are allowed.","Cold Discomfort messages",old_message, multiline= TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN,0,0,0)
|
||||
var/new_message = sanitize(tgui_input_text(user,"Use double enter between messages to enter a new one. Must be at least 3 characters long, 160 characters max and up to 10 messages are allowed.","Cold Discomfort messages",old_message, multiline= TRUE, prevent_enter = TRUE), MAX_MESSAGE_LEN,0,0,0)
|
||||
if(length(new_message) > 0)
|
||||
var/list/raw_list = splittext(new_message,"\n\n")
|
||||
if(raw_list.len > 10)
|
||||
@@ -477,37 +477,37 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_say"])
|
||||
var/say_choice = tgui_alert(usr, "Reset your Custom Say Verb?","Reset Verb",list("Yes","No"))
|
||||
var/say_choice = tgui_alert(user, "Reset your Custom Say Verb?","Reset Verb",list("Yes","No"))
|
||||
if(say_choice == "Yes")
|
||||
pref.custom_say = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_whisper"])
|
||||
var/whisper_choice = tgui_alert(usr, "Reset your Custom Whisper Verb?","Reset Verb",list("Yes","No"))
|
||||
var/whisper_choice = tgui_alert(user, "Reset your Custom Whisper Verb?","Reset Verb",list("Yes","No"))
|
||||
if(whisper_choice == "Yes")
|
||||
pref.custom_whisper = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_ask"])
|
||||
var/ask_choice = tgui_alert(usr, "Reset your Custom Ask Verb?","Reset Verb",list("Yes","No"))
|
||||
var/ask_choice = tgui_alert(user, "Reset your Custom Ask Verb?","Reset Verb",list("Yes","No"))
|
||||
if(ask_choice == "Yes")
|
||||
pref.custom_ask = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_exclaim"])
|
||||
var/exclaim_choice = tgui_alert(usr, "Reset your Custom Exclaim Verb?","Reset Verb",list("Yes","No"))
|
||||
var/exclaim_choice = tgui_alert(user, "Reset your Custom Exclaim Verb?","Reset Verb",list("Yes","No"))
|
||||
if(exclaim_choice == "Yes")
|
||||
pref.custom_exclaim = null
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_cold"])
|
||||
var/cold_choice = tgui_alert(usr, "Reset your Custom Cold Discomfort messages?", "Reset Discomfort",list("Yes","No"))
|
||||
var/cold_choice = tgui_alert(user, "Reset your Custom Cold Discomfort messages?", "Reset Discomfort",list("Yes","No"))
|
||||
if(cold_choice == "Yes")
|
||||
pref.custom_cold = list()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["reset_heat"])
|
||||
var/heat_choice = tgui_alert(usr, "Reset your Custom Heat Discomfort messages?", "Reset Discomfort",list("Yes","No"))
|
||||
var/heat_choice = tgui_alert(user, "Reset your Custom Heat Discomfort messages?", "Reset Discomfort",list("Yes","No"))
|
||||
if(heat_choice == "Yes")
|
||||
pref.custom_heat = list()
|
||||
return TOPIC_REFRESH
|
||||
@@ -572,12 +572,12 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
var/trait_choice
|
||||
var/done = FALSE
|
||||
while(!done)
|
||||
trait_choice = tgui_input_list(usr, message, title, nicelist)
|
||||
trait_choice = tgui_input_list(user, message, title, nicelist)
|
||||
if(!trait_choice)
|
||||
done = TRUE
|
||||
if(trait_choice in nicelist)
|
||||
var/datum/trait/path = nicelist[trait_choice]
|
||||
var/choice = tgui_alert(usr, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name), list("Take Trait","Go Back"))
|
||||
var/choice = tgui_alert(user, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name), list("Take Trait","Go Back"))
|
||||
if(choice == "Take Trait")
|
||||
done = TRUE
|
||||
|
||||
@@ -590,19 +590,19 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
var/conflict = FALSE
|
||||
|
||||
if(pref.dirty_synth && !(instance.can_take & SYNTHETICS))
|
||||
tgui_alert_async(usr, "The trait you've selected can only be taken by organic characters!", "Error")
|
||||
tgui_alert_async(user, "The trait you've selected can only be taken by organic characters!", "Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(pref.gross_meatbag && !(instance.can_take & ORGANICS))
|
||||
tgui_alert_async(usr, "The trait you've selected can only be taken by synthetic characters!", "Error")
|
||||
tgui_alert_async(user, "The trait you've selected can only be taken by synthetic characters!", "Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(pref.species in instance.banned_species)
|
||||
tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!", "Error")
|
||||
tgui_alert_async(user, "The trait you've selected cannot be taken by the species you've chosen!", "Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if( LAZYLEN(instance.allowed_species) && !(pref.species in instance.allowed_species))
|
||||
tgui_alert_async(usr, "The trait you've selected cannot be taken by the species you've chosen!", "Error")
|
||||
tgui_alert_async(user, "The trait you've selected cannot be taken by the species you've chosen!", "Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
if(trait_choice in pref.pos_traits + pref.neu_traits + pref.neg_traits)
|
||||
@@ -628,7 +628,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_
|
||||
break varconflict
|
||||
|
||||
if(conflict)
|
||||
tgui_alert_async(usr, "You cannot take this trait and [conflict] at the same time. Please remove that trait, or pick another trait to add.", "Error")
|
||||
tgui_alert_async(user, "You cannot take this trait and [conflict] at the same time. Please remove that trait, or pick another trait to add.", "Error")
|
||||
return TOPIC_REFRESH
|
||||
|
||||
instance.apply_pref(pref)
|
||||
|
||||
Reference in New Issue
Block a user