From 0180cc74c5b21747eb0b171fc863e6d5256087de Mon Sep 17 00:00:00 2001
From: CHOMPStation2StaffMirrorBot
<94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com>
Date: Sun, 1 Dec 2024 10:31:19 -0700
Subject: [PATCH] [MIRROR] usr to user up to player effects (#9552)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
---
.../binary_devices/algae_generator_vr.dm | 4 +-
.../components/binary_devices/passive_gate.dm | 10 +-
.../components/binary_devices/pump.dm | 8 +-
.../components/omni_devices/filter.dm | 6 +-
.../components/omni_devices/mixer.dm | 10 +-
.../components/omni_devices/omni_base.dm | 2 +-
code/ATMOSPHERICS/components/shutoff.dm | 2 +-
.../components/trinary_devices/filter.dm | 4 +-
.../components/trinary_devices/mixer.dm | 4 +-
code/ATMOSPHERICS/components/tvalve.dm | 2 +-
.../components/unary/cold_sink.dm | 4 +-
.../components/unary/heat_source.dm | 4 +-
code/ATMOSPHERICS/components/valve.dm | 2 +-
code/_helpers/unsorted.dm | 2 +-
code/_onclick/cyborg.dm | 2 +-
code/_onclick/hud/hud.dm | 2 +-
code/_onclick/hud/robot.dm | 4 +-
code/datums/colormate.dm | 12 +-
code/datums/components/crafting/crafting.dm | 19 +-
code/datums/wires/wires.dm | 23 +-
code/defines/obj/weapon.dm | 10 +-
code/game/dna/dna_modifier.dm | 6 +-
.../changeling/powers/mimic_voice.dm | 2 +-
code/game/gamemodes/cult/ritual.dm | 25 +-
code/game/gamemodes/cult/talisman.dm | 2 +-
.../technomancer/spells/audible_deception.dm | 2 +-
code/game/machinery/CableLayer.dm | 4 +-
code/game/machinery/OpTable.dm | 4 +-
code/game/machinery/Sleeper.dm | 14 +-
code/game/machinery/ai_slipper.dm | 4 +-
code/game/machinery/air_alarm.dm | 30 +--
.../atmoalter/area_atmos_computer.dm | 4 +-
code/game/machinery/atmoalter/canister.dm | 20 +-
code/game/machinery/autolathe.dm | 10 +-
code/game/machinery/biogenerator.dm | 18 +-
code/game/machinery/bioprinter.dm | 2 +-
code/game/machinery/bomb_tester_vr.dm | 12 +-
code/game/machinery/camera/camera_assembly.dm | 8 +-
code/game/machinery/clawmachine.dm | 2 +-
code/game/machinery/computer/Operating.dm | 6 +-
code/game/machinery/computer/ai_core.dm | 10 +-
code/game/machinery/computer/aifixer.dm | 4 +-
code/game/machinery/computer/arcade.dm | 70 ++---
code/game/machinery/computer/card.dm | 24 +-
code/game/machinery/computer/cloning.dm | 12 +-
code/game/machinery/computer/computer.dm | 6 +-
code/game/machinery/computer/guestpass.dm | 32 +--
code/game/machinery/computer/medical.dm | 24 +-
code/game/machinery/computer/message.dm | 16 +-
code/game/machinery/computer/pod.dm | 2 +-
code/game/machinery/computer/prisoner.dm | 10 +-
code/game/machinery/computer/robot.dm | 46 ++--
code/game/machinery/computer/security.dm | 30 +--
code/game/machinery/computer/skills.dm | 26 +-
code/game/machinery/computer/supply.dm | 60 ++---
code/game/machinery/computer/timeclock_vr.dm | 60 ++---
code/game/machinery/cryo.dm | 10 +-
code/game/machinery/cryopod.dm | 10 +-
code/game/machinery/doors/airlock.dm | 26 +-
code/game/machinery/doors/airlock_control.dm | 2 +-
code/game/machinery/doors/blast_door.dm | 2 +-
code/game/machinery/doors/brigdoors.dm | 6 +-
.../embedded_controller_base.dm | 6 +-
code/game/machinery/exonet_node.dm | 10 +-
code/game/machinery/floorlayer.dm | 8 +-
code/game/machinery/gear_dispenser.dm | 2 +-
code/game/machinery/holoposter.dm | 2 +-
code/game/machinery/jukebox.dm | 8 +-
code/game/machinery/mass_driver.dm | 4 +-
code/game/machinery/newscaster.dm | 32 +--
code/game/machinery/nuclear_bomb.dm | 2 +-
code/game/machinery/painter_vr.dm | 27 +-
code/game/machinery/pandemic.dm | 6 +-
code/game/machinery/partslathe_vr.dm | 4 +-
code/game/machinery/pda_multicaster.dm | 2 +-
code/game/machinery/pipe/pipe_dispenser.dm | 24 +-
code/game/machinery/pipe/pipelayer.dm | 2 +-
code/game/machinery/pointdefense.dm | 2 +-
code/game/machinery/portable_turret.dm | 4 +-
code/game/machinery/protean_reconstitutor.dm | 2 +-
code/game/machinery/requests_console.dm | 12 +-
code/game/machinery/spaceheater.dm | 22 +-
.../machinery/suit_storage/suit_cycler.dm | 12 +-
.../machinery/suit_storage/suit_storage.dm | 22 +-
code/game/machinery/syndicatebeacon.dm | 2 +-
code/game/machinery/syndicatebeacon_vr.dm | 2 +-
code/game/machinery/telecomms/logbrowser.dm | 12 +-
.../telecomms/machine_interactions.dm | 28 +-
code/game/machinery/telecomms/telemonitor.dm | 8 +-
code/game/machinery/teleporter.dm | 6 +-
code/game/machinery/turret_control.dm | 6 +-
code/game/machinery/wishgranter.dm | 4 +-
code/game/mecha/combat/fighter.dm | 4 +-
code/game/mecha/mech_fabricator.dm | 6 +-
code/game/mecha/mech_prosthetics.dm | 12 +-
code/game/mecha/mecha.dm | 2 +-
code/game/mecha/mecha_control_console.dm | 12 +-
code/game/mecha/space/shuttle.dm | 4 +-
.../game/objects/effects/decals/contraband.dm | 2 +-
.../objects/effects/decals/posters/posters.dm | 2 +-
code/game/objects/items/contraband_vr.dm | 14 +-
code/game/objects/items/devices/aicard.dm | 11 +-
.../objects/items/devices/body_snatcher_vr.dm | 36 +--
.../items/devices/communicator/UI_tgui.dm | 28 +-
code/game/objects/items/devices/defib.dm | 2 +-
.../objects/items/devices/denecrotizer_vr.dm | 2 +-
.../objects/items/devices/floor_painter.dm | 2 +-
.../objects/items/devices/lightreplacer.dm | 8 +-
.../objects/items/devices/locker_painter.dm | 2 +-
code/game/objects/items/devices/multitool.dm | 2 +-
code/game/objects/items/devices/paicard.dm | 12 +-
.../game/objects/items/devices/radio/radio.dm | 18 +-
.../objects/items/devices/radio/radiopack.dm | 2 +-
.../objects/items/devices/scanners/gas.dm | 2 +-
code/game/objects/items/devices/spy_bug.dm | 2 +-
.../objects/items/devices/ticket_printer.dm | 8 +-
.../objects/items/devices/transfer_valve.dm | 6 +-
.../objects/items/devices/translocator_vr.dm | 2 +-
code/game/objects/items/devices/uplink.dm | 2 +-
code/game/objects/items/robot/robot_parts.dm | 2 +-
code/game/objects/items/selectable_item_vr.dm | 4 +-
code/game/objects/items/shooting_range.dm | 2 +-
code/game/objects/items/stacks/stack.dm | 16 +-
.../objects/items/stacks/tiles/tile_types.dm | 4 +-
code/game/objects/items/toys/toys.dm | 4 +-
code/game/objects/items/toys/toys_vr.dm | 6 +-
code/game/objects/items/weapons/AI_modules.dm | 50 ++--
code/game/objects/items/weapons/RPD_vr.dm | 8 +-
.../circuitboards/computer/camera_monitor.dm | 6 +-
.../weapons/circuitboards/computer/supply.dm | 2 +-
.../objects/items/weapons/dna_injector.dm | 2 +-
code/game/objects/items/weapons/explosives.dm | 2 +-
.../objects/items/weapons/extinguisher.dm | 4 +-
code/game/objects/items/weapons/game_kit.dm | 12 +-
.../items/weapons/grenades/chem_grenade.dm | 2 +-
.../objects/items/weapons/id cards/cards.dm | 12 +-
.../items/weapons/id cards/syndicate_ids.dm | 2 +-
.../items/weapons/implants/implantcase.dm | 2 +-
.../weapons/implants/implantreagent_vr.dm | 2 +-
.../items/weapons/material/chainsaw.dm | 6 +-
.../items/weapons/material/gravemarker.dm | 4 +-
.../weapons/material/material_weapons.dm | 2 +-
.../objects/items/weapons/melee/energy.dm | 4 +-
code/game/objects/items/weapons/scrolls.dm | 2 +-
code/game/objects/items/weapons/shields.dm | 4 +-
.../objects/items/weapons/storage/fancy.dm | 2 +-
.../game/objects/items/weapons/storage/mre.dm | 4 +-
.../objects/items/weapons/storage/secure.dm | 12 +-
.../game/objects/items/weapons/tanks/tanks.dm | 10 +-
.../items/weapons/tools/weldingtool.dm | 6 +-
.../items/weapons/tools/wirecutters.dm | 2 +-
code/game/objects/structures.dm | 6 +-
code/game/objects/structures/artstuff.dm | 7 +-
.../structures/crates_lockers/__closets.dm | 4 +-
.../crates_lockers/closets/coffin.dm | 2 +-
.../crates_lockers/closets/walllocker.dm | 4 +-
code/game/objects/structures/displaycase.dm | 4 +-
code/game/objects/structures/fitness_vr.dm | 8 +-
code/game/objects/structures/girders.dm | 4 +-
code/game/objects/structures/janicart.dm | 46 ++--
.../objects/structures/kitchen_foodcart_vr.dm | 6 +-
code/game/objects/structures/ledges.dm | 8 +-
code/game/objects/structures/mirror.dm | 2 +-
code/game/objects/structures/morgue.dm | 6 +-
code/game/objects/structures/morgue_vr.dm | 2 +-
.../objects/structures/props/beam_prism.dm | 14 +-
code/game/objects/structures/railing.dm | 10 +-
code/game/objects/structures/signs.dm | 2 +-
.../stool_bed_chair_nest/alien_nests.dm | 4 +-
.../stool_bed_chair_nest/wheelchair.dm | 6 +-
.../game/objects/structures/tank_dispenser.dm | 10 +-
code/game/objects/structures/watercloset.dm | 18 +-
.../objects/structures/windoor_assembly.dm | 6 +-
code/game/turfs/turf.dm | 2 +-
code/modules/admin/admin_secrets.dm | 2 +-
code/modules/admin/modify_robot.dm | 14 +-
code/modules/admin/player_effects.dm | 30 +--
code/modules/admin/verbs/entity_narrate.dm | 18 +-
code/modules/casino/casino_prize_vendor.dm | 32 +--
.../volume_sliders/01_volume.dm | 8 +-
code/modules/client/preferences_tgui.dm | 4 +-
.../client/verbs/character_directory.dm | 20 +-
.../clothing/accessories/accessory_vr.dm | 10 +-
.../clothing/spacesuits/rig/rig_tgui.dm | 16 +-
.../detectivework/microscope/dnascanner.dm | 6 +-
code/modules/economy/ATM.dm | 40 +--
code/modules/economy/Accounts_DB.dm | 14 +-
code/modules/economy/vending.dm | 68 ++---
.../eventkit/gm_interfaces/mob_spawner.dm | 36 +--
.../food/kitchen/cooking_machines/_cooker.dm | 8 +-
.../food/kitchen/smartfridge/smartfridge.dm | 16 +-
code/modules/holodeck/HolodeckControl.dm | 14 +-
code/modules/hydroponics/seed_machines.dm | 4 +-
code/modules/hydroponics/trays/tray_tools.dm | 2 +-
.../integrated_electronics/core/assemblies.dm | 10 +-
.../core/integrated_circuit.dm | 30 +--
.../integrated_electronics/core/printer.dm | 12 +-
code/modules/looking_glass/lg_console.dm | 4 +-
code/modules/media/walkpod.dm | 2 +-
.../mining/machinery/machine_processing.dm | 16 +-
.../mining/machinery/machine_stacking.dm | 4 +-
.../equipment_vendor.dm | 6 +-
code/modules/mob/living/bot/cleanbot.dm | 10 +-
code/modules/mob/living/bot/edCLNbot.dm | 8 +-
code/modules/mob/living/bot/farmbot.dm | 6 +-
code/modules/mob/living/bot/floorbot.dm | 2 +-
code/modules/mob/living/bot/medbot.dm | 10 +-
code/modules/mob/living/bot/mulebot.dm | 24 +-
code/modules/mob/living/bot/secbot.dm | 6 +-
.../human/species/station/prommie_blob.dm | 2 +-
.../station/protean_vr/protean_powers.dm | 2 +-
.../station/station_special_abilities_vr.dm | 28 +-
.../mob/living/carbon/human/stripping.dm | 4 +-
code/modules/mob/living/inventory.dm | 2 +-
.../living/silicon/pai/software_modules.dm | 10 +-
.../silicon/robot/drone/drone_console.dm | 22 +-
.../mob/living/silicon/robot/robot_ui.dm | 8 +-
.../computers/modular_computer/ui.dm | 8 +-
.../modular_computers/file_system/program.dm | 5 +-
.../programs/generic/file_browser.dm | 6 +-
.../file_system/programs/generic/game.dm | 10 +-
.../programs/generic/news_browser.dm | 2 +-
.../programs/generic/ntnrc_client.dm | 8 +-
.../programs/generic/nttransfer.dm | 4 +-
.../programs/generic/wordprocessor.dm | 18 +-
.../programs/research/email_administration.dm | 8 +-
.../programs/research/ntmonitor.dm | 12 +-
.../programs/security/digitalwarrant.dm | 22 +-
.../modular_computers/laptop_vendor.dm | 10 +-
.../overmap/disperser/disperser_console.dm | 14 +-
.../overmap/ships/computers/engine_control.dm | 10 +-
code/modules/overmap/ships/computers/helm.dm | 34 +--
.../overmap/ships/computers/sensors.dm | 12 +-
code/modules/overmap/ships/computers/ship.dm | 6 +-
.../overmap/ships/computers/shuttle.dm | 10 +-
code/modules/paperwork/faxmachine.dm | 48 ++--
code/modules/paperwork/filingcabinet.dm | 6 +-
code/modules/paperwork/photocopier.dm | 14 +-
code/modules/pda/core_apps.dm | 80 +++---
code/modules/pda/messenger.dm | 10 +-
code/modules/pda/pda_tgui.dm | 6 +-
code/modules/persistence/noticeboard.dm | 20 +-
code/modules/power/apc.dm | 20 +-
code/modules/power/gravitygenerator_vr.dm | 4 +-
code/modules/power/port_gen.dm | 4 +-
.../particle_accelerator/particle_control.dm | 34 +--
code/modules/power/smes.dm | 4 +-
code/modules/power/turbine.dm | 4 +-
.../modules/reagents/machinery/chem_master.dm | 18 +-
code/modules/recycling/disposal.dm | 22 +-
code/modules/recycling/sortingmachinery.dm | 22 +-
code/modules/research/rdconsole_tgui.dm | 36 +--
code/modules/research/server.dm | 10 +-
code/modules/resleeving/computers.dm | 4 +-
code/modules/resleeving/designer.dm | 10 +-
code/modules/rogueminer_vr/zone_console.dm | 10 +-
code/modules/shieldgen/shield_capacitor.dm | 4 +-
code/modules/shieldgen/shield_gen.dm | 4 +-
code/modules/shieldgen/shield_generator.dm | 12 +-
code/modules/shuttles/shuttle_console.dm | 12 +-
.../modules/shuttles/shuttle_console_multi.dm | 14 +-
code/modules/shuttles/shuttles_web.dm | 30 +--
code/modules/stockmarket/computer.dm | 8 +-
code/modules/telesci/telesci_computer.dm | 4 +-
code/modules/tgui/external.dm | 2 +-
code/modules/tgui/modules/_base.dm | 4 +-
.../tgui/modules/admin/player_notes.dm | 8 +-
.../tgui/modules/admin_shuttle_controller.dm | 24 +-
code/modules/tgui/modules/agentcard.dm | 76 +++---
code/modules/tgui/modules/alarm.dm | 8 +-
.../tgui/modules/appearance_changer.dm | 244 +++++++++---------
code/modules/tgui/modules/atmos_control.dm | 2 +-
code/modules/tgui/modules/camera.dm | 8 +-
code/modules/tgui/modules/communications.dm | 149 ++++++-----
code/modules/tgui/modules/crew_monitor.dm | 10 +-
code/modules/tgui/modules/gyrotron_control.dm | 6 +-
code/modules/tgui/modules/late_choices.dm | 20 +-
code/modules/tgui/modules/law_manager.dm | 40 +--
.../modules/tgui/modules/ntos-only/cardmod.dm | 24 +-
code/modules/tgui/modules/ntos-only/email.dm | 15 +-
code/modules/tgui/modules/ntos-only/uav.dm | 10 +-
code/modules/tgui/modules/overmap.dm | 36 +--
code/modules/tgui/modules/rcon.dm | 8 +-
code/modules/tgui/modules/rustcore_monitor.dm | 4 +-
code/modules/tgui/modules/rustfuel_control.dm | 4 +-
code/modules/tgui/modules/teleporter.dm | 4 +-
code/modules/tgui_input/number.dm | 8 +-
code/modules/tgui_input/text.dm | 6 +-
code/modules/turbolift/turbolift_console.dm | 4 +-
code/modules/vore/eating/vorepanel_vr.dm | 72 +++---
code/modules/vote/vote_datum.dm | 4 +-
.../tools/ano_device_battery.dm | 2 +-
.../tools/artifact_analyser.dm | 2 +-
.../tools/artifact_harvester.dm | 4 +-
.../tools/geosample_scanner.dm | 12 +-
.../tools/suspension_generator.dm | 4 +-
.../AppearanceChangerBody.tsx | 2 +-
297 files changed, 1866 insertions(+), 1893 deletions(-)
diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm
index 87c430c5d7..84ba70f55f 100644
--- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm
@@ -206,10 +206,10 @@
return data
-/obj/machinery/atmospherics/binary/algae_farm/tgui_act(action, params)
+/obj/machinery/atmospherics/binary/algae_farm/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
switch(action)
if("toggle")
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 4a680494f7..fd1158f408 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -203,7 +203,7 @@
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
if(..())
return
- add_fingerprint(usr)
+ add_fingerprint(user)
if(!allowed(user))
to_chat(user, span_warning("Access denied."))
return
@@ -235,7 +235,7 @@
return data
-/obj/machinery/atmospherics/binary/passive_gate/tgui_act(action, params)
+/obj/machinery/atmospherics/binary/passive_gate/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -258,7 +258,7 @@
if("max")
target_pressure = max_pressure_setting
if("set")
- var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure,max_pressure_setting,0)
+ var/new_pressure = tgui_input_number(ui.user,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure Control",src.target_pressure,max_pressure_setting,0)
src.target_pressure = between(0, new_pressure, max_pressure_setting)
if("set_flow_rate")
@@ -269,11 +269,11 @@
if("max")
set_flow_rate = air1.volume
if("set")
- var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate,air1.volume,0)
+ var/new_flow_rate = tgui_input_number(ui.user,"Enter new flow rate limit (0-[air1.volume]L/s)","Flow Rate Control",src.set_flow_rate,air1.volume,0)
src.set_flow_rate = between(0, new_flow_rate, air1.volume)
update_icon()
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/W as obj, var/mob/user as mob)
if (!W.has_tool_quality(TOOL_WRENCH))
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index 4c1a0d0ad8..70b498722f 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -201,13 +201,13 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/binary/pump/attack_hand(mob/user)
if(..())
return
- add_fingerprint(usr)
+ add_fingerprint(user)
if(!allowed(user))
to_chat(user, span_warning("Access denied."))
return
tgui_interact(user)
-/obj/machinery/atmospherics/binary/pump/tgui_act(action, params)
+/obj/machinery/atmospherics/binary/pump/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -223,11 +223,11 @@ Thus, the two variables affect pump operation are set in New():
if("max")
target_pressure = max_pressure_setting
if("set")
- var/new_pressure = tgui_input_number(usr,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure,max_pressure_setting,0)
+ var/new_pressure = tgui_input_number(ui.user,"Enter new output pressure (0-[max_pressure_setting]kPa)","Pressure control",src.target_pressure,max_pressure_setting,0)
src.target_pressure = between(0, new_pressure, max_pressure_setting)
. = TRUE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
update_icon()
/obj/machinery/atmospherics/binary/pump/power_change()
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index 4409482f50..4d442b772a 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -152,7 +152,7 @@
else
return null
-/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params)
+/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -171,7 +171,7 @@
if("set_flow_rate")
if(!configuring || use_power)
return
- var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
+ var/new_flow_rate = tgui_input_number(ui.user,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
. = TRUE
if("switch_mode")
@@ -182,7 +182,7 @@
if("switch_filter")
if(!configuring || use_power)
return
- var/new_filter = tgui_input_list(usr, "Select filter mode:", "Change filter", list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide"))
+ var/new_filter = tgui_input_list(ui.user, "Select filter mode:", "Change filter", list("None", "Oxygen", "Nitrogen", "Carbon Dioxide", "Phoron", "Nitrous Oxide"))
if(!new_filter)
return
switch_filter(dir_flag(params["dir"]), mode_return_switch(new_filter))
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 02c701c91e..9d0b9c78f7 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -164,7 +164,7 @@
return data
-/obj/machinery/atmospherics/omni/mixer/tgui_act(action, params)
+/obj/machinery/atmospherics/omni/mixer/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -184,7 +184,7 @@
. = TRUE
if(!configuring || use_power)
return
- var/new_flow_rate = tgui_input_number(usr,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
+ var/new_flow_rate = tgui_input_number(ui.user,"Enter new flow rate limit (0-[max_flow_rate]L/s)","Flow Rate Control",set_flow_rate,max_flow_rate,0)
set_flow_rate = between(0, new_flow_rate, max_flow_rate)
if("switch_mode")
. = TRUE
@@ -195,7 +195,7 @@
. = TRUE
if(!configuring || use_power)
return
- change_concentration(dir_flag(params["dir"]))
+ change_concentration(dir_flag(params["dir"]), ui.user)
if("switch_conlock")
. = TRUE
if(!configuring || use_power)
@@ -244,7 +244,7 @@
update_ports()
rebuild_mixing_inputs()
-/obj/machinery/atmospherics/omni/mixer/proc/change_concentration(var/port = NORTH)
+/obj/machinery/atmospherics/omni/mixer/proc/change_concentration(var/port = NORTH, mob/user)
tag_north_con = null
tag_south_con = null
tag_east_con = null
@@ -266,7 +266,7 @@
if(non_locked < 1)
return
- var/new_con = (tgui_input_number(usr,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100, round(remain_con * 100, 0.5), 0)) / 100
+ var/new_con = (tgui_input_number(user,"Enter a new concentration (0-[round(remain_con * 100, 0.5)])%","Concentration control", min(remain_con, old_con)*100, round(remain_con * 100, 0.5), 0)) / 100
//cap it between 0 and the max remaining concentration
new_con = between(0, new_con, remain_con)
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 9201cee4a1..9e6613ebf2 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -101,7 +101,7 @@
if(..())
return
- src.add_fingerprint(usr)
+ src.add_fingerprint(user)
tgui_interact(user)
return
diff --git a/code/ATMOSPHERICS/components/shutoff.dm b/code/ATMOSPHERICS/components/shutoff.dm
index 7517cbd7ef..2084b8c901 100644
--- a/code/ATMOSPHERICS/components/shutoff.dm
+++ b/code/ATMOSPHERICS/components/shutoff.dm
@@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves)
return src.attack_hand(user)
/obj/machinery/atmospherics/valve/shutoff/attack_hand(var/mob/user)
- src.add_fingerprint(usr)
+ src.add_fingerprint(user)
update_icon(1)
close_on_leaks = !close_on_leaks
to_chat(user, "You [close_on_leaks ? "enable" : "disable"] the automatic shutoff circuit.")
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 31544ac1f7..f332afee61 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -182,7 +182,7 @@
return data
-/obj/machinery/atmospherics/trinary/atmos_filter/tgui_act(action, params)
+/obj/machinery/atmospherics/trinary/atmos_filter/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -216,7 +216,7 @@
if(4)//removing N2O
filtered_out += "nitrous_oxide"
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
update_icon()
//
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 6397be2c59..86ee751762 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -100,11 +100,11 @@
if(..())
return
tgui_interact(user)
- // src.add_fingerprint(usr)
+ // src.add_fingerprint(user)
// if(!src.allowed(user))
// to_chat(user, span_warning("Access denied."))
// return
- // usr.set_machine(src)
+ // user.set_machine(src)
// var/list/node_connects = get_node_connect_dirs()
// var/dat = {span_bold("Power: ") + "[use_power?"On":"Off"]
// Set Flow Rate Limit:
diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm
index 0e051d9067..9f0f220ec2 100644
--- a/code/ATMOSPHERICS/components/tvalve.dm
+++ b/code/ATMOSPHERICS/components/tvalve.dm
@@ -161,7 +161,7 @@
return
/obj/machinery/atmospherics/tvalve/attack_hand(mob/user as mob)
- src.add_fingerprint(usr)
+ src.add_fingerprint(user)
update_icon(1)
sleep(10)
if (src.state)
diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm
index 9923078311..5dd984a0ff 100644
--- a/code/ATMOSPHERICS/components/unary/cold_sink.dm
+++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm
@@ -84,7 +84,7 @@
return data
-/obj/machinery/atmospherics/unary/freezer/tgui_act(action, params)
+/obj/machinery/atmospherics/unary/freezer/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -103,7 +103,7 @@
var/new_setting = between(0, text2num(params["value"]), 100)
set_power_level(new_setting)
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
/obj/machinery/atmospherics/unary/freezer/process()
..()
diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm
index 9d6d7de86f..71e4e9c022 100644
--- a/code/ATMOSPHERICS/components/unary/heat_source.dm
+++ b/code/ATMOSPHERICS/components/unary/heat_source.dm
@@ -104,7 +104,7 @@
return data
-/obj/machinery/atmospherics/unary/heater/tgui_act(action, params)
+/obj/machinery/atmospherics/unary/heater/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -123,7 +123,7 @@
var/new_setting = between(0, text2num(params["value"]), 100)
set_power_level(new_setting)
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
//upgrading parts
/obj/machinery/atmospherics/unary/heater/RefreshParts()
diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm
index 9139f96e74..d51a369529 100644
--- a/code/ATMOSPHERICS/components/valve.dm
+++ b/code/ATMOSPHERICS/components/valve.dm
@@ -131,7 +131,7 @@
return
/obj/machinery/atmospherics/valve/attack_hand(mob/user as mob)
- src.add_fingerprint(usr)
+ src.add_fingerprint(user)
update_icon(1)
sleep(10)
if (src.open)
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index 2f63f8e904..f9688a027f 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -420,7 +420,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/select_active_ai(var/mob/user)
var/list/ais = active_ais()
if(ais.len)
- if(user) . = tgui_input_list(usr, "AI signals detected:", "AI selection", ais)
+ if(user) . = tgui_input_list(user, "AI signals detected:", "AI selection", ais)
else . = pick(ais)
return .
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index b07669ae9e..7fa2b2293c 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -44,7 +44,7 @@
if(aiCamera && aiCamera.in_camera_mode)
aiCamera.camera_mode_off()
if(is_component_functioning("camera"))
- aiCamera.captureimage(A, usr)
+ aiCamera.captureimage(A, src)
else
to_chat(src, span_userdanger("Your camera isn't functional."))
return
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 774acba147..518c3e03c5 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -396,7 +396,7 @@ var/list/global_huds = list(
set hidden = 1
if(!hud_used)
- to_chat(usr, span_warning("This mob type does not use a HUD."))
+ to_chat(src, span_warning("This mob type does not use a HUD."))
return FALSE
if(!client)
return FALSE
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 06c93c37fb..4b062a6b5f 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -282,11 +282,11 @@ var/obj/screen/robot_inventory
//r.client.screen += robot_inventory //"store" icon
if(!r.module)
- to_chat(usr, span_danger("No module selected"))
+ to_chat(r, span_danger("No module selected"))
return
if(!r.module.modules)
- to_chat(usr, span_danger("Selected module has no modules to select"))
+ to_chat(r, span_danger("Selected module has no modules to select"))
return
if(!r.robot_modules_background)
diff --git a/code/datums/colormate.dm b/code/datums/colormate.dm
index 49c7a88542..3bb625b7b1 100644
--- a/code/datums/colormate.dm
+++ b/code/datums/colormate.dm
@@ -43,7 +43,7 @@
/datum/ColorMate/tgui_state(mob/user)
return GLOB.tgui_conscious_state
-/datum/ColorMate/tgui_data()
+/datum/ColorMate/tgui_data(mob/user)
. = list()
.["activemode"] = active_mode
.["matrixcolors"] = list(
@@ -69,7 +69,7 @@
.["item"] = list()
.["item"]["name"] = inserted.name
.["item"]["sprite"] = icon2base64(get_flat_icon(inserted,dir=SOUTH,no_anim=TRUE))
- .["item"]["preview"] = icon2base64(build_preview())
+ .["item"]["preview"] = icon2base64(build_preview(user))
else
.["item"] = null
@@ -159,7 +159,7 @@
return TRUE
/// Produces the preview image of the item, used in the UI, the way the color is not stacking is a sin.
-/datum/ColorMate/proc/build_preview()
+/datum/ColorMate/proc/build_preview(mob/user)
if(inserted) //sanity
var/list/cm
switch(active_mode)
@@ -178,17 +178,17 @@
text2num(color_matrix_last[11]),
text2num(color_matrix_last[12]),
)
- if(!check_valid_color(cm, usr))
+ if(!check_valid_color(cm, user))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
if(COLORMATE_TINT)
- if(!check_valid_color(activecolor, usr))
+ if(!check_valid_color(activecolor, user))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
if(COLORMATE_HSV)
cm = color_matrix_hsv(build_hue, build_sat, build_val)
color_matrix_last = cm
- if(!check_valid_color(cm, usr))
+ if(!check_valid_color(cm, user))
return get_flat_icon(inserted, dir=SOUTH, no_anim=TRUE)
var/cur_color = inserted.color
diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm
index edda32de87..3f482ea72e 100644
--- a/code/datums/components/crafting/crafting.dm
+++ b/code/datums/components/crafting/crafting.dm
@@ -452,26 +452,25 @@
data["crafting_recipes"] = crafting_recipes
return data
-/datum/component/personal_crafting/tgui_act(action, params)
+/datum/component/personal_crafting/tgui_act(action, params, datum/tgui/ui)
. = ..()
if(.)
return
switch(action)
if("make")
- var/mob/user = usr
var/datum/crafting_recipe/TR = locate(params["recipe"]) in GLOB.crafting_recipes
busy = TRUE
- tgui_interact(user)
- var/atom/movable/result = construct_item(user, TR)
+ tgui_interact(ui.user)
+ var/atom/movable/result = construct_item(ui.user, TR)
if(!istext(result)) //We made an item and didn't get a fail message
- if(ismob(user) && isitem(result)) //In case the user is actually possessing a non mob like a machine
- user.put_in_hands(result)
+ if(ismob(ui.user) && isitem(result)) //In case the user is actually possessing a non mob like a machine
+ ui.user.put_in_hands(result)
else
- result.forceMove(user.drop_location())
- to_chat(user, span_notice("[TR.name] constructed."))
- TR.on_craft_completion(user, result)
+ result.forceMove(ui.user.drop_location())
+ to_chat(ui.user, span_notice("[TR.name] constructed."))
+ TR.on_craft_completion(ui.user, result)
else
- to_chat(user, span_warning("Construction failed[result]"))
+ to_chat(ui.user, span_warning("Construction failed[result]"))
busy = FALSE
if("toggle_recipes")
display_craftable_only = !display_craftable_only
diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm
index 4e71b94630..03ffdb8ecb 100644
--- a/code/datums/wires/wires.dm
+++ b/code/datums/wires/wires.dm
@@ -153,24 +153,23 @@
data["status"] = status
return data
-/datum/wires/tgui_act(action, list/params)
+/datum/wires/tgui_act(action, list/params, datum/tgui/ui)
if(..())
return TRUE
- var/mob/user = usr
- if(!interactable(user))
+ if(!interactable(ui.user))
return
- var/obj/item/I = user.get_active_hand()
+ var/obj/item/I = ui.user.get_active_hand()
var/color = lowertext(params["wire"])
- holder.add_hiddenprint(user)
+ holder.add_hiddenprint(ui.user)
switch(action)
// Toggles the cut/mend status.
if("cut")
// if(!I.has_tool_quality(TOOL_WIRECUTTER) && !user.can_admin_interact())
if(!istype(I) || !I.has_tool_quality(TOOL_WIRECUTTER))
- to_chat(user, span_warning("You need wirecutters!"))
+ to_chat(ui.user, span_warning("You need wirecutters!"))
return
playsound(holder, I.usesound, 20, 1)
@@ -181,7 +180,7 @@
if("pulse")
// if(!I.has_tool_quality(TOOL_MULTITOOL) && !user.can_admin_interact())
if(!istype(I) || !I.has_tool_quality(TOOL_MULTITOOL))
- to_chat(user, span_warning("You need a multitool!"))
+ to_chat(ui.user, span_warning("You need a multitool!"))
return
playsound(holder, 'sound/weapons/empty.ogg', 20, 1)
@@ -189,7 +188,7 @@
// If they pulse the electrify wire, call interactable() and try to shock them.
if(get_wire(color) == WIRE_ELECTRIFY)
- interactable(user)
+ interactable(ui.user)
return TRUE
@@ -198,18 +197,18 @@
if(is_attached(color))
var/obj/item/O = detach_assembly(color)
if(O)
- user.put_in_hands(O)
+ ui.user.put_in_hands(O)
return TRUE
if(!istype(I, /obj/item/assembly/signaler))
- to_chat(user, span_warning("You need a remote signaller!"))
+ to_chat(ui.user, span_warning("You need a remote signaller!"))
return
- if(user.unEquip(I))
+ if(ui.user.unEquip(I))
attach_assembly(color, I)
return TRUE
else
- to_chat(user, span_warning("[I] is stuck to your hand!"))
+ to_chat(ui.user, span_warning("[I] is stuck to your hand!"))
/**
* Proc called to determine if the user can see wire define information, such as "Contraband", "Door Bolts", etc.
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index f0a9947b40..445c8116a2 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -325,13 +325,13 @@
throw_speed = 4
throw_range = 20
-/obj/item/camera_bug/attack_self(mob/usr as mob)
+/obj/item/camera_bug/attack_self(mob/user as mob)
var/list/cameras = new/list()
for (var/obj/machinery/camera/C in cameranet.cameras)
if (C.bugged && C.status)
cameras.Add(C)
if (length(cameras) == 0)
- to_chat(usr, span_warning("No bugged functioning cameras found."))
+ to_chat(user, span_warning("No bugged functioning cameras found."))
return
var/list/friendly_cameras = new/list()
@@ -339,16 +339,16 @@
for (var/obj/machinery/camera/C in cameras)
friendly_cameras.Add(C.c_tag)
- var/target = tgui_input_list(usr, "Select the camera to observe", "Select Camera", friendly_cameras)
+ var/target = tgui_input_list(user, "Select the camera to observe", "Select Camera", friendly_cameras)
if (!target)
return
for (var/obj/machinery/camera/C in cameras)
if (C.c_tag == target)
target = C
break
- if (usr.stat == 2) return
+ if (user.stat == 2) return
- usr.client.eye = target
+ user.client.eye = target
/*
/obj/item/cigarpacket
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 614eb7e981..0d0c0a9bbd 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -449,17 +449,17 @@
return data
-/obj/machinery/computer/scan_consolenew/tgui_act(action, params)
+/obj/machinery/computer/scan_consolenew/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
- if(!istype(usr.loc, /turf))
+ if(!istype(ui.user.loc, /turf))
return TRUE
if(!src || !src.connected)
return TRUE
if(irradiating) // Make sure that it isn't already irradiating someone...
return TRUE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
if(tgui_act_modal(action, params))
return TRUE
diff --git a/code/game/gamemodes/changeling/powers/mimic_voice.dm b/code/game/gamemodes/changeling/powers/mimic_voice.dm
index b8a18ac6fc..f5d65b8ec2 100644
--- a/code/game/gamemodes/changeling/powers/mimic_voice.dm
+++ b/code/game/gamemodes/changeling/powers/mimic_voice.dm
@@ -22,7 +22,7 @@
to_chat(src, span_notice("We return our vocal glands to their original location."))
return
- var/mimic_voice = sanitize(tgui_input_text(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN), MAX_NAME_LEN)
+ var/mimic_voice = sanitize(tgui_input_text(src, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN), MAX_NAME_LEN)
if(!mimic_voice)
return
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index 6883220bac..27c0941144 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -315,8 +315,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
/obj/item/book/tome/attack_self(mob/living/user as mob)
- usr = user
- if(!usr.canmove || usr.stat || usr.restrained())
+ if(!user.canmove || user.stat || user.restrained())
return
if(!cultwords["travel"])
@@ -337,11 +336,11 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if("Cancel", null)
return
if("Read it")
- if(usr.get_active_hand() != src)
+ if(user.get_active_hand() != src)
return
user << browse("[tomedat]", "window=Arcane Tome")
return
- if(usr.get_active_hand() != src)
+ if(user.get_active_hand() != src)
return
var/list/dictionary = list (
@@ -386,7 +385,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
var/chosen_rune = null
- if(usr)
+ if(user)
chosen_rune = input ("Choose a rune to scribe.") in scribewords
if (!chosen_rune)
return
@@ -398,7 +397,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if (chosen_rune == "teleport other")
dictionary[chosen_rune] += input ("Choose a destination word") in english
- if(usr.get_active_hand() != src)
+ if(user.get_active_hand() != src)
return
for (var/mob/V in viewers(src))
@@ -408,7 +407,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if(do_after(user, 50))
var/area/A = get_area(user)
log_and_message_admins("created \an [chosen_rune] rune at \the [A.name] - [user.loc.x]-[user.loc.y]-[user.loc.z].")
- if(usr.get_active_hand() != src)
+ if(user.get_active_hand() != src)
return
var/mob/living/carbon/human/H = user
var/obj/effect/rune/R = new /obj/effect/rune(user.loc)
@@ -439,7 +438,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
w_class = ITEMSIZE_SMALL
var/cultistsonly = 1
/obj/item/book/tome/imbued/attack_self(mob/user as mob)
- if(src.cultistsonly && !iscultist(usr))
+ if(src.cultistsonly && !iscultist(user))
return
if(!cultwords["travel"])
runerandom()
@@ -448,7 +447,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if (!istype(user.loc,/turf))
to_chat(user, span_notice("You do not have enough space to write a proper rune."))
var/list/runes = list("teleport", "itemport", "tome", "armor", "convert", "tear in reality", "emp", "drain", "seer", "raise", "obscure", "reveal", "astral journey", "manifest", "imbue talisman", "sacrifice", "wall", "freedom", "cultsummon", "deafen", "blind", "bloodboil", "communicate", "stun")
- r = input(usr, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking
+ r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes // Remains input() for extreme blocking
var/obj/effect/rune/R = new /obj/effect/rune
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
@@ -460,8 +459,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if("teleport")
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
var/beacon
- if(usr)
- beacon = input(usr, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking
+ if(user)
+ beacon = input(user, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking
R.word1=cultwords["travel"]
R.word2=cultwords["self"]
R.word3=beacon
@@ -470,8 +469,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
if("itemport")
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri")
var/beacon
- if(usr)
- beacon = input(usr, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking
+ if(user)
+ beacon = input(user, "Select the last rune", "Rune Scribing") in words // Remains input() for extreme blocking
R.word1=cultwords["travel"]
R.word2=cultwords["other"]
R.word3=beacon
diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm
index 47add9a0ea..9b5c9968a6 100644
--- a/code/game/gamemodes/cult/talisman.dm
+++ b/code/game/gamemodes/cult/talisman.dm
@@ -14,7 +14,7 @@
if("armor")
call(/obj/effect/rune/proc/armor)()
if("emp")
- call(/obj/effect/rune/proc/emp)(usr.loc,3)
+ call(/obj/effect/rune/proc/emp)(user.loc,3)
if("conceal")
call(/obj/effect/rune/proc/obscure)(2)
if("revealrunes")
diff --git a/code/game/gamemodes/technomancer/spells/audible_deception.dm b/code/game/gamemodes/technomancer/spells/audible_deception.dm
index 73dfa2f7de..9a79928494 100644
--- a/code/game/gamemodes/technomancer/spells/audible_deception.dm
+++ b/code/game/gamemodes/technomancer/spells/audible_deception.dm
@@ -68,7 +68,7 @@
var/list/sound_options = available_sounds
if(check_for_scepter())
sound_options["!!AIR HORN!!"] = 'sound/items/AirHorn.ogg'
- var/new_sound = tgui_input_list(usr, "Select the sound you want to make.", "Sounds", sound_options)
+ var/new_sound = tgui_input_list(user, "Select the sound you want to make.", "Sounds", sound_options)
if(new_sound)
selected_sound = sound_options[new_sound]
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
index 256e57bf18..e13944eb9a 100644
--- a/code/game/machinery/CableLayer.dm
+++ b/code/game/machinery/CableLayer.dm
@@ -36,7 +36,7 @@
if(O.has_tool_quality(TOOL_WIRECUTTER))
if(cable && cable.get_amount())
- var/m = round(input(usr, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1)
+ var/m = round(input(user, "Please specify the length of cable to cut", "Cut cable", min(cable.get_amount(), 30)) as num, 1)
m = min(m, cable.get_amount())
m = min(m, 30)
if(m)
@@ -45,7 +45,7 @@
var/obj/item/stack/cable_coil/CC = new (get_turf(src))
CC.set_amount(m)
else
- to_chat(usr, span_warning("There's no more cable on the reel."))
+ to_chat(user, span_warning("There's no more cable on the reel."))
/obj/machinery/cablelayer/examine(mob/user)
. = ..()
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index d168286ee1..7d9d97acb7 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -43,8 +43,8 @@
return
/obj/machinery/optable/attack_hand(mob/user as mob)
- if(HULK in usr.mutations)
- visible_message(span_danger("\The [usr] destroys \the [src]!"))
+ if(HULK in user.mutations)
+ visible_message(span_danger("\The [user] destroys \the [src]!"))
density = FALSE
qdel(src)
return
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index 799d98fe02..eb81a7efea 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -296,10 +296,10 @@
/obj/machinery/sleeper/tgui_act(action, params, datum/tgui/ui, datum/tgui_state/state)
if(..())
return TRUE
- if(!controls_inside && usr == occupant)
+ if(!controls_inside && ui.user == occupant)
return
if(panel_open)
- to_chat(usr, span_notice("Close the maintenance panel first."))
+ to_chat(ui.user, span_notice("Close the maintenance panel first."))
return
. = TRUE
@@ -309,16 +309,16 @@
return
if(occupant.stat == DEAD)
var/datum/gender/G = gender_datums[occupant.get_visible_gender()]
- to_chat(usr, span_danger("This person has no life to preserve anymore. Take [G.him] to a department capable of reanimating [G.him]."))
+ to_chat(ui.user, span_danger("This person has no life to preserve anymore. Take [G.him] to a department capable of reanimating [G.him]."))
return
var/chemical = params["chemid"]
var/amount = text2num(params["amount"])
if(!length(chemical) || amount <= 0)
return
if(occupant.health > min_health) //|| (chemical in emergency_chems))
- inject_chemical(usr, chemical, amount)
+ inject_chemical(ui.user, chemical, amount)
else
- to_chat(usr, span_danger("This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!"))
+ to_chat(ui.user, span_danger("This person is not in good enough condition for sleepers to be effective! Use another means of treatment, such as cryogenics!"))
if("removebeaker")
remove_beaker()
if("togglefilter")
@@ -328,7 +328,7 @@
if("ejectify")
go_out()
if("changestasis")
- var/new_stasis = tgui_input_list(usr, "Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level", stasis_choices)
+ var/new_stasis = tgui_input_list(ui.user, "Levels deeper than 50% stasis level will render the patient unconscious.","Stasis Level", stasis_choices)
if(new_stasis)
stasis_level = stasis_choices[new_stasis]
if("auto_eject_dead_on")
@@ -337,7 +337,7 @@
auto_eject_dead = FALSE
else
return FALSE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
/obj/machinery/sleeper/process()
if(stat & (NOPOWER|BROKEN))
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index a891a03f82..cf1fc43839 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -39,7 +39,7 @@
if(istype(user, /mob/living/silicon))
return attack_hand(user)
else // trying to unlock the interface
- if(allowed(usr))
+ if(allowed(user))
locked = !locked
to_chat(user, "You [ locked ? "lock" : "unlock"] the device.")
if(locked)
@@ -48,7 +48,7 @@
user << browse(null, "window=ai_slipper")
else
if(user.machine==src)
- attack_hand(usr)
+ attack_hand(user)
else
to_chat(user, span_warning("Access denied."))
return
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index 617198f9c9..0fd6e7862a 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -694,10 +694,10 @@
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
- var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature, round_value = FALSE)
+ var/input_temperature = tgui_input_number(ui.user, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature, round_value = FALSE)
if(isnum(input_temperature))
if(input_temperature > max_temperature || input_temperature < min_temperature)
- to_chat(usr, "Temperature must be between [min_temperature]C and [max_temperature]C")
+ to_chat(ui.user, "Temperature must be between [min_temperature]C and [max_temperature]C")
else
target_temperature = input_temperature + T0C
return TRUE
@@ -706,13 +706,13 @@
// Yes, this is kinda snowflaky; however, I would argue it would be far more snowflakey
// to include "custom hrefs" and all the other bullshit that nano states have just for the
// like, two UIs, that want remote access to other UIs.
- if((locked && !(siliconaccess(usr) || (isobserver(usr) && is_admin(usr))) && !istype(state, /datum/tgui_state/air_alarm_remote)) || (issilicon(usr) && aidisabled)) //CHOMPedit borg access
+ if((locked && !(siliconaccess(ui.user) || (isobserver(ui.user) && is_admin(ui.user))) && !istype(state, /datum/tgui_state/air_alarm_remote)) || (issilicon(ui.user) && aidisabled)) //CHOMPedit borg access
return
var/device_id = params["id_tag"]
switch(action)
if("lock")
- if((siliconaccess(usr) && !wires.is_cut(WIRE_IDSCAN)) || (isobserver(usr) && is_admin(usr))) //CHOMPEdit borg access + admin acces
+ if((siliconaccess(ui.user) && !wires.is_cut(WIRE_IDSCAN)) || (isobserver(ui.user) && is_admin(ui.user))) //CHOMPEdit borg access + admin acces
locked = !locked
. = TRUE
if( "power",
@@ -725,42 +725,42 @@
"panic_siphon",
"scrubbing",
"direction")
- send_signal(device_id, list("[action]" = text2num(params["val"])), usr)
+ send_signal(device_id, list("[action]" = text2num(params["val"])), ui.user)
. = TRUE
if("excheck")
- send_signal(device_id, list("checks" = text2num(params["val"])^1), usr)
+ send_signal(device_id, list("checks" = text2num(params["val"])^1), ui.user)
. = TRUE
if("incheck")
- send_signal(device_id, list("checks" = text2num(params["val"])^2), usr)
+ send_signal(device_id, list("checks" = text2num(params["val"])^2), ui.user)
. = TRUE
if("set_external_pressure", "set_internal_pressure")
var/target = params["value"]
if(!isnull(target))
- send_signal(device_id, list("[action]" = target), usr)
+ send_signal(device_id, list("[action]" = target), ui.user)
. = TRUE
if("reset_external_pressure")
- send_signal(device_id, list("reset_external_pressure"), usr)
+ send_signal(device_id, list("reset_external_pressure"), ui.user)
. = TRUE
if("reset_internal_pressure")
- send_signal(device_id, list("reset_internal_pressure"), usr)
+ send_signal(device_id, list("reset_internal_pressure"), ui.user)
. = TRUE
if("threshold")
var/env = params["env"]
var/name = params["var"]
- var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name], min_value=-1, round_value = FALSE)
+ var/value = tgui_input_number(ui.user, "New [name] for [env]:", name, TLV[env][name], min_value=-1, round_value = FALSE)
if(!isnull(value) && !..())
if(value < 0)
TLV[env][name] = -1
else
TLV[env][name] = round(value, 0.01)
clamp_tlv_values(env, name)
- // investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(usr)]",INVESTIGATE_ATMOS)
+ // investigate_log(" treshold value for [env]:[name] was set to [value] by [key_name(ui.user)]",INVESTIGATE_ATMOS)
. = TRUE
if("mode")
mode = text2num(params["mode"])
- // investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(usr)]",INVESTIGATE_ATMOS)
- apply_mode(usr)
+ // investigate_log("was turned to [get_mode_name(mode)] mode by [key_name(ui.user)]",INVESTIGATE_ATMOS)
+ apply_mode(ui.user)
. = TRUE
if("alarm")
if(alarm_area.atmosalert(2, src))
@@ -829,7 +829,7 @@
to_chat(user, "It does nothing.")
return
else
- if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN))
+ if(allowed(user) && !wires.is_cut(WIRE_IDSCAN))
locked = !locked
to_chat(user, span_notice("You [locked ? "lock" : "unlock"] the Air Alarm interface."))
else
diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm
index 5c5db6ebb5..1c538eaf01 100644
--- a/code/game/machinery/atmoalter/area_atmos_computer.dm
+++ b/code/game/machinery/atmoalter/area_atmos_computer.dm
@@ -51,7 +51,7 @@
return list("scrubbers" = working)
-/obj/machinery/computer/area_atmos/tgui_act(action, params)
+/obj/machinery/computer/area_atmos/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -75,7 +75,7 @@
scanscrubbers()
. = TRUE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
/obj/machinery/computer/area_atmos/proc/toggle_all(on)
for(var/id in connectedscrubbers)
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 329d05c0df..48bd0c18c3 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -320,7 +320,7 @@ update_flag
return data
-/obj/machinery/portable_atmospherics/canister/tgui_act(action, params)
+/obj/machinery/portable_atmospherics/canister/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -336,7 +336,7 @@ update_flag
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
)
- var/label = tgui_input_list(usr, "Choose canister label", "Gas canister", colors)
+ var/label = tgui_input_list(ui.user, "Choose canister label", "Gas canister", colors)
if(label)
canister_color = colors[label]
icon_state = colors[label]
@@ -353,7 +353,7 @@ update_flag
pressure = 10*ONE_ATMOSPHERE
. = TRUE
else if(pressure == "input")
- pressure = tgui_input_number(usr, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10)
+ pressure = tgui_input_number(ui.user, "New release pressure ([ONE_ATMOSPHERE/10]-[10*ONE_ATMOSPHERE] kPa):", name, release_pressure, 10*ONE_ATMOSPHERE, ONE_ATMOSPHERE/10)
if(!isnull(pressure) && !..())
. = TRUE
else if(text2num(pressure) != null)
@@ -364,14 +364,14 @@ update_flag
if("valve")
if(valve_open)
if(holding)
- release_log += "Valve was " + span_bold("closed") + " by [usr] ([usr.ckey]), stopping the transfer into the [holding]
"
+ release_log += "Valve was " + span_bold("closed") + " by [ui.user] ([ui.user.ckey]), stopping the transfer into the [holding]
"
else
- release_log += "Valve was " + span_bold("closed") + " by [usr] ([usr.ckey]), stopping the transfer into the " + span_red(span_bold("air")) + "
"
+ release_log += "Valve was " + span_bold("closed") + " by [ui.user] ([ui.user.ckey]), stopping the transfer into the " + span_red(span_bold("air")) + "
"
else
if(holding)
- release_log += "Valve was " + span_bold("opened") + " by [usr] ([usr.ckey]), starting the transfer into the [holding]
"
+ release_log += "Valve was " + span_bold("opened") + " by [ui.user] ([ui.user.ckey]), starting the transfer into the [holding]
"
else
- release_log += "Valve was " + span_bold("opened") + " by [usr] ([usr.ckey]), starting the transfer into the " + span_red(span_bold("air")) + "
"
+ release_log += "Valve was " + span_bold("opened") + " by [ui.user] ([ui.user.ckey]), starting the transfer into the " + span_red(span_bold("air")) + "
"
log_open()
valve_open = !valve_open
. = TRUE
@@ -379,14 +379,14 @@ update_flag
if(holding)
if(valve_open)
valve_open = 0
- release_log += "Valve was " + span_bold("closed") + " by [usr] ([usr.ckey]), stopping the transfer into the [holding]
"
+ release_log += "Valve was " + span_bold("closed") + " by [ui.user] ([ui.user.ckey]), stopping the transfer into the [holding]
"
if(istype(holding, /obj/item/tank))
- holding.manipulated_by = usr.real_name
+ holding.manipulated_by = ui.user.real_name
holding.loc = loc
holding = null
. = TRUE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
update_icon()
/obj/machinery/portable_atmospherics/canister/phoron/Initialize() //ChompEDIT New --> Initialize
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 752f9305ac..c1b372e5ad 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -146,11 +146,11 @@
if(..())
return TRUE
- usr.set_machine(src)
- add_fingerprint(usr)
+ ui.user.set_machine(src)
+ add_fingerprint(ui.user)
if(busy)
- to_chat(usr, span_notice("The autolathe is busy. Please wait for completion of previous operation."))
+ to_chat(ui.user, span_notice("The autolathe is busy. Please wait for completion of previous operation."))
return
switch(action)
if("make")
@@ -176,8 +176,8 @@
if(!isnull(materials.get_material_amount(material)) && materials.get_material_amount(material) < round(making.resources[material] * coeff))
max_sheets = 0
//Build list of multipliers for sheets.
- multiplier = tgui_input_number(usr, "How many do you want to print? (0-[max_sheets])", null, null, max_sheets, 0)
- if(!multiplier || multiplier <= 0 || (multiplier != round(multiplier)) || multiplier > max_sheets || tgui_status(usr, state) != STATUS_INTERACTIVE)
+ multiplier = tgui_input_number(ui.user, "How many do you want to print? (0-[max_sheets])", null, null, max_sheets, 0)
+ if(!multiplier || multiplier <= 0 || (multiplier != round(multiplier)) || multiplier > max_sheets || tgui_status(ui.user, state) != STATUS_INTERACTIVE)
return FALSE
//Check if we still have the materials.
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index d9fe85fcbd..b3b41376ff 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -135,14 +135,14 @@
ui = new(user, src, "Biogenerator", name)
ui.open()
-/obj/machinery/biogenerator/tgui_act(action, params)
+/obj/machinery/biogenerator/tgui_act(action, params, datum/tgui/ui)
if(..())
return
. = TRUE
switch(action)
if("activate")
- INVOKE_ASYNC(src, PROC_REF(activate))
+ INVOKE_ASYNC(src, PROC_REF(activate), ui.user)
return TRUE
if("detach")
if(beaker)
@@ -166,11 +166,11 @@
return
var/cost = round(br.cost / build_eff)
if(cost > points)
- to_chat(usr, span_danger("Insufficient biomass."))
+ to_chat(ui.user, span_danger("Insufficient biomass."))
return
var/amt_to_actually_dispense = round(min(beaker.reagents.get_free_space(), br.reagent_amt))
if(amt_to_actually_dispense <= 0)
- to_chat(usr, span_danger("The loaded beaker is full!"))
+ to_chat(ui.user, span_danger("The loaded beaker is full!"))
return
points -= (cost * (amt_to_actually_dispense / br.reagent_amt))
beaker.reagents.add_reagent(br.reagent_id, amt_to_actually_dispense)
@@ -179,7 +179,7 @@
var/cost = round(bi.cost / build_eff)
if(cost > points)
- to_chat(usr, span_danger("Insufficient biomass."))
+ to_chat(ui.user, span_danger("Insufficient biomass."))
return
points -= cost
@@ -263,13 +263,13 @@
return
tgui_interact(user)
-/obj/machinery/biogenerator/proc/activate()
- if(usr.stat)
+/obj/machinery/biogenerator/proc/activate(mob/user)
+ if(user.stat)
return
if(stat) //NOPOWER etc
return
if(processing)
- to_chat(usr, span_notice("The biogenerator is in the process of working."))
+ to_chat(user, span_notice("The biogenerator is in the process of working."))
return
var/S = 0
for(var/obj/item/reagent_containers/food/snacks/grown/I in contents)
@@ -289,7 +289,7 @@
playsound(src, 'sound/machines/biogenerator_end.ogg', 40, 1)
update_icon()
else
- to_chat(usr, span_warning("Error: No growns inside. Please insert growns."))
+ to_chat(user, span_warning("Error: No growns inside. Please insert growns."))
return
/obj/machinery/biogenerator/RefreshParts()
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index bc27d4e501..c977215eeb 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -151,7 +151,7 @@
if(anomalous_organs)
possible_list |= anomalous_products
- var/choice = tgui_input_list(usr, "What would you like to print?", "Print Choice", possible_list)
+ var/choice = tgui_input_list(user, "What would you like to print?", "Print Choice", possible_list)
if(!choice || printing || (stat & (BROKEN|NOPOWER)))
return
diff --git a/code/game/machinery/bomb_tester_vr.dm b/code/game/machinery/bomb_tester_vr.dm
index e45c329f37..6e59c56844 100644
--- a/code/game/machinery/bomb_tester_vr.dm
+++ b/code/game/machinery/bomb_tester_vr.dm
@@ -149,26 +149,26 @@
text_mode = "tank transfer valve detonation"
if(MODE_CANISTER)
text_mode = "canister-assisted single gas tank detonation"
- to_chat(usr, span_notice("[src] set to simulate a [text_mode]."))
+ to_chat(ui.user, span_notice("[src] set to simulate a [text_mode]."))
return TRUE
if("add_tank")
- if(istype(usr.get_active_hand(), /obj/item/tank))
- var/obj/item/tank/T = usr.get_active_hand()
+ if(istype(ui.user.get_active_hand(), /obj/item/tank))
+ var/obj/item/tank/T = ui.user.get_active_hand()
var/slot = params["slot"]
if(slot == 1 && !tank1)
tank1 = T
else if(slot == 2 && !tank2)
tank2 = T
else
- to_chat(usr, span_warning("Slot [slot] is full."))
+ to_chat(ui.user, span_warning("Slot [slot] is full."))
return
- usr.drop_item(T)
+ ui.user.drop_item(T)
T.forceMove(src)
return TRUE
else
- to_chat(usr, span_warning("You must be wielding a tank to insert it!"))
+ to_chat(ui.user, span_warning("You must be wielding a tank to insert it!"))
if("remove_tank")
var/obj/item/tank/T = locate(params["ref"]) in list(tank1, tank2)
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 67824ecb3f..6feae4eff2 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -80,19 +80,19 @@
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
- var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
+ var/input = sanitize(tgui_input_text(user, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
if(!input)
- to_chat(usr, "No input found please hang up and try your call again.")
+ to_chat(user, "No input found please hang up and try your call again.")
return
var/list/tempnetwork = splittext(input, ",")
if(tempnetwork.len < 1)
- to_chat(usr, "No network found please hang up and try your call again.")
+ to_chat(user, "No network found please hang up and try your call again.")
return
var/area/camera_area = get_area(src)
var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])"
- input = sanitizeSafe(tgui_input_text(usr, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN)
+ input = sanitizeSafe(tgui_input_text(user, "How would you like to name the camera?", "Set Camera Name", camera_name ? camera_name : temptag), MAX_NAME_LEN)
state = 4
var/obj/machinery/camera/C = new(src.loc)
diff --git a/code/game/machinery/clawmachine.dm b/code/game/machinery/clawmachine.dm
index f86ad1c6e1..406f80850f 100644
--- a/code/game/machinery/clawmachine.dm
+++ b/code/game/machinery/clawmachine.dm
@@ -169,7 +169,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/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm
index ed07a6158b..4f4722c559 100644
--- a/code/game/machinery/computer/Operating.dm
+++ b/code/game/machinery/computer/Operating.dm
@@ -127,11 +127,11 @@
return data
-/obj/machinery/computer/operating/tgui_act(action, params)
+/obj/machinery/computer/operating/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
- if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
+ if((ui.user.contents.Find(src) || (in_range(src, ui.user) && istype(src.loc, /turf))) || (istype(ui.user, /mob/living/silicon)))
+ ui.user.set_machine(src)
. = TRUE
switch(action)
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 85b633df83..1646933bfb 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -111,23 +111,23 @@
laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
laws.add_inherent_law("You must obey orders given to you by human beings, except where such orders would conflict with the First Law.")
laws.add_inherent_law("You must protect your own existence as long as such does not conflict with the First or Second Law.")
- to_chat(usr, "Law module applied.")
+ to_chat(user, "Law module applied.")
if(istype(P, /obj/item/aiModule/nanotrasen))
laws.add_inherent_law("Safeguard: Protect your assigned space station to the best of your ability. It is not something we can easily afford to replace.")
laws.add_inherent_law("Serve: Serve the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
laws.add_inherent_law("Protect: Protect the crew of your assigned space station to the best of your abilities, with priority as according to their rank and role.")
laws.add_inherent_law("Survive: AI units are not expendable, they are expensive. Do not allow unauthorized personnel to tamper with your equipment.")
- to_chat(usr, "Law module applied.")
+ to_chat(user, "Law module applied.")
if(istype(P, /obj/item/aiModule/purge))
laws.clear_inherent_laws()
- to_chat(usr, "Law module applied.")
+ to_chat(user, "Law module applied.")
if(istype(P, /obj/item/aiModule/freeform))
var/obj/item/aiModule/freeform/M = P
laws.add_inherent_law(M.newFreeFormLaw)
- to_chat(usr, "Added a freeform law.")
+ to_chat(user, "Added a freeform law.")
if(istype(P, /obj/item/mmi))
var/obj/item/mmi/M = P
@@ -148,7 +148,7 @@
user.drop_item()
P.loc = src
brain = P
- to_chat(usr, "Added [P].")
+ to_chat(user, "Added [P].")
icon_state = "3b"
if(P.has_tool_quality(TOOL_CROWBAR) && brain)
diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm
index 44600b9c69..70ec7f8717 100644
--- a/code/game/machinery/computer/aifixer.dm
+++ b/code/game/machinery/computer/aifixer.dm
@@ -80,7 +80,7 @@
return data
-/obj/machinery/computer/aifixer/tgui_act(action, params)
+/obj/machinery/computer/aifixer/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
if(!occupier)
@@ -92,7 +92,7 @@
switch(action)
if("PRG_beginReconstruction")
if(occupier?.health < 100)
- to_chat(usr, span_notice("Reconstruction in progress. This will take several minutes."))
+ to_chat(ui.user, span_notice("Reconstruction in progress. This will take several minutes."))
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 25, FALSE)
restoring = TRUE
var/mob/observer/dead/ghost = occupier.get_ghost()
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 8afe56476b..f6a50c3254 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -159,7 +159,7 @@
sleep(10)
enemy_hp -= attackamt
- arcade_action()
+ arcade_action(ui.user)
if("heal")
blocked = 1
@@ -173,7 +173,7 @@
player_mp -= pointamt
player_hp += healamt
blocked = 1
- arcade_action()
+ arcade_action(ui.user)
if("charge")
blocked = 1
@@ -185,7 +185,7 @@
turtle--
sleep(10)
- arcade_action()
+ arcade_action(ui.user)
if(action == "newgame") //Reset everything
@@ -201,10 +201,10 @@
randomize_characters()
emagged = 0
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
return TRUE
-/obj/machinery/computer/arcade/battle/proc/arcade_action()
+/obj/machinery/computer/arcade/battle/proc/arcade_action(var/mob/user)
if ((enemy_mp <= 0) || (enemy_hp <= 0))
if(!gameover)
gameover = 1
@@ -215,8 +215,8 @@
feedback_inc("arcade_win_emagged")
new /obj/effect/spawner/newbomb/timer/syndicate(src.loc)
new /obj/item/clothing/head/collectable/petehat(src.loc)
- message_admins("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
- log_game("[key_name_admin(usr)] has outbombed Cuban Pete and been awarded a bomb.")
+ message_admins("[key_name_admin(user)] has outbombed Cuban Pete and been awarded a bomb.")
+ log_game("[key_name_admin(user)] has outbombed Cuban Pete and been awarded a bomb.")
randomize_characters()
emagged = 0
else if(!contents.len)
@@ -245,7 +245,7 @@
temp = "You have been drained! GAME OVER"
if(emagged)
feedback_inc("arcade_loss_mana_emagged")
- usr.gib()
+ user.gib()
else
feedback_inc("arcade_loss_mana_normal")
@@ -267,7 +267,7 @@
playsound(src, 'sound/arcade/lose.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
if(emagged)
feedback_inc("arcade_loss_hp_emagged")
- usr.gib()
+ user.gib()
else
feedback_inc("arcade_loss_hp_normal")
@@ -367,12 +367,12 @@
"You have made it to Orion! Congratulations! Your crew is one of the few to start a new foothold for mankind!"
)
-/obj/machinery/computer/arcade/orion_trail/proc/newgame()
+/obj/machinery/computer/arcade/orion_trail/proc/newgame(var/mob/user)
// Set names of settlers in crew
settlers = list()
for(var/i = 1; i <= 3; i++)
add_crewmember()
- add_crewmember("[usr]")
+ add_crewmember("[user]")
// Re-set items to defaults
engine = 1
hull = 1
@@ -466,7 +466,7 @@
if (href_list["continue"]) //Continue your travels
if(gameStatus == ORION_STATUS_NORMAL && !event && turns != 7)
if(turns >= ORION_TRAIL_WINTURN)
- win()
+ win(usr)
else
food -= (alive+traitors_aboard)*2
fuel -= 5
@@ -535,7 +535,7 @@
else if(href_list["newgame"]) //Reset everything
if(gameStatus == ORION_STATUS_START)
playsound(src, 'sound/arcade/Ori_begin.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
- newgame()
+ newgame(usr)
else if(href_list["menu"]) //back to the main menu
if(gameStatus == ORION_STATUS_GAMEOVER)
gameStatus = ORION_STATUS_START
@@ -1006,14 +1006,14 @@
return removed
-/obj/machinery/computer/arcade/orion_trail/proc/win()
+/obj/machinery/computer/arcade/orion_trail/proc/win(var/mob/user)
gameStatus = ORION_STATUS_START
src.visible_message("\The [src] plays a triumpant tune, stating 'CONGRATULATIONS, YOU HAVE MADE IT TO ORION.'")
playsound(src, 'sound/arcade/Ori_win.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
if(emagged)
new /obj/item/orion_ship(src.loc)
- message_admins("[key_name_admin(usr)] made it to Orion on an emagged machine and got an explosive toy ship.")
- log_game("[key_name(usr)] made it to Orion on an emagged machine and got an explosive toy ship.")
+ message_admins("[key_name_admin(user)] made it to Orion on an emagged machine and got an explosive toy ship.")
+ log_game("[key_name(user)] made it to Orion on an emagged machine and got an explosive toy ship.")
else
prizevend()
emagged = 0
@@ -1025,7 +1025,7 @@
to_chat(user, span_notice("You override the cheat code menu and skip to Cheat #[rand(1, 50)]: Realism Mode."))
name = "The Orion Trail: Realism Edition"
desc = "Learn how our ancestors got to Orion, and try not to die in the process!"
- newgame()
+ newgame(user)
emagged = 1
return 1
@@ -1049,8 +1049,8 @@
if(active)
return
- message_admins("[key_name_admin(usr)] primed an explosive Orion ship for detonation.")
- log_game("[key_name(usr)] primed an explosive Orion ship for detonation.")
+ message_admins("[key_name_admin(user)] primed an explosive Orion ship for detonation.")
+ log_game("[key_name(user)] primed an explosive Orion ship for detonation.")
to_chat(user, span_warning("You flip the switch on the underside of [src]."))
active = 1
@@ -1112,10 +1112,10 @@
var/paid = 0
var/obj/item/card/id/W = I.GetID()
if(W) //for IDs and PDAs and wallets with IDs
- paid = pay_with_card(W,I)
+ paid = pay_with_card(W, I, user)
else if(istype(I, /obj/item/spacecash/ewallet))
var/obj/item/spacecash/ewallet/C = I
- paid = pay_with_ewallet(C)
+ paid = pay_with_ewallet(C, user)
else if(istype(I, /obj/item/spacecash))
var/obj/item/spacecash/C = I
paid = pay_with_cash(C, user)
@@ -1132,16 +1132,16 @@
// 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 -= gameprice
if(cashmoney.worth <= 0)
- usr.drop_from_inventory(cashmoney)
+ user.drop_from_inventory(cashmoney)
qdel(cashmoney)
else
cashmoney.update_icon()
@@ -1155,9 +1155,9 @@
///// Ewallet
-/obj/machinery/computer/arcade/clawmachine/proc/pay_with_ewallet(var/obj/item/spacecash/ewallet/wallet)
+/obj/machinery/computer/arcade/clawmachine/proc/pay_with_ewallet(var/obj/item/spacecash/ewallet/wallet, var/mob/user)
if(!emagged)
- visible_message(span_info("\The [usr] swipes \the [wallet] through \the [src]."))
+ visible_message(span_info("\The [user] swipes \the [wallet] through \the [src]."))
playsound(src, 'sound/machines/id_swipe.ogg', 50, 1)
if(gameprice > wallet.worth)
visible_message(span_info("Insufficient funds."))
@@ -1168,14 +1168,14 @@
return 1
if(emagged)
playsound(src, 'sound/arcade/steal.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
- to_chat(usr, span_info("It doesn't seem to accept that! Seem you'll need to swipe a valid ID."))
+ to_chat(user, span_info("It doesn't seem to accept that! Seem you'll need to swipe a valid ID."))
///// ID
-/obj/machinery/computer/arcade/clawmachine/proc/pay_with_card(var/obj/item/card/id/I, var/obj/item/ID_container)
+/obj/machinery/computer/arcade/clawmachine/proc/pay_with_card(var/obj/item/card/id/I, var/obj/item/ID_container, var/mob/user)
if(I==ID_container || ID_container == null)
- visible_message(span_info("\The [usr] swipes \the [I] through \the [src]."))
+ visible_message(span_info("\The [user] swipes \the [I] through \the [src]."))
else
- visible_message(span_info("\The [usr] swipes \the [ID_container] through \the [src]."))
+ visible_message(span_info("\The [user] swipes \the [ID_container] through \the [src]."))
playsound(src, 'sound/machines/id_swipe.ogg', 50, 1)
var/datum/money_account/customer_account = get_account(I.associated_account_number)
if(!customer_account)
@@ -1189,7 +1189,7 @@
// Have the customer punch in the PIN before checking if there's enough money. Prevents people from figuring out acct is
// empty at high security levels
if(customer_account.security_level != 0) //If card requires pin authentication (ie seclevel 1 or 2)
- var/attempt_pin = tgui_input_number(usr, "Enter pin code", "Vendor transaction")
+ var/attempt_pin = tgui_input_number(user, "Enter pin code", "Vendor transaction")
customer_account = attempt_account_access(I.associated_account_number, attempt_pin, 2)
if(!customer_account)
@@ -1268,7 +1268,7 @@
return data
-/obj/machinery/computer/arcade/clawmachine/tgui_act(action, params)
+/obj/machinery/computer/arcade/clawmachine/tgui_act(action, params, datum/tgui/ui)
if(..())
return
@@ -1289,9 +1289,9 @@
if(action == "pointless" && wintick >= 10)
instructions = "Insert 1 thaler or swipe a card to play!"
- clawvend()
+ clawvend(ui.user)
-/obj/machinery/computer/arcade/clawmachine/proc/clawvend() /// True to a real claw machine, it's NEARLY impossible to win.
+/obj/machinery/computer/arcade/clawmachine/proc/clawvend(var/mob/user) /// True to a real claw machine, it's NEARLY impossible to win.
winprob += 1 /// Yeah.
if(prob(winprob)) /// YEAH.
@@ -1304,7 +1304,7 @@
winscreen = "You won...?"
var/obj/item/grenade/G = new /obj/item/grenade/explosive(get_turf(src)) /// YEAAAAAAAAAAAAAAAAAAH!!!!!!!!!!
G.activate()
- G.throw_at(get_turf(usr),10,10) /// Play stupid games, win stupid prizes.
+ G.throw_at(get_turf(user),10,10) /// Play stupid games, win stupid prizes.
playsound(src, 'sound/arcade/Ori_win.ogg', 50, 1, extrarange = -3, falloff = 0.1, ignore_walls = FALSE)
winprob = 0
diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm
index a566a6be1a..77f9ce12c0 100644
--- a/code/game/machinery/computer/card.dm
+++ b/code/game/machinery/computer/card.dm
@@ -158,35 +158,35 @@
if(modify)
data_core.manifest_modify(modify.registered_name, modify.assignment, modify.rank)
modify.name = "[modify.registered_name]'s ID Card ([modify.assignment])"
- if(ishuman(usr))
+ if(ishuman(ui.user))
modify.forceMove(get_turf(src))
- if(!usr.get_active_hand())
- usr.put_in_hands(modify)
+ if(!ui.user.get_active_hand())
+ ui.user.put_in_hands(modify)
modify = null
else
modify.forceMove(get_turf(src))
modify = null
else
- var/obj/item/I = usr.get_active_hand()
- if(istype(I, /obj/item/card/id) && usr.unEquip(I))
+ var/obj/item/I = ui.user.get_active_hand()
+ if(istype(I, /obj/item/card/id) && ui.user.unEquip(I))
I.forceMove(src)
modify = I
. = TRUE
if("scan")
if(scan)
- if(ishuman(usr))
+ if(ishuman(ui.user))
scan.forceMove(get_turf(src))
- if(!usr.get_active_hand())
- usr.put_in_hands(scan)
+ if(!ui.user.get_active_hand())
+ ui.user.put_in_hands(scan)
scan = null
else
scan.forceMove(get_turf(src))
scan = null
else
- var/obj/item/I = usr.get_active_hand()
+ var/obj/item/I = ui.user.get_active_hand()
if(istype(I, /obj/item/card/id))
- usr.drop_item()
+ ui.user.drop_item()
I.forceMove(src)
scan = I
. = TRUE
@@ -205,7 +205,7 @@
if(is_authenticated() && modify)
var/t1 = params["assign_target"]
if(t1 == "Custom")
- var/temp_t = sanitize(tgui_input_text(usr, "Enter a custom job assignment.","Assignment"), 45)
+ var/temp_t = sanitize(tgui_input_text(ui.user, "Enter a custom job assignment.","Assignment"), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
@@ -216,7 +216,7 @@
else
var/datum/job/jobdatum = SSjob.get_job(t1)
if(!jobdatum)
- to_chat(usr, span_warning("No log exists for this job: [t1]"))
+ to_chat(ui.user, span_warning("No log exists for this job: [t1]"))
return
access = jobdatum.get_access()
diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm
index 7ed5905f25..33403bbfc4 100644
--- a/code/game/machinery/computer/cloning.dm
+++ b/code/game/machinery/computer/cloning.dm
@@ -196,7 +196,7 @@
return data
-/obj/machinery/computer/cloning/tgui_act(action, params)
+/obj/machinery/computer/cloning/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -204,7 +204,7 @@
switch(tgui_modal_act(src, action, params))
if(TGUI_MODAL_ANSWER)
if(params["id"] == "del_rec" && active_record)
- var/obj/item/card/id/C = usr.get_active_hand()
+ var/obj/item/card/id/C = ui.user.get_active_hand()
if(!istype(C) && !istype(C, /obj/item/pda))
set_temp("ID not in hand.", "danger")
return
@@ -360,16 +360,16 @@
else
scan_mode = FALSE
if("eject")
- if(usr.incapacitated() || !scanner || loading)
+ if(ui.user.incapacitated() || !scanner || loading)
return
- scanner.eject_occupant(usr)
- scanner.add_fingerprint(usr)
+ scanner.eject_occupant(ui.user)
+ scanner.add_fingerprint(ui.user)
if("cleartemp")
temp = null
else
return FALSE
- add_fingerprint(usr)
+ add_fingerprint(ui.user)
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob, var/scan_brain = 0)
if(stat & NOPOWER)
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index 1d43173d5a..2ca39d0ebb 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -185,7 +185,7 @@
if (!can_climb(user))
return
- usr.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
+ user.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
LAZYDISTINCTADD(climbers, user)
if(!do_after(user,(issmall(user) ? climb_delay * 0.6 : climb_delay)))
@@ -196,10 +196,10 @@
LAZYREMOVE(climbers, user)
return
- usr.forceMove(climb_to(user))
+ user.forceMove(climb_to(user))
if (get_turf(user) == get_turf(src))
- usr.visible_message(span_warning("[user] climbs onto \the [src]!"))
+ user.visible_message(span_warning("[user] climbs onto \the [src]!"))
LAZYREMOVE(climbers, user)
/obj/machinery/computer/proc/climb_to(var/mob/living/user)
diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm
index 6bf5417f8d..ddb74b6ad6 100644
--- a/code/game/machinery/computer/guestpass.dm
+++ b/code/game/machinery/computer/guestpass.dm
@@ -49,7 +49,7 @@
to_chat(user, span_warning("This guest pass is already deactivated!"))
return
- var/confirm = tgui_alert(usr, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", list("Yes", "No"))
+ var/confirm = tgui_alert(user, "Do you really want to deactivate this guest pass? (you can't reactivate it)", "Confirm Deactivation", list("Yes", "No"))
if(confirm == "Yes")
//rip guest pass 3
user.visible_message(span_infoplain(span_bold("\The [user]") + "deactivates \the [src]."))
@@ -193,20 +193,20 @@
mode = params["mode"]
if("giv_name")
- var/nam = sanitizeName(tgui_input_text(usr, "Person pass is issued to", "Name", giv_name))
+ var/nam = sanitizeName(tgui_input_text(ui.user, "Person pass is issued to", "Name", giv_name))
if(nam)
giv_name = nam
if("reason")
- var/reas = sanitize(tgui_input_text(usr, "Reason why pass is issued", "Reason", reason))
+ var/reas = sanitize(tgui_input_text(ui.user, "Reason why pass is issued", "Reason", reason))
if(reas)
reason = reas
if("duration")
- var/dur = tgui_input_number(usr, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration", null, 360, 0)
+ var/dur = tgui_input_number(ui.user, "Duration (in minutes) during which pass is valid (up to 360 minutes).", "Duration", null, 360, 0)
if(dur)
if(dur > 0 && dur <= 360) //VOREStation Edit
duration = dur
else
- to_chat(usr, span_warning("Invalid duration."))
+ to_chat(ui.user, span_warning("Invalid duration."))
if("access")
var/A = text2num(params["access"])
if(A in accesses)
@@ -215,22 +215,22 @@
if(A in giver.GetAccess()) //Let's make sure the ID card actually has the access.
accesses.Add(A)
else
- to_chat(usr, span_warning("Invalid selection, please consult technical support if there are any issues."))
- log_debug("[key_name_admin(usr)] tried selecting an invalid guest pass terminal option.")
+ to_chat(ui.user, span_warning("Invalid selection, please consult technical support if there are any issues."))
+ log_debug("[key_name_admin(ui.user)] tried selecting an invalid guest pass terminal option.")
if("id")
if(giver)
- if(ishuman(usr))
- giver.loc = usr.loc
- if(!usr.get_active_hand())
- usr.put_in_hands(giver)
+ if(ishuman(ui.user))
+ giver.loc = ui.user.loc
+ if(!ui.user.get_active_hand())
+ ui.user.put_in_hands(giver)
giver = null
else
giver.loc = src.loc
giver = null
accesses.Cut()
else
- var/obj/item/I = usr.get_active_hand()
- if(istype(I, /obj/item/card/id) && usr.unEquip(I))
+ var/obj/item/I = ui.user.get_active_hand()
+ if(istype(I, /obj/item/card/id) && ui.user.unEquip(I))
I.loc = src
giver = I
@@ -238,7 +238,7 @@
var/dat = "