From a245b8687fc754a9bf0670471d9f13744f41bd71 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:27:34 -0700 Subject: [PATCH] [MIRROR] usr to user part two (#10015) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- archive/maps/gateway_archive_vr/wildwest.dm | 51 ++++++----- code/datums/diseases/_MobProcs.dm | 2 +- code/modules/admin/verbs/buildmode.dm | 4 +- code/modules/admin/verbs/debug.dm | 2 +- code/modules/admin/verbs/pray.dm | 10 +-- code/modules/casino/casino.dm | 58 ++++++------- code/modules/casino/slots.dm | 4 +- .../preference_setup/general/01_basic.dm | 8 +- .../preference_setup/general/02_language.dm | 4 +- .../preference_setup/general/03_body.dm | 16 ++-- .../preference_setup/general/04_equipment.dm | 2 +- .../preference_setup/general/05_background.dm | 6 +- .../preference_setup/occupation/occupation.dm | 2 +- .../volume_sliders/02_media.dm | 2 +- .../client/preference_setup/vore/02_size.dm | 2 +- .../client/preference_setup/vore/07_traits.dm | 53 ++++++------ code/modules/client/preferences.dm | 2 +- code/modules/client/preferences_tgui.dm | 2 +- code/modules/client/verbs/suicide.dm | 8 +- .../modules/clothing/accessories/accessory.dm | 4 +- code/modules/clothing/accessories/hands.dm | 2 +- code/modules/clothing/accessories/holster.dm | 6 +- code/modules/clothing/accessories/lockets.dm | 8 +- code/modules/clothing/accessories/storage.dm | 10 +-- code/modules/clothing/clothing.dm | 53 ++++++------ code/modules/clothing/glasses/glasses.dm | 16 ++-- code/modules/clothing/masks/miscellaneous.dm | 8 +- code/modules/clothing/masks/monitor.dm | 4 +- code/modules/clothing/spacesuits/rig/rig.dm | 14 +-- .../clothing/spacesuits/rig/rig_attackby.dm | 6 +- code/modules/clothing/spacesuits/void/void.dm | 8 +- .../clothing/spacesuits/void/void_vr.dm | 4 +- .../clothing/under/miscellaneous_vr.dm | 6 +- .../detectivework/tools/evidencebag.dm | 2 +- code/modules/detectivework/tools/swabs.dm | 2 +- code/modules/economy/EFTPOS.dm | 10 +-- code/modules/economy/cash.dm | 8 +- code/modules/economy/casinocash.dm | 8 +- code/modules/economy/mint.dm | 4 +- code/modules/economy/money_bag.dm | 4 +- code/modules/economy/retail_scanner.dm | 4 +- code/modules/economy/vending.dm | 10 +-- code/modules/examine/examine.dm | 2 +- code/modules/fireworks/firework_stars.dm | 2 +- code/modules/food/food/snacks.dm | 23 +++-- .../food/kitchen/cooking_machines/_cooker.dm | 2 +- .../food/kitchen/cooking_machines/oven.dm | 6 +- code/modules/games/cards.dm | 24 +++--- code/modules/holodeck/HolodeckObjects.dm | 8 +- code/modules/hydroponics/backtank.dm | 2 +- code/modules/hydroponics/trays/tray.dm | 6 +- .../core/integrated_circuit.dm | 2 +- .../integrated_electronics/core/pins.dm | 6 +- .../core/special_pins/char_pin.dm | 2 +- .../core/special_pins/color_pin.dm | 2 +- .../core/special_pins/dir_pin.dm | 2 +- .../core/special_pins/list_pin.dm | 8 +- .../core/special_pins/number_pin.dm | 2 +- .../core/special_pins/string_pin.dm | 2 +- .../integrated_electronics/core/tools.dm | 6 +- .../integrated_electronics/subtypes/memory.dm | 6 +- code/modules/library/lib_items.dm | 36 ++++---- code/modules/library/lib_machines.dm | 16 ++-- code/modules/materials/sheets/metals/rods.dm | 22 ++--- .../sheets/organic/animal_products.dm | 4 +- code/modules/media/mediamanager.dm | 2 +- code/modules/media/walkpod.dm | 2 +- code/modules/mining/abandonedcrates.dm | 4 +- code/modules/mining/fulton.dm | 2 +- code/modules/mining/shelter_atoms_vr.dm | 4 +- code/modules/mob/dead/observer/free_vr.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 72 ++++++++-------- code/modules/mob/dead/observer/observer_vr.dm | 8 +- code/modules/mob/living/bot/SLed209bot.dm | 4 +- code/modules/mob/living/bot/ed209bot.dm | 4 +- code/modules/mob/living/carbon/give.dm | 2 +- code/modules/mob/living/carbon/human/emote.dm | 2 +- .../mob/living/carbon/human/emote_vr.dm | 2 +- .../mob/living/carbon/human/examine.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 22 ++--- .../carbon/human/human_modular_limbs.dm | 2 +- .../mob/living/carbon/human/human_powers.dm | 10 +-- .../human/species/lleill/lleill_abilities.dm | 12 +-- .../human/species/species_shapeshift.dm | 22 ++--- .../human/species/species_shapeshift_vr.dm | 20 ++--- .../species/station/protean_vr/protean_rig.dm | 4 +- .../station/protean_vr/protean_rig_tgui.dm | 4 +- .../station/traits_vr/traits_tutorial.dm | 8 +- .../human/species/xenomorphs/alien_powers.dm | 2 +- code/modules/mob/living/living.dm | 16 ++-- code/modules/mob/living/living_powers.dm | 2 +- code/modules/mob/living/living_vr.dm | 85 +++++++++---------- code/modules/mob/living/silicon/ai/ai.dm | 30 +++---- .../modules/mob/living/silicon/ai/latejoin.dm | 4 +- code/modules/mob/living/silicon/pai/pai.dm | 10 +-- code/modules/mob/living/silicon/pai/pai_vr.dm | 4 +- .../silicon/robot/dogborg/dog_modules_vr.dm | 6 +- .../mob/living/silicon/robot/drone/drone.dm | 4 +- .../silicon/robot/drone/drone_abilities.dm | 2 +- .../silicon/robot/drone/drone_manufacturer.dm | 8 +- .../modules/mob/living/silicon/robot/robot.dm | 46 +++++----- .../mob/living/silicon/robot/robot_items.dm | 54 ++++++------ .../thinktank/thinktank_interactions.dm | 6 +- code/modules/mob/living/silicon/silicon.dm | 4 +- code/modules/mob/living/silicon/silicon_vr.dm | 2 +- code/modules/mob/living/silicon/subystems.dm | 14 +-- .../mob/living/simple_mob/simple_mob.dm | 16 ++-- .../mob/living/simple_mob/simple_mob_vr.dm | 10 +-- .../subtypes/animal/alien animals/catslug.dm | 4 +- .../subtypes/animal/alien animals/stardog.dm | 2 +- .../simple_mob/subtypes/animal/borer/borer.dm | 2 +- .../subtypes/animal/borer/borer_powers.dm | 4 +- .../subtypes/animal/passive/mouse_vr.dm | 12 +-- .../simple_mob/subtypes/animal/pets/cat.dm | 2 +- .../simple_mob/subtypes/animal/pets/fox_vr.dm | 2 +- .../simple_mob/subtypes/animal/sif/leech.dm | 10 +-- .../simple_mob/subtypes/animal/squirrel.dm | 2 +- .../simple_mob/subtypes/vore/morph/morph.dm | 2 +- code/modules/mob/login.dm | 2 +- code/modules/mob/mob.dm | 78 ++++++++--------- code/modules/mob/mob_transformation_simple.dm | 10 +-- code/modules/mob/new_player/login.dm | 2 +- code/modules/mob/new_player/new_player.dm | 4 +- code/modules/mob/new_player/news.dm | 2 +- .../mob/new_player/preferences_setup.dm | 4 +- code/modules/mob/say.dm | 22 ++--- code/modules/mob/say_old.dm | 16 ++-- code/modules/mob/say_vr.dm | 14 +-- code/modules/mob/transform_procs.dm | 12 +-- code/modules/mob/typing_indicator.dm | 8 +- .../computers/modular_computer/interaction.dm | 8 +- .../computers/subtypes/dev_laptop.dm | 4 +- code/modules/news/new_newspaper.dm | 2 +- code/modules/news/newspaper.dm | 4 +- code/modules/nifsoft/nif_tgui.dm | 2 +- .../nifsoft/software/13_soulcatcher.dm | 8 +- code/modules/organs/internal/augment.dm | 2 +- code/modules/organs/internal/eyes.dm | 2 +- code/modules/organs/organ_external.dm | 4 +- code/modules/overmap/champagne.dm | 4 +- code/modules/overmap/ships/computers/helm.dm | 2 +- code/modules/overmap/ships/ship_vr.dm | 2 +- code/modules/paperwork/clipboard.dm | 10 +-- code/modules/paperwork/faxmachine.dm | 4 +- code/modules/paperwork/handlabeler.dm | 4 +- code/modules/paperwork/paper.dm | 18 ++-- code/modules/paperwork/paper_bundle.dm | 18 ++-- code/modules/paperwork/paper_sticky.dm | 10 +-- code/modules/paperwork/paperbin.dm | 10 +-- code/modules/paperwork/pen.dm | 6 +- code/modules/pda/cart_vr.dm | 4 +- code/modules/pda/pda.dm | 30 +++---- code/modules/pda/pda_tgui.dm | 2 +- code/modules/persistence/graffiti.dm | 2 +- code/modules/power/cable.dm | 10 +-- code/modules/power/fusion/core/_core.dm | 2 +- .../modules/power/fusion/core/core_control.dm | 2 +- .../fusion/fuel_assembly/fuel_control.dm | 2 +- .../fusion/fuel_assembly/fuel_injector.dm | 2 +- .../modules/power/fusion/gyrotron/gyrotron.dm | 4 +- .../power/fusion/gyrotron/gyrotron_control.dm | 2 +- code/modules/power/lighting.dm | 24 +++--- code/modules/power/smes_construction.dm | 20 ++--- code/modules/projectiles/ammunition.dm | 2 +- .../projectiles/ammunition/smartmag.dm | 4 +- code/modules/projectiles/gun.dm | 2 +- .../projectiles/guns/energy/special.dm | 2 +- .../projectiles/guns/launcher/confetti.dm | 34 ++++---- .../projectiles/guns/launcher/crossbow.dm | 6 +- .../guns/launcher/grenade_launcher.dm | 8 +- .../projectiles/guns/launcher/rocket.dm | 4 +- .../projectiles/guns/projectile/pistol.dm | 2 +- .../projectiles/guns/projectile/revolver.dm | 4 +- .../projectiles/guns/projectile/shotgun_vr.dm | 10 +-- .../projectile/sniper/collapsible_sniper.dm | 16 ++-- code/modules/reagents/hoses/connector.dm | 8 +- code/modules/reagents/hoses/hose_connector.dm | 2 +- .../reagents/machinery/dispenser/cartridge.dm | 6 +- .../machinery/dispenser/reagent_tank.dm | 10 +-- code/modules/reagents/machinery/distillery.dm | 2 +- .../reagents/machinery/injector_maker.dm | 4 +- .../reagents/reagent_containers/glass.dm | 10 +-- .../reagents/reagent_containers/spray.dm | 20 ++--- code/modules/recycling/conveyor2.dm | 4 +- .../security levels/keycard authentication.dm | 18 ++-- code/modules/spells/general/area_teleport.dm | 6 +- code/modules/spells/spellbook.dm | 4 +- code/modules/tables/tables.dm | 6 +- code/modules/vehicles/vehicle.dm | 4 +- code/modules/ventcrawl/ventcrawl.dm | 2 +- code/modules/vore/eating/belly_import.dm | 12 +-- code/modules/vore/eating/living_vr.dm | 15 ++-- code/modules/vore/eating/silicon_vr.dm | 12 +-- .../vore/fluffstuff/custom_items_vr.dm | 4 +- code/modules/vore/mouseray.dm | 12 +-- code/modules/vore/resizing/resize_vr.dm | 4 +- code/modules/vore/resizing/sizegun_vr.dm | 11 ++- code/modules/vore/smoleworld/smoleworld_vr.dm | 14 +-- code/modules/xenoarcheaology/finds/fossils.dm | 5 +- .../xenoarcheaology/tools/tools_pickaxe.dm | 2 +- maps/gateway_vr/wildwest.dm | 51 ++++++----- maps/redgate/facility_items.dm | 6 +- maps/tether/tether_things.dm | 2 +- 203 files changed, 974 insertions(+), 993 deletions(-) diff --git a/archive/maps/gateway_archive_vr/wildwest.dm b/archive/maps/gateway_archive_vr/wildwest.dm index 9265e85fa0..0a652dcc77 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 7859cf1a82..ff1ab1ef56 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 659d16ecd9..c9ef8d27ed 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 775a66af99..2a94edde18 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 c8d539fde3..ce715b2a27 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 2da17ef71e..56b6161be1 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 @@ -47,7 +47,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 @@ -84,17 +84,17 @@ //CHOMPAdd Start if(color=="gold") // Happy celebrations! visible_message(span_notice("The roulette stops spinning, the ball lands on the golden zero! Fortune favors all bets!")) - src.confetti_spread = new /datum/effect/effect/system/confetti_spread() - src.confetti_spread.attach(src) //If somehow people start dragging roulette + confetti_spread = new /datum/effect/effect/system/confetti_spread() + confetti_spread.attach(src) //If somehow people start dragging roulette spawn(0) for(var/i = 1 to confetti_strength) - src.confetti_spread.start() + confetti_spread.start() sleep(10) else visible_message(span_notice("The roulette stops spinning, the ball landing on [result], [color].")) //CHOMPAdd End -/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) @@ -262,7 +262,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 @@ -394,14 +394,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 @@ -416,12 +416,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)) @@ -430,7 +430,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 @@ -455,7 +455,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 @@ -487,7 +487,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() @@ -571,14 +571,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 @@ -611,7 +611,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")) //CHOMPEdit Start if(confirm == "Yes") to_chat(user, span_warning("You are now a prize!")) @@ -638,8 +638,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)) @@ -674,7 +674,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" @@ -691,7 +691,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 @@ -719,7 +719,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!")) @@ -747,7 +747,7 @@ cashmoney.update_icon() if(cashmoney.worth <= 0) - usr.drop_from_inventory(cashmoney) + user.drop_from_inventory(cashmoney) qdel(cashmoney) cashmoney.update_icon() @@ -771,11 +771,11 @@ selected_collar.desc = "A collar worn by sentient prizes on the Golden Goose Casino. The tag says its registered to [selected_collar.sentientprizename] and they are owned by [selected_collar.ownername]." //CHOMPEdit 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 a63a380433..f107676b48 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() @@ -346,7 +346,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 c932a0c921..03005022c2 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -103,7 +103,7 @@ return TOPIC_NOACTION else if(href_list["reset_nickname"]) - var/nick_choice = tgui_alert(user, "Wipe your Nickname? This will completely remove any chosen nickname(s).","Wipe Nickname",list("Yes","No")) //ChompEDIT - usr removal + 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 @@ -190,17 +190,17 @@ return TOPIC_REFRESH else if(href_list["edit_ooc_notes"]) - 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)) //ChompEDIT - usr removal + 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(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)) //ChompEDIT - usr removal + 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(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)) //ChompEDIT - usr removal + 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 1c3f92eb6d..d3e4eaeff3 100644 --- a/code/modules/client/preference_setup/general/02_language.dm +++ b/code/modules/client/preference_setup/general/02_language.dm @@ -118,7 +118,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(user, "[chosen_lang.desc]",chosen_lang.name, list("Take","Cancel")) //ChompEDIT - usr removal + 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 @@ -127,7 +127,7 @@ var/char var/keys[0] do - char = tgui_input_text(user, "Enter a single special character.\nYou may re-select the same characters.\nThe following characters are already in use by radio: ; : .\nThe following characters are already in use by special say commands: ! * ^", "Enter Character - [3 - keys.len] remaining") //ChompEDIT - usr removal + 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 e4a38be2a0..16ae29d01a 100644 --- a/code/modules/client/preference_setup/general/03_body.dm +++ b/code/modules/client/preference_setup/general/03_body.dm @@ -376,7 +376,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) @@ -545,7 +545,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(user, "Please select a descriptor.", "Descriptor", descriptor.chargen_value_descriptors) //ChompEDIT - usr removal + 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 @@ -558,7 +558,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(user, "Which species would you like to look at?", "Species Choice", GLOB.playable_species) //ChompEDIT - usr removal + 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()) @@ -590,7 +590,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)) @@ -642,7 +642,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)) @@ -667,7 +667,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. @@ -678,7 +678,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. @@ -1267,7 +1267,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)) - user << browse_rsc(icon(current_species.icobase,"preview"), "species_preview_[current_species.name].png") //ChompEDIT usr -> user + 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 fc7c3d1c3b..e7f0eddd1c 100644 --- a/code/modules/client/preference_setup/general/04_equipment.dm +++ b/code/modules/client/preference_setup/general/04_equipment.dm @@ -195,7 +195,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(user, get_metadata(underwear, gt)) //ChompEDIT - usr removal + 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 338edb7e6a..3987b69611 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(user, "Wipe your Medical Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Wipe your Employment Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Wipe your Security Records? This cannot be reverted if you have not saved your character recently! You may wish to make a backup first.","Reset Records",list("Yes","No")) //ChompEDIT - usr removal + 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 dd9b907432..e7f6a3615f 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -255,7 +255,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(user, "Choose a title for [job.title].", "Choose Title", choices, pref.GetPlayerAltTitle(job)) //ChompEDIT - usr removal + 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 0d007a940f..c6620133a8 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(user, "Choose your Jukebox volume (0-100%)", "Jukebox volume", round(pref.media_volume * 100), 100, 0) //ChompEDIT - usr removal + 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 fb885340d7..904029b3d4 100644 --- a/code/modules/client/preference_setup/vore/02_size.dm +++ b/code/modules/client/preference_setup/vore/02_size.dm @@ -175,7 +175,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(user, "What would you like to set your voice frequency to? ([MIN_VOICE_FREQ] - [MAX_VOICE_FREQ])", "Voice Frequency", preset_voice_freqs) //ChompEDIT - usr removal + 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] diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index b83d745f34..84f4c5f593 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -376,13 +376,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(user, "Pick an icon set for your species:","Icon Base", choices) //ChompEDIT - usr removal + 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(user, "Pick a blood color (does not apply to synths)","Blood Color",pref.blood_color) as color //ChompEDIT - usr removal + 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 @@ -390,7 +390,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(user, "Reset blood color to species default ([new_blood])?","Reset Blood Color",list("Reset","Cancel")) //ChompEDIT - usr removal + 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 @@ -403,7 +403,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(user, "Remove [initial(trait.name)] and regain [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) //ChompEDIT - usr removal + 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] @@ -412,7 +412,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(user, "Remove [initial(trait.name)]?","Remove Trait",list("Remove","Cancel")) //ChompEDIT - usr removal + 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] @@ -421,7 +421,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(user, "Remove [initial(trait.name)] and lose [initial(trait.cost)] points?","Remove Trait",list("Remove","Cancel")) //ChompEDIT - usr removal + 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] @@ -434,25 +434,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(user, "This word or phrase will appear instead of 'says': [pref.real_name] says, \"Hi.\"", "Custom Say", pref.custom_say, 12), 12) //ChompEDIT - usr removal + 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(user, "This word or phrase will appear instead of 'whispers': [pref.real_name] whispers, \"Hi...\"", "Custom Whisper", pref.custom_whisper, 12), 12) //ChompEDIT - usr removal + 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(user, "This word or phrase will appear instead of 'asks': [pref.real_name] asks, \"Hi?\"", "Custom Ask", pref.custom_ask, 12), 12) //ChompEDIT - usr removal + 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(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) //ChompEDIT - usr removal + 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 @@ -460,7 +460,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(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) //ChompEDIT - usr removal + 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) @@ -476,8 +476,8 @@ 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_cold.Join("\n\n") //CHOMP Edit - 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) //ChompEDIT - usr removal + var/old_message = pref.custom_heat.Join("\n\n") + 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) @@ -492,37 +492,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(user, "Reset your Custom Say Verb?","Reset Verb",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Reset your Custom Whisper Verb?","Reset Verb",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Reset your Custom Ask Verb?","Reset Verb",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Reset your Custom Exclaim Verb?","Reset Verb",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Reset your Custom Cold Discomfort messages?", "Reset Discomfort",list("Yes","No")) //ChompEDIT - usr removal + 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(user, "Reset your Custom Heat Discomfort messages?", "Reset Discomfort",list("Yes","No")) //ChompEDIT - usr removal + 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 @@ -587,12 +587,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(user, message, title, nicelist) //ChompEDIT - usr removal + 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(user, "\[Cost:[initial(path.cost)]\] [initial(path.desc)]",initial(path.name), list("Take Trait","Go Back")) //ChompEDIT - usr removal + 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 @@ -605,20 +605,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(user, "The trait you've selected can only be taken by organic characters!", "Error") //ChompEDIT - usr removal - //pref.dirty_synth = 0 //Just to be sure //CHOMPEdit this shit broke, stop. + 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(user, "The trait you've selected can only be taken by synthetic characters!", "Error") //ChompEDIT - usr removal + 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(user, "The trait you've selected cannot be taken by the species you've chosen!", "Error") //ChompEDIT - usr removal + 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(user, "The trait you've selected cannot be taken by the species you've chosen!", "Error") //ChompEDIT - usr removal + 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) @@ -644,7 +643,7 @@ var/global/list/valid_bloodreagents = list("default",REAGENT_ID_IRON,REAGENT_ID_ break varconflict if(conflict) - 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") //ChompEDIT - usr removal + 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 8357d92111..6a872d1cd5 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -282,7 +282,7 @@ var/list/preferences_datums = list() else to_chat(user, span_danger("The forum URL is not set in the server configuration.")) return - ShowChoices(user) //ChompEDIT - usr removal + 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 62c5cb7b03..83e752d337 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 21eb9a135d..4e2585a1aa 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 6f34e5db22..62945db032 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 1d121728db..085df20126 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 49281a36a6..fa5a4298b5 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 @@ -63,7 +63,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 ) @@ -82,7 +82,7 @@ clear_holster() //YW change start -/obj/item/clothing/accessory/holster/attack_hand(mob/user as mob) +/obj/item/clothing/accessory/holster/attack_hand(mob/user) if (user.a_intent == I_HURT && has_suit && (slot & SLOT_HOLSTER )) //if we are part of a suit and are using harm intent if (holstered) unholster(user) diff --git a/code/modules/clothing/accessories/lockets.dm b/code/modules/clothing/accessories/lockets.dm index ee61047461..cff6e310f7 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 de06731d6e..1a7ec234f6 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 13e7e1796a..24911f850c 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -632,32 +632,32 @@ 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 //CHOMPEdit begin - if(istype(usr, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = usr + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user if(H.ability_flags & 0x1) - to_chat(usr, span_warning("You cannot do that while phase shifted.")) + to_chat(user, span_warning("You cannot do that while phase shifted.")) return //CHOMPEdit end - 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) @@ -668,7 +668,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 ..() @@ -886,7 +886,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 ..() @@ -975,37 +975,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" @@ -1106,7 +1105,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 b9391881eb..dbc4f62e15 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 1377fb1ba6..7bf259b0bd 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 1e2b681a39..0b8148ffe6 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 9786fc3202..6d55fffa0c 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -191,7 +191,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")]." @@ -430,14 +430,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() @@ -691,16 +691,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 f14919805d..ef06081927 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 75e5a08a54..6bdb2b10fb 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 49d72e2222..a78a89455c 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 4bed7c8844..2f2bdce5f3 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 7931cdfe4d..cf56d351d6 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 f2c13aed67..969954882d 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 3ab7112e57..2f32c0182a 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 e59242c22f..85c85e02ab 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 9ad1398125..a993e9a525 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 55086056be..ecbc957a68 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 1352780f6a..aa2c3398f7 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 f5bce6ef59..18f29bb50b 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 b0a306e84d..c815af9efe 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 92cefa1ce1..9c5ff9042f 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 30c6c0c306..16072b591f 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 bb63095578..92f9797f21 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -58,9 +58,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) @@ -83,7 +80,7 @@ if(!reagents.total_volume) M.balloon_alert_visible("Finishes eating \the [src].","Finished eating \the [src].") // CHOMPEdit - Balloon alert - 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 //CHOMPAdd Start - Consume item TF mobs as raw nutrition if prefs align if(possessed_voice && possessed_voice.len && M.can_be_drop_pred && M.food_vore && M.vore_selected) @@ -97,8 +94,8 @@ NR.forceMove(M.vore_selected) //CHOMPAdd End 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) //CHOMPAdd Start - Transfer item TF mobs to the trash if able if(possessed_voice && possessed_voice.len) for(var/mob/living/voice/V in possessed_voice) @@ -927,7 +924,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())) @@ -944,16 +941,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 . = ..() @@ -1778,9 +1775,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) . = ..() @@ -4272,7 +4269,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 50c9ea2ba3..e45a6e544b 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 9707c47498..0d9de1f9fd 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 654f21d6dd..937f808ee5 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 ff603066eb..5236ba4101 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 4d36d5b555..91d2e63f1f 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 d36b972040..f63135233d 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -633,15 +633,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 abfe7ff015..2e39b8958a 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 91ea361523..78ddcc060c 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 730318009f..2964e93e4c 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 8442ac8a51..628999b001 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 41ead57403..efa2379efb 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 a29ad54cbe..ae3ae806a3 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 15e9675b0c..39c69145a1 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 41efee9332..eeefc7f607 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 1f66cb86fd..085708824d 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 e69a718711..0fb72e7088 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 09b65b6ccb..0914049128 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()) @@ -213,7 +213,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) @@ -232,27 +232,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 @@ -314,7 +314,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 @@ -333,7 +333,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]" @@ -347,15 +347,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 0337b6cf0e..51635a9467 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) @@ -169,8 +169,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) @@ -309,7 +309,7 @@ . = ..() else - usr.set_machine(src) + user.set_machine(src) var/dat = "Book Inventory Management\n" // dat += "

ADMINISTRATIVE MANAGEMENT

" @@ -528,13 +528,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 4363cb55c1..65eabac6aa 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 9d35cb392f..9c1b458672 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 e45d42a422..ac05bad823 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 eadc493a82..a27c5e2aae 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 953aef9b81..db8690e66f 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 9abfaa9943..7f4f3397a8 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 59ae16bf2d..9f0aaee098 100644 --- a/code/modules/mining/shelter_atoms_vr.dm +++ b/code/modules/mining/shelter_atoms_vr.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(unique_deployable) . += "This capsule has an unknown template stored." // CHOMPEdit Start -/obj/item/survivalcapsule/attack_self(mob/user as mob) +/obj/item/survivalcapsule/attack_self(mob/user) //Can't grab when capsule is New() because templates aren't loaded then if(istype(get_area(user), /area/vr)) to_chat(user, span_danger("\The [src] does not appear to work in VR! This is useless to you!")) @@ -95,7 +95,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 811a535ab1..7473dd7d3a 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 2e5c8c6ebe..68d8779e3b 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 @@ -412,8 +412,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 @@ -421,39 +421,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]) @@ -497,7 +497,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.")) @@ -512,7 +512,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 @@ -629,11 +629,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 @@ -665,13 +665,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 @@ -828,7 +828,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) @@ -848,7 +848,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 */ @@ -1031,7 +1031,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 @@ -1063,21 +1063,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 GLOB.all_pai_cards) var/obj/item/paicard/PP = p @@ -1087,9 +1087,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 9ce7bb6f0a..562d22dd7c 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 2c1a8c9a55..0bac1f9e92 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 fcf683aff0..b977761279 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 81ffb9c065..191d2a2471 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 970d721e46..bbd76e4489 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -365,7 +365,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 25669fb6f8..283e343cc9 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 5bdafc4974..863baab84c 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -299,7 +299,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 b718112ac0..4ed313da7a 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -884,19 +884,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)) @@ -913,7 +913,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) @@ -928,12 +928,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 @@ -961,16 +961,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]"))) @@ -1079,7 +1079,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 @@ -1375,7 +1375,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 41ada68dc1..835a1fe258 100644 --- a/code/modules/mob/living/carbon/human/human_modular_limbs.dm +++ b/code/modules/mob/living/carbon/human/human_modular_limbs.dm @@ -187,7 +187,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 b61624d115..be17ef86c6 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 5dff27de81..c06dbf735a 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 ade1ef0fc8..ae7b7297c8 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 def65e1ffd..bd1ece1752 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 ab932d231d..6f5b28bebf 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 6c90baed52..189467e152 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 e5671811fc..567da70625 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 9d3b610d2b..e2c0dc89b0 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 6ffe988662..1c6afba015 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -112,10 +112,10 @@ 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.")) @@ -744,21 +744,21 @@ return -/mob/living/verb/Examine_OOC() //ChompEDIT - proc --> verb +/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 a829d6f907..2ff8857c0a 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -28,7 +28,7 @@ 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.") //ChompEDIT START - re-assert our layer and plane diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index eeb8f3dcd2..e23edb9b8c 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,71 +29,70 @@ 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) //CHOMPEdit Start - set_metainfo_likes(usr, FALSE) - set_metainfo_dislikes(usr, FALSE) - set_metainfo_favs(usr, FALSE) - set_metainfo_maybes(usr, FALSE) - set_metainfo_ooc_style(usr, FALSE) + set_metainfo_likes(src, FALSE) + set_metainfo_dislikes(src, FALSE) + set_metainfo_favs(src, FALSE) + set_metainfo_maybes(src, FALSE) + set_metainfo_ooc_style(src, FALSE) //CHOMPEdit End -//ChompEDIT START - Removal of usr -/mob/living/proc/set_metainfo_panel(var/mob/user) +/mob/living/proc/set_metainfo_panel(mob/user) if(user != src) return - 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 OOC notes panel!", "Game Preference" , html_decode(ooc_notes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(user)) + 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(user, span_filter_notice("OOC notes updated. Don't forget to save!")) - log_admin("[key_name(user)] updated their OOC notes mid-round.") - ooc_notes_window(user) + 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/mob/user, var/reopen = TRUE) +/mob/living/proc/set_metainfo_likes(mob/user, var/reopen = TRUE) if(user != src) return - 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 OOC notes panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(ooc_notes_likes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(user)) + 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(user, span_filter_notice("OOC note likes have been updated. Don't forget to save!")) - log_admin("[key_name(user)] 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(user) + ooc_notes_window(src) -/mob/living/proc/set_metainfo_dislikes(var/mob/user, var/reopen = TRUE) +/mob/living/proc/set_metainfo_dislikes(mob/user, var/reopen = TRUE) if(user != src) return - 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 OOC notes panel! Type \"!clear\" to empty.", "Game Preference" , html_decode(ooc_notes_dislikes), multiline = TRUE, prevent_enter = TRUE)) - if(new_metadata && CanUseTopic(user)) + 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(user, span_filter_notice("OOC note dislikes have been updated. Don't forget to save!")) - log_admin("[key_name(user)] 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(user) + ooc_notes_window(src) -/mob/living/proc/save_ooc_panel(var/mob/user) +/mob/living/proc/save_ooc_panel(mob/user) if(user != src) return if(client.prefs.real_name != real_name) - to_chat(user, 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(user, span_filter_notice("Character preferences saved.")) + to_chat(src, span_filter_notice("Character preferences saved.")) -/mob/living/proc/print_ooc_notes_to_chat(var/mob/user) +/mob/living/proc/print_ooc_notes_to_chat(mob/user) if(!ooc_notes) return var/msg = ooc_notes @@ -150,15 +149,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" @@ -187,7 +186,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 1517be5742..46b24123bd 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -355,7 +355,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() @@ -369,7 +369,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 @@ -387,7 +387,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 @@ -409,7 +409,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 @@ -425,14 +425,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 @@ -617,7 +617,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 @@ -626,7 +626,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])) @@ -634,7 +634,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 @@ -677,7 +677,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) @@ -824,7 +824,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() @@ -838,7 +838,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 37606a5661..d5a11e74b0 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 387018517c..a17f125e84 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -244,7 +244,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" @@ -338,10 +338,10 @@ var/choice 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) //VOREStation Removal End @@ -351,7 +351,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] @@ -537,7 +537,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 3bef39e265..0d54b4cf3c 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 c03abbbfd0..063bc1cc15 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 @@ -326,7 +326,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.")) @@ -423,7 +423,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 @@ -452,7 +452,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 694e315edf..c3eff59390 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 d243138b31..9f9a02bf3e 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 573d01ce38..b66c8f3ef0 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 4026f451d3..e5b44f1ccc 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -250,7 +250,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) @@ -407,7 +407,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) @@ -424,7 +424,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) @@ -450,7 +450,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() @@ -458,7 +458,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. @@ -522,7 +522,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 @@ -541,7 +541,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 @@ -727,7 +727,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() @@ -737,21 +737,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 @@ -785,7 +785,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) @@ -810,10 +810,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)) @@ -1078,11 +1078,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 9dbccb03b9..043b6c3f94 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 3f00773e09..4319b9a7fc 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 aa9761687a..5ed88fc608 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -262,14 +262,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 73a25dbd76..b30fcbf194 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 e2d82f6fdf..851159c109 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 ab53a8bc9b..795d305da4 100644 --- a/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/code/modules/mob/living/simple_mob/simple_mob.dm @@ -371,10 +371,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 @@ -384,14 +384,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" @@ -399,10 +399,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 98a6090d76..07dc98a911 100644 --- a/code/modules/mob/living/simple_mob/simple_mob_vr.dm +++ b/code/modules/mob/living/simple_mob/simple_mob_vr.dm @@ -439,14 +439,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 @@ -454,8 +454,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 @@ -463,7 +463,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 b5e4dc49bc..655f4ed172 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 @@ -292,7 +292,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 @@ -1170,7 +1170,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 efc26e1bab..b7a73b81b4 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 f734ba0e21..a76cdd148a 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 @@ -245,7 +245,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 9130889ada..07d65d339a 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 25c32571b5..a0acf27576 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 5dbc635a9c..cb377b2fd8 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 f6a42c210d..98fca7c314 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 2df65fc968..6b6a45b091 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 627541df55..02b20bea68 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 f6620f2818..3f22f4e0d5 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 7fe44af4d4..29d26eefd6 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -21,7 +21,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 f082cfa293..feb8b7eba6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -105,7 +105,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 :( @@ -240,7 +240,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 @@ -326,8 +326,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 @@ -391,22 +391,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) @@ -416,47 +416,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 @@ -492,7 +492,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) @@ -512,7 +512,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 @@ -539,8 +539,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 ..() @@ -567,7 +567,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) @@ -626,7 +626,7 @@ if(pulling_old == AM) return - src.pulling = AM + pulling = AM AM.pulledby = src if(pullin) @@ -642,7 +642,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."))]")) @@ -655,13 +655,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) @@ -676,7 +676,7 @@ return /mob/proc/is_active() - return (0 >= usr.stat) + return (0 >= stat) /mob/proc/is_dead() return stat == DEAD @@ -1016,9 +1016,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) @@ -1135,20 +1135,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" /* CHOMPedit removal begin /mob/verb/spacebar_throw_on() set name = ".throwon" @@ -1181,10 +1181,12 @@ ChompEdit removal end*/ /obj/Destroy() + // CHOMPEdit Start if(exploit_for) var/mob/exploited = exploit_for.resolve() exploited?.exploit_addons -= src exploit_for = null + // CHOMPEdit End . = ..() diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index 31940d4b09..aef3310dd6 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 abd5912d7b..70065a1614 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 d162e2a3d2..0ee5b0ddbf 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -443,10 +443,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 6fa6c4f126..667bf41b02 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 634e7b8637..df38a2d66c 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 a57a2daa98..451e738ffd 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 f67ffb58b5..aef6d50757 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 98f9223a23..e6405068fb 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 //CHOMPEdit 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) @@ -261,7 +261,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 @@ -366,7 +366,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 @@ -469,7 +469,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 f9a100000b..3ce48a784a 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -245,13 +245,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) @@ -279,13 +279,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 327cb5378c..bec6bc442e 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 5bd1f72a22..334ecfd8d8 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 a09b432af8..2cfbacfbc6 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 be8560785a..97a05086ee 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 d62d70cd43..8c70f03c85 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 35fe90115b..7c32c935aa 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 fa14d42430..cf400b847e 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -541,7 +541,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) @@ -572,7 +572,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) @@ -627,7 +627,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) @@ -638,7 +638,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 96f663d83c..dbdd37fabf 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 06b9e5f1db..19e8e996d2 100644 --- a/code/modules/organs/internal/eyes.dm +++ b/code/modules/organs/internal/eyes.dm @@ -40,7 +40,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 efc18d8a68..372b5a2dd8 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 163f6b6a9c..35f74be585 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 10ef7829ea..8760d93e24 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -251,7 +251,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 05e1d50b55..cbab234f9d 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 c21835f600..76ef38809a 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 ceb0bfc66b..1176b0dec6 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -62,8 +62,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 2faa8ec05e..ddc8f9c7ee 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 30aa2a0678..50cfdf1973 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -159,7 +159,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.") @@ -210,18 +210,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) @@ -539,7 +539,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.role_alt_title == JOB_CLOWN) || (user.mind.role_alt_title == JOB_ALT_JESTER) || (user.mind.role_alt_title == JOB_ALT_FOOL))) // CHOMPStation Edit - Let clows/fools/jesters use clown stamps @@ -612,7 +612,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 @@ -635,7 +635,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 c3487db836..ca78769db0 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 027e978e9c..623fcc127e 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 90c3dd9861..e45af812aa 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 4fcc291a77..75ed4896ed 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -269,7 +269,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() @@ -277,11 +277,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 305955c1c4..0ef256ef9b 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 de736302ba..1c3705db97 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -86,21 +86,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 @@ -113,19 +113,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) @@ -431,7 +431,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 @@ -439,7 +439,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 5fa161170d..a64a56be8c 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 033aa212d5..ba767ec3f5 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 3940dbc5ca..f4e6ee5b52 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 ed39c4f376..b811632986 100644 --- a/code/modules/power/fusion/core/_core.dm +++ b/code/modules/power/fusion/core/_core.dm @@ -150,7 +150,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 d146dfa5c5..5a7647bd32 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 6a1b50f334..78140d0d07 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 8add9d3b06..5c97db64fd 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 f9177bcecc..7f35f417ed 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 9959123c76..eff9634137 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 2e4a323b74..f787b7bf7a 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)) @@ -1118,37 +1118,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 364662c16b..c490dda9f0 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 0e7fbcd185..7344b480f3 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -280,4 +280,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 e7ef9b6192..7bcd206eea 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 7a5a2be2b7..4d8d9f0982 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -109,7 +109,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 10cb948fbf..5f5a2169fc 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -193,7 +193,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 547ea78288..236c627c34 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 75692e8916..2638ed0273 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -113,7 +113,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 @@ -127,10 +127,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 df8b5f85a2..90c52e8e22 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 5b866fcd7a..eb0f4ed733 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 b3b268894e..030d0e3ccd 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -45,7 +45,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 556112bff2..c447ec5a14 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -68,7 +68,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 @@ -96,7 +96,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 0fa8427c71..7d024a9b8f 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 bf1c1792e7..f0a776a5b2 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 a11834e3cb..91c265e80b 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 b8fbd7dc2f..c259e23bc8 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 f66858cc0c..e8f6a7bc6c 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 81f2ef5700..aeb3299d94 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 308adbad43..76f7529a61 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) update_icon() diff --git a/code/modules/reagents/machinery/injector_maker.dm b/code/modules/reagents/machinery/injector_maker.dm index 8d1cc8c7da..153e0f2c5f 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 c5a6f70111..ebdce79918 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -75,15 +75,15 @@ 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].")) - balloon_alert(usr, "Lid put on \the [src]") + // to_chat(user, span_notice("You put the lid on \the [src].")) + balloon_alert(user, "Lid put on \the [src]") flags ^= OPENCONTAINER else - // to_chat(usr, span_notice("You take the lid off \the [src].")) - balloon_alert(usr, "Lid removed off \the [src]") // CHOMPEdit - Changed to ballopn alert + // to_chat(user, span_notice("You take the lid off \the [src].")) + balloon_alert(user, "Lid removed off \the [src]") // CHOMPEdit - Changed to ballopn alert flags |= OPENCONTAINER update_icon() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index b29d7dc219..13415f71af 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -55,10 +55,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) @@ -143,12 +143,12 @@ /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"].")) - balloon_alert(usr, "Safety [safety ? "on" : "off"].") // CHOMPEdit - Changed to balloon alert + // to_chat(user, span_notice("You switch the safety [safety ? "on" : "off"].")) + balloon_alert(user, "Safety [safety ? "on" : "off"].") // CHOMPEdit - Changed to balloon alert -/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 . = ..() @@ -183,7 +183,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) @@ -263,7 +263,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) @@ -273,8 +273,8 @@ var/list/the_targets = list(T, T1, T2) if(src.reagents.total_volume < 1) - // to_chat(usr, span_notice("\The [src] is empty.")) - balloon_alert(usr, "\The [src] is empty.") + // to_chat(user, span_notice("\The [src] is empty.")) + balloon_alert(user, "\The [src] is empty.") return if(!heavy_spray) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index eaa818f4e8..89eec46509 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 248e9be0a6..a624504aaa 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 3012be46fa..36c6c8751e 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 c2c32fe807..a2545f554f 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 f4f3e8712f..5cc05e9054 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 8e53a08b17..a153f0f703 100644 --- a/code/modules/vehicles/vehicle.dm +++ b/code/modules/vehicles/vehicle.dm @@ -302,7 +302,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) @@ -310,7 +310,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 69bef8cf89..29b06f4e3a 100644 --- a/code/modules/ventcrawl/ventcrawl.dm +++ b/code/modules/ventcrawl/ventcrawl.dm @@ -149,7 +149,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 f0e35be336..c16bf16a1d 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 6914b7e27a..5748abfb45 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -187,7 +187,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(user, "Which belly?", "Select A Belly", vore_organs) //ChompEDIT - user, not usr + 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)]!"), @@ -747,17 +747,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(user, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit remove usr + belly = tgui_input_list(user, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit 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(user, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit - remove usr + var/belly = tgui_input_list(user, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit 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(user, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit - remove usr + var/belly = tgui_input_list(user, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit return perform_the_nom(user, prey, pred, belly) // @@ -1330,7 +1330,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(usr) //ChompEDIT - usr arg @@ -1355,7 +1355,6 @@ if(href_list["set_metainfo_ooc_style"]) set_metainfo_ooc_style(usr) //ChompEDIT - usr arg //CHOMPEdit End - print_ooc_notes_to_chat() if(href_list["save_private_notes"]) if(usr == src) save_private_notes(usr) @@ -1440,12 +1439,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 a96e3de0ed..85d1913171 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 8a7eab6db7..38620b8e8a 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -870,7 +870,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() @@ -884,7 +884,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 594199a2bc..70b15bca2e 100644 --- a/code/modules/vore/mouseray.dm +++ b/code/modules/vore/mouseray.dm @@ -26,18 +26,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 . = ..() @@ -533,7 +533,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 436d499b6b..e1065c2a4f 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -164,7 +164,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) if(temporary_form) //CHOMPEdit - resizing both our forms @@ -199,7 +199,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 202b4cc2f6..0a49bb6628 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 5280d64e27..a7e9e74c97 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 ff852e1b1f..6e944a70e9 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 54beff3086..0d23161019 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 3bbd1fee76..333fbd1c5b 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 26a42ecef7..c51e7dec25 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 abeb401bfd..e062152d1c 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