Remove many incorrect uses of usr (#8296)

This commit is contained in:
Raeschen
2024-04-25 16:33:15 +02:00
committed by GitHub
parent 4436ea38d3
commit 8d04b28ec2
22 changed files with 250 additions and 247 deletions
@@ -142,7 +142,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")) //ChompEDIT - usr removal
if(nick_choice == "Yes")
pref.nickname = null
return TOPIC_REFRESH
@@ -229,30 +229,30 @@
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.metadata), 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.metadata), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(new_metadata && CanUseTopic(user))
pref.metadata = 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.metadata_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.metadata_likes), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(new_metadata && CanUseTopic(user))
if(new_metadata == "!clear")
new_metadata = ""
pref.metadata_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.metadata_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.metadata_dislikes), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(new_metadata && CanUseTopic(user))
if(new_metadata == "!clear")
new_metadata = ""
pref.metadata_dislikes = new_metadata
//CHOMPEdit Start
else if(href_list["edit_ooc_note_favs"])
var/new_metadata = strip_html_simple(tgui_input_text(usr, "Enter any information you'd like others to see relating to your FAVOURITE 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.metadata_favs), 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 FAVOURITE 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.metadata_favs), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(new_metadata && CanUseTopic(user))
if(new_metadata == "!clear")
new_metadata = ""
pref.metadata_favs = new_metadata
else if(href_list["edit_ooc_note_maybes"])
var/new_metadata = strip_html_simple(tgui_input_text(usr, "Enter any information you'd like others to see relating to your MAYBE 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.metadata_maybes), 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 MAYBE 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.metadata_maybes), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(new_metadata && CanUseTopic(user))
if(new_metadata == "!clear")
new_metadata = ""
@@ -120,7 +120,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")) //ChompEDIT - usr removal
if(choice != "Cancel" && pref.alternate_languages.len < (S.num_alternate_languages + pref.extra_languages))
pref.alternate_languages |= new_lang
return TOPIC_REFRESH
@@ -129,7 +129,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") //ChompEDIT - usr removal
if(char)
if(length(char) > 1)
tgui_alert_async(user, "Only single characters allowed.", "Error")
@@ -698,7 +698,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) //ChompEDIT - usr removal
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
@@ -711,7 +711,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) //ChompEDIT - usr removal
if(!choice) return
pref.species_preview = choice
SetSpecies(preference_mob())
@@ -719,7 +719,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_HANDLED
else if(href_list["disabilities_yw"])
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
else if(href_list["set_species"])
user << browse(null, "window=species")
@@ -1236,7 +1236,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["disabilities"])
var/disability_flag = text2num(href_list["disabilities"])
pref.disabilities ^= disability_flag
Disabilities_YW(usr) //YW Edit
Disabilities_YW(user) //YW Edit //ChompEDIT - usr removal
else if(href_list["toggle_preview_value"])
pref.equip_preview_mob ^= text2num(href_list["toggle_preview_value"])
@@ -1270,23 +1270,23 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["wingdings"])
pref.wingdings = !pref.wingdings
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
else if(href_list["colorblind_mono"])
pref.colorblind_mono = !pref.colorblind_mono
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
else if(href_list["colorblind_vulp"])
pref.colorblind_vulp = !pref.colorblind_vulp
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
else if(href_list["colorblind_taj"])
pref.colorblind_taj = !pref.colorblind_taj
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
else if(href_list["haemophilia"])
pref.haemophilia = !pref.haemophilia
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
else if(href_list["reset_disabilities"])
pref.wingdings = 0
@@ -1294,7 +1294,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.colorblind_taj = 0
pref.colorblind_vulp = 0
pref.haemophilia = 0
Disabilities_YW(usr)
Disabilities_YW(user) //ChompEDIT - usr removal
//YW Add End
@@ -1433,7 +1433,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") //ChompEDIT usr -> user
dat += "<img src='species_preview_[current_species.name].png' width='64px' height='64px'><br/><br/>"
dat += "<b>Language:</b> [current_species.species_language]<br/>"
dat += "<small>"
@@ -170,7 +170,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)) //ChompEDIT - usr removal
if(new_metadata)
set_metadata(underwear, gt, new_metadata)
return TOPIC_REFRESH_UPDATE_PREVIEW
@@ -153,19 +153,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")) //ChompEDIT - usr removal
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")) //ChompEDIT - usr removal
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")) //ChompEDIT - usr removal
if(resetsec_choice == "Yes")
pref.sec_record = null
return TOPIC_REFRESH
@@ -69,11 +69,11 @@
switch(href_list["flavor_text"])
if("open")
if("general")
var/msg = strip_html_simple(tgui_input_text(usr,"Give a general description of your character. This will be shown regardless of clothings. Put in a single space to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE)) //VOREStation Edit: separating out OOC notes
var/msg = strip_html_simple(tgui_input_text(user,"Give a general description of your character. This will be shown regardless of clothings. Put in a single space to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE)) //VOREStation Edit: separating out OOC notes //ChompEDIT - usr removal
if(CanUseTopic(user) && msg)
pref.flavor_texts[href_list["flavor_text"]] = msg
else
var/msg = strip_html_simple(tgui_input_text(usr,"Set the flavor text for your [href_list["flavor_text"]]. Put in a single space to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE))
var/msg = strip_html_simple(tgui_input_text(user,"Set the flavor text for your [href_list["flavor_text"]]. Put in a single space to make blank.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(CanUseTopic(user) && msg)
pref.flavor_texts[href_list["flavor_text"]] = msg
SetFlavorText(user)
@@ -83,23 +83,23 @@
switch(href_list["flavour_text_robot"])
if("open")
if("Default")
var/msg = strip_html_simple(tgui_input_text(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting. Put in a single space to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE, prevent_enter = TRUE))
var/msg = strip_html_simple(tgui_input_text(user,"Set the default flavour text for your robot. It will be used for any module without individual setting. Put in a single space to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(CanUseTopic(user) && msg)
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
else
var/msg = strip_html_simple(tgui_input_text(usr,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this blank, default flavour text will be used for this module. Put in a single space to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE, prevent_enter = TRUE))
var/msg = strip_html_simple(tgui_input_text(user,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this blank, default flavour text will be used for this module. Put in a single space to make blank.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(CanUseTopic(user) && msg)
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
SetFlavourTextRobot(user)
return TOPIC_HANDLED
else if(href_list["custom_link"])
var/new_link = strip_html_simple(tgui_input_text(usr, "Enter a link to add on to your examine text! This should be a related image link/gallery, or things like your F-list. This is not the place for memes.", "Custom Link" , html_decode(pref.custom_link), max_length = 100, encode = TRUE, prevent_enter = TRUE))
if(new_link && CanUseTopic(usr))
var/new_link = strip_html_simple(tgui_input_text(user, "Enter a link to add on to your examine text! This should be a related image link/gallery, or things like your F-list. This is not the place for memes.", "Custom Link" , html_decode(pref.custom_link), max_length = 100, encode = TRUE, prevent_enter = TRUE)) //ChompEDIT - usr removal
if(new_link && CanUseTopic(user)) //ChompEDIT - usr removal
if(length(new_link) > 100)
to_chat(usr, "<span class = 'warning'>Your entry is too long, it must be 100 characters or less.</span>")
to_chat(user, "<span class = 'warning'>Your entry is too long, it must be 100 characters or less.</span>") //ChompEDIT - usr removal
return
pref.custom_link = new_link
log_admin("[usr]/[usr.ckey] set their custom link to [pref.custom_link]")
log_admin("[user]/[user.ckey] set their custom link to [pref.custom_link]") //ChompEDIT - usr removal
return ..()