diff --git a/archive/maps/gateway_archive_vr/wildwest.dm b/archive/maps/gateway_archive_vr/wildwest.dm index 9265e85fa0c..0a652dcc772 100644 --- a/archive/maps/gateway_archive_vr/wildwest.dm +++ b/archive/maps/gateway_archive_vr/wildwest.dm @@ -20,8 +20,8 @@ var/chargesa = 1 var/insistinga = 0 -/obj/machinery/wish_granter_dark/attack_hand(var/mob/living/carbon/human/user as mob) - usr.set_machine(src) +/obj/machinery/wish_granter_dark/attack_hand(var/mob/living/carbon/human/user) + user.set_machine(src) if(chargesa <= 0) to_chat(user, "The Wish Granter lies silent.") @@ -41,7 +41,7 @@ else chargesa-- insistinga = 0 - var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) + var/wish = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) switch(wish) if("Power") to_chat(user, span_boldwarning("Your wish is granted, but at a terrible cost...")) @@ -147,28 +147,27 @@ set category = "Immortality" set name = "Resurrection" - var/mob/living/carbon/C = usr - if(!C.stat) - to_chat(C, span_notice("You're not dead yet!")) - return - to_chat(C, span_notice("Death is not your end!")) + if(!stat) + to_chat(src, span_notice("You're not dead yet!")) + return FALSE + to_chat(src, span_notice("Death is not your end!")) spawn(rand(800,1200)) - if(C.stat == DEAD) - dead_mob_list -= C - living_mob_list += C - C.set_stat(CONSCIOUS) - C.tod = null - C.setToxLoss(0) - C.setOxyLoss(0) - C.setCloneLoss(0) - C.SetParalysis(0) - C.SetStunned(0) - C.SetWeakened(0) - C.radiation = 0 - C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss()) - C.reagents.clear_reagents() - to_chat(C, span_notice("You have regenerated.")) - C.visible_message(span_warning("[usr] appears to wake from the dead, having healed all wounds.")) - C.update_canmove() - return 1 + if(stat == DEAD) + dead_mob_list -= src + living_mob_list += src + set_stat(CONSCIOUS) + tod = null + setToxLoss(0) + setOxyLoss(0) + setCloneLoss(0) + SetParalysis(0) + SetStunned(0) + SetWeakened(0) + radiation = 0 + heal_overall_damage(getBruteLoss(), getFireLoss()) + reagents.clear_reagents() + to_chat(src, span_notice("You have regenerated.")) + visible_message(span_warning("[src] appears to wake from the dead, having healed all wounds.")) + update_canmove() + return TRUE diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 7859cf1a82a..ff1ab1ef563 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -53,7 +53,7 @@ else DD.vars[V] = D.vars[V] - log_admin("[key_name(usr)] has contracted the virus \"[DD]\"") + log_admin("[key_name(src)] has contracted the virus \"[DD]\"") /mob/living/carbon/ContractDisease(datum/disease/D) if(!CanContractDisease(D)) diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index aa3efca68dc..2ec08a92a6d 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -16,7 +16,7 @@ set category = "Special Verbs" if(M.client) if(M.client.buildmode) - log_admin("[key_name(usr)] has left build mode.") + log_admin("[key_name(M)] has left build mode.") M.client.buildmode = 0 M.client.show_popup_menus = 1 M.plane_holder.set_vis(VIS_BUILDMODE, FALSE) @@ -24,7 +24,7 @@ if(H.cl == M.client) qdel(H) else - log_admin("[key_name(usr)] has entered build mode.") + log_admin("[key_name(M)] has entered build mode.") M.client.buildmode = 1 M.client.show_popup_menus = 0 M.plane_holder.set_vis(VIS_BUILDMODE, TRUE) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 775a66af993..2a94edde18d 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -126,7 +126,7 @@ log_admin("[key_name(src)] has animalized [M.key].") spawn(10) - M.Animalize() + M.Animalize(usr) /client/proc/makepAI() diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 1e3b8117e9e..e6cec578360 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -2,14 +2,14 @@ set category = "IC.Game" set name = "Pray" - var/raw_msg = sanitize(tgui_input_text(usr, "Prayers are sent to staff but do not open tickets or go to Discord. If you have a technical difficulty or an event/spice idea/hook - please ahelp instead. Thank you!", "Pray", null, MAX_MESSAGE_LEN)) + var/raw_msg = sanitize(tgui_input_text(src, "Prayers are sent to staff but do not open tickets or go to Discord. If you have a technical difficulty or an event/spice idea/hook - please ahelp instead. Thank you!", "Pray", null, MAX_MESSAGE_LEN)) if(!raw_msg) return - if(usr.client) + if(src.client) if(raw_msg) client.handle_spam_prevention(MUTE_PRAY) - if(usr.client.prefs.muted & MUTE_PRAY) - to_chat(usr, span_red("You cannot pray (muted).")) + if(src.client.prefs.muted & MUTE_PRAY) + to_chat(src, span_red("You cannot pray (muted).")) return var/icon/cross = icon('icons/obj/storage.dmi',"bible") @@ -21,7 +21,7 @@ if(C.prefs?.read_preference(/datum/preference/toggle/show_chat_prayers)) to_chat(C, msg, type = MESSAGE_TYPE_PRAYER, confidential = TRUE) C << 'sound/effects/ding.ogg' - to_chat(usr, "Your prayers have been received by the gods.", confidential = TRUE) + to_chat(src, "Your prayers have been received by the gods.", confidential = TRUE) feedback_add_details("admin_verb","PR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_pray(raw_msg, src) diff --git a/code/modules/casino/casino.dm b/code/modules/casino/casino.dm index 75b82422023..a22bfdf028d 100644 --- a/code/modules/casino/casino.dm +++ b/code/modules/casino/casino.dm @@ -19,7 +19,7 @@ var/busy = 0 -/obj/structure/casino_table/attackby(obj/item/W as obj, mob/user as mob) +/obj/structure/casino_table/attackby(obj/item/W, mob/user) if(item_place) user.drop_item(src.loc) return @@ -44,7 +44,7 @@ else . += "It doesn't have a ball." -/obj/structure/casino_table/roulette_table/attack_hand(mob/user as mob) +/obj/structure/casino_table/roulette_table/attack_hand(mob/user) if(busy) to_chat(user,span_notice("You cannot spin now! The roulette is already spinning.")) return @@ -78,7 +78,7 @@ busy = 0 icon_state = initial(icon_state) -/obj/structure/casino_table/roulette_table/attackby(obj/item/W as obj, mob/user as mob) +/obj/structure/casino_table/roulette_table/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/roulette_ball)) if(!ball) user.drop_from_inventory(W) @@ -246,7 +246,7 @@ else icon_state = "roulette_ball_glass" -/obj/item/roulette_ball/hollow/attack_self(mob/user as mob) +/obj/item/roulette_ball/hollow/attack_self(mob/user) if(!trapped) to_chat(user, span_notice("\The [src] is empty!")) return @@ -375,14 +375,14 @@ var/confetti_strength = 15 -/obj/machinery/wheel_of_fortune/attack_hand(mob/user as mob) +/obj/machinery/wheel_of_fortune/attack_hand(mob/user) if (busy) to_chat(user,span_notice("The wheel of fortune is already spinning!")) return - if(usr.incapacitated()) + if(user.incapacitated()) return - if(ishuman(usr) || isrobot(usr)) + if(ishuman(user) || isrobot(user)) switch(input(user,"Choose what to do","Wheel Of Fortune") in list("Spin the Wheel! (Not Lottery)", "Set the interval", "Cancel")) if("Cancel") return @@ -397,12 +397,12 @@ setinterval() -/obj/machinery/wheel_of_fortune/attackby(obj/item/W as obj, mob/user as mob) +/obj/machinery/wheel_of_fortune/attackby(obj/item/W, mob/user) if (busy) to_chat(user,span_notice("The wheel of fortune is already spinning!")) return - if(usr.incapacitated()) + if(user.incapacitated()) return if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) @@ -411,7 +411,7 @@ return else to_chat(user, span_warning("Proper access, allowed staff controls.")) - if(ishuman(usr) || isrobot(usr)) + if(ishuman(user) || isrobot(user)) switch(input(user,"Choose what to do (Management)","Wheel Of Fortune (Management)") in list("Spin the Lottery Wheel!", "Toggle Lottery Sales", "Toggle Public Spins", "Reset Lottery", "Cancel")) if("Cancel") return @@ -436,7 +436,7 @@ to_chat(user,span_notice("Public spins has been disabled.")) if("Reset Lottery") - var/confirm = tgui_alert(usr, "Are you sure you want to reset Lottery?", "Confirm Lottery Reset", list("Yes", "No")) + var/confirm = tgui_alert(user, "Are you sure you want to reset Lottery?", "Confirm Lottery Reset", list("Yes", "No")) if(confirm == "Yes") to_chat(user, span_warning("Lottery has been Reset!")) lottery_entries = 0 @@ -468,7 +468,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() @@ -552,14 +552,14 @@ var/sentientprizes_ckeys_list = list() //Same trick as lottery, to keep life simple var/obj/item/clothing/accessory/collar/casinosentientprize/selected_collar = null -/obj/machinery/casinosentientprize_handler/attack_hand(mob/living/user as mob) - if(usr.incapacitated()) +/obj/machinery/casinosentientprize_handler/attack_hand(mob/living/user) + if(user.incapacitated()) return if(casinosentientprize_sale == "disabled") to_chat(user,span_notice("The SPASM is disabled.")) return - if(ishuman(usr) || isrobot(usr)) + if(ishuman(user) || isrobot(user)) switch(input(user,"Choose what to do","SPASM") in list("Show selected Prize", "Select Prize", "Become Prize (Please examine yourself first)", "Cancel")) if("Cancel") return @@ -592,7 +592,7 @@ if(safety_ckey in sentientprizes_ckeys_list) to_chat(user, span_warning("The SPASM beeps in an upset manner, you already have a collar!")) return - var/confirm = tgui_alert(usr, "Are you sure you want to become a sentient prize?", "Confirm Sentient Prize", list("Yes", "No")) + var/confirm = tgui_alert(user, "Are you sure you want to become a sentient prize?", "Confirm Sentient Prize", list("Yes", "No")) if(confirm != "Yes") return to_chat(user, span_warning("You are now a prize!")) @@ -613,8 +613,8 @@ spawn_casinochips(casinosentientprize_price, src.loc) -/obj/machinery/casinosentientprize_handler/attackby(obj/item/W as obj, mob/user as mob) - if(usr.incapacitated()) +/obj/machinery/casinosentientprize_handler/attackby(obj/item/W, mob/user) + if(user.incapacitated()) return if(istype(W, /obj/item/spacecasinocash)) @@ -649,7 +649,7 @@ to_chat(user,span_notice("If collar isn't disabled and entry removed, please ask your owner to free you with collar swipe on the SPASM, or contact staff if you need assistance.")) return if(user.name == C.ownername) - var/confirm = tgui_alert(usr, "Are you sure you want to wipe [C.sentientprizename] entry?", "Confirm Sentient Prize Release", list("Yes", "No")) + var/confirm = tgui_alert(user, "Are you sure you want to wipe [C.sentientprizename] entry?", "Confirm Sentient Prize Release", list("Yes", "No")) if(confirm == "Yes") to_chat(user, span_warning("[C.sentientprizename] collar has been deleted from registry!")) C.icon_state = "casinoslave" @@ -666,7 +666,7 @@ return else to_chat(user, span_warning("Proper access, allowed staff controls.")) - if(ishuman(usr) || isrobot(usr)) + if(ishuman(user) || isrobot(user)) switch(input(user,"Choose what to do (Management)","SPASM (Management)") in list("Toggle Sentient Prize Sales", "Wipe Selected Prize Entry", "Change Prize Value", "Cancel")) if("Cancel") return @@ -694,7 +694,7 @@ selected_collar = null return var/safety_ckey = selected_collar.sentientprizeckey - var/confirm = tgui_alert(usr, "Are you sure you want to wipe [selected_collar.sentientprizename] entry?", "Confirm Sentient Prize", list("Yes", "No")) + var/confirm = tgui_alert(user, "Are you sure you want to wipe [selected_collar.sentientprizename] entry?", "Confirm Sentient Prize", list("Yes", "No")) if(confirm == "Yes") if(safety_ckey == selected_collar.sentientprizeckey) to_chat(user, span_warning("[selected_collar.sentientprizename] collar has been deleted from registry!")) @@ -722,7 +722,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() @@ -746,11 +746,11 @@ selected_collar.desc = "A collar worn by sentient prizes registered to a SPASM. The tag says its registered to [selected_collar.sentientprizename] and they are owned by [selected_collar.ownername]." selected_collar = null -/obj/machinery/casinosentientprize_handler/proc/setprice(mob/living/user as mob) - if(usr.incapacitated()) +/obj/machinery/casinosentientprize_handler/proc/setprice(mob/living/user) + if(user.incapacitated()) return - if(ishuman(usr) || isrobot(usr)) - casinosentientprize_price = tgui_input_number(usr, "Select the desired price (1-1000)", "Set Price", null, null, 1000, 1) + if(ishuman(user) || isrobot(user)) + casinosentientprize_price = tgui_input_number(user, "Select the desired price (1-1000)", "Set Price", null, null, 1000, 1) if(casinosentientprize_price>1000 || casinosentientprize_price<1) to_chat(user,span_notice("Invalid price.")) return diff --git a/code/modules/casino/slots.dm b/code/modules/casino/slots.dm index bfc9e074911..bfcb1e49f3e 100644 --- a/code/modules/casino/slots.dm +++ b/code/modules/casino/slots.dm @@ -115,7 +115,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() @@ -344,7 +344,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index 93523ff3c53..49e51560b80 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -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 = "" diff --git a/code/modules/client/preference_setup/general/02_language.dm b/code/modules/client/preference_setup/general/02_language.dm index 2b1af1b02e4..1d58f6ead91 100644 --- a/code/modules/client/preference_setup/general/02_language.dm +++ b/code/modules/client/preference_setup/general/02_language.dm @@ -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") diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm index 66482747c82..90496253daa 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -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 += "" 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 += "

" dat += span_bold("Language:") + " [current_species.species_language]
" dat += "" diff --git a/code/modules/client/preference_setup/general/04_equipment.dm b/code/modules/client/preference_setup/general/04_equipment.dm index 65ddbce69a4..01004fcfa45 100644 --- a/code/modules/client/preference_setup/general/04_equipment.dm +++ b/code/modules/client/preference_setup/general/04_equipment.dm @@ -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 diff --git a/code/modules/client/preference_setup/general/05_background.dm b/code/modules/client/preference_setup/general/05_background.dm index 8025514cf77..3987b696117 100644 --- a/code/modules/client/preference_setup/general/05_background.dm +++ b/code/modules/client/preference_setup/general/05_background.dm @@ -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 diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index 6b501f95052..9f134fea267 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -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) diff --git a/code/modules/client/preference_setup/volume_sliders/02_media.dm b/code/modules/client/preference_setup/volume_sliders/02_media.dm index d6617b5816c..c6620133a87 100644 --- a/code/modules/client/preference_setup/volume_sliders/02_media.dm +++ b/code/modules/client/preference_setup/volume_sliders/02_media.dm @@ -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 diff --git a/code/modules/client/preference_setup/vore/02_size.dm b/code/modules/client/preference_setup/vore/02_size.dm index 305659a34e1..a0d10caedd6 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -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 diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 6b803a896c9..f91e53592d3 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -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) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 56d9eef6855..1d691d3a24c 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -281,7 +281,7 @@ var/list/preferences_datums = list() else to_chat(user, span_danger("The forum URL is not set in the server configuration.")) return - ShowChoices(usr) + ShowChoices(user) return 1 /datum/preferences/Topic(href, list/href_list) diff --git a/code/modules/client/preferences_tgui.dm b/code/modules/client/preferences_tgui.dm index 62c5cb7b038..83e752d337a 100644 --- a/code/modules/client/preferences_tgui.dm +++ b/code/modules/client/preferences_tgui.dm @@ -93,7 +93,7 @@ // Yielding var/new_color = tgui_color_picker( - usr, + ui.user, "Select new color", null, default_value || COLOR_WHITE, diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index 21eb9a135d4..4e2585a1aac 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -29,7 +29,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = tgui_alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) if(confirm == "Yes") suiciding = 1 @@ -49,7 +49,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = tgui_alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) if(confirm == "Yes") suiciding = 1 @@ -69,7 +69,7 @@ to_chat(src, "You're already committing suicide! Be patient!") return - var/confirm = tgui_alert(usr, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No")) if(confirm == "Yes") suiciding = 1 @@ -83,7 +83,7 @@ set category = "Abilities.pAI Commands" set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)" set name = "pAI Suicide" - var/answer = tgui_alert(usr, "REALLY kill yourself? This action can't be undone.", "Suicide", list("Yes","No")) + var/answer = tgui_alert(src, "REALLY kill yourself? This action can't be undone.", "Suicide", list("Yes","No")) if(answer == "Yes") var/obj/item/paicard/card = loc card.removePersonality() diff --git a/code/modules/clothing/accessories/accessory.dm b/code/modules/clothing/accessories/accessory.dm index 8850256b0cd..2936d92d381 100644 --- a/code/modules/clothing/accessories/accessory.dm +++ b/code/modules/clothing/accessories/accessory.dm @@ -104,7 +104,7 @@ has_gloves.punch_force = initial(has_gloves.punch_force) has_suit = null if(user) - usr.put_in_hands(src) + user.put_in_hands(src) add_fingerprint(user) else if(get_turf(src)) //We actually exist in space forceMove(get_turf(src)) @@ -114,7 +114,7 @@ ..() //default attack_hand behaviour -/obj/item/clothing/accessory/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/attack_hand(mob/user) if(has_suit) return //we aren't an object on the ground so don't call parent ..() diff --git a/code/modules/clothing/accessories/hands.dm b/code/modules/clothing/accessories/hands.dm index 1d121728dbb..085df201266 100644 --- a/code/modules/clothing/accessories/hands.dm +++ b/code/modules/clothing/accessories/hands.dm @@ -41,7 +41,7 @@ if(!M.mind) return 0 - var/input = sanitizeSafe(input(usr, "Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(input(M, "Who do you want to dedicate the bracelet to?", ,""), MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) desc = "A beautiful friendship bracelet in all the colors of the rainbow. It's dedicated to [input]." diff --git a/code/modules/clothing/accessories/holster.dm b/code/modules/clothing/accessories/holster.dm index 2e410760ce8..8face57dfd7 100644 --- a/code/modules/clothing/accessories/holster.dm +++ b/code/modules/clothing/accessories/holster.dm @@ -41,7 +41,7 @@ holstered = null name = initial(name) -/obj/item/clothing/accessory/holster/proc/unholster(mob/user as mob) +/obj/item/clothing/accessory/holster/proc/unholster(mob/user) if(!holstered) return @@ -51,7 +51,7 @@ var/sound_vol = 25 if(user.a_intent == I_HURT) sound_vol = 50 - usr.visible_message( + user.visible_message( span_danger("[user] draws \the [holstered], ready to go!"), //VOREStation Edit span_warning("You draw \the [holstered], ready to go!") //VOREStation Edit ) @@ -69,7 +69,7 @@ w_class = initial(w_class) clear_holster() -/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/holster/attack_hand(mob/user) if (has_suit && (slot & ACCESSORY_SLOT_UTILITY)) //if we are part of a suit if (holstered) unholster(user) diff --git a/code/modules/clothing/accessories/lockets.dm b/code/modules/clothing/accessories/lockets.dm index ee610474615..cff6e310f7c 100644 --- a/code/modules/clothing/accessories/lockets.dm +++ b/code/modules/clothing/accessories/lockets.dm @@ -11,7 +11,7 @@ var/open var/obj/item/held //Item inside locket. -/obj/item/clothing/accessory/locket/attack_self(mob/user as mob) +/obj/item/clothing/accessory/locket/attack_self(mob/user) if(!base_icon) base_icon = icon_state @@ -30,16 +30,16 @@ else icon_state = "[base_icon]" -/obj/item/clothing/accessory/locket/attackby(var/obj/item/O as obj, mob/user as mob) +/obj/item/clothing/accessory/locket/attackby(var/obj/item/O, mob/user) if(!open) to_chat(user, "You have to open it first.") return if(istype(O,/obj/item/paper) || istype(O, /obj/item/photo)) if(held) - to_chat(usr, "\The [src] already has something inside it.") + to_chat(user, "\The [src] already has something inside it.") else - to_chat(usr, "You slip [O] into [src].") + to_chat(user, "You slip [O] into [src].") user.drop_item() O.loc = src held = O diff --git a/code/modules/clothing/accessories/storage.dm b/code/modules/clothing/accessories/storage.dm index de06731d6e9..1a7ec234f6f 100644 --- a/code/modules/clothing/accessories/storage.dm +++ b/code/modules/clothing/accessories/storage.dm @@ -19,7 +19,7 @@ if (!hide_on_roll) on_rolled["down"] = icon_state -/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/storage/attack_hand(mob/user) if (has_suit) //if we are part of a suit hold.open(user) return @@ -27,24 +27,24 @@ if (hold.handle_attack_hand(user)) //otherwise interact as a regular storage item ..(user) -/obj/item/clothing/accessory/storage/MouseDrop(obj/over_object as obj) +/obj/item/clothing/accessory/storage/MouseDrop(obj/over_object) if (has_suit) return if (hold.handle_mousedrop(usr, over_object)) ..(over_object) -/obj/item/clothing/accessory/storage/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/clothing/accessory/storage/attackby(obj/item/W, mob/user) return hold.attackby(W, user) /obj/item/clothing/accessory/storage/emp_act(severity) hold.emp_act(severity) ..() -/obj/item/clothing/accessory/storage/attack_self(mob/user as mob) +/obj/item/clothing/accessory/storage/attack_self(mob/user) to_chat(user, span_notice("You empty [src].")) var/turf/T = get_turf(src) - hold.hide_from(usr) + hold.hide_from(user) for(var/obj/item/I in hold.contents) hold.remove_from_storage(I, T) add_fingerprint(user) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index f5fb67a39a5..552997b2d14 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -632,24 +632,24 @@ update_icon_define_digi = "icons/inventory/feet/mob_digi.dmi" -/obj/item/clothing/shoes/proc/draw_knife() +/obj/item/clothing/shoes/proc/draw_knife(mob/living/user) set name = "Draw Boot Knife" set desc = "Pull out your boot knife." set category = "IC.Game" set src in usr - if(usr.stat || usr.restrained() || usr.incapacitated()) + if(user.stat || user.restrained() || user.incapacitated()) return - holding.forceMove(get_turf(usr)) + holding.forceMove(get_turf(user)) - if(usr.put_in_hands(holding)) - usr.visible_message(span_danger("\The [usr] pulls a knife out of their boot!")) + if(user.put_in_hands(holding)) + user.visible_message(span_danger("\The [user] pulls a knife out of their boot!")) playsound(src, 'sound/weapons/holster/sheathout.ogg', 25) holding = null cut_overlay("[icon_state]_knife") else - to_chat(usr, span_warning("Your need an empty, unbroken hand to do that.")) + to_chat(user, span_warning("Your need an empty, unbroken hand to do that.")) holding.forceMove(src) if(!holding) @@ -660,7 +660,7 @@ /obj/item/clothing/shoes/attack_hand(var/mob/living/M) if(can_hold_knife == 1 && holding && src.loc == M) - draw_knife() + draw_knife(M) return ..() @@ -874,7 +874,7 @@ /obj/item/clothing/under/attack_hand(var/mob/user) if(LAZYLEN(accessories)) ..() - if ((ishuman(usr) || issmall(usr)) && src.loc == user) + if ((ishuman(user) || issmall(user)) && src.loc == user) return ..() @@ -963,37 +963,36 @@ if(3) . += "Its vital tracker and tracking beacon appear to be enabled." -/obj/item/clothing/under/proc/set_sensors(mob/usr as mob) - var/mob/M = usr - if (istype(M, /mob/observer)) return - if (usr.stat || usr.restrained()) return +/obj/item/clothing/under/proc/set_sensors(mob/user) + if (istype(user, /mob/observer)) return + if (user.stat || user.restrained()) return if(has_sensor >= 2) - to_chat(usr, "The controls are locked.") + to_chat(user, "The controls are locked.") return 0 if(has_sensor <= 0) - to_chat(usr, "This suit does not have any sensors.") + to_chat(user, "This suit does not have any sensors.") return 0 var/list/modes = list("Off", "Binary sensors", "Vitals tracker", "Tracking beacon") - var/switchMode = tgui_input_list(usr, "Select a sensor mode:", "Suit Sensor Mode", modes) - if(get_dist(usr, src) > 1) - to_chat(usr, "You have moved too far away.") + var/switchMode = tgui_input_list(user, "Select a sensor mode:", "Suit Sensor Mode", modes) + if(get_dist(user, src) > 1) + to_chat(user, "You have moved too far away.") return sensor_mode = modes.Find(switchMode) - 1 - if (src.loc == usr) + if (src.loc == user) switch(sensor_mode) if(0) - usr.visible_message("[usr] adjusts their sensors.", "You disable your suit's remote sensing equipment.") + user.visible_message("[user] adjusts their sensors.", "You disable your suit's remote sensing equipment.") if(1) - usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report whether you are live or dead.") + user.visible_message("[user] adjusts their sensors.", "Your suit will now report whether you are live or dead.") if(2) - usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns.") + user.visible_message("[user] adjusts their sensors.", "Your suit will now report your vital lifesigns.") if(3) - usr.visible_message("[usr] adjusts their sensors.", "Your suit will now report your vital lifesigns as well as your coordinate position.") + user.visible_message("[user] adjusts their sensors.", "Your suit will now report your vital lifesigns as well as your coordinate position.") else if (istype(src.loc, /mob)) - usr.visible_message("[usr] adjusts [src.loc]'s sensors.", "You adjust [src.loc]'s sensors.") + user.visible_message("[user] adjusts [src.loc]'s sensors.", "You adjust [src.loc]'s sensors.") /obj/item/clothing/under/verb/toggle() set name = "Toggle Suit Sensors" @@ -1094,7 +1093,7 @@ // only override icon if a corresponding digitigrade replacement icon_state exists // otherwise, keep the old non-digi icon_define (or nothing) - if(icon_state && icon_states(update_icon_define_digi).Find(icon_state)) + if(icon_state && icon_states(update_icon_define_digi)?.Find(icon_state)) update_icon_define = update_icon_define_digi diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index b9391881eb5..dbc4f62e15e 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -353,21 +353,21 @@ BLIND // can't see anything icon_state = "salesman" var/ar = 0 -/obj/item/clothing/glasses/sunglasses/bigshot/examine(mob/user as mob) +/obj/item/clothing/glasses/sunglasses/bigshot/examine(mob/user) . = ..() - . += to_chat(usr, span_notice("Alt-click to toggle modes.")) + . += to_chat(user, span_notice("Alt-click to toggle modes.")) -/obj/item/clothing/glasses/sunglasses/bigshot/AltClick() +/obj/item/clothing/glasses/sunglasses/bigshot/AltClick(mob/user) set src in usr - if(usr.canmove && !usr.stat && !usr.restrained()) + if(user.canmove && !user.stat && !user.restrained()) if(src.ar) src.ar = !src.ar icon_state = initial(icon_state) - to_chat(usr, "You press a small button on \the [src] and deactivate the AR mode.") + to_chat(user, "You press a small button on \the [src] and deactivate the AR mode.") else src.ar = !src.ar icon_state = "[initial(icon_state)]_fzz" - to_chat(usr, "You press a small button on \the [src] and activate the AR mode.") + to_chat(user, "You press a small button on \the [src] and activate the AR mode.") update_clothing_icon() /obj/item/clothing/glasses/welding @@ -496,12 +496,12 @@ BLIND // can't see anything flash_protection = FLASH_PROTECTION_NONE enables_planes = away_planes away_planes = null - to_chat(usr, "You switch the [src] to HUD mode.") + to_chat(user, "You switch the [src] to HUD mode.") else flash_protection = initial(flash_protection) away_planes = enables_planes enables_planes = null - to_chat(usr, "You switch \the [src] to flash protection mode.") + to_chat(user, "You switch \the [src] to flash protection mode.") update_icon() user << activation_sound user.recalculate_vis() diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 1377fb1ba67..7bf259b0bdd 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -39,21 +39,21 @@ armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 60, rad = 0) var/hanging = 0 -/obj/item/clothing/mask/surgical/proc/adjust_mask(mob_user) - if(usr.canmove && !usr.stat) +/obj/item/clothing/mask/surgical/proc/adjust_mask(mob/user) + if(user.canmove && !user.stat) src.hanging = !src.hanging if (src.hanging) gas_transfer_coefficient = 1 body_parts_covered = body_parts_covered & ~FACE armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) icon_state = "steriledown" - to_chat(usr, "You pull the mask below your chin.") + to_chat(user, "You pull the mask below your chin.") else gas_transfer_coefficient = initial(gas_transfer_coefficient) body_parts_covered = initial(body_parts_covered) icon_state = initial(icon_state) armor = initial(armor) - to_chat(usr, "You pull the mask up to cover your face.") + to_chat(user, "You pull the mask up to cover your face.") update_clothing_icon() /obj/item/clothing/mask/surgical/verb/toggle() diff --git a/code/modules/clothing/masks/monitor.dm b/code/modules/clothing/masks/monitor.dm index 1e2b681a39e..0b8148ffe6c 100644 --- a/code/modules/clothing/masks/monitor.dm +++ b/code/modules/clothing/masks/monitor.dm @@ -54,9 +54,9 @@ if(!istype(H) || H != usr) return if(H.wear_mask != src) - to_chat(usr, span_warning("You have not installed \the [src] yet.")) + to_chat(H, span_warning("You have not installed \the [src] yet.")) return - var/choice = tgui_input_list(usr, "Select a screen icon:", "Head Monitor Choice", monitor_states) + var/choice = tgui_input_list(H, "Select a screen icon:", "Head Monitor Choice", monitor_states) if(choice) monitor_state_index = choice update_icon() diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index af3249be7db..74b86407d4e 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -190,7 +190,7 @@ continue . += "[icon2html(piece, user.client)] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed." - if(src.loc == usr) + if(src.loc == user) . += "The access panel is [locked? "locked" : "unlocked"]." . += "The maintenance panel is [open ? "open" : "closed"]." . += "Hardsuit systems are [offline ? span_warning("offline") : span_notice("online")]." @@ -429,14 +429,14 @@ return cooling_on = 1 - to_chat(usr, span_notice("You switch \the [src]'s cooling system on.")) + to_chat(user, span_notice("You switch \the [src]'s cooling system on.")) /obj/item/rig/proc/turn_cooling_off(var/mob/user, var/failed) if(failed) visible_message("\The [src]'s cooling system clicks and whines as it powers down.") else - to_chat(usr, span_notice("You switch \the [src]'s cooling system off.")) + to_chat(user, span_notice("You switch \the [src]'s cooling system off.")) cooling_on = 0 /obj/item/rig/proc/get_environment_temperature() @@ -690,16 +690,16 @@ if((!istype(wearer) || (!wearer.back == src && !wearer.belt == src)) && !forced) return - if((usr == wearer && (usr.stat||usr.paralysis||usr.stunned)) && !forced) // If the usr isn't wearing the suit it's probably an AI. + if(!H) + return + + if((H == wearer && (H.stat||H.paralysis||H.stunned)) && !forced) // If the user isn't wearing the suit it's probably an AI. return var/obj/item/check_slot var/equip_to var/obj/item/use_obj - if(!H) - return - switch(piece) if("helmet") equip_to = slot_head diff --git a/code/modules/clothing/spacesuits/rig/rig_attackby.dm b/code/modules/clothing/spacesuits/rig/rig_attackby.dm index f14919805d9..ef06081927b 100644 --- a/code/modules/clothing/spacesuits/rig/rig_attackby.dm +++ b/code/modules/clothing/spacesuits/rig/rig_attackby.dm @@ -1,4 +1,4 @@ -/obj/item/rig/attackby(obj/item/W as obj, mob/living/user as mob) +/obj/item/rig/attackby(obj/item/W, mob/living/user) if(!istype(user)) return 0 @@ -122,7 +122,7 @@ if(cell) current_mounts += "cell" if(installed_modules && installed_modules.len) current_mounts += "system module" - var/to_remove = tgui_input_list(usr, "Which would you like to modify?", "Removal Choice", current_mounts) + var/to_remove = tgui_input_list(user, "Which would you like to modify?", "Removal Choice", current_mounts) if(!to_remove) return @@ -160,7 +160,7 @@ to_chat(user, "There are no installed modules to remove.") return - var/removal_choice = tgui_input_list(usr, "Which module would you like to remove?", "Removal Choice", possible_removals) + var/removal_choice = tgui_input_list(user, "Which module would you like to remove?", "Removal Choice", possible_removals) if(!removal_choice) return diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 143de9b9c50..d2a48976926 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -61,9 +61,9 @@ if(tank && ispath(tank)) tank = new tank(src) -/obj/item/clothing/suit/space/void/examine(user) +/obj/item/clothing/suit/space/void/examine(mob/user) . = ..() - . += to_chat(usr, span_notice("Alt-click to relase Tank/Cooling unit if installed.")) + . += to_chat(user, span_notice("Alt-click to relase Tank/Cooling unit if installed.")) for(var/obj/item/I in list(helmet,boots,tank,cooler)) . += "It has \a [I] installed." if(tank && in_range(src,user)) @@ -230,7 +230,7 @@ removing.canremove = TRUE H.drop_from_inventory(removing) -/obj/item/clothing/suit/space/void/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/clothing/suit/space/void/attackby(obj/item/W, mob/user) if(!isliving(user)) return @@ -243,7 +243,7 @@ if(W.has_tool_quality(TOOL_SCREWDRIVER)) if(helmet || boots || tank) - var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(helmet,boots,tank,cooler)) + var/choice = tgui_input_list(user, "What component would you like to remove?", "Remove Component", list(helmet,boots,tank,cooler)) if(!choice) return if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead diff --git a/code/modules/clothing/spacesuits/void/void_vr.dm b/code/modules/clothing/spacesuits/void/void_vr.dm index 49d72e2222c..a78a89455c6 100644 --- a/code/modules/clothing/spacesuits/void/void_vr.dm +++ b/code/modules/clothing/spacesuits/void/void_vr.dm @@ -102,7 +102,7 @@ helmet = new /obj/item/clothing/head/helmet/space/void/autolok //autoinstall the helmet //override the attackby screwdriver proc so that people can't remove the helmet -/obj/item/clothing/suit/space/void/autolok/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/clothing/suit/space/void/autolok/attackby(obj/item/W, mob/user) if(!isliving(user)) return @@ -116,7 +116,7 @@ if(W.has_tool_quality(TOOL_SCREWDRIVER)) if(boots || tank || cooler) - var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(boots,tank,cooler)) + var/choice = tgui_input_list(user, "What component would you like to remove?", "Remove Component", list(boots,tank,cooler)) if(!choice) return if(choice == tank) //No, a switch doesn't work here. Sorry. ~Techhead diff --git a/code/modules/clothing/under/miscellaneous_vr.dm b/code/modules/clothing/under/miscellaneous_vr.dm index e101dee28e2..a80b25c4d5d 100644 --- a/code/modules/clothing/under/miscellaneous_vr.dm +++ b/code/modules/clothing/under/miscellaneous_vr.dm @@ -63,11 +63,11 @@ set src in usr bluespace_size(usr) -/obj/item/clothing/under/hyperfiber/bluespace/proc/bluespace_size(mob/usr as mob) - if (!ishuman(usr)) +/obj/item/clothing/under/hyperfiber/bluespace/proc/bluespace_size(mob/user) + if (!ishuman(user)) return - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user if (H.stat || H.restrained()) return diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index d7100c61375..a2b650f2e00 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -9,7 +9,7 @@ w_class = ITEMSIZE_SMALL var/obj/item/stored_item = null -/obj/item/evidencebag/MouseDrop(var/obj/item/I as obj) +/obj/item/evidencebag/MouseDrop(var/obj/item/I) if (!ishuman(usr)) return if(!istype(I) || I.anchored) diff --git a/code/modules/detectivework/tools/swabs.dm b/code/modules/detectivework/tools/swabs.dm index f2c13aed674..969954882d6 100644 --- a/code/modules/detectivework/tools/swabs.dm +++ b/code/modules/detectivework/tools/swabs.dm @@ -92,7 +92,7 @@ else if(choices.len == 1) choice = choices[1] else - choice = tgui_input_list(usr, "What kind of evidence are you looking for?","Evidence Collection", choices) + choice = tgui_input_list(user, "What kind of evidence are you looking for?","Evidence Collection", choices) if(!choice) return diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index 3ab7112e574..2f32c0182ae 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -101,7 +101,7 @@ else user << browse(null,"window=eftpos") -/obj/item/eftpos/attackby(obj/item/O as obj, user as mob) +/obj/item/eftpos/attackby(obj/item/O, mob/user) var/obj/item/card/id/I = O.GetID() @@ -109,7 +109,7 @@ if(linked_account) scan_card(I, O) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("Unable to connect to linked account.")) + to_chat(user, "[icon2html(src, user.client)]" + span_warning("Unable to connect to linked account.")) else if (istype(O, /obj/item/spacecash/ewallet)) var/obj/item/spacecash/ewallet/E = O if (linked_account) @@ -134,11 +134,11 @@ T.time = stationtime2text() linked_account.transaction_log.Add(T) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("\The [O] doesn't have that much money!")) + to_chat(user, "[icon2html(src, user.client)]" + span_warning("\The [O] doesn't have that much money!")) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("Connected account has been suspended.")) + to_chat(user, "[icon2html(src, user.client)]" + span_warning("Connected account has been suspended.")) else - to_chat(usr, "[icon2html(src, usr.client)]" + span_warning("EFTPOS is not connected to an account.")) + to_chat(user, "[icon2html(src, user.client)]" + span_warning("EFTPOS is not connected to an account.")) else ..() diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index e59242c22fd..85c85e02ab8 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -79,8 +79,8 @@ update_icon() return worth -/obj/item/spacecash/attack_self() - var/amount = tgui_input_number(usr, "How many [initial_name]s do you want to take? (0 to [src.worth])", "Take Money", 20, src.worth) +/obj/item/spacecash/attack_self(mob/user) + var/amount = tgui_input_number(user, "How many [initial_name]s do you want to take? (0 to [src.worth])", "Take Money", 20, src.worth) if(!src || QDELETED(src)) return amount = round(CLAMP(amount, 0, src.worth)) @@ -89,9 +89,9 @@ return adjust_worth(-amount) - var/obj/item/spacecash/SC = new (usr.loc) + var/obj/item/spacecash/SC = new (user.loc) SC.set_worth(amount) - usr.put_in_hands(SC) + user.put_in_hands(SC) /obj/item/spacecash/c1 name = "1 Thaler" diff --git a/code/modules/economy/casinocash.dm b/code/modules/economy/casinocash.dm index ad2dbdaf90f..7f07ddbd39a 100644 --- a/code/modules/economy/casinocash.dm +++ b/code/modules/economy/casinocash.dm @@ -111,8 +111,8 @@ update_icon() return worth -/obj/item/spacecasinocash/attack_self() - var/amount = tgui_input_number(usr, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20, src.worth) +/obj/item/spacecasinocash/attack_self(mob/user) + var/amount = tgui_input_number(user, "How much credits worth of chips do you want to take? (0 to [src.worth])", "Take chips", 20, src.worth) if(!src || QDELETED(src)) return amount = round(CLAMP(amount, 0, src.worth)) @@ -121,9 +121,9 @@ return adjust_worth(-amount) - var/obj/item/spacecasinocash/SC = new (usr.loc) + var/obj/item/spacecasinocash/SC = new (user.loc) SC.set_worth(amount) - usr.put_in_hands(SC) + user.put_in_hands(SC) /obj/item/spacecasinocash/c1 name = "1 credit casino chip" diff --git a/code/modules/economy/mint.dm b/code/modules/economy/mint.dm index 55086056be4..ecbc957a68c 100644 --- a/code/modules/economy/mint.dm +++ b/code/modules/economy/mint.dm @@ -9,7 +9,7 @@ var/coinsToProduce = 6 //how many coins do we make per sheet? a sheet is 2000 units whilst a coin is 250, and some material should be lost in the process var/list/validMats = list(MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_IRON, MAT_PHORON, MAT_URANIUM) //what's valid stuff to make coins out of? -/obj/machinery/mineral/mint/attackby(obj/item/stack/material/M as obj, mob/user as mob) +/obj/machinery/mineral/mint/attackby(obj/item/stack/material/M, mob/user) if(M.default_type in validMats) user.visible_message("[user] starts to feed a sheet of [M.default_type] into \the [src].") while(M.amount > 0) @@ -42,7 +42,7 @@ src.visible_message(span_notice("\The [src] has run out of usable materials.")) break else - to_chat(usr,span_warning("\The [src] is hand-operated and requires your full attention!")) + to_chat(user,span_warning("\The [src] is hand-operated and requires your full attention!")) icon_state = "coinpress0" break else diff --git a/code/modules/economy/money_bag.dm b/code/modules/economy/money_bag.dm index 1352780f6a2..aa2c3398f71 100644 --- a/code/modules/economy/money_bag.dm +++ b/code/modules/economy/money_bag.dm @@ -45,12 +45,12 @@ dat += text("Uranium coins: [amt_uranium] Remove one
") user << browse("[dat]", "window=moneybag") -/obj/item/moneybag/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/moneybag/attackby(obj/item/W, mob/user) ..() if (istype(W, /obj/item/coin)) var/obj/item/coin/C = W to_chat(user, span_blue("You add the [C.name] into the bag.")) - usr.drop_item() + user.drop_item() contents += C if (istype(W, /obj/item/moneybag)) var/obj/item/moneybag/C = W diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index f5bce6ef594..18f29bb50b0 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -165,7 +165,7 @@ -/obj/item/retail_scanner/attackby(obj/O as obj, user as mob) +/obj/item/retail_scanner/attackby(obj/O, mob/user) // Check for a method of paying (ID, PDA, e-wallet, cash, ect.) var/obj/item/card/id/I = O.GetID() if(I) @@ -174,7 +174,7 @@ var/obj/item/spacecash/ewallet/E = O scan_wallet(E) else if (istype(O, /obj/item/spacecash)) - to_chat(usr, span_warning("This device does not accept cash.")) + to_chat(user, span_warning("This device does not accept cash.")) else if(istype(O, /obj/item/card/emag)) return ..() diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm index a397da77b7f..78ea8835645 100644 --- a/code/modules/economy/vending.dm +++ b/code/modules/economy/vending.dm @@ -263,23 +263,23 @@ GLOBAL_LIST_EMPTY(vending_products) /** * Receive payment with cashmoney. * - * usr is the mob who gets the change. + * user is the mob who gets the change. */ /obj/machinery/vending/proc/pay_with_cash(var/obj/item/spacecash/cashmoney, mob/user) if(currently_vending.price > cashmoney.worth) // This is not a status display message, since it's something the character // themselves is meant to see BEFORE putting the money in - to_chat(usr, "[icon2html(cashmoney, user.client)] " + span_warning("That is not enough money.")) + to_chat(user, "[icon2html(cashmoney, user.client)] " + span_warning("That is not enough money.")) return 0 if(istype(cashmoney, /obj/item/spacecash)) - visible_message(span_info("\The [usr] inserts some cash into \the [src].")) + visible_message(span_info("\The [user] inserts some cash into \the [src].")) cashmoney.worth -= currently_vending.price if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) else cashmoney.update_icon() @@ -298,7 +298,7 @@ GLOBAL_LIST_EMPTY(vending_products) visible_message(span_info("\The [user] swipes \the [wallet] through \the [src].")) playsound(src, 'sound/machines/id_swipe.ogg', 50, 1) if(currently_vending.price > wallet.worth) - to_chat(usr, span_warning("Insufficient funds on chargecard.")) + to_chat(user, span_warning("Insufficient funds on chargecard.")) return 0 else wallet.worth -= currently_vending.price diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index 92cefa1ce10..9c5ff9042f6 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -65,7 +65,7 @@ set name = "Examine" set category = "IC.Game" - if((is_blind(src) || usr.stat) && !isobserver(src)) + if((is_blind(src) || src.stat) && !isobserver(src)) to_chat(src, span_notice("Something is there but you can't see it.")) return 1 diff --git a/code/modules/fireworks/firework_stars.dm b/code/modules/fireworks/firework_stars.dm index 30c6c0c3067..16072b591f9 100644 --- a/code/modules/fireworks/firework_stars.dm +++ b/code/modules/fireworks/firework_stars.dm @@ -117,7 +117,7 @@ "Nanotrasen logo", "a geometric-looking letter S", "a dodecahedron") /obj/item/firework_star/aesthetic/configurable/attack_self(var/mob/user) - var/choice = tgui_alert(usr, "What setting do you want to adjust?", "Firework Star", list("Color", "Shape", "Nothing")) + var/choice = tgui_alert(user, "What setting do you want to adjust?", "Firework Star", list("Color", "Shape", "Nothing")) if(src.loc != user) return diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 5d646fcd81f..b3f1b5a82ca 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -57,9 +57,6 @@ //Placeholder for effect that trigger on eating that aren't tied to reagents. /obj/item/reagent_containers/food/snacks/proc/On_Consume(var/mob/living/M) - if(!usr) // what - usr = M - if(food_inserted_micros && food_inserted_micros.len) if(M.can_be_drop_pred && M.food_vore && M.vore_selected) for(var/mob/living/F in food_inserted_micros) @@ -82,11 +79,11 @@ if(!reagents.total_volume) M.visible_message(span_notice("[M] finishes eating \the [src]."),span_notice("You finish eating \the [src].")) - usr.drop_from_inventory(src) // Drop food from inventory so it doesn't end up staying on the hud after qdel, and so inhands go away + M.drop_from_inventory(src) // Drop food from inventory so it doesn't end up staying on the hud after qdel, and so inhands go away if(trash) - var/obj/item/TrashItem = new trash(usr) - usr.put_in_hands(TrashItem) + var/obj/item/TrashItem = new trash(M) + M.put_in_hands(TrashItem) qdel(src) /obj/item/reagent_containers/food/snacks/attack_self(mob/user as mob) @@ -843,7 +840,7 @@ . = ..() reagents.add_reagent(REAGENT_ID_EGG, 3) -/obj/item/reagent_containers/food/snacks/egg/afterattack(obj/O as obj, mob/user as mob, proximity) +/obj/item/reagent_containers/food/snacks/egg/afterattack(obj/O, mob/user, proximity) if(istype(O,/obj/machinery/microwave)) return . = ..() if(!(proximity && O.is_open_container())) @@ -860,16 +857,16 @@ src.visible_message(span_red("[src.name] has been squashed."),span_red("You hear a smack.")) qdel(src) -/obj/item/reagent_containers/food/snacks/egg/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/reagent_containers/food/snacks/egg/attackby(obj/item/W, mob/user) if(istype( W, /obj/item/pen/crayon )) var/obj/item/pen/crayon/C = W var/clr = C.colourName if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) - to_chat(usr, span_blue("The egg refuses to take on this color!")) + to_chat(user, span_blue("The egg refuses to take on this color!")) return - to_chat(usr, span_blue("You color \the [src] [clr]")) + to_chat(user, span_blue("You color \the [src] [clr]")) icon_state = "egg-[clr]" else . = ..() @@ -1635,9 +1632,9 @@ . = ..() unpopped = rand(1,10) -/obj/item/reagent_containers/food/snacks/popcorn/On_Consume() +/obj/item/reagent_containers/food/snacks/popcorn/On_Consume(mob/living/M) if(prob(unpopped)) //lol ...what's the point? - to_chat(usr, span_red("You bite down on an un-popped kernel!")) + to_chat(M, span_red("You bite down on an un-popped kernel!")) unpopped = max(0, unpopped-1) . = ..() @@ -3985,7 +3982,7 @@ if( src.open ) return - var/t = sanitize(input(usr, "Enter what you want to add to the tag:", "Write", null, null) as text, 30) + var/t = sanitize(input(user, "Enter what you want to add to the tag:", "Write", null, null) as text, 30) var/obj/item/pizzabox/boxtotagto = src if( boxes.len > 0 ) diff --git a/code/modules/food/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm index 50c9ea2ba3b..e45a6e544b1 100644 --- a/code/modules/food/kitchen/cooking_machines/_cooker.dm +++ b/code/modules/food/kitchen/cooking_machines/_cooker.dm @@ -61,7 +61,7 @@ switch(action) if("toggle_power") - attempt_toggle_power(usr) + attempt_toggle_power(ui.user) return TRUE if("toggle_safety") toggle_safety() diff --git a/code/modules/food/kitchen/cooking_machines/oven.dm b/code/modules/food/kitchen/cooking_machines/oven.dm index 968ed06e2ce..7fd75de81f2 100644 --- a/code/modules/food/kitchen/cooking_machines/oven.dm +++ b/code/modules/food/kitchen/cooking_machines/oven.dm @@ -82,14 +82,14 @@ try_toggle_door(usr) /obj/machinery/appliance/cooker/oven/proc/try_toggle_door(mob/user) - if(!isliving(usr) || isAI(user)) + if(!isliving(user) || isAI(user)) return - if(!usr.IsAdvancedToolUser()) + if(!user.IsAdvancedToolUser()) to_chat(user, span_notice("You lack the dexterity to do that.")) return - if(!Adjacent(usr)) + if(!Adjacent(user)) to_chat(user, span_notice("You can't reach the [src] from there, get closer!")) return diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 1a065d10b10..63d2cc5fd6c 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -82,13 +82,13 @@ var/mob/living/carbon/user = usr - if(usr.stat || !Adjacent(usr)) return + if(user.stat || !Adjacent(user)) return if(user.hands_are_full()) // Safety check lest the card disappear into oblivion to_chat(user,span_notice("Your hands are full!")) return - if(!istype(usr,/mob/living/carbon)) + if(!istype(user,/mob/living/carbon)) return if(!cards.len) @@ -237,10 +237,10 @@ return -/obj/item/deck/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck - if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) - if(!isanimal(usr)) - if( !usr.get_active_hand() ) //if active hand is empty +/obj/item/deck/MouseDrop(mob/user) // Code from Paper bin, so you can still pick up the deck + if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user)))))) + if(!isanimal(user)) + if( !user.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] @@ -257,9 +257,9 @@ /obj/item/deck/verb_pickup() // Snowflaked so pick up verb work as intended var/mob/user = usr - if((istype(user) && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) - if(!isanimal(usr)) - if( !usr.get_active_hand() ) //if active hand is empty + if((istype(user) && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user)))))) + if(!isanimal(user)) + if( !user.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] @@ -372,15 +372,15 @@ if(user.stat || !Adjacent(user)) return if(user.hands_are_full()) // Safety check lest the card disappear into oblivion - to_chat(usr,span_danger("Your hands are full!")) + to_chat(user,span_danger("Your hands are full!")) return var/pickablecards = list() for(var/datum/playingcard/P in cards) pickablecards[P.name] = P - var/pickedcard = tgui_input_list(usr, "Which card do you want to remove from the hand?", "Card Selection", pickablecards) + var/pickedcard = tgui_input_list(user, "Which card do you want to remove from the hand?", "Card Selection", pickablecards) - if(!pickedcard || !pickablecards[pickedcard] || !usr || !src) return + if(!pickedcard || !pickablecards[pickedcard] || !user || !src) return var/datum/playingcard/card = pickablecards[pickedcard] diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index ff603066eb7..5236ba41015 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -426,7 +426,7 @@ active_power_usage = 6 power_channel = ENVIRON -/obj/machinery/readybutton/attack_ai(mob/user as mob) +/obj/machinery/readybutton/attack_ai(mob/user) to_chat(user, "The station AI is not to interact with these devices!") return @@ -434,10 +434,10 @@ ..() -/obj/machinery/readybutton/attackby(obj/item/W as obj, mob/user as mob) +/obj/machinery/readybutton/attackby(obj/item/W, mob/user) to_chat(user, "The device is a solid button, there's nothing you can do with it!") -/obj/machinery/readybutton/attack_hand(mob/user as mob) +/obj/machinery/readybutton/attack_hand(mob/user) if(user.stat || stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") @@ -451,7 +451,7 @@ qdel(src) if(eventstarted) - to_chat(usr, "The event has already begun!") + to_chat(user, "The event has already begun!") return ready = !ready diff --git a/code/modules/hydroponics/backtank.dm b/code/modules/hydroponics/backtank.dm index 4d36d5b555d..91d2e63f1fe 100644 --- a/code/modules/hydroponics/backtank.dm +++ b/code/modules/hydroponics/backtank.dm @@ -86,7 +86,7 @@ if(!slot_check()) to_chat(user, span_warning("You need to equip [src] before taking out [noz].")) else - if(!usr.put_in_hands(noz)) //Detach the handset into the user's hands + if(!user.put_in_hands(noz)) //Detach the handset into the user's hands to_chat(user, span_warning("You need a free hand to hold the handset!")) update_icon() //success diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index aa9b9ad4fbf..88259428618 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -615,15 +615,15 @@ return -/obj/machinery/portable_atmospherics/hydroponics/attack_tk(mob/user as mob) +/obj/machinery/portable_atmospherics/hydroponics/attack_tk(mob/user) if(dead) remove_dead(user) else if(harvest) harvest(user) -/obj/machinery/portable_atmospherics/hydroponics/attack_hand(mob/user as mob) +/obj/machinery/portable_atmospherics/hydroponics/attack_hand(mob/user) - if(istype(usr,/mob/living/silicon)) + if(istype(user,/mob/living/silicon)) return if(frozen == 1) to_chat(user, span_warning("Disable the cryogenic freezing first!")) diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index abfe7ff0150..2e39b8958a9 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -68,7 +68,7 @@ a creative player the means to solve many problems. Circuits are held inside an if(!check_interactivity(M)) return - var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the circuit?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN) + var/input = sanitizeSafe(tgui_input_text(M, "What do you want to name the circuit?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN) if(src && input && assembly.check_interactivity(M)) to_chat(M, span_notice("The circuit '[src.name]' is now labeled '[input]'.")) displayed_name = input diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm index 91ea3615235..78ddcc060cb 100644 --- a/code/modules/integrated_electronics/core/pins.dm +++ b/code/modules/integrated_electronics/core/pins.dm @@ -147,20 +147,20 @@ list[]( src.linked.Remove(their_io) /datum/integrated_io/proc/ask_for_data_type(mob/user, var/default, var/list/allowed_data_types = list("string","number","null")) - var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", allowed_data_types) + var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", allowed_data_types) if(!holder.check_interactivity(user)) return var/new_data = null switch(type_to_use) if("string") - new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null, MAX_NAME_LEN) + new_data = tgui_input_text(user, "Now type in a string.","[src] string writing", istext(default) ? default : null, MAX_NAME_LEN) new_data = sanitize(new_data,MAX_NAME_LEN) if(istext(new_data) && holder.check_interactivity(user) ) to_chat(user, span_notice("You input [new_data] into the pin.")) return new_data if("number") - new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null, MAX_NAME_LEN) + new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", isnum(default) ? default : null, MAX_NAME_LEN) if(isnum(new_data) && holder.check_interactivity(user) ) to_chat(user, span_notice("You input [new_data] into the pin.")) return new_data diff --git a/code/modules/integrated_electronics/core/special_pins/char_pin.dm b/code/modules/integrated_electronics/core/special_pins/char_pin.dm index 730318009ff..2964e93e4c1 100644 --- a/code/modules/integrated_electronics/core/special_pins/char_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/char_pin.dm @@ -3,7 +3,7 @@ name = "char pin" /datum/integrated_io/char/ask_for_pin_data(mob/user) - var/new_data = tgui_input_text(usr, "Please type in one character.","[src] char writing") + var/new_data = tgui_input_text(user, "Please type in one character.","[src] char writing") if(holder.check_interactivity(user) ) to_chat(user, span_notice("You input [new_data ? "new_data" : "NULL"] into the pin.")) write_data_to_pin(new_data) diff --git a/code/modules/integrated_electronics/core/special_pins/color_pin.dm b/code/modules/integrated_electronics/core/special_pins/color_pin.dm index 8442ac8a512..628999b0014 100644 --- a/code/modules/integrated_electronics/core/special_pins/color_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/color_pin.dm @@ -3,7 +3,7 @@ name = "color pin" /datum/integrated_io/color/ask_for_pin_data(mob/user) - var/new_data = input(usr, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color + var/new_data = input(user, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color if(holder.check_interactivity(user) ) to_chat(user, span_notice("You input a new color into the pin.")) write_data_to_pin(new_data) diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm index 41ead574034..efa2379efb5 100644 --- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/dir_pin.dm @@ -3,7 +3,7 @@ name = "dir pin" /datum/integrated_io/dir/ask_for_pin_data(mob/user) - var/new_data = tgui_input_number(usr, "Please type in a valid dir number. \ + var/new_data = tgui_input_number(user, "Please type in a valid dir number. \ Valid dirs are;\n\ North/Fore = [NORTH],\n\ South/Aft = [SOUTH],\n\ diff --git a/code/modules/integrated_electronics/core/special_pins/list_pin.dm b/code/modules/integrated_electronics/core/special_pins/list_pin.dm index a29ad54cbea..ae3ae806a30 100644 --- a/code/modules/integrated_electronics/core/special_pins/list_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/list_pin.dm @@ -53,7 +53,7 @@ to_chat(user, span_warning("The list is empty, there's nothing to remove.")) return if(!target_entry) - target_entry = tgui_input_list(usr, "Which piece of data do you want to remove?", "Remove", my_list) + target_entry = tgui_input_list(user, "Which piece of data do you want to remove?", "Remove", my_list) if(target_entry) my_list.Remove(target_entry) @@ -63,7 +63,7 @@ to_chat(user, span_warning("The list is empty, there's nothing to modify.")) return if(!target_entry) - target_entry = tgui_input_list(usr, "Which piece of data do you want to edit?", "Edit", my_list) + target_entry = tgui_input_list(user, "Which piece of data do you want to edit?", "Edit", my_list) if(target_entry) var/edited_entry = ask_for_data_type(user, target_entry) if(edited_entry) @@ -88,11 +88,11 @@ to_chat(user, span_warning("The list is empty, or too small to do any meaningful swapping.")) return if(!first_target) - first_target = tgui_input_list(usr, "Which piece of data do you want to swap? (1)", "Swap", my_list) + first_target = tgui_input_list(user, "Which piece of data do you want to swap? (1)", "Swap", my_list) if(first_target) if(!second_target) - second_target = tgui_input_list(usr, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target) + second_target = tgui_input_list(user, "Which piece of data do you want to swap? (2)", "Swap", my_list - first_target) if(second_target) var/first_pos = my_list.Find(first_target) diff --git a/code/modules/integrated_electronics/core/special_pins/number_pin.dm b/code/modules/integrated_electronics/core/special_pins/number_pin.dm index 15e9675b0c5..39c69145a1b 100644 --- a/code/modules/integrated_electronics/core/special_pins/number_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/number_pin.dm @@ -4,7 +4,7 @@ // data = 0 /datum/integrated_io/number/ask_for_pin_data(mob/user) - var/new_data = tgui_input_number(usr, "Please type in a number.","[src] number writing") + var/new_data = tgui_input_number(user, "Please type in a number.","[src] number writing") if(isnum(new_data) && holder.check_interactivity(user) ) to_chat(user, span_notice("You input [new_data] into the pin.")) write_data_to_pin(new_data) diff --git a/code/modules/integrated_electronics/core/special_pins/string_pin.dm b/code/modules/integrated_electronics/core/special_pins/string_pin.dm index 41efee9332d..eeefc7f6078 100644 --- a/code/modules/integrated_electronics/core/special_pins/string_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/string_pin.dm @@ -3,7 +3,7 @@ name = "string pin" /datum/integrated_io/string/ask_for_pin_data(mob/user) - var/new_data = tgui_input_text(usr, "Please type in a string.","[src] string writing") + var/new_data = tgui_input_text(user, "Please type in a string.","[src] string writing") new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0) if(new_data && holder.check_interactivity(user) ) diff --git a/code/modules/integrated_electronics/core/tools.dm b/code/modules/integrated_electronics/core/tools.dm index 9bf3ea4889c..ddd87ed60aa 100644 --- a/code/modules/integrated_electronics/core/tools.dm +++ b/code/modules/integrated_electronics/core/tools.dm @@ -114,7 +114,7 @@ var/accepting_refs = 0 /obj/item/integrated_electronics/debugger/attack_self(mob/user) - var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null")) + var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null")) if(!CanInteract(user, GLOB.tgui_physical_state)) return @@ -122,14 +122,14 @@ switch(type_to_use) if("string") accepting_refs = 0 - new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", null, MAX_MESSAGE_LEN) + new_data = tgui_input_text(user, "Now type in a string.","[src] string writing", null, MAX_MESSAGE_LEN) new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0) if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state)) data_to_write = new_data to_chat(user, span_notice("You set \the [src]'s memory to \"[new_data]\".")) if("number") accepting_refs = 0 - new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", min_value=-INFINITY, round_value=FALSE) + new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", min_value=-INFINITY, round_value=FALSE) if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state)) data_to_write = new_data to_chat(user, span_notice("You set \the [src]'s memory to [new_data].")) diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index e69a7187116..0fb72e7088e 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -88,7 +88,7 @@ /obj/item/integrated_circuit/memory/constant/attack_self(mob/user) var/datum/integrated_io/O = outputs[1] - var/type_to_use = tgui_input_list(usr, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null")) + var/type_to_use = tgui_input_list(user, "Please choose a type to use.","[src] type setting", list("string","number","ref", "null")) if(!CanInteract(user, GLOB.tgui_physical_state)) return @@ -96,14 +96,14 @@ switch(type_to_use) if("string") accepting_refs = 0 - new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", MAX_NAME_LEN) + new_data = tgui_input_text(user, "Now type in a string.","[src] string writing", MAX_NAME_LEN) new_data = sanitize(new_data,MAX_NAME_LEN) if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state)) O.data = new_data to_chat(user, span_notice("You set \the [src]'s memory to [O.display_data(O.data)].")) if("number") accepting_refs = 0 - new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", MAX_NAME_LEN) + new_data = tgui_input_number(user, "Now type in a number.","[src] number writing", MAX_NAME_LEN) if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state)) O.data = new_data to_chat(user, span_notice("You set \the [src]'s memory to [O.display_data(O.data)].")) diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index b9c0f7d4195..f455d50eade 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -27,13 +27,13 @@ I.loc = src update_icon() -/obj/structure/bookcase/attackby(obj/item/O as obj, mob/user as mob) +/obj/structure/bookcase/attackby(obj/item/O, mob/user) if(istype(O, /obj/item/book)) user.drop_item() O.loc = src update_icon() else if(istype(O, /obj/item/pen)) - var/newname = sanitizeSafe(tgui_input_text(usr, "What would you like to title this bookshelf?", null, null, MAX_NAME_LEN), MAX_NAME_LEN) + var/newname = sanitizeSafe(tgui_input_text(user, "What would you like to title this bookshelf?", null, null, MAX_NAME_LEN), MAX_NAME_LEN) if(!newname) return else @@ -55,11 +55,11 @@ else ..() -/obj/structure/bookcase/attack_hand(var/mob/user as mob) +/obj/structure/bookcase/attack_hand(var/mob/user) if(contents.len) - var/obj/item/book/choice = tgui_input_list(usr, "Which book would you like to remove from the shelf?", "Book Selection", contents) + var/obj/item/book/choice = tgui_input_list(user, "Which book would you like to remove from the shelf?", "Book Selection", contents) if(choice) - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(!user.canmove || user.stat || user.restrained() || !in_range(loc, user)) return if(ishuman(user)) if(!user.get_active_hand()) @@ -212,7 +212,7 @@ Book Cart End dat = "[dat]" user << browse(replacetext(dat, "", "Penned by [author].
"), "window=book") -/obj/item/book/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/book/attackby(obj/item/W, mob/user) if(carved) if(!store) if(W.w_class < ITEMSIZE_LARGE) @@ -231,27 +231,27 @@ Book Cart End if(unique) to_chat(user, "These pages don't seem to take the ink well. Looks like you can't modify it.") return - var/choice = tgui_input_list(usr, "What would you like to change?", "Change What?", list("Title", "Contents", "Author", "Cancel")) + var/choice = tgui_input_list(user, "What would you like to change?", "Change What?", list("Title", "Contents", "Author", "Cancel")) switch(choice) if("Title") - var/newtitle = reject_bad_text(sanitizeSafe(tgui_input_text(usr, "Write a new title:"))) + var/newtitle = reject_bad_text(sanitizeSafe(tgui_input_text(user, "Write a new title:"))) if(!newtitle) - to_chat(usr, "The title is invalid.") + to_chat(user, "The title is invalid.") return else src.name = newtitle src.title = newtitle if("Contents") - var/content = sanitize(input(usr, "Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN) + var/content = sanitize(input(user, "Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN) if(!content) - to_chat(usr, "The content is invalid.") + to_chat(user, "The content is invalid.") return else src.dat += content if("Author") - var/newauthor = sanitize(tgui_input_text(usr, "Write the author's name:")) + var/newauthor = sanitize(tgui_input_text(user, "Write the author's name:")) if(!newauthor) - to_chat(usr, "The name is invalid.") + to_chat(user, "The name is invalid.") return else src.author = newauthor @@ -313,7 +313,7 @@ Book Cart End var/page = 1 //current page var/list/pages = list() //the contents of each page -/obj/item/book/bundle/proc/show_content(mob/user as mob) +/obj/item/book/bundle/proc/show_content(mob/user) if(!pages.len) return var/dat @@ -332,7 +332,7 @@ Book Cart End dat+= "
Next Page


" if(istype(pages[page], /obj/item/paper)) var/obj/item/paper/P = W - if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) + if(!(ishuman(user) || isobserver(user) || issilicon(user))) dat += "[P.name][stars(P.info)][P.stamps]" else dat += "[P.name][P.info][P.stamps]" @@ -346,15 +346,15 @@ Book Cart End + "[P.scribble ? "
Written on the back:
[P.scribble]" : null]"\ + "", "window=[name]") else if(!isnull(pages[page])) - if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) + if(!(ishuman(user) || isobserver(user) || issilicon(user))) dat += "Page [page][stars(pages[page])]" else dat += "Page [page][pages[page]]" user << browse(dat, "window=[name]") -/obj/item/book/bundle/attack_self(mob/user as mob) +/obj/item/book/bundle/attack_self(mob/user) src.show_content(user) - add_fingerprint(usr) + add_fingerprint(user) update_icon() return diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 1dcdbae571b..48d16e7664a 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -32,8 +32,8 @@ var/author var/SQLquery -/obj/machinery/librarypubliccomp/attack_hand(var/mob/user as mob) - usr.set_machine(src) +/obj/machinery/librarypubliccomp/attack_hand(var/mob/user) + user.set_machine(src) var/dat = "Library Visitor\n" // switch(screenstate) if(0) @@ -168,8 +168,8 @@ var/obj/item/book/M = new path(null) all_books[M.title] = M -/obj/machinery/librarycomp/attack_hand(var/mob/user as mob) - usr.set_machine(src) +/obj/machinery/librarycomp/attack_hand(var/mob/user) + user.set_machine(src) var/dat = "Book Inventory Management\n" // switch(screenstate) if(0) @@ -313,7 +313,7 @@ . = ..() else - usr.set_machine(src) + user.set_machine(src) var/dat = "Book Inventory Management\n" // dat += "

ADMINISTRATIVE MANAGEMENT

" @@ -532,13 +532,13 @@ density = TRUE var/obj/item/book/cache // Last scanned book -/obj/machinery/libraryscanner/attackby(var/obj/O as obj, var/mob/user as mob) +/obj/machinery/libraryscanner/attackby(var/obj/O, var/mob/user) if(istype(O, /obj/item/book)) user.drop_item() O.loc = src -/obj/machinery/libraryscanner/attack_hand(var/mob/user as mob) - usr.set_machine(src) +/obj/machinery/libraryscanner/attack_hand(var/mob/user) + user.set_machine(src) var/dat = "Scanner Control Interface\n" // if(cache) dat += span_darkgray("Data stored in memory.") + "
" diff --git a/code/modules/materials/sheets/metals/rods.dm b/code/modules/materials/sheets/metals/rods.dm index 4363cb55c14..65eabac6aad 100644 --- a/code/modules/materials/sheets/metals/rods.dm +++ b/code/modules/materials/sheets/metals/rods.dm @@ -42,7 +42,7 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \ new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 0), new/datum/stack_recipe("catwalk", /obj/structure/catwalk, 2, time = 80, one_per_turf = 1, on_floor = 1)) -/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/stack/rods/attackby(obj/item/W, mob/user) if(W.has_tool_quality(TOOL_WELDER)) var/obj/item/weldingtool/WT = W.get_welder() @@ -51,8 +51,8 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \ return if(WT.remove_fuel(0,user)) - var/obj/item/stack/material/steel/new_item = new(usr.loc) - new_item.add_to_stacks(usr) + var/obj/item/stack/material/steel/new_item = new(user.loc) + new_item.add_to_stacks(user) for (var/mob/M in viewers(src)) M.show_message(span_notice("[src] is shaped into metal by [user.name] with the weldingtool."), 3, span_notice("You hear welding."), 2) var/obj/item/stack/rods/R = src @@ -75,13 +75,13 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \ ..() /* -/obj/item/stack/rods/attack_self(mob/user as mob) +/obj/item/stack/rods/attack_self(mob/user) src.add_fingerprint(user) if(!istype(user.loc,/turf)) return 0 - if (locate(/obj/structure/grille, usr.loc)) - for(var/obj/structure/grille/G in usr.loc) + if (locate(/obj/structure/grille, user.loc)) + for(var/obj/structure/grille/G in user.loc) if (G.destroyed) G.health = 10 G.density = TRUE @@ -95,15 +95,15 @@ var/global/list/datum/stack_recipe/rods_recipes = list( \ if(get_amount() < 2) to_chat(user, span_warning("You need at least two rods to do this.")) return - to_chat(usr, span_notice("Assembling grille...")) + to_chat(user, span_notice("Assembling grille...")) in_use = 1 - if (!do_after(usr, 10)) + if (!do_after(user, 10)) in_use = 0 return - var/obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc ) - to_chat(usr, span_notice("You assemble a grille")) + var/obj/structure/grille/F = new /obj/structure/grille/ ( user.loc ) + to_chat(user, span_notice("You assemble a grille")) in_use = 0 - F.add_fingerprint(usr) + F.add_fingerprint(user) use(2) return */ diff --git a/code/modules/materials/sheets/organic/animal_products.dm b/code/modules/materials/sheets/organic/animal_products.dm index 6940a5cf71d..02f1aa1d813 100644 --- a/code/modules/materials/sheets/organic/animal_products.dm +++ b/code/modules/materials/sheets/organic/animal_products.dm @@ -162,5 +162,5 @@ name = "handmade blindfold" desc = "A handmade blindfold that covers the eyes, preventing sight." -/obj/item/clothing/accessory/collar/craftable/attack_self(mob/living/user as mob) - given_name = sanitizeSafe(tgui_input_text(usr, "What would you like to label the collar?", "Collar Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) +/obj/item/clothing/accessory/collar/craftable/attack_self(mob/living/user) + given_name = sanitizeSafe(tgui_input_text(user, "What would you like to label the collar?", "Collar Labelling", null, MAX_NAME_LEN), MAX_NAME_LEN) diff --git a/code/modules/media/mediamanager.dm b/code/modules/media/mediamanager.dm index e23866e8e9f..73ac2aa9d35 100644 --- a/code/modules/media/mediamanager.dm +++ b/code/modules/media/mediamanager.dm @@ -62,7 +62,7 @@ if(QDELETED(src.media) || !istype(src.media)) to_chat(user, span_warning("You have no media datum to change, if you're not in the lobby tell an admin.")) return - var/value = input(usr, "Choose your Jukebox volume.", "Jukebox volume", media.volume) + var/value = input(user, "Choose your Jukebox volume.", "Jukebox volume", media.volume) value = round(max(0, min(100, value))) media.update_volume(value) diff --git a/code/modules/media/walkpod.dm b/code/modules/media/walkpod.dm index eadc493a82e..a27c5e2aaeb 100644 --- a/code/modules/media/walkpod.dm +++ b/code/modules/media/walkpod.dm @@ -230,7 +230,7 @@ if(!istype(L)) return if(deployed_headpods) - to_chat(usr, span_warning("The HeadPods are already deployed!")) + to_chat(L, span_warning("The HeadPods are already deployed!")) return deployed_headpods = new () L.put_in_any_hand_if_possible(deployed_headpods) diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm index 953aef9b817..db8690e66f1 100644 --- a/code/modules/mining/abandonedcrates.dm +++ b/code/modules/mining/abandonedcrates.dm @@ -148,12 +148,12 @@ vorestation edit end */ -/obj/structure/closet/crate/secure/loot/togglelock(mob/user as mob) +/obj/structure/closet/crate/secure/loot/togglelock(mob/user) if(!locked) return to_chat(user, span_notice("The crate is locked with a Deca-code lock.")) - var/input = tgui_input_text(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") + var/input = tgui_input_text(user, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") if(!Adjacent(user)) return var/list/sanitised = list() diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index abad46ed3eb..ad9c8649bee 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -29,7 +29,7 @@ var/global/list/total_extraction_beacons = list() else var/A - A = tgui_input_list(usr, "Select a beacon to connect to", "Balloon Extraction Pack", possible_beacons) + A = tgui_input_list(user, "Select a beacon to connect to", "Balloon Extraction Pack", possible_beacons) if(!A) return diff --git a/code/modules/mining/shelter_atoms_vr.dm b/code/modules/mining/shelter_atoms_vr.dm index a5e4de78681..d8847d9c6a9 100644 --- a/code/modules/mining/shelter_atoms_vr.dm +++ b/code/modules/mining/shelter_atoms_vr.dm @@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(unique_deployable) else . += "This capsule has an unknown template stored." -/obj/item/survivalcapsule/attack_self() +/obj/item/survivalcapsule/attack_self(mob/user) //Can't grab when capsule is New() because templates aren't loaded then get_template() if(!used) @@ -89,7 +89,7 @@ GLOBAL_LIST_EMPTY(unique_deployable) playsound(src, 'sound/effects/phasein.ogg', 100, 1) - log_and_message_admins("activated a bluespace capsule at [get_area(T)]!", usr) + log_and_message_admins("activated a bluespace capsule at [get_area(T)]!", user) if(above_location) template.add_roof(above_location) template.annihilate_plants(deploy_location) diff --git a/code/modules/mob/dead/observer/free_vr.dm b/code/modules/mob/dead/observer/free_vr.dm index 811a535ab1e..7473dd7d3ab 100644 --- a/code/modules/mob/dead/observer/free_vr.dm +++ b/code/modules/mob/dead/observer/free_vr.dm @@ -11,7 +11,7 @@ var/global/list/prevent_respawns = list() set category = "OOC.Game" set desc = "Free your job slot, remove yourself from the manifest, and prevent respawning as this character for this round." - var/confirm = tgui_alert(usr, "This will free up your job slot, remove you from the manifest, and allow you to respawn as this character. You can rejoin as another \ + var/confirm = tgui_alert(src, "This will free up your job slot, remove you from the manifest, and allow you to respawn as this character. You can rejoin as another \ character if you like. Do this now?","Quit This Round",list("Quit Round","Cancel")) if(confirm != "Quit Round") return diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 350af8e2a4c..1439c7df41a 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -274,9 +274,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/turf/location = get_turf(src) var/special_role = check_special_role() if(!istype(loc,/obj/machinery/cryopod)) - log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (JMP)",usr) + log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (JMP)",src) else if(special_role) - log_and_message_admins("has ghosted in cryo as [special_role]. (JMP)",usr) + log_and_message_admins("has ghosted in cryo as [special_role]. (JMP)",src) var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 if(ghost) ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. @@ -302,11 +302,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, span_warning("You have no body.")) return if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients - to_chat(usr, span_warning("Another consciousness is in your body... it is resisting you.")) + to_chat(src, span_warning("Another consciousness is in your body... it is resisting you.")) return //VOREStation Add if(prevent_respawns.Find(mind.name)) - to_chat(usr, span_warning("You already quit this round as this character, sorry!")) + to_chat(src, span_warning("You already quit this round as this character, sorry!")) return //VOREStation Add End if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). @@ -316,7 +316,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp found_rune = 1 break if(!found_rune) - to_chat(usr, span_warning("The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.")) + to_chat(src, span_warning("The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.")) return mind.current.ajourn=0 mind.current.key = key @@ -410,8 +410,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost.Game" set desc = "Teleport to a location." - if(!isobserver(usr)) - to_chat(usr, span_filter_notice("Not when you're not dead!")) + if(!isobserver(src)) + to_chat(src, span_filter_notice("Not when you're not dead!")) return var/area/A @@ -419,39 +419,39 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(areaname) A = return_sorted_areas()[areaname] else - A = return_sorted_areas()[tgui_input_list(usr, "Select an area:", "Ghost Teleport", jumpable_areas())] + A = return_sorted_areas()[tgui_input_list(src, "Select an area:", "Ghost Teleport", jumpable_areas())] if(!A) return - if(!isobserver(usr)) - to_chat(usr, "Not when you're not dead!") + if(!isobserver(src)) + to_chat(src, "Not when you're not dead!") return - usr.forceMove(pick(get_area_turfs(A))) - usr.on_mob_jump() + src.forceMove(pick(get_area_turfs(A))) + src.on_mob_jump() /mob/observer/dead/verb/follow(mobname as anything in jumpable_mobs()) set name = "Follow" set category = "Ghost.Game" set desc = "Follow and haunt a mob." - if(!isobserver(usr)) - to_chat(usr, "Not when you're not dead!") + if(!isobserver(src)) + to_chat(src, "Not when you're not dead!") return var/mob/M if(!mobname) var/list/possible_mobs = jumpable_mobs() - var/input = tgui_input_list(usr, "Select a mob:", "Ghost Follow", possible_mobs) + var/input = tgui_input_list(src, "Select a mob:", "Ghost Follow", possible_mobs) if(!input) return M = possible_mobs[input] if(!M) return - if(!isobserver(usr)) - to_chat(usr, "Not when you're not dead!") + if(!isobserver(src)) + to_chat(src, "Not when you're not dead!") return ManualFollow(M || jumpable_mobs()[mobname]) @@ -495,7 +495,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/turf/targetloc = get_turf(target) if(check_holy(targetloc)) - to_chat(usr, span_warning("You cannot follow a mob standing on holy grounds!")) + to_chat(src, span_warning("You cannot follow a mob standing on holy grounds!")) return if(get_z(target) in using_map?.secret_levels) to_chat(src, span_warning("Sorry, that target is in an area that ghosts aren't allowed to go.")) @@ -510,7 +510,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(ismob(target)) var/target_turf = get_turf(target) if(!target_turf) - to_chat(usr, span_warning("This mob does not seem to exist in the tangible world.")) + to_chat(src, span_warning("This mob does not seem to exist in the tangible world.")) return forceMove(target_turf) var/mob/M = target @@ -620,11 +620,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set desc = "Teleport to a mob" set popup_menu = FALSE - if(!isobserver(usr)) //Make sure they're an observer! + if(!isobserver(src)) //Make sure they're an observer! return var/list/possible_mobs = jumpable_mobs() - var/input = tgui_input_list(usr, "Select a mob:", "Ghost Jump", possible_mobs) + var/input = tgui_input_list(src, "Select a mob:", "Ghost Jump", possible_mobs) if(!input) return @@ -656,13 +656,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Analyze Air" set category = "Ghost.Game" - if(!isobserver(usr)) return + if(!isobserver(src)) return // Shamelessly copied from the Gas Analyzers - if (!( istype(usr.loc, /turf) )) + if (!( istype(src.loc, /turf) )) return - var/datum/gas_mixture/environment = usr.loc.return_air() + var/datum/gas_mixture/environment = src.loc.return_air() var/pressure = environment.return_pressure() var/total_moles = environment.total_moles @@ -819,7 +819,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/max_length = 50 - var/message = sanitize(tgui_input_text(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "", max_length)) + var/message = sanitize(tgui_input_text(src, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "", max_length)) if (message) @@ -837,7 +837,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/observer/dead/pointed(atom/A as mob|obj|turf in view()) if(!..()) return 0 - usr.visible_message(span_deadsay(span_bold("[src]") + " points to [A].")) + src.visible_message(span_deadsay(span_bold("[src]") + " points to [A].")) return 1 /mob/observer/dead/proc/manifest(mob/user) @@ -1013,7 +1013,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/finalized = "No" while(finalized == "No" && src.client) - choice = tgui_input_list(usr, "What would you like to use for your ghost sprite?", "Ghost Sprite", possible_ghost_sprites) + choice = tgui_input_list(src, "What would you like to use for your ghost sprite?", "Ghost Sprite", possible_ghost_sprites) if(!choice) return @@ -1045,21 +1045,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/time_till_respawn = time_till_respawn() if(time_till_respawn == -1) // Special case, never allowed to respawn - to_chat(usr, span_warning("Respawning is not allowed!")) + to_chat(src, span_warning("Respawning is not allowed!")) else if(time_till_respawn) // Nonzero time to respawn - to_chat(usr, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.")) + to_chat(src, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.")) return - if(jobban_isbanned(usr, "pAI")) - to_chat(usr,span_warning("You cannot alert pAI cards when you are banned from playing as a pAI.")) + if(jobban_isbanned(src, "pAI")) + to_chat(src,span_warning("You cannot alert pAI cards when you are banned from playing as a pAI.")) return - if(usr.client.prefs?.be_special & BE_PAI) - var/choice = tgui_alert(usr, "Would you like to submit yourself to the recruitment list too?", "Confirmation", list("No", "Yes")) + if(src.client.prefs?.be_special & BE_PAI) + var/choice = tgui_alert(src, "Would you like to submit yourself to the recruitment list too?", "Confirmation", list("No", "Yes")) if(!choice) return if(choice == "Yes") - paiController.recruitWindow(usr) + paiController.recruitWindow(src) var/count = 0 for(var/obj/item/paicard/p in all_pai_cards) var/obj/item/paicard/PP = p @@ -1069,9 +1069,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp PP.alertUpdate() spawn(54) PP.cut_overlays() - to_chat(usr,span_notice("Flashing the displays of [count] unoccupied PAIs.")) + to_chat(src,span_notice("Flashing the displays of [count] unoccupied PAIs.")) else - to_chat(usr,span_warning("You have 'Be pAI' disabled in your character prefs, so we can't help you.")) + to_chat(src,span_warning("You have 'Be pAI' disabled in your character prefs, so we can't help you.")) /mob/observer/dead/speech_bubble_appearance() return "ghost" diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index 5ca6b52f310..5e78750f7d6 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -3,7 +3,7 @@ set name = "Join Into Soulcatcher" set desc = "Select a player with a working NIF + Soulcatcher NIFSoft to join into it." - var/picked = tgui_input_list(usr, "Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player", player_list) + var/picked = tgui_input_list(src, "Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player", player_list) //Didn't pick anyone or picked a null if(!picked) @@ -110,10 +110,10 @@ set desc = "Find an active ghost pod" set popup_menu = FALSE - if(!isobserver(usr)) //Make sure they're an observer! + if(!isobserver(src)) //Make sure they're an observer! return - var/input = tgui_input_list(usr, "Select a ghost pod:", "Ghost Jump", observe_list_format(active_ghost_pods)) + var/input = tgui_input_list(src, "Select a ghost pod:", "Ghost Jump", observe_list_format(active_ghost_pods)) if(!input) to_chat(src, span_filter_notice("No active ghost pods detected.")) return @@ -137,7 +137,7 @@ set desc = "Find a Auto Resleever" set popup_menu = FALSE - if(!isobserver(usr)) //Make sure they're an observer! + if(!isobserver(src)) //Make sure they're an observer! return var/list/ar = list() diff --git a/code/modules/mob/living/bot/SLed209bot.dm b/code/modules/mob/living/bot/SLed209bot.dm index 2c1a8c9a554..0bac1f9e92d 100644 --- a/code/modules/mob/living/bot/SLed209bot.dm +++ b/code/modules/mob/living/bot/SLed209bot.dm @@ -65,12 +65,12 @@ item_state = "buildpipe" created_name = "SL-ED-209 Security Robot" -/obj/item/secbot_assembly/ed209_assembly/slime/attackby(var/obj/item/W as obj, var/mob/user as mob) // Here in the event it's added into a PoI or some such. Standard construction relies on the standard ED up until taser. +/obj/item/secbot_assembly/ed209_assembly/slime/attackby(var/obj/item/W, var/mob/user) // Here in the event it's added into a PoI or some such. Standard construction relies on the standard ED up until taser. if(istype(W, /obj/item/pen)) var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && src.loc != usr) + if(!in_range(src, user) && src.loc != user) return created_name = t return diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index fcf683aff05..b977761279e 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -83,14 +83,14 @@ created_name = "ED-209 Security Robot" var/lasercolor = "" -/obj/item/secbot_assembly/ed209_assembly/attackby(var/obj/item/W as obj, var/mob/user as mob) +/obj/item/secbot_assembly/ed209_assembly/attackby(var/obj/item/W, var/mob/user) ..() if(istype(W, /obj/item/pen)) var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", name, created_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && src.loc != usr) + if(!in_range(src, user) && src.loc != user) return created_name = t return diff --git a/code/modules/mob/living/carbon/give.dm b/code/modules/mob/living/carbon/give.dm index 93559fbd982..8392bcf01c9 100644 --- a/code/modules/mob/living/carbon/give.dm +++ b/code/modules/mob/living/carbon/give.dm @@ -18,7 +18,7 @@ to_chat(src, span_warning("You don't have anything in your hands to give to \the [target].")) return - usr.visible_message(span_notice("\The [usr] holds out \the [I] to \the [target]."), span_notice("You hold out \the [I] to \the [target], waiting for them to accept it.")) + src.visible_message(span_notice("\The [src] holds out \the [I] to \the [target]."), span_notice("You hold out \the [I] to \the [target], waiting for them to accept it.")) if(tgui_alert(target,"[src] wants to give you \a [I]. Will you accept it?","Item Offer",list("Yes","No")) != "Yes") target.visible_message(span_notice("\The [src] tried to hand \the [I] to \the [target], but \the [target] didn't want it.")) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index e73b9462452..1f2d4492ec2 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -337,7 +337,7 @@ var/list/_simple_mob_default_emotes = list( var/datum/gender/T = gender_datums[get_visible_gender()] - pose = strip_html_simple(tgui_input_text(usr, "This is [src]. [T.he]...", "Pose", null)) + pose = strip_html_simple(tgui_input_text(src, "This is [src]. [T.he]...", "Pose", null)) /mob/living/carbon/human/verb/set_flavor() set name = "Set Flavour Text" diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index 25669fb6f86..283e343cc9e 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -36,7 +36,7 @@ set name = "Set Gender Identity" set desc = "Sets the pronouns when examined and performing an emote." set category = "IC.Settings" - var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity:", "Set Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) + var/new_gender_identity = tgui_input_list(src, "Please select a gender Identity:", "Set Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) if(!new_gender_identity) return 0 change_gender_identity(new_gender_identity) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 9f6cdce6678..0da110677a9 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -298,7 +298,7 @@ if((stat == 2 || src.losebreath) && get_dist(user, src) <= 3) msg += span_warning("[T.He] [T.does] not appear to be breathing.") if(ishuman(user) && !user.stat && Adjacent(user)) - user.visible_message(span_infoplain(span_bold("[usr]") + " checks [src]'s pulse."), span_infoplain("You check [src]'s pulse.")) + user.visible_message(span_infoplain(span_bold("[user]") + " checks [src]'s pulse."), span_infoplain("You check [src]'s pulse.")) spawn(15) if(isobserver(user) || (Adjacent(user) && !user.stat)) // If you're a corpse then you can't exactly check their pulse, but ghosts can see anything if(pulse == PULSE_NONE) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index a9e83c0b4ab..7243432053b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -880,19 +880,19 @@ remove_verb(src, /mob/living/carbon/human/proc/morph) return - var/new_facial = input(usr, "Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) as color + var/new_facial = input(src, "Please select facial hair color.", "Character Generation",rgb(r_facial,g_facial,b_facial)) as color if(new_facial) r_facial = hex2num(copytext(new_facial, 2, 4)) g_facial = hex2num(copytext(new_facial, 4, 6)) b_facial = hex2num(copytext(new_facial, 6, 8)) - var/new_hair = input(usr, "Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) as color + var/new_hair = input(src, "Please select hair color.", "Character Generation",rgb(r_hair,g_hair,b_hair)) as color if(new_facial) r_hair = hex2num(copytext(new_hair, 2, 4)) g_hair = hex2num(copytext(new_hair, 4, 6)) b_hair = hex2num(copytext(new_hair, 6, 8)) - var/new_eyes = input(usr, "Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) as color + var/new_eyes = input(src, "Please select eye color.", "Character Generation",rgb(r_eyes,g_eyes,b_eyes)) as color if(new_eyes) r_eyes = hex2num(copytext(new_eyes, 2, 4)) g_eyes = hex2num(copytext(new_eyes, 4, 6)) @@ -909,7 +909,7 @@ hairs.Add(H.name) // add hair name to hairs qdel(H) // delete the hair after it's all done - var/new_style = tgui_input_list(usr, "Please select hair style", "Character Generation", hairs) + var/new_style = tgui_input_list(src, "Please select hair style", "Character Generation", hairs) // if new style selected (not cancel) if (new_style) @@ -924,12 +924,12 @@ fhairs.Add(H.name) qdel(H) - new_style = tgui_input_list(usr, "Please select facial style", "Character Generation", fhairs) + new_style = tgui_input_list(src, "Please select facial style", "Character Generation", fhairs) if(new_style) f_style = new_style - var/new_gender = tgui_alert(usr, "Please select gender.", "Character Generation", list("Male", "Female", "Neutral")) + var/new_gender = tgui_alert(src, "Please select gender.", "Character Generation", list("Male", "Female", "Neutral")) if (new_gender) if(new_gender == "Male") gender = MALE @@ -957,16 +957,16 @@ var/list/creatures = list() for(var/mob/living/carbon/h in mob_list) creatures += h - var/mob/target = tgui_input_list(usr, "Who do you want to project your mind to?", "Project Mind", creatures) + var/mob/target = tgui_input_list(src, "Who do you want to project your mind to?", "Project Mind", creatures) if (isnull(target)) return - var/say = sanitize(tgui_input_text(usr, "What do you wish to say?")) + var/say = sanitize(tgui_input_text(src, "What do you wish to say?")) if(mRemotetalk in target.mutations) target.show_message(span_filter_say("[span_blue("You hear [src.real_name]'s voice: [say]")]")) else target.show_message(span_filter_say("[span_blue("You hear a voice that seems to echo around the room: [say]")]")) - usr.show_message(span_filter_say("[span_blue("You project your mind into [target.real_name]: [say]")]")) + src.show_message(span_filter_say("[span_blue("You project your mind into [target.real_name]: [say]")]")) log_say("(TPATH to [key_name(target)]) [say]",src) for(var/mob/observer/dead/G in mob_list) G.show_message(span_filter_say(span_italics("Telepathic message from " + span_bold("[src]") + " to " + span_bold("[target]") + ": [say]"))) @@ -1078,7 +1078,7 @@ set name = "sim" set background = 1 - var/damage = input(usr, "Wound damage","Wound damage") as num + var/damage = input(src, "Wound damage","Wound damage") as num var/germs = 0 var/tdamage = 0 @@ -1370,7 +1370,7 @@ var/max_length = bloody_hands * 30 //tweeter style - var/message = sanitize(tgui_input_text(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")) + var/message = sanitize(tgui_input_text(src, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")) if (message) var/used_blood_amount = round(length(message) / 30, 1) diff --git a/code/modules/mob/living/carbon/human/human_modular_limbs.dm b/code/modules/mob/living/carbon/human/human_modular_limbs.dm index 7e1d4e1e40e..39d6aea0c47 100644 --- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm +++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm @@ -183,7 +183,7 @@ if(!length(detachable_limbs)) to_chat(src, span_warning("You have no detachable limbs.")) return FALSE - var/obj/item/organ/external/E = tgui_input_list(usr, "Which limb do you wish to detach?", "Limb Removal", detachable_limbs) + var/obj/item/organ/external/E = tgui_input_list(src, "Which limb do you wish to detach?", "Limb Removal", detachable_limbs) if(!check_can_detach_modular_limb(E)) return FALSE if(!do_after(src, 2 SECONDS, src)) diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 79168e922ad..3d43b7d8c58 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -22,7 +22,7 @@ var/datum/sprite_accessory/hair/test = hair_styles_list[hair_string] if(test.flags & HAIR_TIEABLE) valid_hairstyles.Add(hair_string) - selected_string = tgui_input_list(usr, "Select a new hairstyle", "Your hairstyle", valid_hairstyles) + selected_string = tgui_input_list(src, "Select a new hairstyle", "Your hairstyle", valid_hairstyles) if(incapacitated()) to_chat(src, span_warning("You can't mess with your hair right now!")) return @@ -90,11 +90,11 @@ var/text = null targets += getmobs() //Fill list, prompt user with list - target = tgui_input_list(usr, "Select a creature!", "Speak to creature", targets) + target = tgui_input_list(src, "Select a creature!", "Speak to creature", targets) if(!target) return - text = tgui_input_text(usr, "What would you like to say?", "Speak to creature", null, MAX_MESSAGE_LEN) + text = tgui_input_text(src, "What would you like to say?", "Speak to creature", null, MAX_MESSAGE_LEN) text = sanitize(text, MAX_MESSAGE_LEN) @@ -134,7 +134,7 @@ set desc = "Whisper silently to someone over a distance." set category = "Abilities.General" - var/msg = sanitize(tgui_input_text(usr, "Message:", "Psychic Whisper")) + var/msg = sanitize(tgui_input_text(src, "Message:", "Psychic Whisper")) if(msg) log_say("(PWHISPER to [key_name(M)]) [msg]", src) to_chat(M, span_filter_say("[span_green("You hear a strange, alien voice in your head... [msg]")]")) @@ -370,7 +370,7 @@ var/list/states if(!states) states = params2list(robohead.monitor_styles) - var/choice = tgui_input_list(usr, "Select a screen icon:", "Screen Icon Choice", states) + var/choice = tgui_input_list(src, "Select a screen icon:", "Screen Icon Choice", states) if(choice) E.eye_icon_location = robohead.monitor_icon E.eye_icon = states[choice] diff --git a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm index 1145e796326..e0b87525b18 100644 --- a/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/lleill/lleill_abilities.dm @@ -47,7 +47,7 @@ last_special = world.time + 50 var/new_species = null - new_species = tgui_input_list(usr, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src)) + new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src)) if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species) return @@ -73,7 +73,7 @@ last_special = world.time + 50 - var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color + var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color if(!new_skin) return lleill_set_colour(new_skin) @@ -142,13 +142,13 @@ return else visible_message(span_infoplain(span_bold("\The [src]") + " begins to change the form of \the [I].")) - if(!do_after(usr, 10 SECONDS, I, exclusive = TASK_USER_EXCLUSIVE)) + if(!do_after(src, 10 SECONDS, I, exclusive = TASK_USER_EXCLUSIVE)) visible_message(span_infoplain(span_bold("\The [src]") + " leaves \the [I] in its original form.")) return 0 visible_message(span_infoplain(span_bold("\The [src]") + " transmutes \the [I] into \the [transmute_product.name].")) drop_item(I) qdel(I) - var/spawnloc = get_turf(usr) + var/spawnloc = get_turf(src) var/obj/item/N = new transmute_product(spawnloc) put_in_active_hand(N) species.lleill_energy -= energy_cost @@ -361,13 +361,13 @@ return else visible_message(span_infoplain(span_bold("\The [src]") + " begins to change the form of \the [I].")) - if(!do_after(usr, 10 SECONDS, I, exclusive = TASK_USER_EXCLUSIVE)) + if(!do_after(src, 10 SECONDS, I, exclusive = TASK_USER_EXCLUSIVE)) visible_message(span_infoplain(span_bold("\The [src]") + " leaves \the [I] in its original form.")) return 0 visible_message(span_infoplain(span_bold("\The [src]") + " transmutes \the [I] into \the [transmute_product.name].")) drop_item(I) qdel(I) - var/spawnloc = get_turf(usr) + var/spawnloc = get_turf(src) var/obj/item/N = new transmute_product(spawnloc) put_in_active_hand(N) species.lleill_energy -= energy_cost diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm index ade1ef0fc8a..ae7b7297c80 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift.dm @@ -111,13 +111,13 @@ var/list/wrapped_species_by_ref = list() visible_message(span_notice("\The [src]'s form contorts subtly.")) if(valid_hairstyles.len) - var/new_hair = tgui_input_list(usr, "Select a hairstyle.", "Shapeshifter Hair", valid_hairstyles) + var/new_hair = tgui_input_list(src, "Select a hairstyle.", "Shapeshifter Hair", valid_hairstyles) change_hair(new_hair ? new_hair : "Bald") if(valid_gradstyles.len) - var/new_hair = tgui_input_list(usr, "Select a hair gradient style.", "Shapeshifter Hair", valid_gradstyles) + var/new_hair = tgui_input_list(src, "Select a hair gradient style.", "Shapeshifter Hair", valid_gradstyles) change_hair_gradient(new_hair ? new_hair : "None") if(valid_facialhairstyles.len) - var/new_hair = tgui_input_list(usr, "Select a facial hair style.", "Shapeshifter Hair", valid_facialhairstyles) + var/new_hair = tgui_input_list(src, "Select a facial hair style.", "Shapeshifter Hair", valid_facialhairstyles) change_facial_hair(new_hair ? new_hair : "Shaved") /mob/living/carbon/human/proc/shapeshifter_select_gender() @@ -130,11 +130,11 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 - var/new_gender = tgui_input_list(usr, "Please select a gender.", "Shapeshifter Gender", list(FEMALE, MALE, NEUTER, PLURAL)) + var/new_gender = tgui_input_list(src, "Please select a gender.", "Shapeshifter Gender", list(FEMALE, MALE, NEUTER, PLURAL)) if(!new_gender) return - var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity.", "Shapeshifter Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) //VOREStation Edit + var/new_gender_identity = tgui_input_list(src, "Please select a gender Identity.", "Shapeshifter Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) //VOREStation Edit if(!new_gender_identity) return @@ -153,7 +153,7 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 var/new_species = null - new_species = tgui_input_list(usr, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src)) + new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src)) if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species) return @@ -179,7 +179,7 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 - var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color + var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", rgb(r_skin, g_skin, b_skin)) as null|color if(!new_skin) return shapeshifter_set_colour(new_skin) @@ -217,15 +217,15 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 - var/new_hair = input(usr, "Please select a new hair color.", "Hair Colour") as color + var/new_hair = input(src, "Please select a new hair color.", "Hair Colour") as color if(!new_hair) return shapeshifter_set_hair_color(new_hair) - var/new_grad = input(usr, "Please select a new hair gradient color.", "Hair Gradient Colour") as color + var/new_grad = input(src, "Please select a new hair gradient color.", "Hair Gradient Colour") as color if(!new_grad) return shapeshifter_set_grad_color(new_grad) - var/new_fhair = input(usr, "Please select a new facial hair color.", "Facial Hair Color") as color + var/new_fhair = input(src, "Please select a new facial hair color.", "Facial Hair Color") as color if(!new_fhair) return shapeshifter_set_facial_color(new_fhair) @@ -317,7 +317,7 @@ var/list/wrapped_species_by_ref = list() last_special = world.time + 50 var/current_color = rgb(r_eyes,g_eyes,b_eyes) - var/new_eyes = input(usr, "Pick a new color for your eyes.","Eye Color", current_color) as null|color + var/new_eyes = input(src, "Pick a new color for your eyes.","Eye Color", current_color) as null|color if(!new_eyes) return diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm index def65e1ffda..bd1ece17528 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm @@ -28,7 +28,7 @@ //Allow color picks var/current_pri_color = rgb(r_ears,g_ears,b_ears) - var/new_pri_color = input(usr, "Pick primary ear color:","Ear Color (Pri)", current_pri_color) as null|color + var/new_pri_color = input(src, "Pick primary ear color:","Ear Color (Pri)", current_pri_color) as null|color if(new_pri_color) var/list/new_color_rgb_list = hex2rgb(new_pri_color) r_ears = new_color_rgb_list[1] @@ -38,7 +38,7 @@ //Indented inside positive primary color choice, don't bother if they clicked cancel var/current_sec_color = rgb(r_ears2,g_ears2,b_ears2) - var/new_sec_color = input(usr, "Pick secondary ear color (only applies to some ears):","Ear Color (sec)", current_sec_color) as null|color + var/new_sec_color = input(src, "Pick secondary ear color (only applies to some ears):","Ear Color (sec)", current_sec_color) as null|color if(new_sec_color) new_color_rgb_list = hex2rgb(new_sec_color) r_ears2 = new_color_rgb_list[1] @@ -47,7 +47,7 @@ var/current_ter_color = rgb(r_ears3,g_ears3,b_ears3) - var/new_ter_color = input(usr, "Pick tertiary ear color (only applies to some ears):","Ear Color (sec)", current_ter_color) as null|color + var/new_ter_color = input(src, "Pick tertiary ear color (only applies to some ears):","Ear Color (sec)", current_ter_color) as null|color if(new_ter_color) new_color_rgb_list = hex2rgb(new_sec_color) r_ears3 = new_color_rgb_list[1] @@ -83,7 +83,7 @@ for(var/channel in 1 to ear_secondary_style.get_color_channel_count()) var/channel_name = GLOB.fancy_sprite_accessory_color_channel_names[channel] var/default = LAZYACCESS(ear_secondary_colors, channel) || "#ffffff" - var/new_color = tgui_color_picker(usr, "Pick [channel_name]", "Ear Color ([channel_name])", default) + var/new_color = tgui_color_picker(src, "Pick [channel_name]", "Ear Color ([channel_name])", default) new_colors += new_color || default update_hair() @@ -114,7 +114,7 @@ //Allow color picks var/current_pri_color = rgb(r_tail,g_tail,b_tail) - var/new_pri_color = input(usr, "Pick primary tail color:","Tail Color (Pri)", current_pri_color) as null|color + var/new_pri_color = input(src, "Pick primary tail color:","Tail Color (Pri)", current_pri_color) as null|color if(new_pri_color) var/list/new_color_rgb_list = hex2rgb(new_pri_color) r_tail = new_color_rgb_list[1] @@ -124,7 +124,7 @@ //Indented inside positive primary color choice, don't bother if they clicked cancel var/current_sec_color = rgb(r_tail2,g_tail2,b_tail2) - var/new_sec_color = input(usr, "Pick secondary tail color (only applies to some tails):","Tail Color (sec)", current_sec_color) as null|color + var/new_sec_color = input(src, "Pick secondary tail color (only applies to some tails):","Tail Color (sec)", current_sec_color) as null|color if(new_sec_color) new_color_rgb_list = hex2rgb(new_sec_color) r_tail2 = new_color_rgb_list[1] @@ -133,7 +133,7 @@ var/current_ter_color = rgb(r_tail3,g_tail3,b_tail3) - var/new_ter_color = input(usr, "Pick tertiary tail color (only applies to some tails):","Tail Color (sec)", current_ter_color) as null|color + var/new_ter_color = input(src, "Pick tertiary tail color (only applies to some tails):","Tail Color (sec)", current_ter_color) as null|color if(new_ter_color) new_color_rgb_list = hex2rgb(new_ter_color) r_tail3 = new_color_rgb_list[1] @@ -168,7 +168,7 @@ //Allow color picks var/current_color = rgb(r_wing,g_wing,b_wing) - var/new_color = input(usr, "Pick wing color:","Wing Color", current_color) as null|color + var/new_color = input(src, "Pick wing color:","Wing Color", current_color) as null|color if(new_color) var/list/new_color_rgb_list = hex2rgb(new_color) r_wing = new_color_rgb_list[1] @@ -178,7 +178,7 @@ //Indented inside positive primary color choice, don't bother if they clicked cancel var/current_sec_color = rgb(r_wing2,g_wing2,b_wing2) - var/new_sec_color = input(usr, "Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) as null|color + var/new_sec_color = input(src, "Pick secondary wing color (only applies to some wings):","Wing Color (sec)", current_sec_color) as null|color if(new_sec_color) new_color_rgb_list = hex2rgb(new_sec_color) r_wing2 = new_color_rgb_list[1] @@ -187,7 +187,7 @@ var/current_ter_color = rgb(r_wing3,g_wing3,b_wing3) - var/new_ter_color = input(usr, "Pick tertiary wing color (only applies to some wings):","Wing Color (sec)", current_ter_color) as null|color + var/new_ter_color = input(src, "Pick tertiary wing color (only applies to some wings):","Wing Color (sec)", current_ter_color) as null|color if(new_ter_color) new_color_rgb_list = hex2rgb(new_ter_color) r_wing3 = new_color_rgb_list[1] diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig.dm index d525dde2a6b..d948e336778 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig.dm @@ -235,7 +235,7 @@ default_worn_icon = 'icons/mob/spacesuit.dmi' //Copy pasted most of this proc from base because I don't feel like rewriting the base proc with a shit load of exceptions -/obj/item/rig/protean/attackby(obj/item/W as obj, mob/living/user as mob) +/obj/item/rig/protean/attackby(obj/item/W, mob/living/user) if(!istype(user)) return 0 if(dead) @@ -339,7 +339,7 @@ to_chat(user, "There are no installed modules to remove.") return - var/removal_choice = tgui_input_list(usr, "Which module would you like to remove?", "Removal Choice", possible_removals) + var/removal_choice = tgui_input_list(user, "Which module would you like to remove?", "Removal Choice", possible_removals) if(!removal_choice) return diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig_tgui.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig_tgui.dm index 6c90baed522..189467e1528 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig_tgui.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_rig_tgui.dm @@ -87,7 +87,7 @@ So here it sits, snowflake code for a single item. return data /* -/obj/item/rig/protean/tgui_act(action, params) +/obj/item/rig/protean/tgui_act(action, params, datum/tgui/ui) switch(action) if("toggle_seals") toggle_seals(wearer) @@ -96,7 +96,7 @@ So here it sits, snowflake code for a single item. toggle_cooling(wearer) . = TRUE if("toggle_ai_control") - to_chat(usr, span_notice("Proteans cannot be AI controlled.")) + to_chat(ui.user, span_notice("Proteans cannot be AI controlled.")) . = TRUE if("toggle_suit_lock") locked = !locked diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/traits_tutorial.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/traits_tutorial.dm index e5671811fc2..567da706255 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/traits_tutorial.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/traits_tutorial.dm @@ -36,7 +36,7 @@ TGUI frontend path: tgui\packages\tgui\interfaces\TraitTutorial.tsx var/list/list_of_traits = species.traits if(!LAZYLEN(list_of_traits)) //Although we shouldn't show up if no traits, leaving this in case someone loses theirs after (re)spawning. - to_chat(usr, span_notice("You do not have any custom traits!")) + to_chat(src, span_notice("You do not have any custom traits!")) return //Dont want an empty TGUI panel and list by accident after all. @@ -64,13 +64,13 @@ TGUI frontend path: tgui\packages\tgui\interfaces\TraitTutorial.tsx if(UI_choice == "To Chat") - var/to_chat_choice = tgui_input_list(usr, "Please choose the trait to be explained", "Print to Chat", trait_names, null) + var/to_chat_choice = tgui_input_list(src, "Please choose the trait to be explained", "Print to Chat", trait_names, null) if(to_chat_choice) - to_chat(usr,span_notice(span_bold("Name:") + " [to_chat_choice] \n " + span_bold("Category:") + " [trait_category[to_chat_choice]] \n " + span_bold("Description:") + " [trait_desc[to_chat_choice]] \n \ + to_chat(src,span_notice(span_bold("Name:") + " [to_chat_choice] \n " + span_bold("Category:") + " [trait_category[to_chat_choice]] \n " + span_bold("Description:") + " [trait_desc[to_chat_choice]] \n \ " + span_bold("Guide:") + " \n [trait_tutorial[to_chat_choice]]")) else if(UI_choice == "TGUI") fancy_UI.set_vars(trait_names, trait_category, trait_desc, trait_tutorial) - fancy_UI.tgui_interact(usr) + fancy_UI.tgui_interact(src) diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm index 2b6a51fc51c..2bd7749a4a4 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm @@ -67,7 +67,7 @@ to_chat(src, span_alium("Their plasma vessel is missing.")) return - var/amount = tgui_input_number(usr, "Amount:", "Transfer Plasma to [M]") + var/amount = tgui_input_number(src, "Amount:", "Transfer Plasma to [M]") if (amount) amount = abs(round(amount)) if(check_alien_ability(amount,0,O_PLASMA)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a4f12412cb4..98c25f096c6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -99,17 +99,17 @@ if(!..()) return 0 - usr.visible_message(span_filter_notice(span_bold("[src]") + " points to [A].")) + src.visible_message(span_filter_notice(span_bold("[src]") + " points to [A].")) return 1 /mob/living/verb/succumb() set name = "Succumb to death" set category = "IC.Game" set desc = "Press this button if you are in crit and wish to die. Use this sparingly (ending a scene, no medical, etc.)" - var/confirm1 = tgui_alert(usr, "Pressing this button will kill you instantenously! Are you sure you wish to proceed?", "Confirm wish to succumb", list("No","Yes")) + var/confirm1 = tgui_alert(src, "Pressing this button will kill you instantenously! Are you sure you wish to proceed?", "Confirm wish to succumb", list("No","Yes")) var/confirm2 = "No" if(confirm1 == "Yes") - confirm2 = tgui_alert(usr, "Pressing this buttom will really kill you, no going back", "Are you sure?", list("Yes", "No")) //Swapped answers to protect from accidental double clicks. + confirm2 = tgui_alert(src, "Pressing this buttom will really kill you, no going back", "Are you sure?", list("Yes", "No")) //Swapped answers to protect from accidental double clicks. if (src.health < 0 && stat != DEAD && confirm1 == "Yes" && confirm2 == "Yes") // Checking both confirm1 and confirm2 for good measure. I don't trust TGUI. src.death() to_chat(src, span_blue("You have given up life and succumbed to death.")) @@ -716,21 +716,21 @@ return -/mob/living/proc/Examine_OOC() +/mob/living/proc/Examine_OOC(mob/user = src) set name = "Examine Meta-Info (OOC)" set category = "OOC.Game" set src in view() //VOREStation Edit Start - Making it so SSD people have prefs with fallback to original style. if(CONFIG_GET(flag/allow_metadata)) if(ooc_notes) - ooc_notes_window(usr) -// to_chat(usr, span_filter_notice("[src]'s Metainfo:
[ooc_notes]")) + ooc_notes_window(user) +// to_chat(user, span_filter_notice("[src]'s Metainfo:
[ooc_notes]")) else if(client) - to_chat(usr, span_filter_notice("[src]'s Metainfo:
[client.prefs.read_preference(/datum/preference/text/living/ooc_notes)]")) + to_chat(user, span_filter_notice("[src]'s Metainfo:
[client.prefs.read_preference(/datum/preference/text/living/ooc_notes)]")) else - to_chat(usr, span_filter_notice("[src] does not have any stored infomation!")) + to_chat(user, span_filter_notice("[src] does not have any stored infomation!")) else - to_chat(usr, span_filter_notice("OOC Metadata is not supported by this server!")) + to_chat(user, span_filter_notice("OOC Metadata is not supported by this server!")) //VOREStation Edit End - Making it so SSD people have prefs with fallback to original style. return diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index 3b6806b9f9b..678adca4baa 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -28,5 +28,5 @@ allow_self_surgery = !allow_self_surgery - to_chat(usr, span_notice("You will [allow_self_surgery ? "now" : "no longer"] attempt to operate upon yourself.")) + to_chat(src, span_notice("You will [allow_self_surgery ? "now" : "no longer"] attempt to operate upon yourself.")) log_admin("DEBUG \[[world.timeofday]\]: [src.ckey ? "[src.name]:([src.ckey])" : "[src.name]"] has [allow_self_surgery ? "Enabled" : "Disabled"] self surgery.") diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index 5f90e952d63..a196169dc8c 100644 --- a/code/modules/mob/living/living_vr.dm +++ b/code/modules/mob/living/living_vr.dm @@ -12,13 +12,13 @@ var/sayselect = tgui_alert(src, "Which say-verb do you wish to customize?", "Select Verb", list("Say","Whisper","Ask (?)","Exclaim/Shout/Yell (!)","Cancel")) if(sayselect == "Say") - custom_say = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'says': [src] says, \"Hi.\"", "Custom Say", null))) + custom_say = lowertext(sanitize(tgui_input_text(src, "This word or phrase will appear instead of 'says': [src] says, \"Hi.\"", "Custom Say", null))) else if(sayselect == "Whisper") - custom_whisper = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'whispers': [src] whispers, \"Hi...\"", "Custom Whisper", null))) + custom_whisper = lowertext(sanitize(tgui_input_text(src, "This word or phrase will appear instead of 'whispers': [src] whispers, \"Hi...\"", "Custom Whisper", null))) else if(sayselect == "Ask (?)") - custom_ask = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'asks': [src] asks, \"Hi?\"", "Custom Ask", null))) + custom_ask = lowertext(sanitize(tgui_input_text(src, "This word or phrase will appear instead of 'asks': [src] asks, \"Hi?\"", "Custom Ask", null))) else if(sayselect == "Exclaim/Shout/Yell (!)") - custom_exclaim = lowertext(sanitize(tgui_input_text(usr, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [src] exclaims, \"Hi!\"", "Custom Exclaim", null))) + custom_exclaim = lowertext(sanitize(tgui_input_text(src, "This word or phrase will appear instead of 'exclaims', 'shouts' or 'yells': [src] exclaims, \"Hi!\"", "Custom Exclaim", null))) else return @@ -29,63 +29,63 @@ if(usr != src) return - 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 OOC notes panel!", "Game Preference" , html_decode(ooc_notes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(usr)) + var/new_metadata = strip_html_simple(tgui_input_text(src, "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 OOC notes panel!", "Game Preference" , html_decode(ooc_notes), multiline = TRUE, prevent_enter = TRUE)) + if(new_metadata && CanUseTopic(src)) ooc_notes = new_metadata client.prefs.update_preference_by_type(/datum/preference/text/living/ooc_notes, new_metadata) - to_chat(usr, span_filter_notice("OOC notes updated. Don't forget to save!")) - log_admin("[key_name(usr)] updated their OOC notes mid-round.") - ooc_notes_window(usr) + to_chat(src, span_filter_notice("OOC notes updated. Don't forget to save!")) + log_admin("[key_name(src)] updated their OOC notes mid-round.") + ooc_notes_window(src) set_metainfo_likes(FALSE) set_metainfo_dislikes(FALSE) /mob/living/proc/set_metainfo_panel() if(usr != src) return - 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 OOC notes panel!", "Game Preference" , html_decode(ooc_notes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(usr)) + var/new_metadata = strip_html_simple(tgui_input_text(src, "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 OOC notes panel!", "Game Preference" , html_decode(ooc_notes), multiline = TRUE, prevent_enter = TRUE)) + if(new_metadata && CanUseTopic(src)) ooc_notes = new_metadata client.prefs.update_preference_by_type(/datum/preference/text/living/ooc_notes, new_metadata) - to_chat(usr, span_filter_notice("OOC notes updated. Don't forget to save!")) - log_admin("[key_name(usr)] updated their OOC notes mid-round.") - ooc_notes_window(usr) + to_chat(src, span_filter_notice("OOC notes updated. Don't forget to save!")) + log_admin("[key_name(src)] updated their OOC notes mid-round.") + ooc_notes_window(src) /mob/living/proc/set_metainfo_likes(var/reopen = TRUE) if(usr != src) return - 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 OOC notes panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(ooc_notes_likes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(usr)) + var/new_metadata = strip_html_simple(tgui_input_text(src, "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 OOC notes panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(ooc_notes_likes), multiline = TRUE, prevent_enter = TRUE)) + if(new_metadata && CanUseTopic(src)) if(new_metadata == "!clear") new_metadata = "" ooc_notes_likes = new_metadata client.prefs.update_preference_by_type(/datum/preference/text/living/ooc_notes_likes, new_metadata) - to_chat(usr, span_filter_notice("OOC note likes have been updated. Don't forget to save!")) - log_admin("[key_name(usr)] updated their OOC note likes mid-round.") + to_chat(src, span_filter_notice("OOC note likes have been updated. Don't forget to save!")) + log_admin("[key_name(src)] updated their OOC note likes mid-round.") if(reopen) - ooc_notes_window(usr) + ooc_notes_window(src) /mob/living/proc/set_metainfo_dislikes(var/reopen = TRUE) if(usr != src) return - 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 OOC notes panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(ooc_notes_dislikes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(usr)) + var/new_metadata = strip_html_simple(tgui_input_text(src, "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 OOC notes panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(ooc_notes_dislikes), multiline = TRUE, prevent_enter = TRUE)) + if(new_metadata && CanUseTopic(src)) if(new_metadata == "!clear") new_metadata = "" ooc_notes_dislikes = new_metadata client.prefs.update_preference_by_type(/datum/preference/text/living/ooc_notes_dislikes, new_metadata) - to_chat(usr, span_filter_notice("OOC note dislikes have been updated. Don't forget to save!")) - log_admin("[key_name(usr)] updated their OOC note dislikes mid-round.") + to_chat(src, span_filter_notice("OOC note dislikes have been updated. Don't forget to save!")) + log_admin("[key_name(src)] updated their OOC note dislikes mid-round.") if(reopen) - ooc_notes_window(usr) + ooc_notes_window(src) /mob/living/proc/save_ooc_panel() if(usr != src) return if(client.prefs.real_name != real_name) - to_chat(usr, span_danger("Your selected character slot name is not the same as your character's name. Aborting save. Please select [real_name]'s character slot in character setup before saving.")) + to_chat(src, span_danger("Your selected character slot name is not the same as your character's name. Aborting save. Please select [real_name]'s character slot in character setup before saving.")) return if(client.prefs.save_character()) - to_chat(usr, span_filter_notice("Character preferences saved.")) + to_chat(src, span_filter_notice("Character preferences saved.")) /mob/living/proc/print_ooc_notes_to_chat() if(!ooc_notes) @@ -95,7 +95,7 @@ msg += "

LIKES

[ooc_notes_likes]" if(ooc_notes_dislikes) msg += "

DISLIKES

[ooc_notes_dislikes]" - to_chat(usr, span_chatexport("[src]'s Metainfo:
[msg]")) + to_chat(src, span_chatexport("[src]'s Metainfo:
[msg]")) /mob/living/verb/set_custom_link() set name = "Set Custom Link" @@ -104,15 +104,15 @@ if(usr != src) return - 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(custom_link), max_length = 100, encode = TRUE, prevent_enter = TRUE)) - if(new_link && CanUseTopic(usr)) + var/new_link = strip_html_simple(tgui_input_text(src, "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(custom_link), max_length = 100, encode = TRUE, prevent_enter = TRUE)) + if(new_link && CanUseTopic(src)) if(length(new_link) > 100) - to_chat(usr, span_warning("Your entry is too long, it must be 100 characters or less.")) + to_chat(src, span_warning("Your entry is too long, it must be 100 characters or less.")) return custom_link = new_link - to_chat(usr, span_notice("Link set: [custom_link]")) - log_admin("[usr]/[usr.ckey] set their custom link to [custom_link]") + to_chat(src, span_notice("Link set: [custom_link]")) + log_admin("[src]/[src.ckey] set their custom link to [custom_link]") /mob/living/verb/set_voice_freq() set name = "Set Voice Frequency" @@ -141,7 +141,7 @@ set category = "OOC.Game Settings" var/list/possible_voice_types = get_talk_sound() - 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(src, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types) if(!choice) voice_sounds_list = talk_sound voice_sounds_list = get_talk_sound(choice) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 7733b9df0a8..046f865a1ae 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -352,7 +352,7 @@ var/list/ai_verbs_default = list( return if (!custom_sprite) - var/new_sprite = tgui_input_list(usr, "Select an icon!", "AI", ai_icons) + var/new_sprite = tgui_input_list(src, "Select an icon!", "AI", ai_icons) if(new_sprite) selected_sprite = new_sprite update_icon() @@ -366,7 +366,7 @@ var/list/ai_verbs_default = list( if(message_cooldown) to_chat(src, span_filter_notice("Please allow one minute to pass between announcements.")) return - var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "A.I. Announcement") + var/input = tgui_input_text(src, "Please write a message to announce to the station crew.", "A.I. Announcement") if(!input) return @@ -384,7 +384,7 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_WIRELESS)) return - var/confirm = tgui_alert(usr, "Are you sure you want to call the shuttle?", "Confirm Shuttle Call", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to call the shuttle?", "Confirm Shuttle Call", list("Yes", "No")) if(!confirm) return @@ -406,7 +406,7 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_WIRELESS)) return - var/confirm = tgui_alert(usr, "Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to recall the shuttle?", "Confirm Shuttle Recall", list("Yes", "No")) if(check_unable(AI_CHECK_WIRELESS)) return @@ -422,14 +422,14 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_WIRELESS)) return if(emergency_message_cooldown) - to_chat(usr, span_warning("Arrays recycling. Please stand by.")) + to_chat(src, span_warning("Arrays recycling. Please stand by.")) return - var/input = sanitize(tgui_input_text(usr, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) + var/input = sanitize(tgui_input_text(src, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")) if(!input) return - CentCom_announce(input, usr) - to_chat(usr, span_notice("Message transmitted.")) - log_game("[key_name(usr)] has made an IA [using_map.boss_short] announcement: [input]") + CentCom_announce(input, src) + to_chat(src, span_notice("Message transmitted.")) + log_game("[key_name(src)] has made an IA [using_map.boss_short] announcement: [input]") emergency_message_cooldown = 1 spawn(300) emergency_message_cooldown = 0 @@ -614,7 +614,7 @@ var/list/ai_verbs_default = list( holo_color = input if("Model") - choice = tgui_alert(usr, "Would you like to select a hologram based on a (visible) crew member, switch to unique avatar, or load your character from your character slot?","Hologram Selection",list("Crew Member","Unique","My Character")) + choice = tgui_alert(src, "Would you like to select a hologram based on a (visible) crew member, switch to unique avatar, or load your character from your character slot?","Hologram Selection",list("Crew Member","Unique","My Character")) if(!choice) return @@ -623,7 +623,7 @@ var/list/ai_verbs_default = list( if("Crew Member") //A seeable crew member (or a dog) var/list/targets = trackable_mobs() if(targets.len) - input = tgui_input_list(usr, "Select a crew member:", "Hologram Choice", targets) //The definition of "crew member" is a little loose... + input = tgui_input_list(src, "Select a crew member:", "Hologram Choice", targets) //The definition of "crew member" is a little loose... //This is torture, I know. If someone knows a better way... if(!input) return var/new_holo = getHologramIcon(getCompoundIcon(targets[input])) @@ -631,7 +631,7 @@ var/list/ai_verbs_default = list( holo_icon = new_holo else - tgui_alert_async(usr, "No suitable records found. Aborting.") + tgui_alert_async(src, "No suitable records found. Aborting.") if("My Character") //Loaded character slot if(!client || !client.prefs) return @@ -671,7 +671,7 @@ var/list/ai_verbs_default = list( "male skrell", "female skrell" ) - input = tgui_input_list(usr, "Please select a hologram:", "Hologram Choice", icon_list) + input = tgui_input_list(src, "Please select a hologram:", "Hologram Choice", icon_list) if(input) qdel(holo_icon) switch(input) @@ -812,7 +812,7 @@ var/list/ai_verbs_default = list( set category = "AI.Settings" set desc = "Augment visual feed with internal sensor overlays" sensor_type = !sensor_type //VOREStation Add - to_chat(usr, "You [sensor_type ? "enable" : "disable"] your sensors.") //VOREStation Add + to_chat(src, "You [sensor_type ? "enable" : "disable"] your sensors.") //VOREStation Add toggle_sensor_mode() /mob/living/silicon/ai/proc/toggle_hologram_movement() @@ -826,7 +826,7 @@ var/list/ai_verbs_default = list( var/obj/effect/overlay/aiholo/hologram = holo.masters[src] walk(hologram, 0) //VOREStation Add End - to_chat(usr, span_filter_notice("Your hologram will [hologram_follow ? "follow" : "no longer follow"] you now.")) + to_chat(src, span_filter_notice("Your hologram will [hologram_follow ? "follow" : "no longer follow"] you now.")) /mob/living/silicon/ai/proc/check_unable(var/flags = 0, var/feedback = 1) diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index 37606a56610..d5a11e74b05 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -16,11 +16,11 @@ var/global/list/empty_playable_ai_cores = list() set desc = "Enter intelligence storage. This is functionally equivalent to cryo or robotic storage, freeing up your job slot." if(ticker && ticker.mode && ticker.mode.name == "AI malfunction") - to_chat(usr, span_danger("You cannot use this verb in malfunction. If you need to leave, please adminhelp.")) + to_chat(src, span_danger("You cannot use this verb in malfunction. If you need to leave, please adminhelp.")) return // Guard against misclicks, this isn't the sort of thing we want happening accidentally - if(tgui_alert(usr, "WARNING: This will immediately empty your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Store Core", list("No", "Yes")) != "Yes") + if(tgui_alert(src, "WARNING: This will immediately empty your core and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Store Core", list("No", "Yes")) != "Yes") return // We warned you. diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 3e1432f62a3..6ace80b4a04 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -238,7 +238,7 @@ medicalActive2 = null medical_cannotfind = 0 SStgui.update_uis(src) - to_chat(usr, span_notice("You reset your record-viewing software.")) + to_chat(src, span_notice("You reset your record-viewing software.")) /mob/living/silicon/pai/cancel_camera() set category = "Abilities.pAI Commands" @@ -334,11 +334,11 @@ var/finalized = "No" while(finalized == "No" && src.client) - choice = tgui_input_list(usr,"What would you like to use for your mobile chassis icon?","Chassis Choice", possible_chassis) + choice = tgui_input_list(src,"What would you like to use for your mobile chassis icon?","Chassis Choice", possible_chassis) if(!choice) return icon_state = possible_chassis[choice] - finalized = tgui_alert(usr, "Look at your sprite. Is this what you wish to use?","Choose Chassis",list("No","Yes")) + finalized = tgui_alert(src, "Look at your sprite. Is this what you wish to use?","Choose Chassis",list("No","Yes")) chassis = possible_chassis[choice] add_verb(src, /mob/living/proc/hide) @@ -349,7 +349,7 @@ set category = "Abilities.pAI Commands" set name = "Choose Speech Verbs" - var/choice = tgui_input_list(usr,"What theme would you like to use for your speech verbs?","Theme Choice", possible_say_verbs) + var/choice = tgui_input_list(src,"What theme would you like to use for your speech verbs?","Theme Choice", possible_say_verbs) if(!choice) return var/list/sayverbs = possible_say_verbs[choice] @@ -540,7 +540,7 @@ set desc = "Upload your personality to the cloud and wipe your software from the card. This is functionally equivalent to cryo or robotic storage, freeing up your job slot." // Make sure people don't kill themselves accidentally - if(tgui_alert(usr, "WARNING: This will immediately wipe your software and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Wipe Software", list("No", "Yes")) != "Yes") + if(tgui_alert(src, "WARNING: This will immediately wipe your software and ghost you, removing your character from the round permanently (similar to cryo and robotic storage). Are you entirely sure you want to do this?", "Wipe Software", list("No", "Yes")) != "Yes") return close_up() diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 69f5839a15b..05294334fcc 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -181,7 +181,7 @@ set name = "Choose Chassis" var/choice - choice = tgui_input_list(usr, "What would you like to use for your mobile chassis icon?", "Chassis Choice", possible_chassis) + choice = tgui_input_list(src, "What would you like to use for your mobile chassis icon?", "Chassis Choice", possible_chassis) if(!choice) return var/oursize = size_multiplier resize(1, FALSE, TRUE, TRUE, FALSE) //We resize ourselves to normal here for a moment to let the vis_height get reset @@ -463,7 +463,7 @@ set name = "Set Gender Identity" set desc = "Sets the pronouns when examined and performing an emote." set category = "IC.Settings" - var/new_gender_identity = tgui_input_list(usr, "Please select a gender Identity:", "Set Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) + var/new_gender_identity = tgui_input_list(src, "Please select a gender Identity:", "Set Gender Identity", list(FEMALE, MALE, NEUTER, PLURAL, HERM)) if(!new_gender_identity) return 0 gender = new_gender_identity diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm index 1cafcf860fb..609efa946e3 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm @@ -254,7 +254,7 @@ if(!choice) return if(choice == "Color") - var/new_color = tgui_color_picker(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) + var/new_color = tgui_color_picker(user, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) if(new_color) selected_color = new_color to_chat(user, span_filter_notice("The light color has been changed.")) @@ -351,7 +351,7 @@ to_chat(src, span_filter_notice("Cell charge too low to continue.")) return - if(usr.incapacitated(INCAPACITATION_DISABLED)) + if(src.incapacitated(INCAPACITATION_DISABLED)) to_chat(src, span_filter_notice("You cannot leap in your current state.")) return @@ -380,7 +380,7 @@ if(last_special > world.time) return - if(usr.incapacitated(INCAPACITATION_DISABLED)) + if(src.incapacitated(INCAPACITATION_DISABLED)) to_chat(src, span_filter_notice("You cannot leap in your current state.")) return diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 36aa8eea9c3..48152b22a23 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -240,7 +240,7 @@ var/list/mob_hat_cache = list() to_chat(user, span_danger("The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one.")) return - if(!allowed(usr)) + if(!allowed(user)) to_chat(user, span_danger("Access denied.")) return @@ -258,7 +258,7 @@ var/list/mob_hat_cache = list() if(emagged) return - if(allowed(usr)) + if(allowed(user)) shut_down() else to_chat(user, span_danger("Access denied.")) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm index d243138b317..9f9a02bf3e8 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm @@ -4,7 +4,7 @@ set desc = "Tag yourself for delivery through the disposals system." set category = "Abilities.Silicon" - var/new_tag = tgui_input_list(usr, "Select the desired destination.", "Set Mail Tag", GLOB.tagger_locations) + var/new_tag = tgui_input_list(src, "Select the desired destination.", "Set Mail Tag", GLOB.tagger_locations) if(!new_tag) mail_destination = "" diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 573d01ce385..b66c8f3ef0e 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -113,14 +113,14 @@ return 0 //something is terribly wrong if(jobban_isbanned(src,JOB_CYBORG)) - to_chat(usr, span_danger("You are banned from playing synthetics and cannot spawn as a drone.")) + to_chat(src, span_danger("You are banned from playing synthetics and cannot spawn as a drone.")) return // VOREStation Addition Start if(CONFIG_GET(flag/use_age_restriction_for_jobs) && isnum(src.client.player_age)) var/time_till_play = max(0, 3 - src.client.player_age) if(time_till_play) - to_chat(usr, span_danger("You have not been playing on the server long enough to join as drone.")) + to_chat(src, span_danger("You have not been playing on the server long enough to join as drone.")) return // VOREStation Addition End @@ -139,8 +139,8 @@ var/deathtimeseconds = round((deathtime - deathtimeminutes * 1 MINUTE) / 10,1) if (deathtime < 5 MINUTES) - to_chat(usr, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.") - to_chat(usr, "You must wait 5 minutes to respawn as a drone!") + to_chat(src, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.") + to_chat(src, "You must wait 5 minutes to respawn as a drone!") return var/list/all_fabricators = list() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 15f4f227cac..6c2c70a0c8e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -247,7 +247,7 @@ /mob/living/silicon/robot/proc/init() aiCamera = new/obj/item/camera/siliconcam/robot_camera(src) - laws = new global.using_map.default_law_type // VOREstation edit: use map's default + laws = new global.using_map.default_law_type //use map's default additional_law_channels["Binary"] = "#b" var/new_ai = select_active_ai_with_fewest_borgs() if(new_ai) @@ -404,7 +404,7 @@ flavor_text = module_flavour else flavor_text = client.prefs.flavour_texts_robot["Default"] - // Vorestation Edit: and meta info + //and meta info ooc_notes = client.prefs.read_preference(/datum/preference/text/living/ooc_notes) ooc_notes_likes = client.prefs.read_preference(/datum/preference/text/living/ooc_notes_likes) ooc_notes_dislikes = client.prefs.read_preference(/datum/preference/text/living/ooc_notes_dislikes) @@ -416,7 +416,7 @@ set category = "Abilities.Settings" if(custom_name) - to_chat(usr, "You can't pick another custom name. [isshell(src) ? "" : "Go ask for a name change."]") + to_chat(src, "You can't pick another custom name. [isshell(src) ? "" : "Go ask for a name change."]") return 0 var/newname = sanitizeSafe(tgui_input_text(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","", MAX_NAME_LEN), MAX_NAME_LEN) @@ -442,7 +442,7 @@ set name = "Toggle Lights" lights_on = !lights_on - to_chat(usr, span_filter_notice("You [lights_on ? "enable" : "disable"] your integrated light.")) + to_chat(src, span_filter_notice("You [lights_on ? "enable" : "disable"] your integrated light.")) handle_light() update_icon() @@ -450,7 +450,7 @@ set category = "Abilities.Silicon" set name = "Toggle extras" robotdecal_on = !robotdecal_on - to_chat(usr, span_filter_notice("You [robotdecal_on ? "enable" : "disable"] your extra apperances.")) + to_chat(src, span_filter_notice("You [robotdecal_on ? "enable" : "disable"] your extra apperances.")) update_icon() /mob/living/silicon/robot/verb/spark_plug() //So you can still sparkle on demand without violence. @@ -513,7 +513,7 @@ if(prob(75) && Proj.damage > 0) spark_system.start() return 2 -/mob/living/silicon/robot/attackby(obj/item/W as obj, mob/user as mob) +/mob/living/silicon/robot/attackby(obj/item/W, mob/user) if (istype(W, /obj/item/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do return @@ -532,7 +532,7 @@ C.brute_damage = WC.brute C.electronics_damage = WC.burn - to_chat(usr, span_notice("You install the [W.name].")) + to_chat(user, span_notice("You install the [W.name].")) return @@ -718,7 +718,7 @@ if(opened) to_chat(user, span_filter_notice("You must close the cover to swipe an ID card.")) else - if(allowed(usr)) + if(allowed(user)) locked = !locked to_chat(user, span_filter_notice("You [ locked ? "lock" : "unlock"] [src]'s interface.")) update_icon() @@ -728,21 +728,21 @@ else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W if(!opened) - to_chat(usr, span_filter_notice("You must access the borgs internals!")) - else if(!src.module && U.require_module) - to_chat(usr, span_filter_notice("The borg must choose a module before it can be upgraded!")) + to_chat(user, span_filter_notice("You must access the borgs internals!")) + else if(!module && U.require_module) + to_chat(user, span_filter_notice("The borg must choose a module before it can be upgraded!")) else if(user == src && istype(W,/obj/item/borg/upgrade/utility/reset)) - to_chat(usr, span_warning("You are restricted from reseting your own module.")) + to_chat(user, span_warning("You are restricted from reseting your own module.")) else if(U.locked) - to_chat(usr, span_filter_notice("The upgrade is locked and cannot be used yet!")) + to_chat(user, span_filter_notice("The upgrade is locked and cannot be used yet!")) else if(U.action(src)) - to_chat(usr, span_filter_notice("You apply the upgrade to [src]!")) - usr.drop_item() + to_chat(user, span_filter_notice("You apply the upgrade to [src]!")) + user.drop_item() U.loc = src hud_used.update_robot_modules_display() else - to_chat(usr, span_filter_notice("Upgrade error!")) + to_chat(user, span_filter_notice("Upgrade error!")) else @@ -776,7 +776,7 @@ return /mob/living/silicon/robot/proc/module_reset(var/notify = TRUE) - transform_with_anim() //VOREStation edit: sprite animation + transform_with_anim() //sprite animation uneq_all() hud_used.update_robot_modules_display(TRUE) modtype = initial(modtype) @@ -800,10 +800,10 @@ set desc = "Allows to recolour once." if(!has_recoloured) - var/datum/ColorMate/recolour = new /datum/ColorMate(usr) - recolour.tgui_interact(usr) + var/datum/ColorMate/recolour = new /datum/ColorMate(src) + recolour.tgui_interact(src) return - to_chat(usr, "You've already recoloured yourself once. Ask for a module reset for another.") + to_chat(src, "You've already recoloured yourself once. Ask for a module reset for another.") /mob/living/silicon/robot/attack_hand(mob/user) if(LAZYLEN(buckled_mobs)) @@ -1067,11 +1067,11 @@ update_icon() /mob/living/silicon/robot/proc/sensor_mode() //Medical/Security HUD controller for borgs - set name = "Toggle Sensor Augmentation" //VOREStation Add + set name = "Toggle Sensor Augmentation" set category = "Abilities.Silicon" set desc = "Augment visual feed with internal sensor overlays." - sensor_type = !sensor_type //VOREStation Add - to_chat(usr, "You [sensor_type ? "enable" : "disable"] your sensors.") //VOREStation Add + sensor_type = !sensor_type + to_chat(src, "You [sensor_type ? "enable" : "disable"] your sensors.") toggle_sensor_mode() /mob/living/silicon/robot/proc/repick_laws() diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 9dbccb03b99..043b6c3f943 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -274,9 +274,9 @@ name = "Printing Pen" var/mode = 1 -/obj/item/pen/robopen/attack_self(mob/user as mob) +/obj/item/pen/robopen/attack_self(mob/user) - var/choice = tgui_alert(usr, "Would you like to change colour or mode?", "Change What?", list("Colour","Mode","Cancel")) + var/choice = tgui_alert(user, "Would you like to change colour or mode?", "Change What?", list("Colour","Mode","Cancel")) if(!choice || choice == "Cancel") return @@ -285,7 +285,7 @@ switch(choice) if("Colour") - var/newcolour = tgui_input_list(usr, "Which colour would you like to use?", "Color Choice", list("black","blue","red","green","yellow")) + var/newcolour = tgui_input_list(user, "Which colour would you like to use?", "Color Choice", list("black","blue","red","green","yellow")) if(newcolour) colour = newcolour if("Mode") @@ -329,19 +329,19 @@ /obj/item/form_printer/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) return -/obj/item/form_printer/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params) +/obj/item/form_printer/afterattack(atom/target, mob/living/user, flag, params) if(!target || !flag) return if(istype(target,/obj/structure/table)) - deploy_paper(get_turf(target)) + deploy_paper(user) -/obj/item/form_printer/attack_self(mob/user as mob) - deploy_paper() +/obj/item/form_printer/attack_self(mob/user) + deploy_paper(user) -/obj/item/form_printer/proc/deploy_paper() - var/choice = tgui_alert(usr, "Would you like dispense and empty page or print a form?", "Dispense", list("Paper","Form")) +/obj/item/form_printer/proc/deploy_paper(mob/user) + var/choice = tgui_alert(user, "Would you like dispense and empty page or print a form?", "Dispense", list("Paper","Form")) if(!choice || choice == "Cancel") return switch(choice) @@ -352,9 +352,9 @@ T.visible_message(span_notice("\The [src.loc] dispenses a sheet of crisp white paper.")) new /obj/item/paper(T) if ("Form") - var/list/content = print_form() + var/list/content = print_form(user) if(!content) - to_chat(usr, span_warning("No form for this category found in central network. Central is advising employees to upload new forms whenever possible.")) + to_chat(user, span_warning("No form for this category found in central network. Central is advising employees to upload new forms whenever possible.")) return flick("doc_printer_mod_printing", src) spawn(22) @@ -362,7 +362,7 @@ T.visible_message(span_notice("\The [src.loc] dispenses an official form to fill.")) new /obj/item/paper(T, content[1], content[2]) -/obj/item/form_printer/proc/print_form() +/obj/item/form_printer/proc/print_form(mob/user) var/list/paper_forms = list("Empty", "Command", "Security", "Supply", "Science", "Medical", "Engineering", "Service", "Exploration", "Event", "Other", "Mercenary") var/list/command_paper_forms = list("COM-0002: Dismissal Order", "COM-0003: Job Change Request", "COM-0004: ID Replacement Request", "COM-0005: Access Change Order", "COM-0006: Formal Complaint", "COM-0009: Visitor Permit", "COM-0012: Personnel Request Form", "COM-0013: Employee of the Month Nomination Form") var/list/security_paper_forms = list("SEC-1001: Shift-Start Checklist", "SEC-1002: Patrol Assignment Sheet", "SEC-1003: Incident Report", "SEC-1004: Arrest Report", "SEC-1005: Arrest Warrant", "SEC-1006: Search Warrant", "SEC-1007: Forensics Investigation Report", "SEC-1008: Interrogation Report", "SEC-1009: Witness Statement", "SEC-1010: Armory Inventory", "SEC-1011: Armory Equipment Request", "SEC-1012: Armory Equipment Deployment", "SEC-1013: Weapon Permit", "SEC-1014: Injunction", "SEC-1015: Deputization Waiver") @@ -377,64 +377,64 @@ var/list/mercenary_paper_forms = list("MERC-?071: Mercenary Request") var/list/split = list() - var/papertype = tgui_input_list(usr, "What kind of form do you want to print?", "Department", paper_forms) + var/papertype = tgui_input_list(user, "What kind of form do you want to print?", "Department", paper_forms) if(!papertype || papertype == "Cancel") return switch(papertype) if ("Empty") split = list("", "Empty form") if("Command") - var/command_paper = tgui_input_list(usr, "What kind of command form do you want to print?", "Form", command_paper_forms) + var/command_paper = tgui_input_list(user, "What kind of command form do you want to print?", "Form", command_paper_forms) if(!command_paper || command_paper == "Cancel") return split = splittext(command_paper, ": ") if("Security") - var/security_paper = tgui_input_list(usr, "What kind of security form do you want to print?", "Form", security_paper_forms) + var/security_paper = tgui_input_list(user, "What kind of security form do you want to print?", "Form", security_paper_forms) if(!security_paper || security_paper == "Cancel") return split = splittext(security_paper, ": ") if("Supply") - var/supply_paper = tgui_input_list(usr, "What kind of supply form do you want to print?", "Form", supply_paper_forms) + var/supply_paper = tgui_input_list(user, "What kind of supply form do you want to print?", "Form", supply_paper_forms) if(!supply_paper || supply_paper == "Cancel") return split = splittext(supply_paper, ": ") if("Science") - var/science_paper = tgui_input_list(usr, "What kind of science form do you want to print?", "Form", science_paper_forms) + var/science_paper = tgui_input_list(user, "What kind of science form do you want to print?", "Form", science_paper_forms) if(!science_paper || science_paper == "Cancel") return split = splittext(science_paper, ": ") if("Medical") - var/medical_paper = tgui_input_list(usr, "What kind of medical form do you want to print?", "Form", medical_paper_forms) + var/medical_paper = tgui_input_list(user, "What kind of medical form do you want to print?", "Form", medical_paper_forms) if(!medical_paper || medical_paper == "Cancel") return split = splittext(medical_paper, ": ") if("Engineering") - var/engineering_paper = tgui_input_list(usr, "What kind of engineering form do you want to print?", "Form", engineering_paper_forms) + var/engineering_paper = tgui_input_list(user, "What kind of engineering form do you want to print?", "Form", engineering_paper_forms) if(!engineering_paper || engineering_paper == "Cancel") return split = splittext(engineering_paper, ": ") if("Service") - var/service_paper = tgui_input_list(usr, "What kind of service form do you want to print?", "Form", service_paper_forms) + var/service_paper = tgui_input_list(user, "What kind of service form do you want to print?", "Form", service_paper_forms) if(!service_paper || service_paper == "Cancel") return split = splittext(service_paper, ": ") if("Exploration") - var/exploration_paper = tgui_input_list(usr, "What kind of exploration form do you want to print?", "Form", exploration_paper_forms) + var/exploration_paper = tgui_input_list(user, "What kind of exploration form do you want to print?", "Form", exploration_paper_forms) if(!exploration_paper || exploration_paper == "Cancel") return split = splittext(exploration_paper, ": ") if("Event") - var/event_paper = tgui_input_list(usr, "What kind of event form do you want to print?", "Form", event_paper_forms) + var/event_paper = tgui_input_list(user, "What kind of event form do you want to print?", "Form", event_paper_forms) if(!event_paper || event_paper == "Cancel") return split = splittext(event_paper, ": ") if("Other") - var/other_paper = tgui_input_list(usr, "What kind of other form do you want to print?", "Form", other_paper_forms) + var/other_paper = tgui_input_list(user, "What kind of other form do you want to print?", "Form", other_paper_forms) if(!other_paper || other_paper == "Cancel") return split = splittext(other_paper, ": ") if("Mercenary") - var/mercenary_paper = tgui_input_list(usr, "What kind of mercenary form do you want to print?", "Form", mercenary_paper_forms) + var/mercenary_paper = tgui_input_list(user, "What kind of mercenary form do you want to print?", "Form", mercenary_paper_forms) if(!mercenary_paper || mercenary_paper == "Cancel") return split = splittext(mercenary_paper, ": ") @@ -686,9 +686,9 @@ . += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored." . += "It is set to deploy [mode ? "doors" : "walls"]" -/obj/item/inflatable_dispenser/attack_self() +/obj/item/inflatable_dispenser/attack_self(mob/user) mode = !mode - to_chat(usr, span_filter_notice("You set \the [src] to deploy [mode ? "doors" : "walls"].")) + to_chat(user, span_filter_notice("You set \the [src] to deploy [mode ? "doors" : "walls"].")) /obj/item/inflatable_dispenser/afterattack(var/atom/A, var/mob/user) ..(A, user) @@ -750,7 +750,7 @@ qdel(A) else if(stored_doors >= max_doors) - to_chat(usr, span_filter_notice("\The [src] is full!")) + to_chat(user, span_filter_notice("\The [src] is full!")) return stored_doors++ qdel(A) diff --git a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm index 3f00773e09d..4319b9a7fca 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/thinktank/thinktank_interactions.dm @@ -37,7 +37,7 @@ if(client || key || stat == DEAD || !ticker || !ticker.mode) return ..() - var/confirm = tgui_alert(usr, "Do you wish to take control of \the [src]?", "Platform Control", list("No", "Yes")) + var/confirm = tgui_alert(user, "Do you wish to take control of \the [src]?", "Platform Control", list("No", "Yes")) if(confirm != "Yes" || QDELETED(src) || client || key || stat == DEAD || !ticker || !ticker.mode) return ..() @@ -55,8 +55,8 @@ pluralcheck = " [deathtimeminutes] minute\s and" var/deathtimeseconds = round((deathtime - deathtimeminutes * 1 MINUTE) / 10,1) if (deathtime < platform_respawn_time) - to_chat(usr, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.") - to_chat(usr, "You must wait [platform_respawn_time/600] minute\s to take control of \the [src]!") + to_chat(user, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.") + to_chat(user, "You must wait [platform_respawn_time/600] minute\s to take control of \the [src]!") return // End boilerplate. diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 0f06a5c878a..011b3ba2170 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -259,14 +259,14 @@ set desc = "Sets a description which will be shown when someone examines you." set category = "IC.Settings" - pose = strip_html_simple(tgui_input_text(usr, "This is [src]. It is...", "Pose", null)) + pose = strip_html_simple(tgui_input_text(src, "This is [src]. It is...", "Pose", null)) /mob/living/silicon/verb/set_flavor() set name = "Set Flavour Text" set desc = "Sets an extended description of your character's features." set category = "IC.Settings" - var/new_flavortext = strip_html_simple(tgui_input_text(usr, "Please enter your new flavour text.", "Flavour text", flavor_text, multiline = TRUE)) + var/new_flavortext = strip_html_simple(tgui_input_text(src, "Please enter your new flavour text.", "Flavour text", flavor_text, multiline = TRUE)) if(new_flavortext) flavor_text = new_flavortext diff --git a/code/modules/mob/living/silicon/silicon_vr.dm b/code/modules/mob/living/silicon/silicon_vr.dm index 73a25dbd76f..b30fcbf194e 100644 --- a/code/modules/mob/living/silicon/silicon_vr.dm +++ b/code/modules/mob/living/silicon/silicon_vr.dm @@ -1,6 +1,6 @@ /mob/living/silicon/Topic(href, href_list) //For Robots and pAI's. And possibly AI's too. if(href_list["ooc_notes"]) - src.Examine_OOC() + Examine_OOC(usr) return 1 return ..() diff --git a/code/modules/mob/living/silicon/subystems.dm b/code/modules/mob/living/silicon/subystems.dm index e2d82f6fdfe..851159c109d 100644 --- a/code/modules/mob/living/silicon/subystems.dm +++ b/code/modules/mob/living/silicon/subystems.dm @@ -53,7 +53,7 @@ set name = "Alarm Monitor" set category = "Abilities.Silicon" - alarm_monitor.tgui_interact(usr) + alarm_monitor.tgui_interact(src) /******************** * Atmos Control * @@ -62,7 +62,7 @@ set category = "Abilities.Silicon" set name = "Atmospherics Control" - atmos_control.tgui_interact(usr) + atmos_control.tgui_interact(src) /******************** * Crew Manifest * @@ -71,7 +71,7 @@ set category = "Abilities.Silicon" set name = "Crew Manifest" - crew_manifest.tgui_interact(usr) + crew_manifest.tgui_interact(src) /******************** * Crew Monitor * @@ -80,7 +80,7 @@ set category = "Abilities.Silicon" set name = "Crew Monitor" - crew_monitor.tgui_interact(usr) + crew_monitor.tgui_interact(src) /**************** * Law Manager * @@ -89,7 +89,7 @@ set name = "Law Manager" set category = "Abilities.Silicon" - law_manager.tgui_interact(usr) + law_manager.tgui_interact(src) /******************** * Power Monitor * @@ -98,7 +98,7 @@ set category = "Abilities.Silicon" set name = "Power Monitor" - power_monitor.tgui_interact(usr) + power_monitor.tgui_interact(src) /************ * RCON * @@ -107,4 +107,4 @@ set category = "Abilities.Silicon" set name = "RCON" - rcon.tgui_interact(usr) + rcon.tgui_interact(src) diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm index b2a61880b5e..55923db0b5f 100644 --- a/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/code/modules/mob/living/simple_mob/simple_mob.dm @@ -361,10 +361,10 @@ set desc = "Allows to recolour once." if(!has_recoloured) - var/datum/ColorMate/recolour = new /datum/ColorMate(usr) - recolour.tgui_interact(usr) + var/datum/ColorMate/recolour = new /datum/ColorMate(src) + recolour.tgui_interact(src) return - to_chat(usr, "You've already recoloured yourself once. You are only allowed to recolour yourself once during a around.") + to_chat(src, "You've already recoloured yourself once. You are only allowed to recolour yourself once during a around.") //Thermal vision adding @@ -374,14 +374,14 @@ set desc = "Uses you natural predatory instincts to seek out prey even through walls, or your natural survival instincts to spot predators from a distance." if(hunting_cooldown + 5 MINUTES < world.time) - to_chat(usr, "You can sense other creatures by focusing carefully on your surroundings.") + to_chat(src, "You can sense other creatures by focusing carefully on your surroundings.") sight |= SEE_MOBS hunting_cooldown = world.time spawn(600) - to_chat(usr, "Your concentration wears off.") + to_chat(src, "Your concentration wears off.") sight -= SEE_MOBS else if(hunting_cooldown + 5 MINUTES > world.time) - to_chat(usr, "You must wait for a while before using this again.") + to_chat(src, "You must wait for a while before using this again.") /mob/living/simple_mob/proc/hunting_vision_plus() set name = "Thermal vision toggle" @@ -389,10 +389,10 @@ set desc = "Uses you natural predatory instincts to seek out prey even through walls, or your natural survival instincts to spot predators from a distance." if(!isthermal) - to_chat(usr, "You can sense other creatures by focusing carefully on your surroundings.") + to_chat(src, "You can sense other creatures by focusing carefully on your surroundings.") sight |= SEE_MOBS else - to_chat(usr, "You stop sensing creatures beyond the walls.") + to_chat(src, "You stop sensing creatures beyond the walls.") sight -= SEE_MOBS /mob/living/simple_mob/proc/character_directory_species() diff --git a/code/modules/mob/living/simple_mob/simple_mob_vr.dm b/code/modules/mob/living/simple_mob/simple_mob_vr.dm index bfdcea8360d..e99602186a6 100644 --- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm +++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm @@ -411,14 +411,14 @@ var/mob/living/T = tgui_input_list(src, "Who do you wish to leap at?", "Target Choice", choices) - if(!T || !src || src.stat) return + if(!T || !src || stat) return if(get_dist(get_turf(T), get_turf(src)) > 3) return if(last_special > world.time) return - if(usr.incapacitated(INCAPACITATION_DISABLED)) + if(incapacitated(INCAPACITATION_DISABLED)) to_chat(src, "You cannot leap in your current state.") return @@ -426,8 +426,8 @@ status_flags |= LEAPING pixel_y = pixel_y + 10 - src.visible_message(span_danger("\The [src] leaps at [T]!")) - src.throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src) + visible_message(span_danger("\The [src] leaps at [T]!")) + throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src) playsound(src, 'sound/effects/bodyfall1.ogg', 50, 1) pixel_y = default_pixel_y @@ -435,7 +435,7 @@ if(status_flags & LEAPING) status_flags &= ~LEAPING - if(!src.Adjacent(T)) + if(!Adjacent(T)) to_chat(src, span_warning("You miss!")) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm index 4de01464442..145a65179ba 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/catslug.dm @@ -291,7 +291,7 @@ if(picked_color) to_chat(src, span_notice("You have already picked a color! If you picked the wrong color, ask an admin to change your picked_color variable to 0.")) return - var/newcolor = tgui_color_picker(usr, "Choose a color.", "", color) + var/newcolor = tgui_color_picker(src, "Choose a color.", "", color) if(newcolor) color = newcolor picked_color = TRUE @@ -1169,7 +1169,7 @@ if(victims.len == 1) target = victims[1] else - target = tgui_input_list(usr, "Kill", "Pick a victim", victims) + target = tgui_input_list(src, "Kill", "Pick a victim", victims) if(target && istype(target)) target.adjustBruteLoss(3000) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm index 49f5b5cb059..a7b9592463b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/alien animals/stardog.dm @@ -1149,7 +1149,7 @@ to_chat(L, span_warning("You cannot speak in IC (muted).")) return if (!message) - message = tgui_input_text(usr, "Type a message to emote.","Emote Beyond") + message = tgui_input_text(L, "Type a message to emote.","Emote Beyond") message = sanitize_or_reflect(message,L) if (!message) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm index 6848a439396..9a5925c6784 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer.dm @@ -243,7 +243,7 @@ nearby_mobs += LM var/mob/living/speaker if(nearby_mobs.len) - speaker = tgui_input_list(usr, "Choose a target speaker:", "Target Choice", nearby_mobs) + speaker = tgui_input_list(src, "Choose a target speaker:", "Target Choice", nearby_mobs) if(speaker) log_admin("[src.ckey]/([src]) tried to force [speaker] to say: [message]") message_admins("[src.ckey]/([src]) tried to force [speaker] to say: [message]") diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm index 9130889ada9..07d65d339ab 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/borer/borer_powers.dm @@ -218,7 +218,7 @@ if(chemicals < 50) to_chat(src, span_warning("You don't have enough chemicals!")) - var/chem = tgui_input_list(usr, "Select a chemical to secrete.", "Chemicals", list(REAGENT_ID_ALKYSINE,REAGENT_ID_BICARIDINE,REAGENT_ID_HYPERZINE,REAGENT_ID_TRAMADOL)) + var/chem = tgui_input_list(src, "Select a chemical to secrete.", "Chemicals", list(REAGENT_ID_ALKYSINE,REAGENT_ID_BICARIDINE,REAGENT_ID_HYPERZINE,REAGENT_ID_TRAMADOL)) if(!chem || chemicals < 50 || !host || controlling || !src || stat) //Sanity check. return @@ -344,7 +344,7 @@ set desc = "Send a jolt of electricity through your host, reviving them." if(stat != 2) - to_chat(usr, "Your host is already alive.") + to_chat(src, "Your host is already alive.") return remove_verb(src, /mob/living/carbon/human/proc/jumpstart) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm index e772105fc78..45aab4c7169 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/mouse_vr.dm @@ -13,17 +13,17 @@ universal_understand = 1 /obj/item/holder/mouse/attack_self(var/mob/U) - for(var/mob/living/simple_mob/M in src.contents) + for(var/mob/living/simple_mob/M in contents) if((I_HELP) && U.checkClickCooldown()) //a little snowflakey, but makes it use the same cooldown as interacting with non-inventory objects U.setClickCooldown(U.get_attack_speed()) //if there's a cleaner way in baycode, I'll change this U.visible_message(span_notice("[U] [M.response_help] \the [M].")) //Jank grabber that uses the 'attack_hand' insead of 'MouseDrop' -/mob/living/simple_mob/animal/passive/mouse/attack_hand(var/atom/over_object) - var/mob/living/carbon/human/H = over_object - if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (src.a_intent == I_HELP && H.a_intent == I_HELP)) +/mob/living/simple_mob/animal/passive/mouse/attack_hand(mob/user) + var/mob/living/carbon/human/H = user + if(holder_type && issmall(src) && istype(H) && !H.lying && Adjacent(H) && (a_intent == I_HELP && H.a_intent == I_HELP)) if(!issmall(H) || !ishuman(src)) - get_scooped(H, (usr == src)) + get_scooped(H, (H == src)) return return ..() @@ -33,7 +33,7 @@ return if(self_grab) - if(src.incapacitated()) return + if(incapacitated()) return else if(grabber.incapacitated()) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm index 5dbc635a9c4..cb377b2fd85 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/cat.dm @@ -105,7 +105,7 @@ var/list/_cat_default_emotes = list( return // Fuck off ghosts. if(friend) - if(friend == usr) + if(friend == L) to_chat(L, span_notice("\The [src] is already your friend! Meow!")) return else diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm index f6a42c210dd..98fca7c314b 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm @@ -118,7 +118,7 @@ return // Fuck off ghosts. if(friend) - if(friend == usr) + if(friend == L) to_chat(L, span_notice("\The [src] is already your friend!")) return else diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm index fc94c6f54f2..704f5616874 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/leech.dm @@ -233,7 +233,7 @@ to_chat(src, span_alium("We are too tired to do this...")) return - do_infest(usr) + do_infest(src) /mob/living/simple_mob/animal/sif/leech/proc/do_infest(var/mob/living/user, var/mob/living/target = null) if(host) @@ -360,7 +360,7 @@ if(!M || stat) return - poison_inject(usr, M) + poison_inject(src, M) /mob/living/simple_mob/animal/sif/leech/proc/poison_inject(var/mob/living/user, var/mob/living/carbon/L) if(!L || !Adjacent(L) || stat) @@ -393,11 +393,11 @@ return if(!host || chemicals <= 50) - to_chat(usr, span_alien("We cannot produce any chemicals right now.")) + to_chat(src, span_alien("We cannot produce any chemicals right now.")) return if(host) - var/chem = tgui_input_list(usr, "Select a chemical to produce.", "Chemicals", produceable_chemicals) + var/chem = tgui_input_list(src, "Select a chemical to produce.", "Chemicals", produceable_chemicals) inject_meds(chem) /mob/living/simple_mob/animal/sif/leech/proc/inject_meds(var/chem) @@ -424,7 +424,7 @@ var/target if(client) - target = tgui_input_list(usr, "Select an organ to feed on.", "Organs", host_internal_organs) + target = tgui_input_list(src, "Select an organ to feed on.", "Organs", host_internal_organs) if(!target) to_chat(src, span_alien("We decide not to feed.")) return diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm b/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm index 97d79e4290d..902e012ad52 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/squirrel.dm @@ -215,7 +215,7 @@ if(picked_color) to_chat(src, span_notice("You have already picked a color! If you picked the wrong color, ask an admin to change your picked_color variable to 0.")) return - var/newcolor = tgui_color_picker(usr, "Choose a color.", "", color) + var/newcolor = tgui_color_picker(src, "Choose a color.", "", color) if(newcolor) color = newcolor picked_color = TRUE diff --git a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm index 3db9acc2cb6..9289624c3a2 100644 --- a/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm +++ b/code/modules/mob/living/simple_mob/subtypes/vore/morph/morph.dm @@ -249,7 +249,7 @@ set name = "Pick Color" set category = "Abilities.Settings" set desc = "You can set your color!" - var/newcolor = tgui_color_picker(usr, "Choose a color.", "", color) + var/newcolor = tgui_color_picker(src, "Choose a color.", "", color) if(newcolor) color = newcolor chosen_color = newcolor diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index c311aba2945..61057d8009b 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -15,7 +15,7 @@ if(matches) matches += " and " matches += "ID ([client.computer_id])" if(!CONFIG_GET(flag/disable_cid_warn_popup)) - tgui_alert_async(usr, "You appear to have logged in with another key this round, which is not permitted. Please contact an administrator if you believe this message to be in error.") + tgui_alert_async(src, "You appear to have logged in with another key this round, which is not permitted. Please contact an administrator if you believe this message to be in error.") if(matches) if(M.client) message_admins("[span_red(span_bold("Notice:"))] [span_blue("[key_name_admin(src)] has the same [matches] as [key_name_admin(M)].")]", 1) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index b565fd47b07..8f557a4d2fb 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -107,7 +107,7 @@ exclude_mobs |= src else exclude_mobs = list(src) - src.show_message(self_message, 1, blind_message, 2) + show_message(self_message, 1, blind_message, 2) if(isnull(runemessage)) runemessage = -1 . = ..(message, blind_message, exclude_mobs, range, runemessage) // Really not ideal that atom/visible_message has different arg numbering :( @@ -242,7 +242,7 @@ set name = "Point To" set category = "Object" - if(!src || !isturf(src.loc) || !(A in view(src.loc))) + if(!src || !isturf(loc) || !(A in view(loc))) return 0 if(istype(A, /obj/effect/decal/point)) return 0 @@ -328,8 +328,8 @@ /mob/proc/update_flavor_text() set src in usr if(usr != src) - to_chat(usr, "No.") - var/msg = sanitize(tgui_input_text(usr,"Set the flavor text in your 'examine' verb.","Flavor Text",html_decode(flavor_text), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes + to_chat(src, "No.") + var/msg = sanitize(tgui_input_text(src,"Set the flavor text in your 'examine' verb.","Flavor Text",html_decode(flavor_text), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes if(msg != null) flavor_text = msg @@ -393,22 +393,22 @@ set category = "OOC.Game" if(stat != DEAD || !ticker) - to_chat(usr, span_boldnotice("You must be dead to use this!")) + to_chat(src, span_boldnotice("You must be dead to use this!")) return // Final chance to abort "respawning" if(mind && timeofdeath) // They had spawned before - var/choice = tgui_alert(usr, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", list("No, wait", "Yes, leave")) + var/choice = tgui_alert(src, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", list("No, wait", "Yes, leave")) if(!choice || choice == "No, wait") return else if(mind.assigned_role) - var/extra_check = tgui_alert(usr, "Do you want to Quit This Round before you return to lobby?\ + var/extra_check = tgui_alert(src, "Do you want to Quit This Round before you return to lobby?\ This will properly remove you from manifest, as well as prevent resleeving. BEWARE: Pressing 'NO' will STILL return you to lobby!", "Quit This Round",list("Quit Round","No")) if(extra_check == "Quit Round") //Update any existing objectives involving this mob. for(var/datum/objective/O in all_objectives) - if(O.target == src.mind) + if(O.target == mind) if(O.owner && O.owner.current) to_chat(O.owner.current,span_warning("You get the feeling your target is no longer within your reach...")) qdel(O) @@ -418,47 +418,47 @@ SStranscore.leave_round(src) //Job slot cleanup - var/job = src.mind.assigned_role + var/job = mind.assigned_role job_master.FreeRole(job) //Their objectives cleanup - if(src.mind.objectives.len) - qdel(src.mind.objectives) - src.mind.special_role = null + if(mind.objectives.len) + qdel(mind.objectives) + mind.special_role = null //Cut the PDA manifest (ugh) if(PDA_Manifest.len) PDA_Manifest.Cut() for(var/datum/data/record/R in data_core.medical) - if((R.fields["name"] == src.real_name)) + if((R.fields["name"] == real_name)) qdel(R) for(var/datum/data/record/T in data_core.security) - if((T.fields["name"] == src.real_name)) + if((T.fields["name"] == real_name)) qdel(T) for(var/datum/data/record/G in data_core.general) - if((G.fields["name"] == src.real_name)) + if((G.fields["name"] == real_name)) qdel(G) //This removes them from being 'active' list on join screen - src.mind.assigned_role = null + mind.assigned_role = null to_chat(src,span_notice("Your job has been free'd up, and you can rejoin as another character or quit. Thanks for properly quitting round, it helps the server!")) // Beyond this point, you're going to respawn if(!client) - log_game("[usr.key] AM failed due to disconnect.") + log_game("[key] AM failed due to disconnect.") return client.screen.Cut() client.screen += client.void if(!client) - log_game("[usr.key] AM failed due to disconnect.") + log_game("[key] AM failed due to disconnect.") return announce_ghost_joinleave(client, 0) var/mob/new_player/M = new /mob/new_player() if(!client) - log_game("[usr.key] AM failed due to disconnect.") + log_game("[key] AM failed due to disconnect.") qdel(M) return @@ -482,7 +482,7 @@ if(client.holder && (client.holder.rights & R_ADMIN|R_EVENT)) is_admin = 1 else if(stat != DEAD || isnewplayer(src)) - to_chat(usr, span_filter_notice("[span_blue("You must be observing to use this!")]")) + to_chat(src, span_filter_notice("[span_blue("You must be observing to use this!")]")) return if(is_admin && stat == DEAD) @@ -502,7 +502,7 @@ var/eye_name = null var/ok = "[is_admin ? "Admin Observe" : "Observe"]" - eye_name = tgui_input_list(usr, "Select something to [ok]:", "Select Target", targets) + eye_name = tgui_input_list(src, "Select something to [ok]:", "Select Target", targets) if (!eye_name) return @@ -529,8 +529,8 @@ src << browse(null, t1) if(href_list["flavor_more"]) - usr << browse(text("[][]", name, replacetext(flavor_text, "\n", "
")), text("window=[];size=500x200", name)) - onclose(usr, "[name]") + src << browse(text("[][]", name, replacetext(flavor_text, "\n", "
")), text("window=[];size=500x200", name)) + onclose(src, "[name]") if(href_list["flavor_change"]) update_flavor_text() return ..() @@ -557,7 +557,7 @@ /mob/proc/start_pulling(var/atom/movable/AM) - if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! + if ( !AM || src==AM || !isturf(loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! return if (AM.anchored) @@ -613,7 +613,7 @@ if(pulling_old == AM) return - src.pulling = AM + pulling = AM AM.pulledby = src if(pullin) @@ -629,7 +629,7 @@ visible_message(span_warning("\The [src] grips \the [H]'s arm."), span_notice("You grip \the [H]'s arm."), exclude_mobs = list(H)) if(!H.stat) to_chat(H, span_warning("\The [src] grips your arm.")) - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25) //Quieter than hugging/grabbing but we still want some audio feedback + playsound(loc, 'sound/weapons/thudswoosh.ogg', 25) //Quieter than hugging/grabbing but we still want some audio feedback if(H.pull_damage()) to_chat(src, span_filter_notice("[span_red(span_bold("Pulling \the [H] in their current condition would probably be a bad idea."))]")) @@ -642,13 +642,13 @@ // We have pulled something before, so we should be able to safely continue pulling it. This proc is only for portals! /mob/proc/continue_pulling(var/atom/movable/AM) - if ( !AM || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! + if ( !AM || src==AM || !isturf(loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! return if (AM.anchored) return - src.pulling = AM + pulling = AM AM.pulledby = src if(pullin) @@ -663,7 +663,7 @@ return /mob/proc/is_active() - return (0 >= usr.stat) + return (0 >= stat) /mob/proc/is_dead() return stat == DEAD @@ -1003,9 +1003,9 @@ set_face_dir() if(!facing_dir) - to_chat(usr, span_filter_notice("You are now not facing anything.")) + to_chat(src, span_filter_notice("You are now not facing anything.")) else - to_chat(usr, span_filter_notice("You are now facing [dir2text(facing_dir)].")) + to_chat(src, span_filter_notice("You are now facing [dir2text(facing_dir)].")) /mob/proc/set_face_dir(var/newdir) if(newdir == facing_dir) @@ -1122,20 +1122,20 @@ //Throwing stuff /mob/proc/toggle_throw_mode() - if (src.in_throw_mode) + if (in_throw_mode) throw_mode_off() else throw_mode_on() /mob/proc/throw_mode_off() - src.in_throw_mode = 0 - if(src.throw_icon && !issilicon(src)) //in case we don't have the HUD and we use the hotkey. Silicon use this for something else. Do not overwrite their HUD icon - src.throw_icon.icon_state = "act_throw_off" + in_throw_mode = 0 + if(throw_icon && !issilicon(src)) //in case we don't have the HUD and we use the hotkey. Silicon use this for something else. Do not overwrite their HUD icon + throw_icon.icon_state = "act_throw_off" /mob/proc/throw_mode_on() - src.in_throw_mode = 1 - if(src.throw_icon && !issilicon(src)) // Silicon use this for something else. Do not overwrite their HUD icon - src.throw_icon.icon_state = "act_throw_on" + in_throw_mode = 1 + if(throw_icon && !issilicon(src)) // Silicon use this for something else. Do not overwrite their HUD icon + throw_icon.icon_state = "act_throw_on" /mob/verb/spacebar_throw_on() set name = ".throwon" @@ -1177,8 +1177,8 @@ /obj/Destroy() - if(istype(src.loc, /mob)) - var/mob/holder = src.loc + if(istype(loc, /mob)) + var/mob/holder = loc if(src in holder.exploit_addons) holder.exploit_addons -= src . = ..() diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 31940d4b09c..aef3310dd64 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -5,21 +5,21 @@ /mob/proc/change_mob_type(var/new_type = null, var/turf/location = null, var/new_name = null as text, var/delete_old_mob = 0 as num, var/subspecies) if(isnewplayer(src)) - to_chat(usr, span_red("cannot convert players who have not entered yet.")) + to_chat(src, span_red("cannot convert players who have not entered yet.")) return if(!new_type) - new_type = tgui_input_text(usr, "Mob type path:", "Mob type") + new_type = tgui_input_text(src, "Mob type path:", "Mob type") if(istext(new_type)) new_type = text2path(new_type) if( !ispath(new_type) ) - to_chat(usr, "Invalid type path (new_type = [new_type]) in change_mob_type(). Contact a coder.") + to_chat(src, "Invalid type path (new_type = [new_type]) in change_mob_type(). Contact a coder.") return if( new_type == /mob/new_player ) - to_chat(usr, span_red("cannot convert into a new_player mob type.")) + to_chat(src, span_red("cannot convert into a new_player mob type.")) return var/mob/M @@ -29,7 +29,7 @@ M = new new_type( src.loc ) if(!M || !ismob(M)) - to_chat(usr, "Type path is not a mob (new_type = [new_type]) in change_mob_type(). Contact a coder.") + to_chat(src, "Type path is not a mob (new_type = [new_type]) in change_mob_type(). Contact a coder.") qdel(M) return diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 4fb3531303f..a82ea99f791 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -33,7 +33,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image to_chat(src, examine_block("
[join_motd]
")) if(has_respawned) - to_chat(usr, CONFIG_GET(string/respawn_message)) + to_chat(src, CONFIG_GET(string/respawn_message)) has_respawned = FALSE if(!mind) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index dbf695b23d1..5ff6a18ba0d 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -415,10 +415,10 @@ if (src != usr) return 0 if(!ticker || ticker.current_state != GAME_STATE_PLAYING) - to_chat(usr, span_red("The round is either not ready, or has already finished...")) + to_chat(src, span_red("The round is either not ready, or has already finished...")) return 0 if(!CONFIG_GET(flag/enter_allowed)) - to_chat(usr, span_notice("There is an administrative lock on entering the game!")) + to_chat(src, span_notice("There is an administrative lock on entering the game!")) return 0 if(!IsJobAvailable(rank)) tgui_alert_async(src,"[rank] is not available. Please try another.") diff --git a/code/modules/mob/new_player/news.dm b/code/modules/mob/new_player/news.dm index 6fa6c4f1260..667bf41b024 100644 --- a/code/modules/mob/new_player/news.dm +++ b/code/modules/mob/new_player/news.dm @@ -61,7 +61,7 @@ dat += " (Page [current_news_page] out of [CHANNEL.messages.len])" - var/datum/browser/popup = new(usr, "News", "Latest News", 640, 600, src) + var/datum/browser/popup = new(src, "News", "Latest News", 640, 600, src) popup.set_content(jointext(dat,null)) popup.open() diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 634e7b86370..df38a2d66cf 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -304,13 +304,13 @@ return highJob -/datum/preferences/proc/get_valid_hairstyles() +/datum/preferences/proc/get_valid_hairstyles(mob/user) var/list/valid_hairstyles = list() for(var/hairstyle in hair_styles_list) var/datum/sprite_accessory/S = hair_styles_list[hairstyle] if(!(species in S.species_allowed) && (!custom_base || !(custom_base in S.species_allowed))) //VOREStation Edit - Custom species base species allowance continue - if((!S.ckeys_allowed) || (usr.ckey in S.ckeys_allowed)) //VOREStation Edit, allows ckey locked hairstyles. + if((!S.ckeys_allowed) || (user.ckey in S.ckeys_allowed)) //VOREStation Edit, allows ckey locked hairstyles. valid_hairstyles[S.name] = hairstyle //VOREStation Edit, allows ckey locked hairstyles. //valid_hairstyles[hairstyle] = hair_styles_list[hairstyle] //VOREStation Edit. Replaced by above. diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index a57a2daa988..451e738ffda 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -4,24 +4,20 @@ /mob/verb/whisper(message as text) set name = "Whisper" set hidden = 1 - //VOREStation Addition Start if(forced_psay) psay(message) return - //VOREStation Addition End - usr.say(message,whispering=1) + say(message,whispering=1) /mob/verb/say_verb(message as text) set name = "Say" set hidden = 1 set instant = TRUE - //VOREStation Addition Start if(forced_psay) psay(message) return - //VOREStation Addition End client?.stop_thinking() //queue this message because verbs are scheduled to process after SendMaps in the tick and speech is pretty expensive when it happens. @@ -34,25 +30,21 @@ set desc = "Emote to nearby people (and your pred/prey)" set hidden = 1 - //VOREStation Addition Start if(forced_psay) pme(message) return - //VOREStation Addition End - //VOREStation Edit Start if(muffled) return me_verb_subtle(message) if(autowhisper) return me_verb_subtle(message) - message = sanitize_or_reflect(message,src) //VOREStation Edit - Reflect too-long messages (within reason) - //VOREStation Edit End + message = sanitize_or_reflect(message,src) //Reflect too-long messages (within reason) client?.stop_thinking() if(use_me) - custom_emote(usr.emote_type, message) + custom_emote(emote_type, message) else - usr.emote(message) + emote(message) /mob/proc/say_dead(var/message) if(!client) @@ -64,7 +56,7 @@ return if(!client?.prefs?.read_preference(/datum/preference/toggle/show_dsay)) - to_chat(usr, span_danger("You have deadchat muted.")) + to_chat(src, span_danger("You have deadchat muted.")) return message = encode_html_emphasis(message) @@ -79,14 +71,12 @@ else if(universal_speak || universal_understand) return TRUE - //VOREStation Addition Start if(isliving(src)) var/mob/living/L = src if(isbelly(L.loc) && L.absorbed) var/mob/living/P = L.loc.loc if(P.say_understands(other, speaking)) return TRUE - //VOREStation Addition End //Languages are handled after. if(!speaking) @@ -185,7 +175,7 @@ var/list/prefixes = list() // [["Common", start, end], ["Gutter", start, end]] for(var/i in 1 to length(message)) // This grabs 3 character substrings, to allow for up to 1 prefix, 1 letter language key, and one post-key character to more strictly control where the language breaks happen - var/selection = trim_right(copytext(message, i, i + 3)) // VOREStation Edit: We use uppercase keys to avoid Polaris key duplication, but this had lowertext() in it + var/selection = trim_right(copytext(message, i, i + 3)) // We use uppercase keys to avoid Polaris key duplication, but this had lowertext() in it // The first character in the selection will always be the prefix (if this is a valid language invocation) var/prefix = copytext(selection, 1, 2) var/language_key = copytext(selection, 2, 3) diff --git a/code/modules/mob/say_old.dm b/code/modules/mob/say_old.dm index f67ffb58b5b..aef6d50757e 100644 --- a/code/modules/mob/say_old.dm +++ b/code/modules/mob/say_old.dm @@ -5,7 +5,7 @@ client?.start_thinking() client?.start_typing() - var/message = tgui_input_text(usr, "Speak to people in sight.\nType your message:", "Say") + var/message = tgui_input_text(src, "Speak to people in sight.\nType your message:", "Say") client?.stop_thinking() if(message) @@ -18,7 +18,7 @@ client?.start_thinking() client?.start_typing() - var/message = tgui_input_text(usr, "Emote to people in sight (and your pred/prey).\nType your message:", "Emote", multiline = TRUE) + var/message = tgui_input_text(src, "Emote to people in sight (and your pred/prey).\nType your message:", "Emote", multiline = TRUE) client?.stop_thinking() if(message) @@ -28,7 +28,7 @@ set name = "Whisper Old" set category = "IC.Subtle" - var/message = tgui_input_text(usr, "Speak to nearby people.\nType your message:", "Whisper") + var/message = tgui_input_text(src, "Speak to nearby people.\nType your message:", "Whisper") if(message) whisper(message) @@ -39,7 +39,7 @@ set category = "IC.Subtle" set desc = "Emote to nearby people (and your pred/prey)" - var/message = tgui_input_text(usr, "Emote to nearby people (and your pred/prey).\nType your message:", "Subtle", multiline = TRUE) + var/message = tgui_input_text(src, "Emote to nearby people (and your pred/prey).\nType your message:", "Subtle", multiline = TRUE) if(message) me_verb_subtle(message) @@ -49,7 +49,7 @@ set category = "IC.Subtle" set desc = "Emote to nearby people, with ability to choose which specific portion of people you wish to target." - var/message = tgui_input_text(usr, "Emote to nearby people, with ability to choose which specific portion of people you wish to target.\nType your message:", "Subtle (Custom)", multiline = TRUE) + var/message = tgui_input_text(src, "Emote to nearby people, with ability to choose which specific portion of people you wish to target.\nType your message:", "Subtle (Custom)", multiline = TRUE) if(message) me_verb_subtle_custom(message) @@ -58,7 +58,7 @@ set name = "Psay Old" set category = "IC.Subtle" - var/message = tgui_input_text(usr, "Talk to people affected by complete absorbed or dominate predator/prey.\nType your message:", "Psay") + var/message = tgui_input_text(src, "Talk to people affected by complete absorbed or dominate predator/prey.\nType your message:", "Psay") if(message) psay(message) @@ -67,7 +67,7 @@ set name = "Pme Old" set category = "IC.Subtle" - var/message = tgui_input_text(usr, "Emote to people affected by complete absorbed or dominate predator/prey.\nType your message:", "Pme") + var/message = tgui_input_text(src, "Emote to people affected by complete absorbed or dominate predator/prey.\nType your message:", "Pme") if(message) pme(message) @@ -76,7 +76,7 @@ set name = "Narrate (Player) Old" set category = "IC.Chat" - var/message = tgui_input_text(usr, "Narrate an action or event! An alternative to emoting, for when your emote shouldn't start with your name!\nType your message:", "Narrate (Player)") + var/message = tgui_input_text(src, "Narrate an action or event! An alternative to emoting, for when your emote shouldn't start with your name!\nType your message:", "Narrate (Player)") if(message) player_narrate(message) diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index 1b63658e5fd..2140b078305 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -17,9 +17,9 @@ client?.stop_thinking() if(use_me) - usr.emote_vr("me",4,message) + emote_vr("me",4,message) else - usr.emote_vr(message) + emote_vr(message) /mob/verb/me_verb_subtle_custom(message as message) // Literally same as above but with mode_selection set to true set name = "Subtle (Custom)" @@ -35,9 +35,9 @@ client?.stop_thinking() if(use_me) - usr.emote_vr("me",4,message,TRUE) + emote_vr("me",4,message,TRUE) else - usr.emote_vr(message) + emote_vr(message) /mob/proc/custom_emote_vr(var/m_type=1,var/message = null,var/mode_selection = FALSE) //This would normally go in emote.dm if(stat || !use_me && usr == src) @@ -260,7 +260,7 @@ to_chat(src, span_warning("You cannot speak in IC (muted).")) return if (!message) - message = tgui_input_text(usr, "Type a message to say.","Psay") + message = tgui_input_text(src, "Type a message to say.","Psay") message = sanitize_or_reflect(message,src) if (!message) return @@ -357,7 +357,7 @@ to_chat(src, span_warning("You cannot speak in IC (muted).")) return if (!message) - message = tgui_input_text(usr, "Type a message to emote.","Pme") + message = tgui_input_text(src, "Type a message to emote.","Pme") message = sanitize_or_reflect(message,src) if (!message) return @@ -452,7 +452,7 @@ to_chat(src, span_warning("You cannot speak in IC (muted).")) return if(!message) - message = tgui_input_text(usr, "Type a message to narrate.","Narrate") + message = tgui_input_text(src, "Type a message to narrate.","Narrate") message = sanitize_or_reflect(message,src) if(!message) return diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 5d018586f1d..dfe813b6b74 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -241,13 +241,13 @@ qdel(src) return -/mob/living/carbon/human/Animalize() +/mob/living/carbon/human/Animalize(mob/user) var/list/mobtypes = typesof(/mob/living/simple_mob) - var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes) + var/mobpath = tgui_input_list(user, "Which type of mob should [src] turn into?", "Choose a type", mobtypes) if(!safe_animal(mobpath)) - to_chat(usr, span_red("Sorry but this mob type is currently unavailable.")) + to_chat(user, span_red("Sorry but this mob type is currently unavailable.")) return if(transforming) @@ -275,13 +275,13 @@ qdel(src) return -/mob/proc/Animalize() +/mob/proc/Animalize(mob/user) var/list/mobtypes = typesof(/mob/living/simple_mob) - var/mobpath = tgui_input_list(usr, "Which type of mob should [src] turn into?", "Choose a type", mobtypes) + var/mobpath = tgui_input_list(user, "Which type of mob should [src] turn into?", "Choose a type", mobtypes) if(!safe_animal(mobpath)) - to_chat(usr, span_red("Sorry but this mob type is currently unavailable.")) + to_chat(user, span_red("Sorry but this mob type is currently unavailable.")) return var/mob/new_mob = new mobpath(src.loc) diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index 8cfd9cd2231..102c002e867 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -21,7 +21,7 @@ client?.start_thinking() client?.start_typing() - var/message = tgui_input_text(usr, "Type your message:", "Say") + var/message = tgui_input_text(src, "Type your message:", "Say") client?.stop_thinking() if(message) @@ -37,7 +37,7 @@ client?.start_thinking() client?.start_typing() - var/message = tgui_input_text(usr, "Type your message:", "Emote", multiline = TRUE) + var/message = tgui_input_text(src, "Type your message:", "Emote", multiline = TRUE) client?.stop_thinking() if(message) @@ -54,7 +54,7 @@ if(client?.prefs?.read_preference(/datum/preference/toggle/show_typing_indicator_subtle)) client?.start_thinking() client?.start_typing() - var/message = tgui_input_text(usr, "Type your message:", "Whisper") + var/message = tgui_input_text(src, "Type your message:", "Whisper") client?.stop_thinking() if(message) @@ -72,7 +72,7 @@ if(client?.prefs?.read_preference(/datum/preference/toggle/show_typing_indicator_subtle)) client?.start_thinking() client?.start_typing() - var/message = tgui_input_text(usr, "Type your message:", "Subtle", multiline = TRUE) + var/message = tgui_input_text(src, "Type your message:", "Subtle", multiline = TRUE) client?.stop_thinking() if(message) diff --git a/code/modules/modular_computers/computers/modular_computer/interaction.dm b/code/modules/modular_computers/computers/modular_computer/interaction.dm index 2a6e95c991c..47387e178a0 100644 --- a/code/modules/modular_computers/computers/modular_computer/interaction.dm +++ b/code/modules/modular_computers/computers/modular_computer/interaction.dm @@ -120,7 +120,7 @@ else if(!enabled && screen_on) turn_on(user) -/obj/item/modular_computer/attackby(var/obj/item/W as obj, var/mob/user as mob) +/obj/item/modular_computer/attackby(var/obj/item/W, var/mob/user) if(istype(W, /obj/item/card/id)) // ID Card, try to insert it. var/obj/item/card/id/I = W if(!card_slot) @@ -166,7 +166,7 @@ return to_chat(user, "You begin repairing damage to \the [src]...") - if(WT.remove_fuel(round(damage/75)) && do_after(usr, damage/10)) + if(WT.remove_fuel(round(damage/75)) && do_after(user, damage/10)) damage = 0 to_chat(user, "You repair \the [src].") return @@ -180,12 +180,12 @@ for(var/obj/item/computer_hardware/H in all_components) component_names.Add(H.name) - var/choice = tgui_input_list(usr, "Which component do you want to uninstall?", "Computer maintenance", component_names) + var/choice = tgui_input_list(user, "Which component do you want to uninstall?", "Computer maintenance", component_names) if(!choice) return - if(!Adjacent(usr)) + if(!Adjacent(user)) return var/obj/item/computer_hardware/H = find_hardware_by_name(choice) diff --git a/code/modules/modular_computers/computers/subtypes/dev_laptop.dm b/code/modules/modular_computers/computers/subtypes/dev_laptop.dm index a09b432af88..2cfbacfbc68 100644 --- a/code/modules/modular_computers/computers/subtypes/dev_laptop.dm +++ b/code/modules/modular_computers/computers/subtypes/dev_laptop.dm @@ -23,14 +23,14 @@ // Prevents carrying of open laptops inhand. // While they work inhand, i feel it'd make tablets lose some of their high-mobility advantage they have over laptops now. if(!istype(loc, /turf/)) - to_chat(usr, "\The [src] has to be on a stable surface first!") + to_chat(user, "\The [src] has to be on a stable surface first!") return //VOREStation Addition Begin var/supported = FALSE for(var/obj/structure/table/S in loc) supported = TRUE if(!supported && !anchored) - to_chat(usr, "You will need a better supporting surface before opening \the [src]!") + to_chat(user, "You will need a better supporting surface before opening \the [src]!") return //VOREStation Addition End anchored = !anchored diff --git a/code/modules/news/new_newspaper.dm b/code/modules/news/new_newspaper.dm index be8560785a2..97a05086eea 100644 --- a/code/modules/news/new_newspaper.dm +++ b/code/modules/news/new_newspaper.dm @@ -138,7 +138,7 @@ obj/item/newspaper/attackby(obj/item/W as obj, mob/user) s = sanitize(s) if(!s) return - if(!in_range(src, usr) && src.loc != usr) + if(!in_range(src, user) && loc != user) return scribble_page = curr_page scribble = s diff --git a/code/modules/news/newspaper.dm b/code/modules/news/newspaper.dm index d62d70cd43c..8c70f03c85d 100644 --- a/code/modules/news/newspaper.dm +++ b/code/modules/news/newspaper.dm @@ -130,7 +130,7 @@ if(istype(src.loc, /mob)) attack_self(src.loc) -/obj/item/newspaper/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/newspaper/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/pen)) if(scribble_page == curr_page) to_chat(user, span_blue("There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?")) @@ -139,7 +139,7 @@ s = sanitize(s) if(!s) return - if(!in_range(src, usr) && src.loc != usr) + if(!in_range(src, user) && src.loc != user) return scribble_page = curr_page scribble = s diff --git a/code/modules/nifsoft/nif_tgui.dm b/code/modules/nifsoft/nif_tgui.dm index 35fe90115b9..7c32c935aaf 100644 --- a/code/modules/nifsoft/nif_tgui.dm +++ b/code/modules/nifsoft/nif_tgui.dm @@ -86,7 +86,7 @@ var/obj/item/nif/N = nif if(istype(N)) - N.tgui_interact(usr) + N.tgui_interact(src) /** * The NIF State ensures that only our authorized implanted user can touch us. diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 82d506678bd..9a06d8dc942 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -509,7 +509,7 @@ to_chat(src,span_warning("You need a loaded mind to use NSay.")) return if(!message) - message = tgui_input_text(usr, "Type a message to say.","Speak into Soulcatcher") + message = tgui_input_text(src, "Type a message to say.","Speak into Soulcatcher") if(message) var/sane_message = sanitize(message) SC.say_into(sane_message,src) @@ -540,7 +540,7 @@ return if(!message) - message = tgui_input_text(usr, "Type an action to perform.","Emote into Soulcatcher") + message = tgui_input_text(src, "Type an action to perform.","Emote into Soulcatcher") if(message) var/sane_message = sanitize(message) SC.emote_into(sane_message,src) @@ -595,7 +595,7 @@ set category = "Soulcatcher" if(!message) - message = tgui_input_text(usr, "Type a message to say.","Speak into Soulcatcher") + message = tgui_input_text(src, "Type a message to say.","Speak into Soulcatcher") if(message) var/sane_message = sanitize(message) soulcatcher.say_into(sane_message,src,null) @@ -606,7 +606,7 @@ set category = "Soulcatcher" if(!message) - message = tgui_input_text(usr, "Type an action to perform.","Emote into Soulcatcher") + message = tgui_input_text(src, "Type an action to perform.","Emote into Soulcatcher") if(message) var/sane_message = sanitize(message) soulcatcher.emote_into(sane_message,src,null) diff --git a/code/modules/organs/internal/augment.dm b/code/modules/organs/internal/augment.dm index e824902aacc..916b5774595 100644 --- a/code/modules/organs/internal/augment.dm +++ b/code/modules/organs/internal/augment.dm @@ -107,7 +107,7 @@ set desc = "Toggle your augment menu." set category = "Augments" - enable_augments(usr) + enable_augments(src) /mob/living/carbon/human/proc/enable_augments(var/mob/living/user) var/list/options = list() diff --git a/code/modules/organs/internal/eyes.dm b/code/modules/organs/internal/eyes.dm index c7952314d72..efabcfdfb49 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -37,7 +37,7 @@ set src in usr var/current_color = rgb(eye_colour[1],eye_colour[2],eye_colour[3]) - var/new_color = input(usr, "Pick a new color for your eyes.","Eye Color", current_color) as null|color + var/new_color = input(src, "Pick a new color for your eyes.","Eye Color", current_color) as null|color if(new_color && owner) // input() supplies us with a hex color, which we can't use, so we convert it to rbg values. var/list/new_color_rgb_list = hex2rgb(new_color) diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 0505d8d561d..5c4b8bfff7c 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -166,9 +166,9 @@ return //no eating the limb until everything's been removed return ..() -/obj/item/organ/external/examine() +/obj/item/organ/external/examine(mob/user) . = ..() - if(in_range(usr, src) || isobserver(usr)) + if(in_range(user, src) || isobserver(user)) for(var/obj/item/I in contents) if(istype(I, /obj/item/organ)) continue diff --git a/code/modules/overmap/champagne.dm b/code/modules/overmap/champagne.dm index 163f6b6a9ca..35f74be5859 100644 --- a/code/modules/overmap/champagne.dm +++ b/code/modules/overmap/champagne.dm @@ -15,7 +15,7 @@ var/max_name_len = 32 // Refuse if shuttle tag is longer than this. var/max_area_turfs = 256 // Refuse if area has more than this many turfs. -/obj/item/champagne/afterattack(var/atom/A, mob/user as mob, proximity) +/obj/item/champagne/afterattack(var/atom/A, mob/user, proximity) if(!proximity) return var/obj/machinery/computer/shuttle_control/explore/comp = A @@ -27,7 +27,7 @@ return user.visible_message(span_notice("[user] lifts [src] bottle over [comp]!")) - var/shuttle_name = tgui_input_text(usr, "Choose a name for the shuttle", "New Shuttle Name") + var/shuttle_name = tgui_input_text(user, "Choose a name for the shuttle", "New Shuttle Name") if(!shuttle_name || QDELETED(src) || QDELETED(comp) || comp.shuttle_tag || user.incapacitated()) return // After input() safety re-checks diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index e030e0d7bb6..a2340405e3b 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -249,7 +249,7 @@ GLOBAL_LIST_EMPTY(all_waypoints) if("move") var/ndir = text2num(params["dir"]) - linked.relaymove(usr, ndir, accellimit) + linked.relaymove(ui.user, ndir, accellimit) . = TRUE if("brake") diff --git a/code/modules/overmap/ships/ship_vr.dm b/code/modules/overmap/ships/ship_vr.dm index 21e2e7cb75f..bda1be62b4d 100644 --- a/code/modules/overmap/ships/ship_vr.dm +++ b/code/modules/overmap/ships/ship_vr.dm @@ -16,7 +16,7 @@ var/mob/living/L = over var/confirm = tgui_alert(L, "You COULD eat this spaceship...", "Eat spaceship?", list("Eat it!", "No, thanks.")) if(confirm == "Eat it!") - var/obj/belly/bellychoice = tgui_input_list(usr, "Which belly?","Select A Belly", L.vore_organs) + var/obj/belly/bellychoice = tgui_input_list(L, "Which belly?","Select A Belly", L.vore_organs) if(bellychoice) L.visible_message(span_warning("[L] is trying to stuff \the [src] into [L.gender == MALE ? "his" : L.gender == FEMALE ? "her" : "their"] [bellychoice]!"),span_notice("You begin putting \the [src] into your [bellychoice]!")) if(do_after(L, 5 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE)) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 41e18d5f080..9e282197069 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -43,7 +43,7 @@ add_overlay("clipboard_over") return -/obj/item/clipboard/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/clipboard/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/paper) || istype(W, /obj/item/photo)) user.drop_item() @@ -54,19 +54,19 @@ update_icon() else if(istype(toppaper) && istype(W, /obj/item/pen)) - toppaper.attackby(W, usr) + toppaper.attackby(W, user) update_icon() return -/obj/item/clipboard/afterattack(turf/T as turf, mob/user as mob) +/obj/item/clipboard/afterattack(turf/T as turf, mob/user) for(var/obj/item/paper/P in T) P.loc = src toppaper = P update_icon() to_chat(user, span_notice("You clip the [P] onto \the [src].")) -/obj/item/clipboard/attack_self(mob/user as mob) +/obj/item/clipboard/attack_self(mob/user) var/dat = "Clipboard" if(haspen) dat += "Remove Pen

" @@ -87,7 +87,7 @@ user << browse("[dat]", "window=clipboard") onclose(user, "clipboard") - add_fingerprint(usr) + add_fingerprint(user) return /obj/item/clipboard/Topic(href, href_list) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index d132bb3af7a..acacec87855 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -58,8 +58,8 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins return scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(L) && !L.get_active_hand()) + L.put_in_hands(scan) scan = null authenticated = null diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 2faa8ec05ec..ddc8f9c7ee2 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -12,7 +12,7 @@ /obj/item/hand_labeler/attack() return -/obj/item/hand_labeler/afterattack(atom/A, mob/user as mob, proximity) +/obj/item/hand_labeler/afterattack(atom/A, mob/user, proximity) if(!proximity) return if(!mode) //if it's off, give up. @@ -32,7 +32,7 @@ if(istype(A, /mob/living/silicon/robot/platform)) var/mob/living/silicon/robot/platform/P = A if(!P.allowed(user)) - to_chat(usr, span_warning("Access denied.")) + to_chat(user, span_warning("Access denied.")) else if(P.client || P.key) to_chat(user, span_notice("You rename \the [P] to [label].")) to_chat(P, span_notice("\The [user] renames you to [label].")) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 5fdf1213d41..eadc6db4a29 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -160,7 +160,7 @@ /obj/item/paper/examine(mob/user) . = ..() if(in_range(user, src) || isobserver(user)) - show_content(usr) + show_content(user) else . += span_notice("You have to go closer if you want to read it.") @@ -211,18 +211,18 @@ spam_flag = 0 return -/obj/item/paper/attack_ai(var/mob/living/silicon/ai/user as mob) +/obj/item/paper/attack_ai(var/mob/living/silicon/ai/user) var/dist if(istype(user) && user.camera) //is AI dist = get_dist(src, user.camera) else //cyborg or AI not seeing through a camera dist = get_dist(src, user) if(dist < 2) - usr << browse("[name][info][stamps]", "window=[name]") - onclose(usr, "[name]") + user << browse("[name][info][stamps]", "window=[name]") + onclose(user, "[name]") else - usr << browse("[name][stars(info)][stamps]", "window=[name]") - onclose(usr, "[name]") + user << browse("[name][stars(info)][stamps]", "window=[name]") + onclose(user, "[name]") return /obj/item/paper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) @@ -514,7 +514,7 @@ return "paper" //Gross, but required for now. return ..() -/obj/item/paper/attackby(obj/item/P as obj, mob/user as mob) +/obj/item/paper/attackby(obj/item/P, mob/user) ..() var/clown = 0 if(user.mind && (user.mind.assigned_role == JOB_CLOWN)) @@ -587,7 +587,7 @@ else if(istype(P, /obj/item/pen)) if(icon_state == "scrap") - to_chat(usr, span_warning("\The [src] is too crumpled to write on.")) + to_chat(user, span_warning("\The [src] is too crumpled to write on.")) return var/obj/item/pen/robopen/RP = P @@ -610,7 +610,7 @@ stamps += (stamps=="" ? "
" : "
") + span_italics("[the_stamp.stamptext]") else stamps += (stamps=="" ? "
" : "
") + span_italics("This paper has been stamped with the [the_stamp.name].") - if((!in_range(src, usr) && loc != user && !( istype(loc, /obj/item/clipboard) ) && loc.loc != user && user.get_active_hand() != P)) + if((!in_range(src, user) && loc != user && !( istype(loc, /obj/item/clipboard) ) && loc.loc != user && user.get_active_hand() != P)) return var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') var/x, y diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index c3487db836d..ca78769db02 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -18,7 +18,7 @@ var/list/pages = list() // Ordered list of pages as they are to be displayed. Can be different order than src.contents. -/obj/item/paper_bundle/attackby(obj/item/W as obj, mob/user as mob) +/obj/item/paper_bundle/attackby(obj/item/W, mob/user) ..() if (istype(W, /obj/item/paper/carbon)) @@ -40,7 +40,7 @@ user.drop_from_inventory(W) for(var/obj/O in W) O.loc = src - O.add_fingerprint(usr) + O.add_fingerprint(user) pages.Add(O) to_chat(user, span_notice("You add \the [W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].")) @@ -49,13 +49,13 @@ if(istype(W, /obj/item/tape_roll)) return 0 if(istype(W, /obj/item/pen)) - usr << browse("", "window=[name]") //Closes the dialog + user << browse("", "window=[name]") //Closes the dialog var/obj/P = pages[page] P.attackby(W, user) update_icon() - attack_self(usr) //Update the browsed page. - add_fingerprint(usr) + attack_self(user) //Update the browsed page. + add_fingerprint(user) return /obj/item/paper_bundle/proc/insert_sheet_at(mob/user, var/index, obj/item/sheet) @@ -103,7 +103,7 @@ else . += span_notice("It is too far away.") -/obj/item/paper_bundle/proc/show_content(mob/user as mob) +/obj/item/paper_bundle/proc/show_content(mob/user) var/dat var/obj/item/W = pages[page] @@ -125,7 +125,7 @@ if(istype(pages[page], /obj/item/paper)) var/obj/item/paper/P = W - if(!(ishuman(usr) || isobserver(usr) || issilicon(usr))) + if(!(ishuman(user) || isobserver(user) || issilicon(user))) dat+= "[P.name][stars(P.info)][P.stamps]" else dat+= "[P.name][P.info][P.stamps]" @@ -139,9 +139,9 @@ + "[P.scribble ? "
Written on the back:
[P.scribble]" : null]"\ + "", "window=[name]") -/obj/item/paper_bundle/attack_self(mob/user as mob) +/obj/item/paper_bundle/attack_self(mob/user) src.show_content(user) - add_fingerprint(usr) + add_fingerprint(user) update_icon() return diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm index 027e978e9cb..623fcc127e3 100644 --- a/code/modules/paperwork/paper_sticky.dm +++ b/code/modules/paperwork/paper_sticky.dm @@ -34,7 +34,7 @@ if(writing_space <= 0) to_chat(user, span_warning("There is no room left on \the [src].")) return - var/text = sanitizeSafe(tgui_input_text(usr, "What would you like to write?", null, null, writing_space), writing_space) + var/text = sanitizeSafe(tgui_input_text(user, "What would you like to write?", null, null, writing_space), writing_space) if(!text || thing.loc != user || (!Adjacent(user) && loc != user) || user.incapacitated()) return user.visible_message(span_infoplain(span_bold("\The [user]") + " jots a note down on \the [src].")) @@ -66,10 +66,10 @@ else update_icon() -/obj/item/sticky_pad/MouseDrop(mob/user as mob) - if(user == usr && !(usr.restrained() || usr.stat) && (usr.contents.Find(src) || in_range(src, usr))) - if(!isanimal(usr)) - if( !usr.get_active_hand() ) //if active hand is empty +/obj/item/sticky_pad/MouseDrop(mob/user) + if(user == usr && !(user.restrained() || user.stat) && (user.contents.Find(src) || in_range(src, user))) + if(!isanimal(user)) + if( !user.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 90c3dd98618..e45af812aae 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -20,10 +20,10 @@ pickup_sound = 'sound/items/pickup/cardboardbox.ogg' -/obj/item/paper_bin/MouseDrop(mob/user as mob) - if(user == usr && !(usr.restrained() || usr.stat) && (usr.contents.Find(src) || in_range(src, usr))) - if(!isanimal(usr)) - if( !usr.get_active_hand() ) //if active hand is empty +/obj/item/paper_bin/MouseDrop(mob/user) + if(user == usr && !(user.restrained() || user.stat) && (user.contents.Find(src) || in_range(src, user))) + if(!isanimal(user)) + if( !user.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] @@ -38,7 +38,7 @@ return -/obj/item/paper_bin/attack_hand(mob/user as mob) +/obj/item/paper_bin/attack_hand(mob/user) if(ishuman(user)) var/mob/living/carbon/human/H = user var/obj/item/organ/external/temp = H.organs_by_name["r_hand"] diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 07ac7665f48..0965d183181 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -270,7 +270,7 @@ /obj/item/pen/chameleon var/signature = "" -/obj/item/pen/chameleon/attack_self(mob/user as mob) +/obj/item/pen/chameleon/attack_self(mob/user) /* // Limit signatures to official crew members var/personnel_list[] = list() @@ -278,11 +278,11 @@ personnel_list.Add(t.fields["name"]) personnel_list.Add("Anonymous") - var/new_signature = tgui_input_list(usr, "Enter new signature pattern.", "New Signature", personnel_list) + var/new_signature = tgui_input_list(user, "Enter new signature pattern.", "New Signature", personnel_list) if(new_signature) signature = new_signature */ - signature = sanitize(tgui_input_text(usr, "Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature)) + signature = sanitize(tgui_input_text(user, "Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature)) /obj/item/pen/proc/get_signature(var/mob/user) return (user && user.real_name) ? user.real_name : "Anonymous" diff --git a/code/modules/pda/cart_vr.dm b/code/modules/pda/cart_vr.dm index 305955c1c42..0ef256ef9b8 100644 --- a/code/modules/pda/cart_vr.dm +++ b/code/modules/pda/cart_vr.dm @@ -49,10 +49,10 @@ var/list/exploration_cartridges = list( if (hold.handle_mousedrop(usr, over_object)) ..(over_object) -/obj/item/cartridge/storage/attack_self(mob/user as mob) +/obj/item/cartridge/storage/attack_self(mob/user) to_chat(user, span_notice("You empty [src].")) var/turf/T = get_turf(src) - hold.hide_from(usr) + hold.hide_from(user) for(var/obj/item/I in hold.contents) hold.remove_from_storage(I, T) add_fingerprint(user) diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm index 19ad3981ab4..bd91902cc87 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -84,21 +84,21 @@ var/global/list/obj/item/pda/PDAs = list() if(Adjacent(user)) . += "The time [stationtime2text()] is displayed in the corner of the screen." -/obj/item/pda/CtrlClick() - if(can_use(usr) && !issilicon(usr)) +/obj/item/pda/CtrlClick(mob/user) + if(can_use(user) && !issilicon(user)) remove_pen() return ..() -/obj/item/pda/AltClick() - if(issilicon(usr)) +/obj/item/pda/AltClick(mob/user) + if(issilicon(user)) return - if ( can_use(usr) ) + if ( can_use(user) ) if(id) remove_id() else - to_chat(usr, span_notice("This PDA does not have an ID in it.")) + to_chat(user, span_notice("This PDA does not have an ID in it.")) /obj/item/pda/proc/play_ringtone() var/S @@ -111,19 +111,19 @@ var/global/list/obj/item/pda/PDAs = list() for(var/mob/O in hearers(3, loc)) O.show_message(text("[icon2html(src, O.client)] *[ttone]*")) -/obj/item/pda/proc/set_ringtone() - var/t = tgui_input_text(usr, "Please enter new ringtone", name, ttone) - if(in_range(src, usr) && loc == usr) +/obj/item/pda/proc/set_ringtone(mob/user) + var/t = tgui_input_text(user, "Please enter new ringtone", name, ttone) + if(in_range(src, user) && loc == user) if(t) - if(hidden_uplink && hidden_uplink.check_trigger(usr, lowertext(t), lowertext(lock_code))) - to_chat(usr, "The PDA softly beeps.") - close(usr) + if(hidden_uplink && hidden_uplink.check_trigger(user, lowertext(t), lowertext(lock_code))) + to_chat(user, "The PDA softly beeps.") + close(user) else t = sanitize(copytext(t, 1, 20)) ttone = t return 1 else - close(usr) + close(user) return 0 /obj/item/pda/New(var/mob/living/carbon/human/H) @@ -424,7 +424,7 @@ var/global/list/obj/item/pda/PDAs = list() return 0 // access to status display signals -/obj/item/pda/attackby(obj/item/C as obj, mob/user as mob) +/obj/item/pda/attackby(obj/item/C as obj, mob/user) ..() if(istype(C, /obj/item/cartridge) && !cartridge) cartridge = C @@ -432,7 +432,7 @@ var/global/list/obj/item/pda/PDAs = list() cartridge.loc = src cartridge.update_programs(src) update_shortcuts() - to_chat(usr, span_notice("You insert [cartridge] into [src].")) + to_chat(user, span_notice("You insert [cartridge] into [src].")) if(cartridge.radio) cartridge.radio.hostpda = src diff --git a/code/modules/pda/pda_tgui.dm b/code/modules/pda/pda_tgui.dm index 5fa161170d5..a64a56be8c0 100644 --- a/code/modules/pda/pda_tgui.dm +++ b/code/modules/pda/pda_tgui.dm @@ -105,7 +105,7 @@ if("TouchSounds") touch_silent = !touch_silent if("Ringtone") - return set_ringtone() + return set_ringtone(ui.user) else if(current_app) . = current_app.tgui_act(action, params, ui, state) diff --git a/code/modules/persistence/graffiti.dm b/code/modules/persistence/graffiti.dm index 033aa212d55..ba767ec3f56 100644 --- a/code/modules/persistence/graffiti.dm +++ b/code/modules/persistence/graffiti.dm @@ -55,7 +55,7 @@ to_chat(user, span_warning("You are banned from leaving persistent information across rounds.")) return - var/_message = sanitize(tgui_input_text(usr, "Enter an additional message to engrave.", "Graffiti"), trim = TRUE) + var/_message = sanitize(tgui_input_text(user, "Enter an additional message to engrave.", "Graffiti"), trim = TRUE) if(_message && loc && user && !user.incapacitated() && user.Adjacent(loc) && thing.loc == user) user.visible_message(span_warning("\The [user] begins carving something into \the [loc].")) if(do_after(user, max(20, length(_message)), src) && loc) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 3940dbc5ca4..f4e6ee5b529 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -615,16 +615,16 @@ var/list/possible_cable_coil_colours = list( var/mob/M = usr if(ishuman(M) && !M.restrained() && !M.stat && !M.paralysis && ! M.stunned) - if(!istype(usr.loc,/turf)) return + if(!istype(M.loc,/turf)) return if(src.amount <= 14) - to_chat(usr, span_warning("You need at least 15 lengths to make restraints!")) + to_chat(M, span_warning("You need at least 15 lengths to make restraints!")) return - var/obj/item/handcuffs/cable/B = new /obj/item/handcuffs/cable(usr.loc) + var/obj/item/handcuffs/cable/B = new /obj/item/handcuffs/cable(M.loc) B.color = color - to_chat(usr, span_notice("You wind some cable together to make some restraints.")) + to_chat(M, span_notice("You wind some cable together to make some restraints.")) src.use(15) else - to_chat(usr, span_notice("You cannot do that.")) + to_chat(M, span_notice("You cannot do that.")) /obj/item/stack/cable_coil/cyborg/verb/set_colour() set name = "Change Colour" diff --git a/code/modules/power/fusion/core/_core.dm b/code/modules/power/fusion/core/_core.dm index 7eaee107a50..b5d2797dc92 100644 --- a/code/modules/power/fusion/core/_core.dm +++ b/code/modules/power/fusion/core/_core.dm @@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(fusion_cores) return if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Fusion Core", id_tag, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "Fusion Core", id_tag, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/fusion/core/core_control.dm b/code/modules/power/fusion/core/core_control.dm index d146dfa5c51..5a7647bd327 100644 --- a/code/modules/power/fusion/core/core_control.dm +++ b/code/modules/power/fusion/core/core_control.dm @@ -24,7 +24,7 @@ /obj/machinery/computer/fusion_core_control/attackby(var/obj/item/thing, var/mob/user) ..() if(istype(thing, /obj/item/multitool)) - var/new_ident = sanitize_text(tgui_input_text(usr, "Enter a new ident tag.", "Core Control", monitor.core_tag)) + var/new_ident = sanitize_text(tgui_input_text(user, "Enter a new ident tag.", "Core Control", monitor.core_tag)) if(new_ident && user.Adjacent(src)) monitor.core_tag = new_ident return diff --git a/code/modules/power/fusion/fuel_assembly/fuel_control.dm b/code/modules/power/fusion/fuel_assembly/fuel_control.dm index 6a1b50f334b..78140d0d074 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_control.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_control.dm @@ -117,7 +117,7 @@ /obj/machinery/computer/fusion_fuel_control/attackby(var/obj/item/W, var/mob/user) ..() if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Fuel Control", monitor.fuel_tag, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "Fuel Control", monitor.fuel_tag, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) monitor.fuel_tag = new_ident diff --git a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm index 110ebb199a4..ec3888d25d6 100644 --- a/code/modules/power/fusion/fuel_assembly/fuel_injector.dm +++ b/code/modules/power/fusion/fuel_assembly/fuel_injector.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors) /obj/machinery/fusion_fuel_injector/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Fuel Injector", id_tag, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "Fuel Injector", id_tag, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) id_tag = new_ident diff --git a/code/modules/power/fusion/gyrotron/gyrotron.dm b/code/modules/power/fusion/gyrotron/gyrotron.dm index f9177bcecc9..7f35f417ed9 100644 --- a/code/modules/power/fusion/gyrotron/gyrotron.dm +++ b/code/modules/power/fusion/gyrotron/gyrotron.dm @@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(gyrotrons) /obj/machinery/power/emitter/gyrotron/attackby(var/obj/item/W, var/mob/user) if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron", id_tag, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "Gyrotron", id_tag, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) id_tag = new_ident @@ -66,4 +66,4 @@ GLOBAL_LIST_EMPTY(gyrotrons) if(default_part_replacement(user, W)) return - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/power/fusion/gyrotron/gyrotron_control.dm b/code/modules/power/fusion/gyrotron/gyrotron_control.dm index 9959123c766..eff96341375 100644 --- a/code/modules/power/fusion/gyrotron/gyrotron_control.dm +++ b/code/modules/power/fusion/gyrotron/gyrotron_control.dm @@ -119,7 +119,7 @@ /obj/machinery/computer/gyrotron_control/attackby(var/obj/item/W, var/mob/user) ..() if(istype(W, /obj/item/multitool)) - var/new_ident = tgui_input_text(usr, "Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag, MAX_NAME_LEN) + var/new_ident = tgui_input_text(user, "Enter a new ident tag.", "Gyrotron Control", monitor.gyro_tag, MAX_NAME_LEN) new_ident = sanitize(new_ident,MAX_NAME_LEN) if(new_ident && user.Adjacent(src)) monitor.gyro_tag = new_ident diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 8b4b1266b7c..7103d6d6651 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -79,7 +79,7 @@ var/global/list/light_type_cache = list() cell.update_icon() cell = null -/obj/machinery/light_construct/attackby(obj/item/W as obj, mob/user as mob) +/obj/machinery/light_construct/attackby(obj/item/W, mob/user) src.add_fingerprint(user) if(istype(W, /obj/item/cell/emergency_light)) if(!cell_connectors) @@ -102,8 +102,8 @@ var/global/list/light_type_cache = list() if (W.has_tool_quality(TOOL_WRENCH)) if (src.stage == 1) playsound(src, W.usesound, 75, 1) - to_chat(usr, "You begin deconstructing [src].") - if (!do_after(usr, 30 * W.toolspeed)) + to_chat(user, "You begin deconstructing [src].") + if (!do_after(user, 30 * W.toolspeed)) return new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded ) user.visible_message("[user.name] deconstructs [src].", \ @@ -111,11 +111,11 @@ var/global/list/light_type_cache = list() playsound(src, 'sound/items/Deconstruct.ogg', 75, 1) qdel(src) if (src.stage == 2) - to_chat(usr, "You have to remove the wires first.") + to_chat(user, "You have to remove the wires first.") return if (src.stage == 3) - to_chat(usr, "You have to unscrew the case first.") + to_chat(user, "You have to unscrew the case first.") return if(W.has_tool_quality(TOOL_WIRECUTTER)) @@ -1099,37 +1099,37 @@ var/global/list/light_type_cache = list() "Nightshift Color", ) - var/modification_decision = tgui_input_list(usr, "What do you wish to change about this light?", "Light Adjustment", menu_list) + var/modification_decision = tgui_input_list(user, "What do you wish to change about this light?", "Light Adjustment", menu_list) if(!modification_decision) return //They didn't select anything! switch(modification_decision) if("Normal Range") - var/new_range = tgui_input_number(usr, "Choose the new range of the light! (1-[init_brightness_range])", "", init_brightness_range, init_brightness_range, 1, 0) + var/new_range = tgui_input_number(user, "Choose the new range of the light! (1-[init_brightness_range])", "", init_brightness_range, init_brightness_range, 1, 0) if(new_range) brightness_range = new_range if("Normal Brightness") - var/new_power = tgui_input_number(usr, "Choose the new brightness of the light! (0.01 - [init_brightness_power])", "", init_brightness_power, init_brightness_power, 0.01, round_value=FALSE) + var/new_power = tgui_input_number(user, "Choose the new brightness of the light! (0.01 - [init_brightness_power])", "", init_brightness_power, init_brightness_power, 0.01, round_value=FALSE) if(new_power) brightness_power = new_power if("Normal Color") - var/new_color = tgui_color_picker(usr, "Choose a color to set the light to!", "", brightness_color) + var/new_color = tgui_color_picker(user, "Choose a color to set the light to!", "", brightness_color) if(new_color) brightness_color = new_color if("Nightshift Range") - var/new_range = tgui_input_number(usr, "Choose the new range of the light! (1-[init_nightshift_range])", "", init_nightshift_range, init_nightshift_range, 1) + var/new_range = tgui_input_number(user, "Choose the new range of the light! (1-[init_nightshift_range])", "", init_nightshift_range, init_nightshift_range, 1) if(new_range) nightshift_range = new_range if("Nightshift Brightness") - var/new_power = tgui_input_number(usr, "Choose the new brightness of the light! (0.01 - [init_nightshift_power])", "", init_nightshift_power, init_nightshift_power, 0.01, round_value=FALSE) + var/new_power = tgui_input_number(user, "Choose the new brightness of the light! (0.01 - [init_nightshift_power])", "", init_nightshift_power, init_nightshift_power, 0.01, round_value=FALSE) if(new_power) nightshift_power = new_power if("Nightshift Color") - var/new_color = tgui_color_picker(usr, "Choose a color to set the light to!", "", nightshift_color) + var/new_color = tgui_color_picker(user, "Choose a color to set the light to!", "", nightshift_color) if(new_color) nightshift_color = new_color diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 364662c16bb..c490dda9f02 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -109,15 +109,15 @@ // Proc: attack_ai() // Parameters: None // Description: AI requires the RCON wire to be intact to operate the SMES. -/obj/machinery/power/smes/buildable/attack_ai() +/obj/machinery/power/smes/buildable/attack_ai(mob/user) if(RCon) ..() else // RCON wire cut - to_chat(usr, span_warning("Connection error: Destination Unreachable.")) + to_chat(user, span_warning("Connection error: Destination Unreachable.")) // Cyborgs standing next to the SMES can play with the wiring. - if(isrobot(usr) && Adjacent(usr) && panel_open) - wires.Interact(usr) + if(isrobot(user) && Adjacent(user) && panel_open) + wires.Interact(user) // Proc: New() // Parameters: None @@ -137,10 +137,10 @@ // Proc: attack_hand() // Parameters: None // Description: Opens the UI as usual, and if cover is removed opens the wiring panel. -/obj/machinery/power/smes/buildable/attack_hand() +/obj/machinery/power/smes/buildable/attack_hand(mob/user) ..() if(panel_open) - wires.Interact(usr) + wires.Interact(user) /obj/machinery/power/smes/buildable/RefreshParts() recalc_coils() @@ -191,8 +191,8 @@ var/obj/item/clothing/gloves/G = h_user.gloves if(G.siemens_coefficient == 0) user_protected = 1 - log_game("SMES FAILURE: [src.x]X [src.y]Y [src.z]Z User: [usr.ckey], Intensity: [intensity]/100") - message_admins("SMES FAILURE: [src.x]X [src.y]Y [src.z]Z User: [usr.ckey], Intensity: [intensity]/100 - JMP") + log_game("SMES FAILURE: [src.x]X [src.y]Y [src.z]Z User: [h_user.ckey], Intensity: [intensity]/100") + message_admins("SMES FAILURE: [src.x]X [src.y]Y [src.z]Z User: [h_user.ckey], Intensity: [intensity]/100 - JMP") var/used_hand = h_user.hand?"l_hand":"r_hand" @@ -300,7 +300,7 @@ // Proc: attackby() // Parameters: 2 (W - object that was used on this machine, user - person which used the object) // Description: Handles tool interaction. Allows deconstruction/upgrading/fixing. -/obj/machinery/power/smes/buildable/attackby(var/obj/item/W as obj, var/mob/user as mob) +/obj/machinery/power/smes/buildable/attackby(var/obj/item/W, var/mob/user) // No more disassembling of overloaded SMESs. You broke it, now enjoy the consequences. if (failing) to_chat(user, span_warning("The [src]'s indicator lights are flashing wildly. It seems to be overloaded! Touching it now is probably not a good idea.")) @@ -342,7 +342,7 @@ playsound(src, W.usesound, 50, 1) to_chat(user, span_warning("You begin to disassemble the [src]!")) - if (do_after(usr, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar + if (do_after(user, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar if (failure_probability && prob(failure_probability)) total_system_failure(failure_probability, user) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 1e854ae0c9c..2cece1149f7 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -276,4 +276,4 @@ /obj/item/ammo_magazine/ammo_box/examine(mob/user) . = ..() - . += to_chat(usr, span_notice("Alt-click to extract contents.")) + . += to_chat(user, span_notice("Alt-click to extract contents.")) diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm index e7ef9b61923..7bcd206eead 100644 --- a/code/modules/projectiles/ammunition/smartmag.dm +++ b/code/modules/projectiles/ammunition/smartmag.dm @@ -214,10 +214,10 @@ return if(LAZYLEN(stored_ammo)) - to_chat(usr, span_warning("You can't reset \the [src] unless it's empty!")) + to_chat(H, span_warning("You can't reset \the [src] unless it's empty!")) return - to_chat(usr, span_notice("You clear \the [src]'s data buffers.")) + to_chat(H, span_notice("You clear \the [src]'s data buffers.")) caliber = null ammo_type = null diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index cf964c02573..a067dc3df46 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -108,7 +108,7 @@ var/flight_y_offset = 0 /obj/item/gun/CtrlClick(mob/user) - if(can_flashlight && ishuman(user) && src.loc == usr && !user.incapacitated(INCAPACITATION_ALL)) + if(can_flashlight && ishuman(user) && loc == user && !user.incapacitated(INCAPACITATION_ALL)) toggle_flashlight() else return ..() diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 752cd2f0cfd..09d93aeb3a4 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -186,7 +186,7 @@ /obj/item/gun/energy/staff/special_check(var/mob/user) if((user.mind && !wizards.is_antagonist(user.mind))) - to_chat(usr, span_warning("You focus your mind on \the [src], but nothing happens!")) + to_chat(user, span_warning("You focus your mind on \the [src], but nothing happens!")) return 0 return ..() diff --git a/code/modules/projectiles/guns/launcher/confetti.dm b/code/modules/projectiles/guns/launcher/confetti.dm index 547ea78288b..236c627c348 100644 --- a/code/modules/projectiles/guns/launcher/confetti.dm +++ b/code/modules/projectiles/guns/launcher/confetti.dm @@ -19,27 +19,27 @@ if(get_dist(user, src) <= 2) . += span_blue("It's loaded with [confetti_charge] ball\s of confetti.") -/obj/item/gun/launcher/confetti_cannon/attackby(obj/item/I as obj, mob/user as mob) +/obj/item/gun/launcher/confetti_cannon/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/paper) || istype(I, /obj/item/shreddedp)) if(confetti_charge < max_confetti) user.drop_item() ++confetti_charge - to_chat(usr, span_blue("You put the paper in the [src].")) + to_chat(user, span_blue("You put the paper in the [src].")) qdel(I) else - to_chat(usr, span_red("[src] cannot hold more paper.")) + to_chat(user, span_red("[src] cannot hold more paper.")) -/obj/item/gun/launcher/confetti_cannon/proc/pump(mob/M as mob) - playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) +/obj/item/gun/launcher/confetti_cannon/proc/pump(mob/user) + playsound(user, 'sound/weapons/shotgunpump.ogg', 60, 1) if(!chambered) if(confetti_charge) chambered = new /obj/item/grenade/confetti/party_ball --confetti_charge - to_chat(usr, span_blue("You compress a new confetti ball.")) + to_chat(user, span_blue("You compress a new confetti ball.")) else - to_chat(usr, span_red("The [src] is out of confetti!")) + to_chat(user, span_red("The [src] is out of confetti!")) else - to_chat(usr, span_red("The [src] is already loaded!")) + to_chat(user, span_red("The [src] is already loaded!")) /obj/item/gun/launcher/confetti_cannon/attack_self(mob/user) pump(user) @@ -70,14 +70,14 @@ name = "Party Cannon" desc = "Confetti, pies, banana peels, chaos!" -/obj/item/gun/launcher/confetti_cannon/robot/pump(mob/M as mob) - playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) +/obj/item/gun/launcher/confetti_cannon/robot/pump(mob/user) + playsound(user, 'sound/weapons/shotgunpump.ogg', 60, 1) if(!chambered) - var/choice = tgui_alert(usr, "Load the Party Canon with?", "Change What?", list("Confetti","Banana Peel","Cream Pie")) + var/choice = tgui_alert(user, "Load the Party Canon with?", "Change What?", list("Confetti","Banana Peel","Cream Pie")) if(!choice) return - if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/R = usr + if(istype(user,/mob/living/silicon/robot)) + var/mob/living/silicon/robot/R = user if(!R.use_direct_power(200, 400)) to_chat(R, span_warning("Warning, low power detected. Aborting action.")) return @@ -85,15 +85,15 @@ switch(choice) if("Confetti") chambered = new /obj/item/grenade/confetti/party_ball - to_chat(usr, span_blue("Confetti loaded.")) + to_chat(user, span_blue("Confetti loaded.")) if("Banana Peel") chambered = new /obj/item/bananapeel - to_chat(usr, span_blue("Banana peel loaded.")) + to_chat(user, span_blue("Banana peel loaded.")) if("Cream Pie") chambered = new /obj/item/reagent_containers/food/snacks/pie - to_chat(usr, span_blue("Banana cream pie loaded.")) + to_chat(user, span_blue("Banana cream pie loaded.")) else - to_chat(usr, span_red("The [src] is already loaded!")) + to_chat(user, span_red("The [src] is already loaded!")) /obj/item/gun/launcher/confetti_cannon/robot/consume_next_projectile() if(istype(chambered,/obj/item/grenade/confetti/party_ball)) diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index 0b0e22ce555..1409a9fb13c 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -112,7 +112,7 @@ while(bolt && tension && loc == current_user) if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own. - user.visible_message("[usr] stops drawing and relaxes the string of [src].",span_warning("You stop drawing back and relax the string of [src].")) + user.visible_message("[user] stops drawing and relaxes the string of [src].",span_warning("You stop drawing back and relax the string of [src].")) tension = 0 update_icon() return @@ -126,10 +126,10 @@ if(tension >= max_tension) tension = max_tension - to_chat(usr, "[src] clunks as you draw the string to its maximum tension!") + to_chat(user, "[src] clunks as you draw the string to its maximum tension!") return - user.visible_message("[usr] draws back the string of [src]!",span_notice("You continue drawing back the string of [src]!")) + user.visible_message("[user] draws back the string of [src]!",span_notice("You continue drawing back the string of [src]!")) /obj/item/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob) diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index bd199941d84..29440101feb 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -18,8 +18,8 @@ matter = list(MAT_STEEL = 2000) //revolves the magazine, allowing players to choose between multiple grenade types -/obj/item/gun/launcher/grenade/proc/pump(mob/M as mob) - playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) +/obj/item/gun/launcher/grenade/proc/pump(mob/user) + playsound(user, 'sound/weapons/shotgunpump.ogg', 60, 1) var/obj/item/grenade/next if(grenades.len) @@ -30,9 +30,9 @@ if(next) grenades -= next //Remove grenade from loaded list. chambered = next - to_chat(M, span_warning("You pump [src], loading \a [next] into the chamber.")) + to_chat(user, span_warning("You pump [src], loading \a [next] into the chamber.")) else - to_chat(M, span_warning("You pump [src], but the magazine is empty.")) + to_chat(user, span_warning("You pump [src], but the magazine is empty.")) update_icon() /obj/item/gun/launcher/grenade/examine(mob/user) diff --git a/code/modules/projectiles/guns/launcher/rocket.dm b/code/modules/projectiles/guns/launcher/rocket.dm index 1e210fb1412..2128a493976 100644 --- a/code/modules/projectiles/guns/launcher/rocket.dm +++ b/code/modules/projectiles/guns/launcher/rocket.dm @@ -21,7 +21,7 @@ if(get_dist(user, src) <= 2) . += span_blue("[rockets.len] / [max_rockets] rockets.") -/obj/item/gun/launcher/rocket/attackby(obj/item/I as obj, mob/user as mob) +/obj/item/gun/launcher/rocket/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/ammo_casing/rocket)) if(rockets.len < max_rockets) user.drop_item() @@ -30,7 +30,7 @@ to_chat(user, span_blue("You put the rocket in [src].")) to_chat(user, span_blue("[rockets.len] / [max_rockets] rockets.")) else - to_chat(usr, span_red(">[src] cannot hold more rockets.")) + to_chat(user, span_red(">[src] cannot hold more rockets.")) /obj/item/gun/launcher/rocket/consume_next_projectile() if(rockets.len) diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index d0eeef4225f..9d45202ffda 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -44,7 +44,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(input(M, "What do you want to name the gun?", ,""), MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) name = input diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index a7a0cfc1e49..e5797318c1c 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -67,7 +67,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(input(M, "What do you want to name the gun?", ,""), MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) name = input @@ -95,7 +95,7 @@ to_chat(M, span_notice("You don't feel cool enough to name this gun, chump.")) return 0 - var/input = sanitizeSafe(input(usr, "What do you want to name the gun?", ,""), MAX_NAME_LEN) + var/input = sanitizeSafe(input(M, "What do you want to name the gun?", ,""), MAX_NAME_LEN) if(src && input && !M.stat && in_range(M,src)) name = input diff --git a/code/modules/projectiles/guns/projectile/shotgun_vr.dm b/code/modules/projectiles/guns/projectile/shotgun_vr.dm index 0fa8427c71e..7d024a9b8f0 100644 --- a/code/modules/projectiles/guns/projectile/shotgun_vr.dm +++ b/code/modules/projectiles/guns/projectile/shotgun_vr.dm @@ -71,7 +71,7 @@ playsound(src, 'sound/weapons/targeton.ogg', 50, 1) user.update_mob_action_buttons() -/obj/item/gun/projectile/shotgun/compact/verb/verb_toggle_stock(mob/user as mob) +/obj/item/gun/projectile/shotgun/compact/verb/verb_toggle_stock() set category = "Object" set name = "Toggle stock" set src in usr @@ -85,14 +85,14 @@ to_chat(usr, span_notice("You cannot do this in your current state.")) -/obj/item/gun/projectile/shotgun/compact/attack_self(mob/user as mob) - if(issilicon(usr)) +/obj/item/gun/projectile/shotgun/compact/attack_self(mob/user) + if(issilicon(user)) return - if (isliving(usr)) + if (isliving(user)) toggle_stock() else - to_chat(usr, span_notice("You cannot do this in your current state.")) + to_chat(user, span_notice("You cannot do this in your current state.")) /obj/item/gun/projectile/shotgun/compact/ui_action_click(mob/unused_user, actiontype) var/mob/living/user = loc diff --git a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm index bf1c1792e75..f0a776a5b2b 100644 --- a/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper/collapsible_sniper.dm @@ -26,7 +26,7 @@ var/obj/item/sniper_rifle_part/stock/stock = new(assembly) assembly.stock = stock assembly.part_count = 2 - assembly.update_build() + assembly.update_build(user) user.put_in_any_hand_if_possible(assembly) || assembly.dropInto(user.loc) user.put_in_any_hand_if_possible(barrel) || barrel.dropInto(user.loc) @@ -69,7 +69,7 @@ ..() trigger_group = src -/obj/item/sniper_rifle_part/attack_self(mob/user as mob) +/obj/item/sniper_rifle_part/attack_self(mob/user) if(part_count == 1) to_chat(user, span_warning("You can't disassemble this further!")) return @@ -90,7 +90,7 @@ user.put_in_any_hand_if_possible(P) || P.dropInto(loc) P.part_count = 1 - update_build() + update_build(user) /obj/item/sniper_rifle_part/attackby(var/obj/item/sniper_rifle_part/A as obj, mob/user as mob) @@ -143,7 +143,7 @@ update_build(user) -/obj/item/sniper_rifle_part/proc/update_build() +/obj/item/sniper_rifle_part/proc/update_build(mob/user) switch(part_count) if(1) name = initial(name) @@ -163,10 +163,10 @@ if(3) var/obj/item/gun/projectile/heavysniper/collapsible/gun = new (get_turf(src), 0) - if(usr && ishuman(usr)) - var/mob/living/carbon/human/user = usr - user.unEquip(src, force=1) - user.put_in_any_hand_if_possible(gun) || gun.dropInto(loc) + if(user && ishuman(user)) + var/mob/living/carbon/human/H = user + H.unEquip(src, force=1) + H.put_in_any_hand_if_possible(gun) || gun.dropInto(loc) qdel(src) /obj/item/gun/projectile/heavysniper/update_icon() diff --git a/code/modules/reagents/hoses/connector.dm b/code/modules/reagents/hoses/connector.dm index a11834e3cb8..91c265e80b2 100644 --- a/code/modules/reagents/hoses/connector.dm +++ b/code/modules/reagents/hoses/connector.dm @@ -13,7 +13,7 @@ if(LAZYLEN(available_sockets)) if(available_sockets.len == 1) var/obj/item/hose_connector/AC = available_sockets[1] - var/choice = tgui_alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", list("Yes", "No")) + var/choice = tgui_alert(user, "Are you sure you want to disconnect [AC]?", "Confirm", list("Yes", "No")) if(choice == "Yes" && Adjacent(user)) visible_message("[user] disconnects \the hose from \the [src].") @@ -22,11 +22,11 @@ else - var/choice = tgui_input_list(usr, "Select a target hose connector.", "Socket Disconnect", available_sockets) + var/choice = tgui_input_list(user, "Select a target hose connector.", "Socket Disconnect", available_sockets) if(choice) var/obj/item/hose_connector/AC = choice - var/confirm = tgui_alert(usr, "Are you sure you want to disconnect [AC]?", "Confirm", list("Yes", "No")) + var/confirm = tgui_alert(user, "Are you sure you want to disconnect [AC]?", "Confirm", list("Yes", "No")) if(confirm == "Yes" && Adjacent(user)) visible_message("[user] disconnects \the hose from \the [src].") @@ -137,4 +137,4 @@ if(carrier && my_hose) carrier.reagents.trans_to_holder(reagents, reagents.maximum_volume) else if(reagents.total_volume && carrier && !my_hose) - reagents.trans_to_obj(carrier, reagents.maximum_volume) \ No newline at end of file + reagents.trans_to_obj(carrier, reagents.maximum_volume) diff --git a/code/modules/reagents/hoses/hose_connector.dm b/code/modules/reagents/hoses/hose_connector.dm index b8fbd7dc2fc..c259e23bc80 100644 --- a/code/modules/reagents/hoses/hose_connector.dm +++ b/code/modules/reagents/hoses/hose_connector.dm @@ -64,7 +64,7 @@ to_chat(user, span_notice("You connect one end of tubing to \the [AC].")) else - var/choice = tgui_input_list(usr, "Select a target hose connector.", "Socket Selection", available_sockets) + var/choice = tgui_input_list(user, "Select a target hose connector.", "Socket Selection", available_sockets) if(choice) var/obj/item/hose_connector/CC = choice diff --git a/code/modules/reagents/machinery/dispenser/cartridge.dm b/code/modules/reagents/machinery/dispenser/cartridge.dm index f66858cc0cb..e8f6a7bc6c2 100644 --- a/code/modules/reagents/machinery/dispenser/cartridge.dm +++ b/code/modules/reagents/machinery/dispenser/cartridge.dm @@ -51,13 +51,13 @@ label = "" name = initial(name) -/obj/item/reagent_containers/chem_disp_cartridge/attack_self() +/obj/item/reagent_containers/chem_disp_cartridge/attack_self(mob/user) ..() if (is_open_container()) - to_chat(usr, span_notice("You put the cap on \the [src].")) + to_chat(user, span_notice("You put the cap on \the [src].")) flags ^= OPENCONTAINER else - to_chat(usr, span_notice("You take the cap off \the [src].")) + to_chat(user, span_notice("You take the cap off \the [src].")) flags |= OPENCONTAINER /obj/item/reagent_containers/chem_disp_cartridge/afterattack(obj/target, mob/user , flag) diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm index 81f2ef57008..aeb3299d94a 100644 --- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm +++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm @@ -207,12 +207,12 @@ if(rig) . += span_notice("There is some kind of device rigged to the tank.") -/obj/structure/reagent_dispensers/fueltank/attack_hand() +/obj/structure/reagent_dispensers/fueltank/attack_hand(mob/user) if (rig) - usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]") - if(do_after(usr, 20)) - usr.visible_message(span_notice("[usr] detaches [rig] from \the [src]."), span_notice("You detach [rig] from \the [src]")) - rig.loc = get_turf(usr) + user.visible_message("[user] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]") + if(do_after(user, 20)) + user.visible_message(span_notice("[user] detaches [rig] from \the [src]."), span_notice("You detach [rig] from \the [src]")) + rig.loc = get_turf(user) rig = null overlays = new/list() diff --git a/code/modules/reagents/machinery/distillery.dm b/code/modules/reagents/machinery/distillery.dm index f2594b8b46b..d6d0af7e521 100644 --- a/code/modules/reagents/machinery/distillery.dm +++ b/code/modules/reagents/machinery/distillery.dm @@ -204,7 +204,7 @@ OutputBeaker = null if("adjust temp") - target_temp = tgui_input_number(usr, "Choose a target temperature.", "Temperature.", T20C, max_temp, min_temp, round_value = FALSE) + target_temp = tgui_input_number(user, "Choose a target temperature.", "Temperature.", T20C, max_temp, min_temp, round_value = FALSE) target_temp = CLAMP(target_temp, min_temp, max_temp) update_icon() diff --git a/code/modules/reagents/machinery/injector_maker.dm b/code/modules/reagents/machinery/injector_maker.dm index 8d1cc8c7daf..153e0f2c5fe 100644 --- a/code/modules/reagents/machinery/injector_maker.dm +++ b/code/modules/reagents/machinery/injector_maker.dm @@ -227,7 +227,7 @@ update_icon() -/obj/machinery/injector_maker/proc/make_injector(var/size, var/amount, var/new_name, var/material, mob/user as mob) +/obj/machinery/injector_maker/proc/make_injector(var/size, var/amount, var/new_name, var/material, mob/user) if(!beaker) return var/amount_per_injector = null @@ -238,7 +238,7 @@ if("large injector") amount_per_injector = CLAMP(beaker.reagents.total_volume / amount, 0, 15) if((size == "small injector" && amount_per_injector < 5) || size == "large injector" && amount_per_injector < 15) - proceed = tgui_alert(usr, "Heads up! Less than max volume per injector!\n Making [amount] [size](s) filled with [amount_per_injector] total reagent volume each!","Proceed?",list("No","Yes")) + proceed = tgui_alert(user, "Heads up! Less than max volume per injector!\n Making [amount] [size](s) filled with [amount_per_injector] total reagent volume each!","Proceed?",list("No","Yes")) if(!proceed || proceed == "No" || !amount_per_injector) return for(var/i, i < amount, i++) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index e48f2fe6fd3..3138a263c27 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -71,13 +71,13 @@ if(!is_open_container()) . += span_notice("Airtight lid seals it completely.") -/obj/item/reagent_containers/glass/attack_self() +/obj/item/reagent_containers/glass/attack_self(mob/user) ..() if(is_open_container()) - to_chat(usr, span_notice("You put the lid on \the [src].")) + to_chat(user, span_notice("You put the lid on \the [src].")) flags ^= OPENCONTAINER else - to_chat(usr, span_notice("You take the lid off \the [src].")) + to_chat(user, span_notice("You take the lid off \the [src].")) flags |= OPENCONTAINER update_icon() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 1e4d441393c..315d8e1c901 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -53,10 +53,10 @@ log_game("[key_name(user)] fired Space lube from \a [src].") return -/obj/item/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity) +/obj/item/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user, proximity) playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6) if (A.density && proximity) - A.visible_message("[usr] sprays [A] with [src].") + A.visible_message("[user] sprays [A] with [src].") reagents.splash(A, amount_per_transfer_from_this) else spawn(0) @@ -138,11 +138,11 @@ /obj/item/reagent_containers/spray/pepper/attack_self(var/mob/user) safety = !safety - to_chat(usr, span_notice("You switch the safety [safety ? "on" : "off"].")) + to_chat(user, span_notice("You switch the safety [safety ? "on" : "off"].")) -/obj/item/reagent_containers/spray/pepper/Spray_at(atom/A as mob|obj) +/obj/item/reagent_containers/spray/pepper/Spray_at(atom/A as mob|obj, mob/user) if(safety) - to_chat(usr, span_warning("The safety is on!")) + to_chat(user, span_warning("The safety is on!")) return . = ..() @@ -176,7 +176,7 @@ volume = 600 origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) -/obj/item/reagent_containers/spray/chemsprayer/Spray_at(atom/A as mob|obj) +/obj/item/reagent_containers/spray/chemsprayer/Spray_at(atom/A as mob|obj, mob/user) playsound(src, 'sound/effects/spray3.ogg', rand(50,1), -6) var/direction = get_dir(src, A) var/turf/T = get_turf(A) @@ -254,7 +254,7 @@ else . = ..() -/obj/item/reagent_containers/spray/chemsprayer/hosed/Spray_at(atom/A as mob|obj) +/obj/item/reagent_containers/spray/chemsprayer/hosed/Spray_at(atom/A as mob|obj, mob/user) update_icon() var/direction = get_dir(src, A) @@ -264,7 +264,7 @@ var/list/the_targets = list(T, T1, T2) if(src.reagents.total_volume < 1) - to_chat(usr, span_notice("\The [src] is empty.")) + to_chat(user, span_notice("\The [src] is empty.")) return if(!heavy_spray) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 89bc7f2d881..9f3fbc33719 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -132,7 +132,7 @@ if(istype(I, /obj/item/multitool)) if(panel_open) - var/input = sanitize(tgui_input_text(usr, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) + var/input = sanitize(tgui_input_text(user, "What id would you like to give this conveyor?", "Multitool-Conveyor interface", id)) if(!input) to_chat(user, "No input found. Please hang up and try your call again.") return @@ -312,7 +312,7 @@ return if(I.has_tool_quality(TOOL_MULTITOOL)) - var/input = sanitize(tgui_input_text(usr, "What id would you like to give this conveyor switch?", "Multitool-Conveyor interface", id)) + var/input = sanitize(tgui_input_text(user, "What id would you like to give this conveyor switch?", "Multitool-Conveyor interface", id)) if(!input) to_chat(user, "No input found. Please hang up and try your call again.") return diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index 248e9be0a6f..a624504aaa9 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -22,11 +22,11 @@ active_power_usage = 6 power_channel = ENVIRON -/obj/machinery/keycard_auth/attack_ai(mob/user as mob) +/obj/machinery/keycard_auth/attack_ai(mob/user) to_chat (user, span_warning("A firewall prevents you from interfacing with this device!")) return -/obj/machinery/keycard_auth/attackby(obj/item/W as obj, mob/user as mob) +/obj/machinery/keycard_auth/attackby(obj/item/W, mob/user) if(stat & (NOPOWER|BROKEN)) to_chat(user, "This device is not powered.") return @@ -37,10 +37,10 @@ //This is not the device that made the initial request. It is the device confirming the request. if(event_source) event_source.confirmed = 1 - event_source.event_confirmed_by = usr + event_source.event_confirmed_by = user else if(screen == 2) - event_triggered_by = usr - broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices + event_triggered_by = user + broadcast_request(user) //This is the device making the initial event request. It needs to broadcast to other devices if(W.has_tool_quality(TOOL_SCREWDRIVER)) to_chat(user, "You begin removing the faceplate from the [src]") @@ -131,7 +131,7 @@ event_triggered_by = null event_confirmed_by = null -/obj/machinery/keycard_auth/proc/broadcast_request() +/obj/machinery/keycard_auth/proc/broadcast_request(mob/user) icon_state = "auth_on" for(var/obj/machinery/keycard_auth/KA in machines) if(KA == src) continue @@ -142,7 +142,7 @@ sleep(confirm_delay) if(confirmed) confirmed = 0 - trigger_event(event) + trigger_event(user) log_game("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]") message_admins("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]", 1) reset() @@ -162,7 +162,7 @@ active = 0 busy = 0 -/obj/machinery/keycard_auth/proc/trigger_event() +/obj/machinery/keycard_auth/proc/trigger_event(mob/user) switch(event) if("Red alert") set_security_level(SEC_LEVEL_RED) @@ -175,7 +175,7 @@ feedback_inc("alert_keycard_auth_maintRevoke",1) if("Emergency Response Team") if(is_ert_blocked()) - to_chat(usr, span_red("All emergency response teams are dispatched and can not be called at this time.")) + to_chat(user, span_red("All emergency response teams are dispatched and can not be called at this time.")) return trigger_armed_response_team(1) diff --git a/code/modules/spells/general/area_teleport.dm b/code/modules/spells/general/area_teleport.dm index 3012be46fa4..36c6c8751ea 100644 --- a/code/modules/spells/general/area_teleport.dm +++ b/code/modules/spells/general/area_teleport.dm @@ -22,11 +22,11 @@ /spell/area_teleport/before_cast() return -/spell/area_teleport/choose_targets() +/spell/area_teleport/choose_targets(mob/user) var/A = null if(!randomise_selection) - A = tgui_input_list(usr, "Area to teleport to", "Teleport", teleportlocs) + A = tgui_input_list(user, "Area to teleport to", "Teleport", teleportlocs) else A = pick(teleportlocs) @@ -82,4 +82,4 @@ else invocation += "[uppertext(chosenarea.name)]" ..() - return \ No newline at end of file + return diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index c2c32fe807c..a2545f554f5 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -15,7 +15,7 @@ if(!user) return if((user.mind && !wizards.is_antagonist(user.mind))) - to_chat(usr, span_warning("You stare at the book but cannot make sense of the markings!")) + to_chat(user, span_warning("You stare at the book but cannot make sense of the markings!")) return user.set_machine(src) @@ -100,7 +100,7 @@ if(href_list["spell_choice"]) if(href_list["spell_choice"] == "rememorize") var/area/wizard_station/A = locate() - if(usr in A.contents) + if(H in A.contents) uses = max_uses H.spellremove() temp = "All spells have been removed. You may now memorize a new set of spells." diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index f4f3e8712f0..5cc05e90546 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -192,9 +192,9 @@ var/list/table_icon_cache = list() visible_message(span_infoplain(span_bold("\The [user]") + " scratches at \the [src]!")) return ..() -/obj/structure/table/MouseDrop_T(obj/item/stack/material/what) - if(can_reinforce && isliving(usr) && (!usr.stat) && istype(what) && usr.get_active_hand() == what && Adjacent(usr)) - reinforce_table(what, usr) +/obj/structure/table/MouseDrop_T(obj/item/stack/material/what, mob/user) + if(can_reinforce && isliving(user) && (!user.stat) && istype(what) && user.get_active_hand() == what && Adjacent(user)) + reinforce_table(what, user) else return ..() diff --git a/code/modules/vehicles/vehicle.dm b/code/modules/vehicles/vehicle.dm index 846e511b293..12a34be6f46 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -289,7 +289,7 @@ C.forceMove(src) cell = C powercheck() - to_chat(usr, span_notice("You install [C] in [src].")) + to_chat(H, span_notice("You install [C] in [src].")) /obj/vehicle/proc/remove_cell(var/mob/living/carbon/human/H) if(!mechanical) @@ -297,7 +297,7 @@ if(!cell) return - to_chat(usr, span_notice("You remove [cell] from [src].")) + to_chat(H, span_notice("You remove [cell] from [src].")) cell.forceMove(get_turf(H)) H.put_in_hands(cell) cell = null diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm index f16deca1dac..ef89d145cb2 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -148,7 +148,7 @@ var/list/ventcrawl_machinery = list( if(pipes.len == 1) pipe = pipes[1] else - pipe = tgui_input_list(usr, "Crawl Through Vent", "Pick a pipe", pipes) + pipe = tgui_input_list(src, "Crawl Through Vent", "Pick a pipe", pipes) if(canmove && pipe) return pipe diff --git a/code/modules/vore/eating/belly_import.dm b/code/modules/vore/eating/belly_import.dm index 3fb41309e09..9ca2b27e814 100644 --- a/code/modules/vore/eating/belly_import.dm +++ b/code/modules/vore/eating/belly_import.dm @@ -1,19 +1,19 @@ /datum/vore_look/proc/import_belly(mob/host) - var/panel_choice = tgui_input_list(usr, "Belly Import", "Pick an option", list("Import all bellies from VRDB","Import one belly from VRDB")) + var/panel_choice = tgui_input_list(host, "Belly Import", "Pick an option", list("Import all bellies from VRDB","Import one belly from VRDB")) if(!panel_choice) return var/pickOne = FALSE if(panel_choice == "Import one belly from VRDB") pickOne = TRUE - var/input_file = input(usr,"Please choose a valid VRDB file to import from.","Belly Import") as file + var/input_file = input(host,"Please choose a valid VRDB file to import from.","Belly Import") as file var/input_data try input_data = json_decode(file2text(input_file)) catch(var/exception/e) - tgui_alert_async(usr, "The supplied file contains errors: [e]", "Error!") + tgui_alert_async(host, "The supplied file contains errors: [e]", "Error!") return FALSE if(!islist(input_data)) - tgui_alert_async(usr, "The supplied file was not a valid VRDB file.", "Error!") + tgui_alert_async(host, "The supplied file was not a valid VRDB file.", "Error!") return FALSE var/list/valid_names = list() @@ -35,11 +35,11 @@ valid_lists += list(raw_list) if(length(valid_names) == 0) - tgui_alert_async(usr, "The supplied VRDB file does not contain any valid bellies.", "Error!") + tgui_alert_async(host, "The supplied VRDB file does not contain any valid bellies.", "Error!") return FALSE if(pickOne) - var/picked = tgui_input_list(usr, "Belly Import", "Which belly?", valid_names) + var/picked = tgui_input_list(host, "Belly Import", "Which belly?", valid_names) if(!picked) return for(var/B in valid_lists) if(lowertext(picked) == lowertext(B["name"])) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index c2f510d9c07..6ff858e7938 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -175,7 +175,7 @@ else if(istype(I,/obj/item/radio/beacon)) var/confirm = tgui_alert(user, "[src == user ? "Eat the beacon?" : "Feed the beacon to [src]?"]", "Confirmation", list("Yes!", "Cancel")) if(confirm == "Yes!") - var/obj/belly/B = tgui_input_list(usr, "Which belly?", "Select A Belly", vore_organs) + var/obj/belly/B = tgui_input_list(user, "Which belly?", "Select A Belly", vore_organs) if(!istype(B)) return TRUE visible_message(span_warning("[user] is trying to stuff a beacon into [src]'s [lowertext(B.name)]!"), @@ -640,17 +640,17 @@ /mob/living/proc/eat_held_mob(mob/living/user, mob/living/prey, mob/living/pred) var/belly if(user != pred) - belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs) + belly = tgui_input_list(user, "Choose Belly", "Belly Choice", pred.vore_organs) else belly = pred.vore_selected return perform_the_nom(user, prey, pred, belly) /mob/living/proc/feed_self_to_grabbed(mob/living/user, mob/living/pred) - var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs) + var/belly = tgui_input_list(user, "Choose Belly", "Belly Choice", pred.vore_organs) return perform_the_nom(user, user, pred, belly) /mob/living/proc/feed_grabbed_to_other(mob/living/user, mob/living/prey, mob/living/pred) - var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs) + var/belly = tgui_input_list(user, "Choose Belly", "Belly Choice", pred.vore_organs) return perform_the_nom(user, prey, pred, belly) // @@ -1179,7 +1179,7 @@ if(href_list["vore_prefs"]) display_voreprefs(usr) if(href_list["ooc_notes"]) - src.Examine_OOC() + Examine_OOC(usr) if(href_list["edit_ooc_notes"]) if(usr == src) set_metainfo_panel() @@ -1260,12 +1260,12 @@ if(result == "Open Panel") var/mob/living/user = usr if(!user) - to_chat(usr,span_notice("Mob undefined: [user]")) + to_chat(user,span_notice("Mob undefined: [user]")) return FALSE var/datum/vore_look/export_panel/exportPanel if(!exportPanel) - exportPanel = new(usr) + exportPanel = new(user) if(!exportPanel) to_chat(user,span_notice("Export panel undefined: [exportPanel]")) diff --git a/code/modules/vore/eating/silicon_vr.dm b/code/modules/vore/eating/silicon_vr.dm index a96e3de0ed5..85d19131719 100644 --- a/code/modules/vore/eating/silicon_vr.dm +++ b/code/modules/vore/eating/silicon_vr.dm @@ -13,13 +13,13 @@ walk(src, 0) // Because we might have called walk_to, we must stop the walk loop or BYOND keeps an internal reference to us forever. return ..() -/obj/effect/overlay/aiholo/proc/get_prey(var/mob/living/prey) +/obj/effect/overlay/aiholo/proc/get_prey(var/mob/living/prey, mob/user) if(bellied) return playsound(src, 'sound/effects/stealthoff.ogg',50,0) bellied = prey prey.forceMove(src) visible_message("[src] entirely engulfs [prey] in hardlight holograms!") - to_chat(usr, span_vnotice("You completely engulf [prey] in hardlight holograms!")) //Can't be part of the above, because the above is from the hologram. + to_chat(user, span_vnotice("You completely engulf [prey] in hardlight holograms!")) //Can't be part of the above, because the above is from the hologram. desc = "[initial(desc)] It seems to have hardlight mode enabled and someone inside." pass_flags = 0 @@ -46,7 +46,7 @@ // Wrong state if (!eyeobj || !holo) - to_chat(usr, span_vwarning("You can only use this when holo-projecting!")) + to_chat(src, span_vwarning("You can only use this when holo-projecting!")) return //Holopads have this 'masters' list where the keys are AI names and the values are the hologram effects @@ -58,7 +58,7 @@ //Already full if (hologram.bellied) - var/choice = tgui_alert(usr, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", list("Drop Mob", "Cancel")) + var/choice = tgui_alert(src, "You can only contain one person. [hologram.bellied] is in you.", "Already Full", list("Drop Mob", "Cancel")) if(choice == "Drop Mob") hologram.drop_prey() return @@ -68,13 +68,13 @@ return //Probably cancelled if(!istype(prey)) - to_chat(usr, span_vwarning("Invalid mob choice!")) + to_chat(src, span_vwarning("Invalid mob choice!")) return hologram.visible_message("[hologram] starts engulfing [prey] in hardlight holograms!") to_chat(src, span_vnotice("You begin engulfing [prey] in hardlight holograms.")) //Can't be part of the above, because the above is from the hologram. if(do_after(user=eyeobj,delay=50,target=prey,needhand=0) && holo && hologram && !hologram.bellied) //Didn't move and still projecting and effect exists and no other bellied people - hologram.get_prey(prey) + hologram.get_prey(prey, src) /* Can't, lets them examine things in camera blackout areas //I basically have to do this, you know? diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm index db4a5493b00..3f70ec79b5a 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -872,7 +872,7 @@ /obj/item/fluff/injector/monkey/attack(mob/living/M, mob/living/user) - if(usr == M) //Is the person using it on theirself? + if(user == M) //Is the person using it on theirself? if(ishuman(M)) //If so, monkify them. var/mob/living/carbon/human/H = user H.monkeyize() @@ -886,7 +886,7 @@ /obj/item/fluff/injector/numb_bite/attack(mob/living/M, mob/living/user) - if(usr == M) //Is the person using it on theirself? + if(user == M) //Is the person using it on theirself? if(ishuman(M)) //Give them numbing bites. var/mob/living/carbon/human/H = user H.species.give_numbing_bite() //This was annoying, but this is the easiest way of performing it. diff --git a/code/modules/vore/mouseray.dm b/code/modules/vore/mouseray.dm index 902275cef94..85c17af7af3 100644 --- a/code/modules/vore/mouseray.dm +++ b/code/modules/vore/mouseray.dm @@ -25,18 +25,18 @@ /obj/item/gun/energy/mouseray/attack_self(mob/user) . = ..() if(tf_allow_select) - pick_type() + pick_type(user) -/obj/item/gun/energy/mouseray/proc/pick_type() - var/choice = tgui_input_list(usr, "Select a type to turn things into.", "[src.name]", tf_possible_types) +/obj/item/gun/energy/mouseray/proc/pick_type(mob/user) + var/choice = tgui_input_list(user, "Select a type to turn things into.", "[src.name]", tf_possible_types) if(!choice) return tf_type = tf_possible_types[choice] - to_chat(usr, span_notice("You selected [choice].")) + to_chat(user, span_notice("You selected [choice].")) /obj/item/gun/energy/mouseray/Fire(atom/target, mob/living/user, clickparams, pointblank, reflex) if(world.time < cooldown) - to_chat(usr, span_warning("\The [src] isn't ready yet.")) + to_chat(user, span_warning("\The [src] isn't ready yet.")) return . = ..() @@ -428,7 +428,7 @@ /obj/item/gun/energy/mouseray/metamorphosis/advanced/random/Fire(atom/target, mob/living/user, clickparams, pointblank, reflex) if(world.time < cooldown) - to_chat(usr, span_warning("\The [src] isn't ready yet.")) + to_chat(user, span_warning("\The [src] isn't ready yet.")) return var/choice = pick(tf_possible_types) tf_type = tf_possible_types[choice] diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index e2e54669045..9747f41baa5 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -160,7 +160,7 @@ var/nagmessage = "Adjust your mass to be a size between 25 to 200% (or 1% to 600% in dormitories). (DO NOT ABUSE)" var/default = size_multiplier * 100 - var/new_size = tgui_input_number(usr, nagmessage, "Pick a Size", default, 600, 1) + var/new_size = tgui_input_number(src, nagmessage, "Pick a Size", default, 600, 1) if(size_range_check(new_size)) resize(new_size/100, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE) // I'm not entirely convinced that `src ? ADMIN_JMP(src) : "null"` here does anything @@ -194,7 +194,7 @@ return 0 if(size_diff >= 0.50 || mob_size < MOB_SMALL || size_diff >= get_effective_size() || ignore_size) if(buckled) - to_chat(usr,span_notice("You have to unbuckle \the [src] before you pick them up.")) + to_chat(src,span_notice("You have to unbuckle \the [src] before you pick them up.")) return 0 holder_type = /obj/item/holder/micro var/obj/item/holder/m_holder = get_scooped(M, G) diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm index 202b4cc2f68..0a49bb66286 100644 --- a/code/modules/vore/resizing/sizegun_vr.dm +++ b/code/modules/vore/resizing/sizegun_vr.dm @@ -31,7 +31,7 @@ /obj/item/gun/energy/sizegun/attack_self(mob/user) . = ..() - select_size() + select_size(user) /obj/item/gun/energy/sizegun/proc/spin_dial() set name = "Spin Size Dial" @@ -47,12 +47,12 @@ if(istype(G)) G.set_size = size_set_to -/obj/item/gun/energy/sizegun/proc/select_size() +/obj/item/gun/energy/sizegun/proc/select_size(mob/user = usr) set name = "Select Size" set category = "Object" set src in view(1) - var/size_select = tgui_input_number(usr, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100, 600, 1) + var/size_select = tgui_input_number(user, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100, 600, 1) if(!size_select) return //cancelled //We do valid resize testing in actual firings because people move after setting these things. @@ -123,15 +123,14 @@ charge_cost = 0 projectile_type = /obj/item/projectile/beam/sizelaser/admin/alien -/obj/item/gun/energy/sizegun/admin/select_size() +/obj/item/gun/energy/sizegun/admin/select_size(mob/user = usr) set name = "Select Size" set category = "Object" set src in view(1) - var/size_select = tgui_input_number(usr, "Put the desired size (1-600%)", "Set Size", size_set_to * 100, 600, 1) + var/size_select = tgui_input_number(user, "Put the desired size (1-600%)", "Set Size", size_set_to * 100, 600, 1) if(!size_select) return //cancelled - size_set_to = clamp((size_select/100), 0, 1000) //eheh to_chat(usr, span_notice("You set the size to [size_select]%")) /obj/item/gun/energy/sizegun/afterattack(atom/A, mob/living/user, adjacent, params) diff --git a/code/modules/vore/smoleworld/smoleworld_vr.dm b/code/modules/vore/smoleworld/smoleworld_vr.dm index 5280d64e275..a7e9e74c976 100644 --- a/code/modules/vore/smoleworld/smoleworld_vr.dm +++ b/code/modules/vore/smoleworld/smoleworld_vr.dm @@ -115,7 +115,7 @@ /obj/structure/smoletrack/attack_hand(mob/user) if(user.a_intent == I_DISARM) - if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) + if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction))) return to_chat(user, span_notice("[src] was dismantaled into bricks.")) playsound(src, 'sound/items/smolesmallbuild.ogg', 50, 1, -1, volume_channel = VOLUME_CHANNEL_MASTER) @@ -212,7 +212,7 @@ //makes it so buildings can be dismaintaled or GodZilla style attacked /obj/structure/smolebuilding/attack_hand(mob/user) if(user.a_intent == I_DISARM) - if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) + if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction))) return to_chat(user, span_notice("[src] was dismantaled into bricks.")) playsound(src, 'sound/items/smolesmallbuild.ogg', 50, 1, -1, volume_channel = VOLUME_CHANNEL_MASTER) @@ -221,19 +221,19 @@ new /obj/item/stack/material/smolebricks(loc) qdel(src) - else if (usr.a_intent == I_HURT) + else if (user.a_intent == I_HURT) - if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) + if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction))) return take_damage() playsound(src, 'sound/items/smolebuildinghit2.ogg', 50, 1) user.do_attack_animation(src) - usr.visible_message(span_danger("\The [usr] bangs against \the [src]!"), + user.visible_message(span_danger("\The [user] bangs against \the [src]!"), span_danger("You bang against \the [src]!"), "You hear a banging sound.") else - usr.visible_message("[usr.name] knocks on the [src.name].", + user.visible_message("[user.name] knocks on the [src.name].", "You knock on the [src.name].") return @@ -275,7 +275,7 @@ //get material from ruins /obj/structure/smoleruins/attack_hand(mob/user) if(user.a_intent == I_DISARM) - if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction))) + if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction))) return to_chat(user, span_notice("[src] was dismantaled into bricks.")) playsound(src, 'sound/items/smolelargeunbuild.ogg', 50, 1, volume_channel = VOLUME_CHANNEL_MASTER) diff --git a/code/modules/xenoarcheaology/finds/fossils.dm b/code/modules/xenoarcheaology/finds/fossils.dm index ff852e1b1f3..6e944a70e96 100644 --- a/code/modules/xenoarcheaology/finds/fossils.dm +++ b/code/modules/xenoarcheaology/finds/fossils.dm @@ -54,14 +54,13 @@ src.breq = rand(6)+3 src.desc = "An incomplete skeleton, looks like it could use [src.breq-src.bnum] more bones." -/obj/skeleton/attackby(obj/item/W as obj, mob/user as mob) +/obj/skeleton/attackby(obj/item/W, mob/user) if(istype(W,/obj/item/fossil/bone)) if(!bstate) bnum++ src.contents.Add(new/obj/item/fossil/bone) qdel(W) if(bnum==breq) - usr = user icon_state = "skel" src.bstate = 1 src.density = TRUE @@ -76,7 +75,7 @@ else ..() else if(istype(W,/obj/item/pen)) - plaque_contents = sanitize(tgui_input_text(usr, "What would you like to write on the plaque:","Skeleton plaque","")) + plaque_contents = sanitize(tgui_input_text(user, "What would you like to write on the plaque:","Skeleton plaque","")) user.visible_message("[user] writes something on the base of [src].","You relabel the plaque on the base of [icon2html(src,viewers(src))] [src].") if(src.contents.Find(/obj/item/fossil/skull/horned)) src.desc = "A creature made of [src.contents.len-1] assorted bones and a horned skull. The plaque reads \'[plaque_contents]\'." diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index 54beff3086b..0d231610191 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -174,7 +174,7 @@ attack_verb = list("drilled") /obj/item/pickaxe/excavationdrill/attack_self(mob/user as mob) - var/depth = tgui_input_number(usr, "Put the desired depth (1-60 centimeters).", "Set Depth", excavation_amount, 60, 1) + var/depth = tgui_input_number(user, "Put the desired depth (1-60 centimeters).", "Set Depth", excavation_amount, 60, 1) if(depth>60 || depth<1) to_chat(user, span_notice("Invalid depth.")) return diff --git a/maps/gateway_vr/wildwest.dm b/maps/gateway_vr/wildwest.dm index 3bbd1fee766..333fbd1c5b3 100644 --- a/maps/gateway_vr/wildwest.dm +++ b/maps/gateway_vr/wildwest.dm @@ -24,8 +24,8 @@ var/chargesa = 1 var/insistinga = 0 -/obj/machinery/wish_granter_dark/attack_hand(var/mob/living/carbon/human/user as mob) - usr.set_machine(src) +/obj/machinery/wish_granter_dark/attack_hand(var/mob/living/carbon/human/user) + user.set_machine(src) if(chargesa <= 0) to_chat(user, "The Wish Granter lies silent.") @@ -45,7 +45,7 @@ else chargesa-- insistinga = 0 - var/wish = tgui_input_list(usr, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) + var/wish = tgui_input_list(user, "You want...","Wish", list("Power","Wealth","Immortality","To Kill","Peace")) switch(wish) if("Power") to_chat(user, span_boldwarning("Your wish is granted, but at a terrible cost...")) @@ -150,31 +150,30 @@ set category = "Immortality" set name = "Resurrection" - var/mob/living/carbon/C = usr - if(!C.stat) - to_chat(C, span_notice("You're not dead yet!")) - return - to_chat(C, span_notice("Death is not your end!")) + if(!stat) + to_chat(src, span_notice("You're not dead yet!")) + return FALSE + to_chat(src, span_notice("Death is not your end!")) spawn(rand(800,1200)) - if(C.stat == DEAD) - dead_mob_list -= C - living_mob_list += C - C.set_stat(CONSCIOUS) - C.tod = null - C.setToxLoss(0) - C.setOxyLoss(0) - C.setCloneLoss(0) - C.SetParalysis(0) - C.SetStunned(0) - C.SetWeakened(0) - C.radiation = 0 - C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss()) - C.reagents.clear_reagents() - to_chat(C, span_notice("You have regenerated.")) - C.visible_message(span_warning("[usr] appears to wake from the dead, having healed all wounds.")) - C.update_canmove() - return 1 + if(stat == DEAD) + dead_mob_list -= src + living_mob_list += src + set_stat(CONSCIOUS) + tod = null + setToxLoss(0) + setOxyLoss(0) + setCloneLoss(0) + SetParalysis(0) + SetStunned(0) + SetWeakened(0) + radiation = 0 + heal_overall_damage(src.getBruteLoss(), src.getFireLoss()) + reagents.clear_reagents() + to_chat(src, span_notice("You have regenerated.")) + visible_message(span_warning("[src] appears to wake from the dead, having healed all wounds.")) + update_canmove() + return TRUE */ /obj/effect/overmap/visitable/sector/common_gateway/wildwest diff --git a/maps/redgate/facility_items.dm b/maps/redgate/facility_items.dm index 26a42ecef73..c51e7dec256 100644 --- a/maps/redgate/facility_items.dm +++ b/maps/redgate/facility_items.dm @@ -38,16 +38,16 @@ density = 1 anchored = 0 -/obj/structure/crystalholder/attackby(obj/item/W as obj, mob/living/user as mob) +/obj/structure/crystalholder/attackby(obj/item/W, mob/living/user) if(istype(W,/obj/item/glamourcrystal) && !crystal) icon_state = "crystalholder_full" update_icon() crystal = 1 user.drop_item() qdel(W) - to_chat(usr, span_notice("You insert the crystal into the receptacle.")) + to_chat(user, span_notice("You insert the crystal into the receptacle.")) else - to_chat(usr, span_notice("There isn't a slot for that.")) + to_chat(user, span_notice("There isn't a slot for that.")) /obj/machinery/crystalexperimenter name = "crystal experimenter" diff --git a/maps/tether/tether_things.dm b/maps/tether/tether_things.dm index abeb401bfd2..e062152d1cf 100644 --- a/maps/tether/tether_things.dm +++ b/maps/tether/tether_things.dm @@ -212,7 +212,7 @@ var/mob/living/carbon/human/user = AM - var/choice = tgui_alert(usr, "Do you want to depart via the tram? Your character will leave the round.","Departure",list("Yes","No")) + var/choice = tgui_alert(user, "Do you want to depart via the tram? Your character will leave the round.","Departure",list("Yes","No")) if(user && Adjacent(user) && choice == "Yes") var/mob/observer/dead/newghost = user.ghostize() newghost.timeofdeath = world.time