From 49d89c00593112d3a99d8c28e944472cdb28f772 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Tue, 12 Nov 2024 00:10:20 +0100 Subject: [PATCH] usr to user up to player effects --- .../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/components/crafting/crafting.dm | 19 +++-- code/defines/obj/weapon.dm | 10 +-- .../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 | 8 +-- 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 | 50 ++++++------- 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/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 | 6 +- 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 ++++---- .../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 +- 177 files changed, 831 insertions(+), 835 deletions(-) diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm index 87c430c5d7a..84ba70f55f4 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 4a680494f78..fd1158f408a 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 4c1a0d0ad80..70b498722f2 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 4409482f507..4d442b772a6 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 02c701c91e8..9d0b9c78f7f 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 9201cee4a16..9e6613ebf2b 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 7517cbd7efc..2084b8c901c 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 31544ac1f72..f332afee61c 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 6397be2c59e..86ee7517622 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 0e051d9067d..9f0f220ec2a 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 9923078311b..5dd984a0ff8 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 67839d7d3ae..2c1a22a825c 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 9139f96e749..d51a3695293 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 057f988dcb9..d852798dab7 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 15acd142c67..80d086a298c 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 774acba147f..518c3e03c57 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 06c93c37fb1..4b062a6b5fe 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/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index edda32de873..3f482ea72e2 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/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 75855cec648..5a7f00f4a6b 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/gamemodes/changeling/powers/mimic_voice.dm b/code/game/gamemodes/changeling/powers/mimic_voice.dm index b8a18ac6fc0..f5d65b8ec2e 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 6883220bac6..27c09411449 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 47add9a0ea6..9b5c9968a62 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 8f32c6cc5b3..1d1e90fb355 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 256e57bf183..e13944eb9a6 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 d168286ee19..7d9d97acb72 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 5a14185d7c6..180bebe532d 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 a891a03f826..cf1fc43839f 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 aff190e5e3a..522a883efee 100644 --- a/code/game/machinery/air_alarm.dm +++ b/code/game/machinery/air_alarm.dm @@ -682,10 +682,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 @@ -694,13 +694,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 && !issilicon(usr) && !istype(state, /datum/tgui_state/air_alarm_remote)) || (issilicon(usr) && aidisabled)) + if((locked && !issilicon(ui.user) && !istype(state, /datum/tgui_state/air_alarm_remote)) || (issilicon(ui.user) && aidisabled)) return var/device_id = params["id_tag"] switch(action) if("lock") - if(issilicon(usr) && !wires.is_cut(WIRE_IDSCAN)) + if(issilicon(ui.user) && !wires.is_cut(WIRE_IDSCAN)) locked = !locked . = TRUE if( "power", @@ -713,42 +713,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)) @@ -817,7 +817,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 5c5db6ebb59..1c538eaf01c 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 fa0900ac461..c3a323a896c 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -315,7 +315,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 @@ -331,7 +331,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] @@ -348,7 +348,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) @@ -359,14 +359,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 @@ -374,14 +374,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/New() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 752f9305acb..c1b372e5ad4 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 d9fe85fcbd9..b37f2e19eaf 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -135,7 +135,7 @@ 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 @@ -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 diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index 7a02d6115a3..cc3e3fc7556 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -150,7 +150,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 e45c329f37a..6e59c568440 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 67824ecb3f5..6feae4eff23 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 6b9298cf399..90c64d1031e 100644 --- a/code/game/machinery/clawmachine.dm +++ b/code/game/machinery/clawmachine.dm @@ -158,7 +158,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 ed07a6158bd..4f4722c559f 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 2808be538a9..aa3902c8467 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 44600b9c69b..70ec7f8717c 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 8afe56476bd..f6a50c32548 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 a566a6be1a3..77f9ce12c00 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 9efcb481305..9175cb391ad 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 1d43173d5af..2ca39d0ebb7 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 6bf5417f8dd..ddb74b6ad69 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 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 = "

Activity log of guest pass terminal #[uid]


" for (var/entry in internal_log) dat += "[entry]

" - //to_chat(usr, "Printing the log, standby...") + //to_chat(ui.user, "Printing the log, standby...") //sleep(50) var/obj/item/paper/P = new/obj/item/paper( loc ) P.name = "activity log" @@ -263,7 +263,7 @@ pass.reason = reason pass.name = "guest pass #[number]" else - to_chat(usr, span_warning("Cannot issue pass without issuing ID.")) + to_chat(ui.user, span_warning("Cannot issue pass without issuing ID.")) - add_fingerprint(usr) + add_fingerprint(ui.user) return TRUE diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 00339ac2737..671671c497f 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -202,7 +202,7 @@ data["modal"] = tgui_modal_data(src) return data -/obj/machinery/computer/med_data/tgui_act(action, params) +/obj/machinery/computer/med_data/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -221,13 +221,13 @@ if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) 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 if("login") @@ -236,12 +236,12 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" if(authenticated) active1 = null @@ -259,8 +259,8 @@ if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null screen = null diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 10b4187e6cb..fb49f1ca0f9 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -179,7 +179,7 @@ custommessage = "This is a test, please ignore." customjob = "Admin" -/obj/machinery/computer/message_monitor/tgui_act(action, params) +/obj/machinery/computer/message_monitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -202,7 +202,7 @@ //Find a server if("find") if(message_servers && message_servers.len > 1) - linkedServer = tgui_input_list(usr,"Please select a server.", "Select a server.", message_servers) + linkedServer = tgui_input_list(ui.user,"Please select a server.", "Select a server.", message_servers) set_temp("NOTICE: Server selected.", "alert") else if(message_servers && message_servers.len > 0) linkedServer = message_servers[1] @@ -211,13 +211,13 @@ temp = noserver //Hack the Console to get the password if("hack") - if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr)) + if((istype(ui.user, /mob/living/silicon/ai) || istype(ui.user, /mob/living/silicon/robot)) && (ui.user.mind.special_role && ui.user.mind.original == ui.user)) hacking = 1 update_icon() //Time it takes to bruteforce is dependant on the password length. spawn(100*length(linkedServer.decryptkey)) - if(src && linkedServer && usr) - BruteForce(usr) + if(src && linkedServer && ui.user) + BruteForce(ui.user) if(!auth) return @@ -243,10 +243,10 @@ . = TRUE //Change the password - KEY REQUIRED if("pass") - var/dkey = trim(tgui_input_text(usr, "Please enter the current decryption key.")) + var/dkey = trim(tgui_input_text(ui.user, "Please enter the current decryption key.")) if(dkey && dkey != "") if(linkedServer.decryptkey == dkey) - var/newkey = trim(tgui_input_text(usr,"Please enter the new key (3 - 16 characters max):",null,null,16)) + var/newkey = trim(tgui_input_text(ui.user,"Please enter the new key (3 - 16 characters max):",null,null,16)) if(length(newkey) <= 3) set_temp("NOTICE: Decryption key too short!", "average") else if(length(newkey) > 16) @@ -325,7 +325,7 @@ . = TRUE if("addtoken") - linkedServer.spamfilter += tgui_input_text(usr,"Enter text you want to be filtered out","Token creation") + linkedServer.spamfilter += tgui_input_text(ui.user,"Enter text you want to be filtered out","Token creation") . = TRUE if("deltoken") diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 7b2dffc6ea3..9bc753b59e9 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -136,7 +136,7 @@ dat += "
\nToggle Outer Door
" dat += "

Close" user << browse(dat, "window=computer;size=400x500") - add_fingerprint(usr) + add_fingerprint(user) onclose(user, "computer") return diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 8e73278ce31..043bfc8e5d5 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -66,7 +66,7 @@ return list("locked" = !screen, "chemImplants" = chemImplants, "trackImplants" = trackImplants) -/obj/machinery/computer/prisoner/tgui_act(action, list/params) +/obj/machinery/computer/prisoner/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE switch(action) @@ -76,17 +76,17 @@ I.activate(clamp(params["val"], 0, 10)) . = TRUE if("lock") - if(allowed(usr)) + if(allowed(ui.user)) screen = !screen else - to_chat(usr, "Unauthorized Access.") + to_chat(ui.user, "Unauthorized Access.") . = TRUE if("warn") - var/warning = sanitize(tgui_input_text(usr, "Message:", "Enter your message here!", "")) + var/warning = sanitize(tgui_input_text(ui.user, "Message:", "Enter your message here!", "")) if(!warning) return var/obj/item/implant/I = locate(params["imp"]) if(I && I.imp_in) to_chat(I.imp_in, span_notice("You hear a voice in your head saying: '[warning]'")) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index ca5ef050255..9f16d3d057b 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -151,30 +151,30 @@ data["show_detonate_all"] = (data["auth"] && length(data["cyborgs"]) > 0 && ishuman(user)) return data -/obj/machinery/computer/robotics/tgui_act(action, params) +/obj/machinery/computer/robotics/tgui_act(action, params, datum/tgui/ui) if(..()) return . = FALSE - if(!is_authenticated(usr)) - to_chat(usr, span_warning("Access denied.")) + if(!is_authenticated(ui.user)) + to_chat(ui.user, span_warning("Access denied.")) return switch(action) if("arm") // Arms the emergency self-destruct system - if(issilicon(usr)) - to_chat(usr, span_danger("Access Denied (silicon detected)")) + if(issilicon(ui.user)) + to_chat(ui.user, span_danger("Access Denied (silicon detected)")) return safety = !safety - to_chat(usr, span_notice("You [safety ? "disarm" : "arm"] the emergency self destruct.")) + to_chat(ui.user, span_notice("You [safety ? "disarm" : "arm"] the emergency self destruct.")) . = TRUE if("nuke") // Destroys all accessible cyborgs if safety is disabled - if(issilicon(usr)) - to_chat(usr, span_danger("Access Denied (silicon detected)")) + if(issilicon(ui.user)) + to_chat(ui.user, span_danger("Access Denied (silicon detected)")) return if(safety) - to_chat(usr, span_danger("Self-destruct aborted - safety active")) + to_chat(ui.user, span_danger("Self-destruct aborted - safety active")) return - message_admins(span_notice("[key_name_admin(usr)] detonated all cyborgs!")) - log_game(span_notice("[key_name(usr)] detonated all cyborgs!")) + message_admins(span_notice("[key_name_admin(ui.user)] detonated all cyborgs!")) + log_game(span_notice("[key_name(ui.user)] detonated all cyborgs!")) for(var/mob/living/silicon/robot/R in mob_list) if(istype(R, /mob/living/silicon/robot/drone)) continue @@ -188,7 +188,7 @@ . = TRUE if("killbot") // destroys one specific cyborg var/mob/living/silicon/robot/R = locate(params["ref"]) - if(!can_control(usr, R, TRUE)) + if(!can_control(ui.user, R, TRUE)) return if(R.mind && R.mind.special_role && R.emagged) to_chat(R, span_userdanger("Extreme danger! Termination codes detected. Scrambling security codes and automatic AI unlink triggered.")) @@ -196,22 +196,22 @@ . = TRUE return var/turf/T = get_turf(R) - message_admins(span_notice("[key_name_admin(usr)] detonated [key_name_admin(R)] ([ADMIN_COORDJMP(T)])!")) - log_game(span_notice("[key_name(usr)] detonated [key_name(R)]!")) + message_admins(span_notice("[key_name_admin(ui.user)] detonated [key_name_admin(R)] ([ADMIN_COORDJMP(T)])!")) + log_game(span_notice("[key_name(ui.user)] detonated [key_name(R)]!")) to_chat(R, span_danger("Self-destruct command received.")) if(R.connected_ai) to_chat(R.connected_ai, "

[span_alert("ALERT - Cyborg detonation detected: [R.name]")]
") R.self_destruct() . = TRUE if("stopbot") // lock or unlock the borg - if(isrobot(usr)) - to_chat(usr, span_danger("Access Denied.")) + if(isrobot(ui.user)) + to_chat(ui.user, span_danger("Access Denied.")) return var/mob/living/silicon/robot/R = locate(params["ref"]) - if(!can_control(usr, R, TRUE)) + if(!can_control(ui.user, R, TRUE)) return - message_admins(span_notice("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!")) - log_game("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!") + message_admins(span_notice("[ADMIN_LOOKUPFLW(ui.user)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!")) + log_game("[key_name(ui.user)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!") R.SetLockdown(!R.lockcharge) to_chat(R, "[!R.lockcharge ? span_notice("Your lockdown has been lifted!") : span_alert("You have been locked down!")]") if(R.connected_ai) @@ -219,13 +219,13 @@ . = TRUE if("hackbot") // AIs hacking/emagging a borg var/mob/living/silicon/robot/R = locate(params["ref"]) - if(!can_hack(usr, R)) + if(!can_hack(ui.user, R)) return - var/choice = tgui_alert(usr, "Really hack [R.name]? This cannot be undone.", "Hack?", list("Yes", "No")) + var/choice = tgui_alert(ui.user, "Really hack [R.name]? This cannot be undone.", "Hack?", list("Yes", "No")) if(choice != "Yes") return - log_game("[key_name(usr)] emagged [key_name(R)] using robotic console!") - message_admins(span_notice("[key_name_admin(usr)] emagged [key_name_admin(R)] using robotic console!")) + log_game("[key_name(ui.user)] emagged [key_name(R)] using robotic console!") + message_admins(span_notice("[key_name_admin(ui.user)] emagged [key_name_admin(R)] using robotic console!")) R.emagged = TRUE to_chat(R, span_notice("Failsafe protocols overridden. New tools available.")) . = TRUE diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 1be57d146ef..f3155d98d19 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -185,7 +185,7 @@ data["modal"] = tgui_modal_data(src) return data -/obj/machinery/computer/secure_data/tgui_act(action, params) +/obj/machinery/computer/secure_data/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -204,13 +204,13 @@ if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) 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 if("login") @@ -219,12 +219,12 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" if(authenticated) active1 = null @@ -242,8 +242,8 @@ if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null screen = null @@ -338,12 +338,12 @@ SStgui.update_uis(src) addtimer(CALLBACK(src, PROC_REF(print_finish)), 5 SECONDS) if("photo_front") - var/icon/photo = get_photo(usr) + var/icon/photo = get_photo(ui.user) if(photo && active1) active1.fields["photo_front"] = photo active1.fields["photo-south"] = "'data:image/png;base64,[icon2base64(photo)]'" if("photo_side") - var/icon/photo = get_photo(usr) + var/icon/photo = get_photo(ui.user) if(photo && active1) active1.fields["photo_side"] = photo active1.fields["photo-west"] = "'data:image/png;base64,[icon2base64(photo)]'" @@ -474,7 +474,7 @@ var/obj/item/photo/photo = user.get_active_hand() return photo.img if(istype(user, /mob/living/silicon)) - var/mob/living/silicon/tempAI = usr + var/mob/living/silicon/tempAI = user var/obj/item/photo/selection = tempAI.GetPicture() if (selection) return selection.img diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 57524d95fd2..36a498da35f 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -143,11 +143,11 @@ data["modal"] = tgui_modal_data(src) return data -/obj/machinery/computer/skills/tgui_act(action, params) +/obj/machinery/computer/skills/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) if(!data_core.general.Find(active1)) active1 = null @@ -160,13 +160,13 @@ if("scan") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) 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 if("cleartemp") @@ -177,12 +177,12 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment - else if(login_type == LOGIN_TYPE_AI && isAI(usr)) - authenticated = usr.name + else if(login_type == LOGIN_TYPE_AI && isAI(ui.user)) + authenticated = ui.user.name rank = JOB_AI - else if(login_type == LOGIN_TYPE_ROBOT && isrobot(usr)) - authenticated = usr.name - var/mob/living/silicon/robot/R = usr + else if(login_type == LOGIN_TYPE_ROBOT && isrobot(ui.user)) + authenticated = ui.user.name + var/mob/living/silicon/robot/R = ui.user rank = "[R.modtype] [R.braintype]" if(authenticated) active1 = null @@ -199,8 +199,8 @@ if("logout") if(scan) scan.forceMove(loc) - if(ishuman(usr) && !usr.get_active_hand()) - usr.put_in_hands(scan) + if(ishuman(ui.user) && !ui.user.get_active_hand()) + ui.user.put_in_hands(scan) scan = null authenticated = null screen = null diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index dc285601caf..8117cf4499a 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -179,7 +179,7 @@ data["categories"] = all_supply_groups return data -/obj/machinery/computer/supplycomp/tgui_act(action, params) +/obj/machinery/computer/supplycomp/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(!SSsupply) @@ -221,29 +221,29 @@ visible_message(span_warning("[src]'s monitor flashes, \"[reqtime - world.time] seconds remaining until another requisition form may be printed.\"")) return FALSE - var/amount = clamp(tgui_input_number(usr, "How many crates? (0 to 20)", null, null, 20, 0), 0, 20) + var/amount = clamp(tgui_input_number(ui.user, "How many crates? (0 to 20)", null, null, 20, 0), 0, 20) if(!amount) return FALSE var/timeout = world.time + 600 - var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?","")) + var/reason = sanitize(tgui_input_text(ui.user, "Reason:","Why do you require this item?","")) if(world.time > timeout) - to_chat(usr, span_warning("Error. Request timed out.")) + to_chat(ui.user, span_warning("Error. Request timed out.")) return FALSE if(!reason) return FALSE for(var/i in 1 to amount) - SSsupply.create_order(S, usr, reason) + SSsupply.create_order(S, ui.user, reason) var/idname = "*None Provided*" var/idrank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user idname = H.get_authentification_name() idrank = H.get_assignment() - else if(issilicon(usr)) - idname = usr.real_name + else if(issilicon(ui.user)) + idname = ui.user.real_name idrank = "Stationbound synthetic" var/obj/item/paper/reqform = new /obj/item/paper(loc) @@ -280,23 +280,23 @@ return FALSE var/timeout = world.time + 600 - var/reason = sanitize(tgui_input_text(usr, "Reason:","Why do you require this item?","")) + var/reason = sanitize(tgui_input_text(ui.user, "Reason:","Why do you require this item?","")) if(world.time > timeout) - to_chat(usr, span_warning("Error. Request timed out.")) + to_chat(ui.user, span_warning("Error. Request timed out.")) return FALSE if(!reason) return FALSE - SSsupply.create_order(S, usr, reason) + SSsupply.create_order(S, ui.user, reason) var/idname = "*None Provided*" var/idrank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr + if(ishuman(ui.user)) + var/mob/living/carbon/human/H = ui.user idname = H.get_authentification_name() idrank = H.get_assignment() - else if(issilicon(usr)) - idname = usr.real_name + else if(issilicon(ui.user)) + idname = ui.user.real_name idrank = "Stationbound synthetic" var/obj/item/paper/reqform = new /obj/item/paper(loc) @@ -323,7 +323,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"])) + var/new_val = sanitize(tgui_input_text(ui.user, params["edit"], "Enter the new value for this field:", params["default"])) if(!new_val) return FALSE @@ -362,7 +362,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.approve_order(O, usr) + SSsupply.approve_order(O, ui.user) . = TRUE if("deny_order") var/datum/supply_order/O = locate(params["ref"]) @@ -370,7 +370,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.deny_order(O, usr) + SSsupply.deny_order(O, ui.user) . = TRUE if("delete_order") var/datum/supply_order/O = locate(params["ref"]) @@ -378,12 +378,12 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.delete_order(O, usr) + SSsupply.delete_order(O, ui.user) . = TRUE if("clear_all_requests") if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.deny_all_pending(usr) + SSsupply.deny_all_pending(ui.user) . = TRUE // Exports if("export_edit_field") @@ -394,11 +394,11 @@ if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE var/list/L = E.contents[params["index"]] - var/field = tgui_alert(usr, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value")) + var/field = tgui_alert(ui.user, "Select which field to edit", "Field Choice", list("Name", "Quantity", "Value")) if(!field) return FALSE - var/new_val = sanitize(tgui_input_text(usr, field, "Enter the new value for this field:", L[lowertext(field)])) + var/new_val = sanitize(tgui_input_text(ui.user, field, "Enter the new value for this field:", L[lowertext(field)])) if(!new_val) return @@ -432,7 +432,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.add_export_item(E, usr) + SSsupply.add_export_item(E, ui.user) . = TRUE if("export_edit") var/datum/exported_crate/E = locate(params["ref"]) @@ -441,7 +441,7 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - var/new_val = sanitize(tgui_input_text(usr, params["edit"], "Enter the new value for this field:", params["default"])) + var/new_val = sanitize(tgui_input_text(ui.user, params["edit"], "Enter the new value for this field:", params["default"])) if(!new_val) return @@ -461,20 +461,20 @@ return FALSE if(!(authorization & SUP_ACCEPT_ORDERS)) return FALSE - SSsupply.delete_export(E, usr) + SSsupply.delete_export(E, ui.user) . = TRUE if("send_shuttle") switch(params["mode"]) if("send_away") if (shuttle.forbidden_atoms_check()) - to_chat(usr, span_warning("For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.")) + to_chat(ui.user, span_warning("For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.")) else shuttle.launch(src) - to_chat(usr, span_notice("Initiating launch sequence.")) + to_chat(ui.user, span_notice("Initiating launch sequence.")) if("send_to_station") shuttle.launch(src) - to_chat(usr, span_notice("The supply shuttle has been called and will arrive in approximately [round(SSsupply.movetime/600,1)] minutes.")) + to_chat(ui.user, span_notice("The supply shuttle has been called and will arrive in approximately [round(SSsupply.movetime/600,1)] minutes.")) if("cancel_shuttle") shuttle.cancel_launch(src) @@ -483,7 +483,7 @@ shuttle.force_launch(src) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/computer/supplycomp/proc/post_signal(var/command) var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435) diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 410ce817bd7..4e5eba6d71b 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -112,33 +112,33 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("id") if(card) - usr.put_in_hands(card) + ui.user.put_in_hands(card) card = 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) card = I update_icon() return TRUE if("switch-to-onduty-rank") - if(checkFace()) - if(checkCardCooldown()) - makeOnDuty(params["switch-to-onduty-rank"], params["switch-to-onduty-assignment"]) - usr.put_in_hands(card) + if(checkFace(ui.user)) + if(checkCardCooldown(ui.user)) + makeOnDuty(params["switch-to-onduty-rank"], params["switch-to-onduty-assignment"], ui.user) + ui.user.put_in_hands(card) card = null update_icon() return TRUE if("switch-to-offduty") - if(checkFace()) - if(checkCardCooldown()) - makeOffDuty() - usr.put_in_hands(card) + if(checkFace(ui.user)) + if(checkCardCooldown(ui.user)) + makeOffDuty(ui.user) + ui.user.put_in_hands(card) card = null update_icon() return TRUE @@ -165,10 +165,10 @@ && !job.disallow_jobhop \ && job.timeoff_factor > 0 -/obj/machinery/computer/timeclock/proc/makeOnDuty(var/newrank, var/newassignment) +/obj/machinery/computer/timeclock/proc/makeOnDuty(var/newrank, var/newassignment, var/mob/user) var/datum/job/oldjob = job_master.GetJob(card.rank) var/datum/job/newjob = job_master.GetJob(newrank) - if(!oldjob || !isOpenOnDutyJob(usr, oldjob.pto_type, newjob)) + if(!oldjob || !isOpenOnDutyJob(user, oldjob.pto_type, newjob)) return if(newassignment != newjob.title && !(newassignment in newjob.alt_titles)) return @@ -181,13 +181,13 @@ card.last_job_switch = world.time callHook("reassign_employee", list(card)) newjob.current_positions++ - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user H.mind.assigned_role = card.rank H.mind.role_alt_title = card.assignment announce.autosay("[card.registered_name] has moved On-Duty as [card.assignment].", "Employee Oversight", channel, zlevels = using_map.get_map_levels(get_z(src))) return -/obj/machinery/computer/timeclock/proc/makeOffDuty() +/obj/machinery/computer/timeclock/proc/makeOffDuty(var/mob/user) var/datum/job/foundjob = job_master.GetJob(card.rank) if(!foundjob) return @@ -206,35 +206,35 @@ data_core.manifest_modify(card.registered_name, card.assignment, card.rank) card.last_job_switch = world.time callHook("reassign_employee", list(card)) - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user H.mind.assigned_role = ptojob.title H.mind.role_alt_title = ptojob.title foundjob.current_positions-- announce.autosay("[card.registered_name], [oldtitle], has moved Off-Duty.", "Employee Oversight", channel, zlevels = using_map.get_map_levels(get_z(src))) return -/obj/machinery/computer/timeclock/proc/checkCardCooldown() +/obj/machinery/computer/timeclock/proc/checkCardCooldown(var/mob/user) if(!card) return FALSE var/time_left = 10 MINUTES - (world.time - card.last_job_switch) if(time_left > 0) - to_chat(usr, "You need to wait another [round((time_left/10)/60, 1)] minute\s before you can switch.") + to_chat(user, "You need to wait another [round((time_left/10)/60, 1)] minute\s before you can switch.") return FALSE return TRUE -/obj/machinery/computer/timeclock/proc/checkFace() +/obj/machinery/computer/timeclock/proc/checkFace(var/mob/user) if(!card) - to_chat(usr, span_notice("No ID is inserted.")) + to_chat(user, span_notice("No ID is inserted.")) return FALSE - var/mob/living/carbon/human/H = usr + var/mob/living/carbon/human/H = user if(!(istype(H))) - to_chat(usr, span_warning("Invalid user detected. Access denied.")) + to_chat(user, span_warning("Invalid user detected. Access denied.")) return FALSE else if((H.wear_mask && (H.wear_mask.flags_inv & HIDEFACE)) || (H.head && (H.head.flags_inv & HIDEFACE))) //Face hiding bad - to_chat(usr, span_warning("Facial recognition scan failed due to physical obstructions. Access denied.")) + to_chat(user, span_warning("Facial recognition scan failed due to physical obstructions. Access denied.")) return FALSE else if(H.get_face_name() == "Unknown" || !(H.real_name == card.registered_name)) - to_chat(usr, span_warning("Facial recognition scan failed. Access denied.")) + to_chat(user, span_warning("Facial recognition scan failed. Access denied.")) return FALSE else return TRUE diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 70716c5ecfd..79603bfaa72 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -90,7 +90,7 @@ return if(panel_open) - to_chat(usr, span_boldnotice("Close the maintenance panel first.")) + to_chat(user, span_boldnotice("Close the maintenance panel first.")) return tgui_interact(user) @@ -139,8 +139,8 @@ return data -/obj/machinery/atmospherics/unary/cryo_cell/tgui_act(action, params) - if(..() || usr == occupant) +/obj/machinery/atmospherics/unary/cryo_cell/tgui_act(action, params, datum/tgui/ui) + if(..() || ui.user == occupant) return TRUE . = TRUE @@ -157,13 +157,13 @@ beaker = null update_icon() if("ejectOccupant") - if(!occupant || isslime(usr) || ispAI(usr)) + if(!occupant || isslime(ui.user) || ispAI(ui.user)) return 0 // don't update UIs attached to this object go_out() else return FALSE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/atmospherics/unary/cryo_cell/attackby(var/obj/item/G as obj, var/mob/user as mob) if(istype(G, /obj/item/reagent_containers/glass)) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index d3ed23c511c..e8479049e58 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -114,7 +114,7 @@ if(..()) return - add_fingerprint(usr) + add_fingerprint(ui.user) return FALSE // VOREStation Edit - prevent topic exploits /* VOREStation Edit - Unreachable due to above @@ -124,12 +124,12 @@ return if(!LAZYLEN(frozen_items)) - to_chat(usr, span_notice("There is nothing to recover from storage.")) + to_chat(ui.user, span_notice("There is nothing to recover from storage.")) return var/obj/item/I = locate(params["ref"]) in frozen_items if(!I) - to_chat(usr, span_notice("\The [I] is no longer in storage.")) + to_chat(ui.user, span_notice("\The [I] is no longer in storage.")) return visible_message(span_notice("The console beeps happily as it disgorges [I].")) @@ -141,7 +141,7 @@ return if(!LAZYLEN(frozen_items)) - to_chat(usr, span_notice("There is nothing to recover from storage.")) + to_chat(ui.user, span_notice("There is nothing to recover from storage.")) return visible_message(span_notice("The console beeps happily as it disgorges the desired objects.")) @@ -709,7 +709,7 @@ if(willing) if(M == user) - visible_message("[usr] [on_enter_visible_message] [src].", 3) + visible_message("[user] [on_enter_visible_message] [src].", 3) else visible_message("\The [user] starts putting [M] into \the [src].", 3) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 6c9538e1f19..a5d9ecc4ea1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -660,7 +660,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/bumpopen(mob/living/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite - if(!issilicon(usr)) + if(!issilicon(user)) if(src.isElectrified()) if(!src.justzap) if(src.shock(user, 100)) @@ -984,7 +984,7 @@ About the new airlock wires panel: return ..() /obj/machinery/door/airlock/attack_hand(mob/user as mob) - if(!istype(usr, /mob/living/silicon)) + if(!istype(user, /mob/living/silicon)) if(src.isElectrified()) if(src.shock(user, 100)) return @@ -1046,10 +1046,10 @@ About the new airlock wires panel: src.hold_open = user src.attack_hand(user) -/obj/machinery/door/airlock/tgui_act(action, params) +/obj/machinery/door/airlock/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(!user_allowed(usr)) + if(!user_allowed(ui.user)) return TRUE switch(action) @@ -1058,14 +1058,14 @@ About the new airlock wires panel: loseMainPower() update_icon() else - to_chat(usr, span_warning("Main power is already offline.")) + to_chat(ui.user, span_warning("Main power is already offline.")) . = TRUE if("disrupt-backup") if(!backup_power_lost_until) loseBackupPower() update_icon() else - to_chat(usr, span_warning("Backup power is already offline.")) + to_chat(ui.user, span_warning("Backup power is already offline.")) . = TRUE if("shock-restore") electrify(0, 1) @@ -1080,14 +1080,14 @@ About the new airlock wires panel: set_idscan(aiDisabledIdScanner, 1) . = TRUE // if("emergency-toggle") - // toggle_emergency(usr) + // toggle_emergency(ui.user) // . = TRUE if("bolt-toggle") - toggle_bolt(usr) + toggle_bolt(ui.user) . = TRUE if("light-toggle") if(wires.is_cut(WIRE_BOLT_LIGHT)) - to_chat(usr, "The bolt lights wire is cut - The door bolt lights are permanently disabled.") + to_chat(ui.user, "The bolt lights wire is cut - The door bolt lights are permanently disabled.") return lights = !lights update_icon() @@ -1097,12 +1097,12 @@ About the new airlock wires panel: . = TRUE if("speed-toggle") if(wires.is_cut(WIRE_SPEED)) - to_chat(usr, "The timing wire is cut - Cannot alter timing.") + to_chat(ui.user, "The timing wire is cut - Cannot alter timing.") return normalspeed = !normalspeed . = TRUE if("open-close") - user_toggle_open(usr) + user_toggle_open(ui.user) . = TRUE update_icon() @@ -1158,7 +1158,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/attackby(obj/item/C, mob/user as mob) //to_world("airlock attackby src [src] obj [C] mob [user]") - if(!istype(usr, /mob/living/silicon)) + if(!istype(user, /mob/living/silicon)) if(src.isElectrified()) if(src.shock(user, 75)) return @@ -1189,7 +1189,7 @@ About the new airlock wires panel: else if(C.has_tool_quality(TOOL_SCREWDRIVER)) if (src.p_open) if (stat & BROKEN) - to_chat(usr, span_warning("The panel is broken and cannot be closed.")) + to_chat(user, span_warning("The panel is broken and cannot be closed.")) else src.p_open = FALSE playsound(src, C.usesound, 50, 1) diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 5d8fd2c688f..5301aa56613 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -261,7 +261,7 @@ ..() /obj/machinery/access_button/attack_hand(mob/user) - add_fingerprint(usr) + add_fingerprint(user) if(!allowed(user)) to_chat(user, span_warning("Access Denied")) diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 355f561c1f9..da9f612f766 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -193,7 +193,7 @@ to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets.")) return to_chat(user, span_notice("You begin repairing [src]...")) - if(do_after(usr, 30)) + if(do_after(user, 30)) if(P.use(amt)) to_chat(user, span_notice("You have repaired \The [src]")) src.repair() diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 84a8a1e2e01..9c95ca1ff25 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -173,13 +173,13 @@ break return data -/obj/machinery/door_timer/tgui_act(action, params) +/obj/machinery/door_timer/tgui_act(action, params, datum/tgui/ui) if(..()) return . = TRUE - if(!allowed(usr)) - to_chat(usr, span_warning("Access denied.")) + if(!allowed(ui.user)) + to_chat(ui.user, span_warning("Access denied.")) return FALSE switch(action) diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 4aeb8ba70b4..f534ccd832a 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -30,14 +30,14 @@ . = ..() // stack_trace("WARNING: Embedded controller [src] ([type]) had Topic() called unexpectedly. Please report this.") // statpanel means that topic can always be called for clicking -/obj/machinery/embedded_controller/tgui_act(action, params) +/obj/machinery/embedded_controller/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(LAZYLEN(valid_actions)) if(action in valid_actions) program.receive_user_command(action) - if(usr) - add_fingerprint(usr) + if(ui.user) + add_fingerprint(ui.user) /obj/machinery/embedded_controller/process() if(program) diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index 9d26ad77dc4..902b7c96501 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -124,7 +124,7 @@ // Proc: tgui_act() // Parameters: 2 (standard tgui_act arguments) // Description: Responds to button presses on the TGUI interface. -/obj/machinery/exonet_node/tgui_act(action, params) +/obj/machinery/exonet_node/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -134,7 +134,7 @@ toggle = !toggle update_power() if(!toggle) - var/msg = "[usr.client.key] ([usr]) has turned [src] off, at [x],[y],[z]." + var/msg = "[ui.user.client.key] ([ui.user]) has turned [src] off, at [x],[y],[z]." message_admins(msg) log_game(msg) @@ -146,7 +146,7 @@ . = TRUE allow_external_communicators = !allow_external_communicators if(!allow_external_communicators) - var/msg = "[usr.client.key] ([usr]) has turned [src]'s communicator port off, at [x],[y],[z]." + var/msg = "[ui.user.client.key] ([ui.user]) has turned [src]'s communicator port off, at [x],[y],[z]." message_admins(msg) log_game(msg) @@ -154,12 +154,12 @@ . = TRUE allow_external_newscasters = !allow_external_newscasters if(!allow_external_newscasters) - var/msg = "[usr.client.key] ([usr]) has turned [src]'s newscaster port off, at [x],[y],[z]." + var/msg = "[ui.user.client.key] ([ui.user]) has turned [src]'s newscaster port off, at [x],[y],[z]." message_admins(msg) log_game(msg) update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) // Proc: get_exonet_node() // Parameters: None diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index bfd592e4675..8534b2d4d1b 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -35,10 +35,10 @@ /obj/machinery/floorlayer/attackby(var/obj/item/W as obj, var/mob/user as mob) if(W.has_tool_quality(TOOL_WRENCH)) - var/m = tgui_input_list(usr, "Choose work mode", "Mode", mode) + var/m = tgui_input_list(user, "Choose work mode", "Mode", mode) mode[m] = !mode[m] var/O = mode[m] - user.visible_message(span_notice("[usr] has set \the [src] [m] mode [!O?"off":"on"]."), span_notice("You set \the [src] [m] mode [!O?"off":"on"].")) + user.visible_message(span_notice("[user] has set \the [src] [m] mode [!O?"off":"on"]."), span_notice("You set \the [src] [m] mode [!O?"off":"on"].")) return if(istype(W, /obj/item/stack/tile)) @@ -51,7 +51,7 @@ if(!length(contents)) to_chat(user, span_notice("\The [src] is empty.")) else - var/obj/item/stack/tile/E = tgui_input_list(usr, "Choose remove tile type.", "Tiles", contents) + var/obj/item/stack/tile/E = tgui_input_list(user, "Choose remove tile type.", "Tiles", contents) if(E) to_chat(user, span_notice("You remove the [E] from \the [src].")) E.loc = src.loc @@ -59,7 +59,7 @@ return if(W.has_tool_quality(TOOL_SCREWDRIVER)) - T = tgui_input_list(usr, "Choose tile type.", "Tiles", contents) + T = tgui_input_list(user, "Choose tile type.", "Tiles", contents) return ..() diff --git a/code/game/machinery/gear_dispenser.dm b/code/game/machinery/gear_dispenser.dm index 9fd11d81c0f..f26860c9248 100644 --- a/code/game/machinery/gear_dispenser.dm +++ b/code/game/machinery/gear_dispenser.dm @@ -186,7 +186,7 @@ var/list/dispenser_presets = list() dispenser_flags &= ~GD_BUSY return - var/choice = tgui_input_list(usr, "Select equipment to dispense.", "Equipment Dispenser", gear_list) + var/choice = tgui_input_list(user, "Select equipment to dispense.", "Equipment Dispenser", gear_list) if(!choice) dispenser_flags &= ~GD_BUSY diff --git a/code/game/machinery/holoposter.dm b/code/game/machinery/holoposter.dm index 9b32fbb3716..4f76a3a66d6 100644 --- a/code/game/machinery/holoposter.dm +++ b/code/game/machinery/holoposter.dm @@ -85,7 +85,7 @@ GLOBAL_LIST_EMPTY(holoposters) return if (W.has_tool_quality(TOOL_MULTITOOL)) playsound(src, 'sound/items/penclick.ogg', 60, 1) - icon_state = tgui_input_list(usr, "Available Posters", "Holographic Poster", postertypes + "random") + icon_state = tgui_input_list(user, "Available Posters", "Holographic Poster", postertypes + "random") if(!Adjacent(user)) return if(icon_state == "random") diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index b290528f877..d5abde1e1fe 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -152,7 +152,7 @@ /obj/machinery/media/jukebox/interact(mob/user) if(inoperable()) - to_chat(usr, "\The [src] doesn't appear to function.") + to_chat(user, "\The [src] doesn't appear to function.") return tgui_interact(user) @@ -235,17 +235,17 @@ spawn(15) explode() else if(current_track == null) - to_chat(usr, "No track selected.") + to_chat(ui.user, "No track selected.") else StartPlaying() return TRUE if("add_new_track") - SSmedia_tracks.add_track(usr, params["url"], params["title"], text2num(params["duration"]) * 10, params["artist"], params["genre"], text2num(params["secret"]), text2num(params["lobby"])) + SSmedia_tracks.add_track(ui.user, params["url"], params["title"], text2num(params["duration"]) * 10, params["artist"], params["genre"], text2num(params["secret"]), text2num(params["lobby"])) if("remove_new_track") var/datum/track/track_to_remove = locate(params["ref"]) in getTracksList() if(track_to_remove == current_track && playing) StopPlaying() - SSmedia_tracks.remove_track(usr, track_to_remove) + SSmedia_tracks.remove_track(ui.user, track_to_remove) /obj/machinery/media/jukebox/attack_ai(mob/user as mob) return src.attack_hand(user) diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index 8ee5e8910d3..a344167c4a7 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -28,9 +28,9 @@ 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(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 id = input return diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 17a1837e333..07dbe9a32e4 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -416,7 +416,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if(FC.channel_name == channel_name) check = 1 break - var/our_user = tgui_user_name(usr) + var/our_user = tgui_user_name(ui.user) if(channel_name == "" || channel_name == "\[REDACTED\]") set_temp("Error: Could not submit feed channel to network: Invalid Channel Name.", "danger", FALSE) return TRUE @@ -430,7 +430,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_temp("Error: Could not submit feed channel to network: A feed channel already exists under your name.", "danger", FALSE) return TRUE - var/choice = tgui_alert(usr, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) + var/choice = tgui_alert(ui.user, "Please confirm Feed channel creation","Network Channel Handler",list("Confirm","Cancel")) if(choice == "Confirm") news_network.CreateFeedChannel(channel_name, our_user, c_locked) set_temp("Feed channel [channel_name] created successfully.", "success", FALSE) @@ -442,25 +442,25 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) for(var/datum/feed_channel/F in news_network.network_channels) if((!F.locked || F.author == scanned_user) && !F.censored) available_channels += F.channel_name - var/new_channel_name = tgui_input_list(usr, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) + var/new_channel_name = tgui_input_list(ui.user, "Choose receiving Feed Channel", "Network Channel Handler", available_channels) if(new_channel_name) channel_name = new_channel_name return TRUE if("set_new_message") - msg = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", multiline = TRUE, prevent_enter = TRUE)) + msg = sanitize(tgui_input_text(ui.user, "Write your Feed story", "Network Channel Handler", multiline = TRUE, prevent_enter = TRUE)) return TRUE if("set_new_title") - title = sanitize(tgui_input_text(usr, "Enter your Feed title", "Network Channel Handler")) + title = sanitize(tgui_input_text(ui.user, "Enter your Feed title", "Network Channel Handler")) return TRUE if("set_attachment") - AttachPhoto(usr) + AttachPhoto(ui.user) return TRUE if("submit_new_message") - var/our_user = tgui_user_name(usr) + var/our_user = tgui_user_name(ui.user) if(msg == "" || msg == "\[REDACTED\]") set_temp("Error: Could not submit feed message to network: Invalid Message.", "danger", FALSE) return TRUE @@ -496,7 +496,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if("submit_wanted") if(!securityCaster) return FALSE - var/our_user = tgui_user_name(usr) + var/our_user = tgui_user_name(ui.user) if(channel_name == "") set_temp("Error: Could not submit wanted issue to network: Invalid Criminal Name.", "danger", FALSE) return TRUE @@ -507,11 +507,11 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) set_temp("Error: Could not submit wanted issue to network: Author unverified.", "danger", FALSE) return TRUE - var/choice = tgui_alert(usr, "Please confirm Wanted Issue change.", "Network Security Handler", list("Confirm", "Cancel")) + var/choice = tgui_alert(ui.user, "Please confirm Wanted Issue change.", "Network Security Handler", list("Confirm", "Cancel")) if(choice == "Confirm") if(news_network.wanted_issue) if(news_network.wanted_issue.is_admin_message) - tgui_alert_async(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.") + tgui_alert_async(ui.user, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot edit it.") return news_network.wanted_issue.author = channel_name news_network.wanted_issue.body = msg @@ -536,9 +536,9 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) if(!securityCaster) return FALSE if(news_network.wanted_issue.is_admin_message) - tgui_alert_async(usr, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.") + tgui_alert_async(ui.user, "The wanted issue has been distributed by a [using_map.company_name] higherup. You cannot take it down.") return - var/choice = tgui_alert(usr, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) + var/choice = tgui_alert(ui.user, "Please confirm Wanted Issue removal","Network Security Handler",list("Confirm","Cancel")) if(choice=="Confirm") news_network.wanted_issue = null for(var/obj/machinery/newscaster/NEWSCASTER in allCasters) @@ -551,7 +551,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_channel/FC = locate(params["ref"]) if(FC.is_admin_channel) - tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") + tgui_alert_async(ui.user, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") return if(FC.author != "\[REDACTED\]") FC.backup_author = FC.author @@ -566,7 +566,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_message/MSG = locate(params["ref"]) if(MSG.is_admin_message) - tgui_alert_async(usr, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.") + tgui_alert_async(ui.user, "This message was created by a [using_map.company_name] Officer. You cannot censor its author.") return if(MSG.author != "\[REDACTED\]") MSG.backup_author = MSG.author @@ -581,7 +581,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_message/MSG = locate(params["ref"]) if(MSG.is_admin_message) - tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") + tgui_alert_async(ui.user, "This channel was created by a [using_map.company_name] Officer. You cannot censor it.") return if(MSG.body != "\[REDACTED\]") MSG.backup_body = MSG.body @@ -603,7 +603,7 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster) return FALSE var/datum/feed_channel/FC = locate(params["ref"]) if(FC.is_admin_channel) - tgui_alert_async(usr, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.") + tgui_alert_async(ui.user, "This channel was created by a [using_map.company_name] Officer. You cannot place a D-Notice upon it.") return FC.censored = !FC.censored FC.update() diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm index 26f9d6fabfb..3f6ec0cbe35 100644 --- a/code/game/machinery/nuclear_bomb.dm +++ b/code/game/machinery/nuclear_bomb.dm @@ -85,7 +85,7 @@ var/bomb_set if(extended) if(istype(O, /obj/item/disk/nuclear)) - usr.drop_item() + user.drop_item() O.loc = src auth = O add_fingerprint(user) diff --git a/code/game/machinery/pandemic.dm b/code/game/machinery/pandemic.dm index ae8687d6657..cd51b2a9fc7 100644 --- a/code/game/machinery/pandemic.dm +++ b/code/game/machinery/pandemic.dm @@ -114,7 +114,7 @@ default_name = replacetext(beaker.name, new/regex(" culture bottle\\Z", "g"), "") else default_name = D.name - var/name = tgui_input_text(usr, "Name:", "Name the culture", default_name, MAX_NAME_LEN) + var/name = tgui_input_text(ui.user, "Name:", "Name the culture", default_name, MAX_NAME_LEN) if(name == null || wait) return var/obj/item/reagent_containers/glass/bottle/B = create_culture(name) @@ -167,7 +167,7 @@ if(!A) atom_say("Unable to find requested strain.") return - print_form(A, usr) + print_form(A, ui.user) if("name_strain") var/strain_index = text2num(params["strain_index"]) if(isnull(strain_index)) @@ -184,7 +184,7 @@ if(A.name != "Unknown") atom_say("Request rejected. Strain already has a name.") return - var/new_name = tgui_input_text(usr, "Name the Strain", "New Name", max_length = MAX_NAME_LEN) + var/new_name = tgui_input_text(ui.user, "Name the Strain", "New Name", max_length = MAX_NAME_LEN) if(!new_name) return A.AssignName(new_name) diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index 8693642de76..0314d6b1b9b 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -297,7 +297,7 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) // Queue management can be done even while busy if("queue") @@ -331,7 +331,7 @@ return TRUE if(busy) - to_chat(usr, span_notice("[src] is busy. Please wait for completion of previous operation.")) + to_chat(ui.user, span_notice("[src] is busy. Please wait for completion of previous operation.")) return switch(action) diff --git a/code/game/machinery/pda_multicaster.dm b/code/game/machinery/pda_multicaster.dm index acbb0ebbeb4..a26f25e2193 100644 --- a/code/game/machinery/pda_multicaster.dm +++ b/code/game/machinery/pda_multicaster.dm @@ -57,7 +57,7 @@ visible_message("\the [user] turns \the [src] [toggle ? "on" : "off"].") update_power() if(!toggle) - var/msg = "[usr.client.key] ([usr]) has turned [src] off, at [x],[y],[z]." + var/msg = "[user.client.key] ([user]) has turned [src] off, at [x],[y],[z]." message_admins(msg) log_game(msg) diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm index bf87c9ff93c..95bfe9ec346 100644 --- a/code/game/machinery/pipe/pipe_dispenser.dm +++ b/code/game/machinery/pipe/pipe_dispenser.dm @@ -67,10 +67,10 @@ return data -/obj/machinery/pipedispenser/tgui_act(action, params) +/obj/machinery/pipedispenser/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(unwrenched || !usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(unwrenched || !ui.user.canmove || ui.user.stat || ui.user.restrained() || !in_range(loc, ui.user)) return TRUE . = TRUE @@ -101,18 +101,18 @@ else if(istype(recipe, /datum/pipe_recipe/meter)) created_object = new recipe.pipe_type(loc) else - log_runtime(EXCEPTION("Warning: [usr] attempted to spawn pipe recipe type by params [json_encode(params)] ([recipe] [recipe?.type]), but it was not allowed by this machine ([src] [type])")) + log_runtime(EXCEPTION("Warning: [ui.user] attempted to spawn pipe recipe type by params [json_encode(params)] ([recipe] [recipe?.type]), but it was not allowed by this machine ([src] [type])")) return - created_object.add_fingerprint(usr) + created_object.add_fingerprint(ui.user) wait = TRUE VARSET_IN(src, wait, FALSE, 15) /obj/machinery/pipedispenser/attackby(var/obj/item/W as obj, var/mob/user as mob) - src.add_fingerprint(usr) + src.add_fingerprint(user) if (istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter)) - to_chat(usr, span_notice("You put [W] back in [src].")) + to_chat(user, span_notice("You put [W] back in [src].")) user.drop_item() qdel(W) return @@ -128,8 +128,8 @@ src.anchored = FALSE src.stat |= MAINT src.unwrenched = 1 - if (usr.machine==src) - usr << browse(null, "window=pipedispenser") + if (user.machine==src) + user << browse(null, "window=pipedispenser") else /*if (unwrenched==1)*/ playsound(src, W.usesound, 50, 1) to_chat(user, span_notice("You begin to fasten \the [src] to the floor...")) @@ -155,17 +155,17 @@ disposals = TRUE //Allow you to drag-drop disposal pipes into it -/obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe as obj, mob/usr as mob) - if(!usr.canmove || usr.stat || usr.restrained()) +/obj/machinery/pipedispenser/disposal/MouseDrop_T(var/obj/structure/disposalconstruct/pipe as obj, mob/user as mob) + if(!user.canmove || user.stat || user.restrained()) return - if (!istype(pipe) || get_dist(usr, src) > 1 || get_dist(src,pipe) > 1 ) + if (!istype(pipe) || get_dist(user, src) > 1 || get_dist(src,pipe) > 1 ) return if (pipe.anchored) return - to_chat(usr, span_notice("You shove [pipe] back in [src].")) + to_chat(user, span_notice("You shove [pipe] back in [src].")) qdel(pipe) // adding a pipe dispensers that spawn unhooked from the ground diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 0b5c572e137..96f96dcfe32 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -82,7 +82,7 @@ if(default_part_replacement(user, W)) return if (!panel_open && W.has_tool_quality(TOOL_WRENCH)) - P_type_t = tgui_input_list(usr, "Choose pipe type", "Pipe type", Pipes) + P_type_t = tgui_input_list(user, "Choose pipe type", "Pipe type", Pipes) P_type = Pipes[P_type_t] user.visible_message(span_notice("[user] has set \the [src] to manufacture [P_type_t]."), span_notice("You set \the [src] to manufacture [P_type_t].")) return diff --git a/code/game/machinery/pointdefense.dm b/code/game/machinery/pointdefense.dm index ce35f88253b..4d4082b75d6 100644 --- a/code/game/machinery/pointdefense.dm +++ b/code/game/machinery/pointdefense.dm @@ -62,7 +62,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense) return FALSE if(!(get_z(PD) in GetConnectedZlevels(get_z(src)))) - to_chat(usr, span_warning("[PD] is not within control range.")) + to_chat(ui.user, span_warning("[PD] is not within control range.")) return FALSE if(!PD.Activate()) //Activate() whilst the device is active will return false. diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 756508c1707..117ab2cda28 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -443,7 +443,7 @@ /obj/machinery/porta_turret/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - if(isLocked(usr)) + if(isLocked(ui.user)) return TRUE . = TRUE @@ -1094,7 +1094,7 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new turret name", name, finish_name, MAX_NAME_LEN), MAX_NAME_LEN) if(!t) return - if(!in_range(src, usr) && loc != usr) + if(!in_range(src, user) && loc != user) return finish_name = t diff --git a/code/game/machinery/protean_reconstitutor.dm b/code/game/machinery/protean_reconstitutor.dm index f26e23d90cb..37eac939c05 100644 --- a/code/game/machinery/protean_reconstitutor.dm +++ b/code/game/machinery/protean_reconstitutor.dm @@ -135,7 +135,7 @@ if(W.has_tool_quality(TOOL_WRENCH)) if(protean_brain || protean_orchestrator || protean_refactory) - var/choice = tgui_input_list(usr, "What component would you like to remove?", "Remove Component", list(protean_brain,protean_orchestrator,protean_refactory)) + var/choice = tgui_input_list(user, "What component would you like to remove?", "Remove Component", list(protean_brain,protean_orchestrator,protean_refactory)) if(!choice) return if(choice == protean_brain) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index c387e5dd3ac..8f998d90d9d 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -137,18 +137,18 @@ var/list/obj/machinery/requests_console/allConsoles = list() data["announceAuth"] = announceAuth return data -/obj/machinery/requests_console/tgui_act(action, list/params) +/obj/machinery/requests_console/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("write") if(reject_bad_text(params["write"])) recipient = params["write"] //write contains the string of the receiving department's name - var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", "")) + var/new_message = sanitize(tgui_input_text(ui.user, "Write your message:", "Awaiting Input", "")) if(new_message) message = new_message screen = RCS_MESSAUTH @@ -164,7 +164,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() . = TRUE if("writeAnnouncement") - var/new_message = sanitize(tgui_input_text(usr, "Write your message:", "Awaiting Input", "")) + var/new_message = sanitize(tgui_input_text(ui.user, "Write your message:", "Awaiting Input", "")) if(new_message) message = new_message else @@ -233,9 +233,9 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(computer_deconstruction_screwdriver(user, O)) return if(istype(O, /obj/item/multitool)) - var/input = sanitize(tgui_input_text(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department)) + var/input = sanitize(tgui_input_text(user, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department)) 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 department = input announcement.title = "[department] announcement" diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index f7c9f3c6b9a..a10c4aa36da 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -78,12 +78,12 @@ return else // insert cell - var/obj/item/cell/C = usr.get_active_hand() + var/obj/item/cell/C = user.get_active_hand() if(istype(C)) user.drop_item() cell = C C.loc = src - C.add_fingerprint(usr) + C.add_fingerprint(user) user.visible_message(span_notice("[user] inserts a power cell into [src]."), span_notice("You insert the power cell into [src].")) power_change() @@ -140,7 +140,7 @@ return data -/obj/machinery/space_heater/tgui_act(action, params) +/obj/machinery/space_heater/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -154,11 +154,11 @@ . = TRUE if("cellremove") - if(cell && !usr.get_active_hand()) - usr.visible_message(span_notice("[usr] removes [cell] from [src]."), span_notice("You remove [cell] from [src].")) + if(cell && !ui.user.get_active_hand()) + ui.user.visible_message(span_notice("[ui.user] removes [cell] from [src]."), span_notice("You remove [cell] from [src].")) cell.update_icon() - usr.put_in_hands(cell) - cell.add_fingerprint(usr) + ui.user.put_in_hands(cell) + cell.add_fingerprint(ui.user) cell = null power_change() . = TRUE @@ -166,14 +166,14 @@ if("cellinstall") if(!cell) - var/obj/item/cell/C = usr.get_active_hand() + var/obj/item/cell/C = ui.user.get_active_hand() if(istype(C)) - usr.drop_item() + ui.user.drop_item() cell = C C.loc = src - C.add_fingerprint(usr) + C.add_fingerprint(ui.user) power_change() - usr.visible_message(span_notice("[usr] inserts \the [C] into \the [src]."), span_notice("You insert \the [C] into \the [src].")) + ui.user.visible_message(span_notice("[ui.user] inserts \the [C] into \the [src]."), span_notice("You insert \the [C] into \the [src].")) . = TRUE /obj/machinery/space_heater/process() diff --git a/code/game/machinery/suit_storage/suit_cycler.dm b/code/game/machinery/suit_storage/suit_cycler.dm index 3db6a74911b..e9bbf206491 100644 --- a/code/game/machinery/suit_storage/suit_cycler.dm +++ b/code/game/machinery/suit_storage/suit_cycler.dm @@ -357,7 +357,7 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache) return data -/obj/machinery/suit_cycler/tgui_act(action, params) +/obj/machinery/suit_cycler/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -409,20 +409,20 @@ GLOBAL_LIST_EMPTY(suit_cycler_typecache) . = TRUE if("lock") - if(allowed(usr)) + if(allowed(ui.user)) locked = !locked - to_chat(usr, "You [locked ? "" : "un"]lock \the [src].") + to_chat(ui.user, "You [locked ? "" : "un"]lock \the [src].") else - to_chat(usr, span_danger("Access denied.")) + to_chat(ui.user, span_danger("Access denied.")) . = TRUE if("eject_guy") - eject_occupant(usr) + eject_occupant(ui.user) . = TRUE if("uv") if(safeties && occupant) - to_chat(usr, span_danger("The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.")) + to_chat(ui.user, span_danger("The cycler has detected an occupant. Please remove the occupant before commencing the decontamination cycle.")) return active = 1 diff --git a/code/game/machinery/suit_storage/suit_storage.dm b/code/game/machinery/suit_storage/suit_storage.dm index 14705c2a479..b4a89aa5c04 100644 --- a/code/game/machinery/suit_storage/suit_storage.dm +++ b/code/game/machinery/suit_storage/suit_storage.dm @@ -120,45 +120,45 @@ data["occupied"] = FALSE return data -/obj/machinery/suit_storage_unit/tgui_act(action, params) //I fucking HATE this proc +/obj/machinery/suit_storage_unit/tgui_act(action, params, datum/tgui/ui) //I fucking HATE this proc if(..() || isUV || isbroken) return TRUE switch(action) if("door") - toggle_open(usr) + toggle_open(ui.user) . = TRUE if("dispense") switch(params["item"]) if("helmet") - dispense_helmet(usr) + dispense_helmet(ui.user) if("mask") - dispense_mask(usr) + dispense_mask(ui.user) if("suit") - dispense_suit(usr) + dispense_suit(ui.user) . = TRUE if("uv") - start_UV(usr) + start_UV(ui.user) . = TRUE if("lock") - toggle_lock(usr) + toggle_lock(ui.user) . = TRUE if("eject_guy") - eject_occupant(usr) + eject_occupant(ui.user) . = TRUE // Panel Open stuff if(!. && panelopen) switch(action) if("toggleUV") - toggleUV(usr) + toggleUV(ui.user) . = TRUE if("togglesafeties") - togglesafeties(usr) + togglesafeties(ui.user) . = TRUE update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob) diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index de8a16c1ab7..a6429938630 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -17,7 +17,7 @@ var/charges = 1 /obj/machinery/syndicate_beacon/attack_hand(var/mob/user as mob) - usr.set_machine(src) + user.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) if(is_special_character(user)) diff --git a/code/game/machinery/syndicatebeacon_vr.dm b/code/game/machinery/syndicatebeacon_vr.dm index 2c911638583..b5762b18491 100644 --- a/code/game/machinery/syndicatebeacon_vr.dm +++ b/code/game/machinery/syndicatebeacon_vr.dm @@ -1,7 +1,7 @@ // Virgo modified syndie beacon, does not give objectives /obj/machinery/syndicate_beacon/virgo/attack_hand(var/mob/user as mob) - usr.set_machine(src) + user.set_machine(src) var/dat = "Scanning [pick("retina pattern", "voice print", "fingerprints", "dna sequence")]...
Identity confirmed,
" if(istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) if(is_special_character(user)) diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 683c1dd5f86..3a4e0592af1 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -75,11 +75,11 @@ ui = new(user, src, "TelecommsLogBrowser", name) ui.open() -/obj/machinery/computer/telecomms/server/tgui_act(action, params) +/obj/machinery/computer/telecomms/server/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("view") @@ -114,8 +114,8 @@ . = TRUE if("delete") - if(!allowed(usr) && !emagged) - to_chat(usr, span_warning("ACCESS DENIED.")) + if(!allowed(ui.user) && !emagged) + to_chat(ui.user, span_warning("ACCESS DENIED.")) return if(SelectedServer) @@ -128,10 +128,10 @@ . = TRUE if("network") - var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network, 15) + var/newnet = tgui_input_text(ui.user, "Which network do you want to view?", "Comm Monitor", network, 15) newnet = sanitize(newnet,15) - if(newnet && ((usr in range(1, src) || issilicon(usr)))) + if(newnet && ((ui.user in range(1, src) || issilicon(ui.user)))) if(length(newnet) > 15) set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad") return TRUE diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 72fef22286f..83f61126ce6 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -25,9 +25,9 @@ if (integrity < 100) //Damaged, let's repair! if (T.use(1)) integrity = between(0, integrity + rand(10,20), 100) - to_chat(usr, "You apply the Nanopaste to [src], repairing some of the damage.") + to_chat(user, "You apply the Nanopaste to [src], repairing some of the damage.") else - to_chat(usr, "This machine is already in perfect condition.") + to_chat(user, "This machine is already in perfect condition.") return @@ -210,15 +210,15 @@ data["change_freq"] = change_frequency return data -/obj/machinery/telecomms/bus/Options_Act(action, params) +/obj/machinery/telecomms/bus/Options_Act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) if("change_freq") . = TRUE - var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num - if(canAccess(usr)) + var/newfreq = input(ui.user, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num + if(canAccess(ui.user)) if(newfreq) if(findtext(num2text(newfreq), ".")) newfreq *= 10 // shift the decimal one place @@ -274,11 +274,11 @@ overmap_range = clamp(new_range, overmap_range_min, overmap_range_max) update_idle_power_usage(initial(idle_power_usage)**(overmap_range+1)) -/obj/machinery/telecomms/tgui_act(action, params) +/obj/machinery/telecomms/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - var/obj/item/multitool/P = get_multitool(usr) + var/obj/item/multitool/P = get_multitool(ui.user) switch(action) if("toggle") @@ -288,16 +288,16 @@ . = TRUE if("id") - var/newid = copytext(reject_bad_text(tgui_input_text(usr, "Specify the new ID for this machine", src, id)),1,MAX_MESSAGE_LEN) - if(newid && canAccess(usr)) + var/newid = copytext(reject_bad_text(tgui_input_text(ui.user, "Specify the new ID for this machine", src, id)),1,MAX_MESSAGE_LEN) + if(newid && canAccess(ui.user)) id = newid set_temp("-% New ID assigned: \"[id]\" %-", "average") . = TRUE if("network") - var/newnet = tgui_input_text(usr, "Specify the new network for this machine. This will break all current links.", src, network) + var/newnet = tgui_input_text(ui.user, "Specify the new network for this machine. This will break all current links.", src, network) newnet = sanitize(newnet,15) - if(newnet && canAccess(usr)) + if(newnet && canAccess(ui.user)) if(length(newnet) > 15) set_temp("-% Too many characters in new network tag %-", "average") @@ -313,8 +313,8 @@ if("freq") - var/newfreq = tgui_input_number(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, max_value=9999) - if(newfreq && canAccess(usr)) + var/newfreq = tgui_input_number(ui.user, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, max_value=9999) + if(newfreq && canAccess(ui.user)) if(findtext(num2text(newfreq), ".")) newfreq *= 10 // shift the decimal one place if(!(newfreq in freq_listening) && newfreq < 10000) @@ -372,7 +372,7 @@ if(Options_Act(action, params)) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/machinery/telecomms/proc/canAccess(var/mob/user) if(issilicon(user) || in_range(user, src)) diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 41985368885..67204b61897 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -61,11 +61,11 @@ ui = new(user, src, "TelecommsMachineBrowser", name) ui.open() -/obj/machinery/computer/telecomms/monitor/tgui_act(action, params) +/obj/machinery/computer/telecomms/monitor/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) switch(action) if("view") @@ -100,9 +100,9 @@ . = TRUE if("network") - var/newnet = tgui_input_text(usr, "Which network do you want to view?", "Comm Monitor", network, 15) + var/newnet = tgui_input_text(ui.user, "Which network do you want to view?", "Comm Monitor", network, 15) newnet = sanitize(newnet,15) //Honestly, I'd be amazed if someone managed to do HTML in 15 chars. - if(newnet && ((usr in range(1, src) || issilicon(usr)))) + if(newnet && ((ui.user in range(1, src) || issilicon(ui.user)))) if(length(newnet) > 15) set_temp("FAILED: NETWORK TAG STRING TOO LENGTHY", "bad") return TRUE diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 64b597f9bda..3ada9642b5e 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -65,8 +65,8 @@ L = locate("landmark*[C.data]") // use old stype if(istype(L, /obj/effect/landmark/) && istype(L.loc, /turf)) - to_chat(usr, "You insert the coordinates into the machine.") - to_chat(usr, "A message flashes across the screen, reminding the user that the nuclear authentication disk is not transportable via insecure means.") + to_chat(user, "You insert the coordinates into the machine.") + to_chat(user, "A message flashes across the screen, reminding the user that the nuclear authentication disk is not transportable via insecure means.") user.drop_item() qdel(I) @@ -86,7 +86,7 @@ teleport_control.locked = L one_time_use = 1 - add_fingerprint(usr) + add_fingerprint(user) else ..() diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 23a235faf37..904beff78cc 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -99,7 +99,7 @@ return if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) - if(allowed(usr)) + if(allowed(user)) if(emagged) to_chat(user, span_notice("The turret control is unresponsive.")) else @@ -152,10 +152,10 @@ ) return data -/obj/machinery/turretid/tgui_act(action, params) +/obj/machinery/turretid/tgui_act(action, params, datum/tgui/ui) if(..()) return - if(isLocked(usr)) + if(isLocked(ui.user)) return . = TRUE diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index 7ae9f4102c4..4dd2eae2bba 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -12,7 +12,7 @@ var/insistinga = 0 /obj/machinery/wish_granter/attack_hand(var/mob/living/carbon/human/user as mob) - usr.set_machine(src) + user.set_machine(src) if(chargesa <= 0) to_chat(user, span_infoplain("The Wish Granter lies silent.")) @@ -32,7 +32,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...")) diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm index 387506e7d1b..09de44ec120 100644 --- a/code/game/mecha/combat/fighter.dm +++ b/code/game/mecha/combat/fighter.dm @@ -270,9 +270,9 @@ /obj/mecha/combat/fighter/gunpod/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/multitool) && state == 1) - var/new_paint_location = tgui_input_list(usr, "Please select a target zone.", "Paint Zone", list("Fore Stripe", "Aft Stripe", "CANCEL")) + var/new_paint_location = tgui_input_list(user, "Please select a target zone.", "Paint Zone", list("Fore Stripe", "Aft Stripe", "CANCEL")) if(new_paint_location && new_paint_location != "CANCEL") - var/new_paint_color = input(usr, "Please select a paint color.", "Paint Color", null) as color|null + var/new_paint_color = input(user, "Please select a paint color.", "Paint Color", null) as color|null if(new_paint_color) switch(new_paint_location) if("Fore Stripe") diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 6c7b5f2aade..c17eaa485bf 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -536,14 +536,14 @@ return data -/obj/machinery/mecha_part_fabricator/tgui_act(action, var/list/params) +/obj/machinery/mecha_part_fabricator/tgui_act(action, list/params, datum/tgui/ui) if(..()) return TRUE . = TRUE - add_fingerprint(usr) - usr.set_machine(src) + add_fingerprint(ui.user) + ui.user.set_machine(src) switch(action) if("sync_rnd") diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index fbd3759d9d4..e7a72c3653a 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -105,13 +105,13 @@ . = TRUE - add_fingerprint(usr) - usr.set_machine(src) + add_fingerprint(ui.user) + ui.user.set_machine(src) switch(action) if("species") - var/new_species = tgui_input_list(usr, "Select a new species", "Prosfab Species Selection", species_types) - if(new_species && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_species = tgui_input_list(ui.user, "Select a new species", "Prosfab Species Selection", species_types) + if(new_species && tgui_status(ui.user, state) == STATUS_INTERACTIVE) species = new_species return if("manufacturer") @@ -124,8 +124,8 @@ continue new_manufacturers += A - var/new_manufacturer = tgui_input_list(usr, "Select a new manufacturer", "Prosfab Species Selection", new_manufacturers) - if(new_manufacturer && tgui_status(usr, state) == STATUS_INTERACTIVE) + var/new_manufacturer = tgui_input_list(ui.user, "Select a new manufacturer", "Prosfab Species Selection", new_manufacturers) + if(new_manufacturer && tgui_status(ui.user, state) == STATUS_INTERACTIVE) manufacturer = new_manufacturer return return FALSE diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 0e7eda66c16..325288ff2e1 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1416,7 +1416,7 @@ if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) if(add_req_access || maint_access) - if(internals_access_allowed(usr)) + if(internals_access_allowed(user)) var/obj/item/card/id/id_card if(istype(W, /obj/item/card/id)) id_card = W diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 8bc612b2199..7ba0f91f393 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -26,15 +26,15 @@ /obj/machinery/computer/mecha/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() - - + + var/list/beacons = list() for(var/obj/item/mecha_parts/mecha_tracking/TR in world) var/list/tr_data = TR.tgui_data(user) if(tr_data) beacons.Add(list(tr_data)) data["beacons"] = beacons - + LAZYINITLIST(stored_data) data["stored_data"] = stored_data @@ -43,12 +43,12 @@ /obj/machinery/computer/mecha/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state) if(..()) return TRUE - + switch(action) if("send_message") var/obj/item/mecha_parts/mecha_tracking/MT = locate(params["mt"]) if(istype(MT)) - var/message = sanitize(tgui_input_text(usr, "Input message", "Transmit message")) + var/message = sanitize(tgui_input_text(ui.user, "Input message", "Transmit message")) var/obj/mecha/M = MT.in_mecha() if(message && M) M.occupant_message(message) @@ -65,7 +65,7 @@ if(istype(MT)) stored_data = MT.get_mecha_log() return TRUE - + if("clear_log") stored_data = null return TRUE diff --git a/code/game/mecha/space/shuttle.dm b/code/game/mecha/space/shuttle.dm index 1a7ddfd1d18..b7dd4f35f39 100644 --- a/code/game/mecha/space/shuttle.dm +++ b/code/game/mecha/space/shuttle.dm @@ -68,9 +68,9 @@ /obj/mecha/working/hoverpod/shuttlecraft/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/multitool) && state == 1) - var/new_paint_location = tgui_input_list(usr, "Please select a target zone.", "Paint Zone", list("Central", "Engine", "Base", "Front", "CANCEL")) + var/new_paint_location = tgui_input_list(user, "Please select a target zone.", "Paint Zone", list("Central", "Engine", "Base", "Front", "CANCEL")) if(new_paint_location && new_paint_location != "CANCEL") - var/new_paint_color = input(usr, "Please select a paint color.", "Paint Color", null) as color|null + var/new_paint_color = input(user, "Please select a paint color.", "Paint Color", null) as color|null if(new_paint_color) switch(new_paint_location) if("Central") diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index ca1fcd2f3c6..f3c7027f09f 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -195,7 +195,7 @@ if(ruined) return - if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") + if(tgui_alert(user, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/effects/decals/posters/posters.dm b/code/game/objects/effects/decals/posters/posters.dm index 7aa5709988f..024dc55d40b 100644 --- a/code/game/objects/effects/decals/posters/posters.dm +++ b/code/game/objects/effects/decals/posters/posters.dm @@ -180,7 +180,7 @@ if(ruined) return - if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") + if(tgui_alert(user, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes") if(ruined || !user.Adjacent(src)) return diff --git a/code/game/objects/items/contraband_vr.dm b/code/game/objects/items/contraband_vr.dm index 1052a490b68..85faa40ce98 100644 --- a/code/game/objects/items/contraband_vr.dm +++ b/code/game/objects/items/contraband_vr.dm @@ -11,14 +11,14 @@ /*var/spawn_chance = rand(1,100) switch(spawn_chance) if(0 to 49) - new /obj/random/gun/guarenteed(usr.loc) - to_chat(usr, "You got a thing!") + new /obj/random/gun/guarenteed(user.loc) + to_chat(user, "You got a thing!") if(50 to 99) - new /obj/item/bikehorn/rubberducky(usr.loc) - new /obj/item/bikehorn(usr.loc) - to_chat(usr, "You got two things!") + new /obj/item/bikehorn/rubberducky(user.loc) + new /obj/item/bikehorn(user.loc) + to_chat(user, "You got two things!") if(100) - to_chat(usr, "The box contained nothing!") + to_chat(user, "The box contained nothing!") return */ var/loot = pick(/obj/effect/landmark/costume, @@ -95,7 +95,7 @@ qdel(loot) loot = new_I // swap it //VOREstation edit end - new loot(usr.loc) + new loot(user.loc) to_chat(user, "You unwrap the package.") qdel(src) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 0ab0aa1223c..dd38831b034 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -59,27 +59,26 @@ return data -/obj/item/aicard/tgui_act(action, params) +/obj/item/aicard/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE if(!carded_ai) return - var/user = usr switch(action) if("wipe") - msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].") - add_attack_logs(user,carded_ai,"Purged from AI Card") + msg_admin_attack("[key_name_admin(ui.user)] wiped [key_name_admin(AI)] with \the [src].") + add_attack_logs(ui.user,carded_ai,"Purged from AI Card") INVOKE_ASYNC(src, PROC_REF(wipe_ai)) if("radio") carded_ai.aiRadio.disabledAi = !carded_ai.aiRadio.disabledAi to_chat(carded_ai, span_warning("Your Subspace Transceiver has been [carded_ai.aiRadio.disabledAi ? "disabled" : "enabled"]!")) - to_chat(user, span_notice("You [carded_ai.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.")) + to_chat(ui.user, span_notice("You [carded_ai.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.")) if("wireless") carded_ai.control_disabled = !carded_ai.control_disabled to_chat(carded_ai, span_warning("Your wireless interface has been [carded_ai.control_disabled ? "disabled" : "enabled"]!")) - to_chat(user, span_notice("You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface.")) + to_chat(ui.user, span_notice("You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface.")) if(carded_ai.control_disabled && carded_ai.deployed_shell) carded_ai.disconnect_shell("Disconnecting from remote shell due to [src] wireless access interface being disabled.") update_icon() diff --git a/code/game/objects/items/devices/body_snatcher_vr.dm b/code/game/objects/items/devices/body_snatcher_vr.dm index 36474a2bc34..4d288db81c3 100644 --- a/code/game/objects/items/devices/body_snatcher_vr.dm +++ b/code/game/objects/items/devices/body_snatcher_vr.dm @@ -17,38 +17,38 @@ flags |= NOBLUDGEON //So borgs don't spark. /obj/item/bodysnatcher/attack(mob/living/M, mob/living/user) - usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) if(ishuman(M) || issilicon(M)) //Allows body swapping with humans, synths, and pAI's/borgs since they all have a mind. - if(usr == M) + if(user == M) to_chat(user,span_warning(" A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?")) return if(!M.mind) //Do they have a mind? - to_chat(usr,span_warning("A warning pops up on the device, informing you that [M] appears braindead.")) + to_chat(user,span_warning("A warning pops up on the device, informing you that [M] appears braindead.")) return if(!M.allow_mind_transfer) - to_chat(usr,span_danger("The target's mind is too complex to be affected!")) + to_chat(user,span_danger("The target's mind is too complex to be affected!")) return if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.resleeve_lock && usr.ckey != H.resleeve_lock) + if(H.resleeve_lock && user.ckey != H.resleeve_lock) to_chat(src, span_danger("[H] cannot be impersonated!")) return if(M.stat == DEAD) //Are they dead? - to_chat(usr,span_warning("A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.")) + to_chat(user,span_warning("A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.")) return - var/choice = tgui_alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel")) - if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M)) + var/choice = tgui_alert(user,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel")) + if(choice == "Continue" && user.get_active_hand() == src && user.Adjacent(M)) - usr.visible_message(span_warning("[usr] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!")) - if(do_after(usr,35 SECONDS,M)) - if(usr.mind && M.mind && M.stat != DEAD && usr.stat != DEAD) - log_and_message_admins("[usr.ckey] used a Bodysnatcher to swap bodies with [M.ckey]") - to_chat(usr,span_notice("Your minds have been swapped! Have a nice day.")) + user.visible_message(span_warning("[user] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!")) + if(do_after(user,35 SECONDS,M)) + if(user.mind && M.mind && M.stat != DEAD && user.stat != DEAD) + log_and_message_admins("[user.ckey] used a Bodysnatcher to swap bodies with [M.ckey]") + to_chat(user,span_notice("Your minds have been swapped! Have a nice day.")) var/datum/mind/user_mind = user.mind var/datum/mind/prey_mind = M.mind var/target_ooc_notes = M.ooc_notes @@ -58,8 +58,8 @@ var/user_likes = user.ooc_notes_likes var/user_dislikes = user.ooc_notes_dislikes M.ghostize() - usr.ghostize() - usr.mind = null + user.ghostize() + user.mind = null M.mind = null user_mind.current = null prey_mind.current = null @@ -73,9 +73,9 @@ user.ooc_notes = target_ooc_notes user.ooc_notes_likes = target_likes user.ooc_notes_dislikes = target_dislikes - usr.sleeping = 10 //Device knocks out both the user and the target. - usr.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision - usr.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body. + user.sleeping = 10 //Device knocks out both the user and the target. + user.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision + user.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body. if(ishuman(M)) //Let's not have the AI slurring, even though its downright hilarious. M.sleeping = 10 M.eye_blurry = 30 diff --git a/code/game/objects/items/devices/communicator/UI_tgui.dm b/code/game/objects/items/devices/communicator/UI_tgui.dm index 33cf9408c0a..c387c58ec08 100644 --- a/code/game/objects/items/devices/communicator/UI_tgui.dm +++ b/code/game/objects/items/devices/communicator/UI_tgui.dm @@ -318,11 +318,11 @@ if(..()) return TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) . = TRUE switch(action) if("rename") - var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) ) + var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name) ) if(new_name) register_device(new_name) @@ -341,7 +341,7 @@ ringer = !ringer if("set_ringer_tone") - var/ringtone = tgui_input_text(usr, "Set Ringer Tone", "Ringer") + var/ringtone = tgui_input_text(ui.user, "Set Ringer Tone", "Ringer") if(ringtone) ttone = ringtone @@ -360,7 +360,7 @@ if("dial") if(!get_connection_to_tcomms()) - to_chat(usr, span_danger("Error: Cannot connect to Exonet node.")) + to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node.")) return FALSE var/their_address = params["dial"] exonet.send_message(their_address, "voice") @@ -373,16 +373,16 @@ if("message") if(!get_connection_to_tcomms()) - to_chat(usr, span_danger("Error: Cannot connect to Exonet node.")) + to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node.")) return FALSE var/their_address = params["message"] - var/text = sanitizeSafe(tgui_input_text(usr,"Enter your message.","Text Message")) + var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message")) if(text) exonet.send_message(their_address, "text", text) im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text)) - log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", usr) + log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", ui.user) var/obj/item/communicator/comm = exonet.get_atom_from_address(their_address) - to_chat(usr, span_notice("[icon2html(src, usr.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)")) + to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], \"[text]\" (Reply)")) for(var/mob/M in player_list) if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears)) if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat) @@ -395,16 +395,16 @@ var/name_to_disconnect = params["disconnect"] for(var/mob/living/voice/V in contents) if(name_to_disconnect == sanitize(V.name)) - close_connection(usr, V, "[usr] hung up") + close_connection(ui.user, V, "[ui.user] hung up") for(var/obj/item/communicator/comm in communicating) if(name_to_disconnect == sanitize(comm.name)) - close_connection(usr, comm, "[usr] hung up") + close_connection(ui.user, comm, "[ui.user] hung up") if("startvideo") var/ref_to_video = params["startvideo"] var/obj/item/communicator/comm = locate(ref_to_video) if(comm) - connect_video(usr, comm) + connect_video(ui.user, comm) if("endvideo") if(video_source) @@ -418,15 +418,15 @@ if("hang_up") for(var/mob/living/voice/V in contents) - close_connection(usr, V, "[usr] hung up") + close_connection(ui.user, V, "[ui.user] hung up") for(var/obj/item/communicator/comm in communicating) - close_connection(usr, comm, "[usr] hung up") + close_connection(ui.user, comm, "[ui.user] hung up") if("switch_tab") selected_tab = params["switch_tab"] if("edit") - var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE) + var/n = tgui_input_text(ui.user, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE) n = sanitizeSafe(n, extra = 0) if(n) note = html_decode(n) diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm index 3c5da0ca3ec..e765f3a0e14 100644 --- a/code/game/objects/items/devices/defib.dm +++ b/code/game/objects/items/devices/defib.dm @@ -132,7 +132,7 @@ if(!slot_check()) to_chat(user, span_warning("You need to equip [src] before taking out [paddles].")) else - if(!usr.put_in_hands(paddles)) //Detach the paddles into the user's hands + if(!user.put_in_hands(paddles)) //Detach the paddles into the user's hands to_chat(user, span_warning("You need a free hand to hold the paddles!")) update_icon() //success diff --git a/code/game/objects/items/devices/denecrotizer_vr.dm b/code/game/objects/items/devices/denecrotizer_vr.dm index af55b535d47..b82dfb39738 100644 --- a/code/game/objects/items/devices/denecrotizer_vr.dm +++ b/code/game/objects/items/devices/denecrotizer_vr.dm @@ -49,7 +49,7 @@ if(!evaluate_ghost_join(user)) return ..() - tgui_alert_async(usr, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS) + tgui_alert_async(user, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS) /// A reply to an async alert request was received /mob/living/simple_mob/proc/reply_ghost_join(response) diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index d6a812a4105..ae9b0a5ed58 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -107,7 +107,7 @@ new painting_decal(F, painting_dir, painting_colour) /obj/item/floor_painter/attack_self(var/mob/user) - var/choice = tgui_alert(usr, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel")) + var/choice = tgui_alert(user, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel")) if(choice == "Cancel") return else if(choice == "Decal") diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 84181f83124..e85bb876bca 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -134,14 +134,14 @@ var/mob/living/silicon/robot/R = user if(R.emagged) src.Emag() - to_chat(usr, You short circuit the [src].") + to_chat(user, You short circuit the [src].") return */ - to_chat(usr, "It has [uses] lights remaining.") - var/new_color = input(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null + to_chat(user, "It has [uses] lights remaining.") + var/new_color = input(user, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null if(new_color) selected_color = new_color - to_chat(usr, "The light color has been changed.") + to_chat(user, "The light color has been changed.") /obj/item/lightreplacer/update_icon() icon_state = "lightreplacer[emagged]" diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm index d3eb23c42e1..141f9a6e250 100644 --- a/code/game/objects/items/devices/locker_painter.dm +++ b/code/game/objects/items/devices/locker_painter.dm @@ -120,7 +120,7 @@ return /obj/item/closet_painter/attack_self(var/mob/user) - var/choice = tgui_alert(usr, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour")) + var/choice = tgui_alert(user, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour")) if(choice == "Regular Closet Colour") choose_colour() else if(choice == "Secure Closet Colour") diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index cdaa8215768..65640675b22 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -33,7 +33,7 @@ tool_qualities = list(TOOL_MULTITOOL) /obj/item/multitool/attack_self(mob/living/user) - var/choice = tgui_alert(usr, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel")) + var/choice = tgui_alert(user, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel")) switch(choice) if("Clear Buffers") to_chat(user,span_notice("You clear \the [src]'s memory.")) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 5aefe909d78..0bad4759a84 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -61,21 +61,21 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard) if(pai != null) //Have a person in them already? return ..() if(is_damage_critical()) - to_chat(usr, span_warning("That card is too damaged to activate!")) + to_chat(user, span_warning("That card is too damaged to activate!")) return var/time_till_respawn = user.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(user, 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(user, 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, JOB_PAI)) - to_chat(usr,span_warning("You cannot join a pAI card when you are banned from playing as a pAI.")) + if(jobban_isbanned(user, JOB_PAI)) + to_chat(user,span_warning("You cannot join a pAI card when you are banned from playing as a pAI.")) return for(var/ourkey in paikeys) if(ourkey == user.ckey) - to_chat(usr, span_warning("You can't just rejoin any old pAI card!!! Your card still exists.")) + to_chat(user, span_warning("You can't just rejoin any old pAI card!!! Your card still exists.")) return var/choice = tgui_alert(user, "You sure you want to inhabit this PAI, or submit yourself to being recruited?", "Confirmation", list("Inhabit", "Recruit", "Cancel")) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 03a2f53da90..c7720c6f091 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -240,7 +240,7 @@ var/global/list/default_medbay_channels = list( return STATUS_CLOSE return ..() -/obj/item/radio/tgui_act(action, params) +/obj/item/radio/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE @@ -251,8 +251,8 @@ var/global/list/default_medbay_channels = list( new_frequency = sanitize_frequency(new_frequency) set_frequency(new_frequency) if(hidden_uplink) - if(hidden_uplink.check_trigger(usr, frequency, traitor_frequency)) - usr << browse(null, "window=radio") + if(hidden_uplink.check_trigger(ui.user, frequency, traitor_frequency)) + ui.user << browse(null, "window=radio") . = TRUE if("broadcast") ToggleBroadcast() @@ -269,7 +269,7 @@ var/global/list/default_medbay_channels = list( . = TRUE if("specFreq") var/freq = params["channel"] - if(has_channel_access(usr, freq)) + if(has_channel_access(ui.user, freq)) set_frequency(text2num(freq)) . = TRUE if("subspace") @@ -277,10 +277,10 @@ var/global/list/default_medbay_channels = list( subspace_transmission = !subspace_transmission if(!subspace_transmission) channels = list() - to_chat(usr, span_notice("Subspace Transmission is disabled")) + to_chat(ui.user, span_notice("Subspace Transmission is disabled")) else recalculateChannels() - to_chat(usr, span_notice("Subspace Transmission is enabled")) + to_chat(ui.user, span_notice("Subspace Transmission is enabled")) . = TRUE if("toggleLoudspeaker") if(!subspace_switchable) @@ -288,12 +288,12 @@ var/global/list/default_medbay_channels = list( loudspeaker = !loudspeaker if(loudspeaker) - to_chat(usr, span_notice("Loadspeaker enabled.")) + to_chat(ui.user, span_notice("Loadspeaker enabled.")) else - to_chat(usr, span_notice("Loadspeaker disabled.")) + to_chat(ui.user, span_notice("Loadspeaker disabled.")) . = TRUE - if(. && iscarbon(usr)) + if(. && iscarbon(ui.user)) playsound(src, "button", 10) GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) diff --git a/code/game/objects/items/devices/radio/radiopack.dm b/code/game/objects/items/devices/radio/radiopack.dm index 0dd91f0c875..c4e53205cdf 100644 --- a/code/game/objects/items/devices/radio/radiopack.dm +++ b/code/game/objects/items/devices/radio/radiopack.dm @@ -64,7 +64,7 @@ if(!slot_check()) to_chat(user, span_warning("You need to equip [src] before taking out [handset].")) else - if(!usr.put_in_hands(handset)) //Detach the handset into the user's hands + if(!user.put_in_hands(handset)) //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/game/objects/items/devices/scanners/gas.dm b/code/game/objects/items/devices/scanners/gas.dm index 1ec74ff1059..29e07259a1a 100644 --- a/code/game/objects/items/devices/scanners/gas.dm +++ b/code/game/objects/items/devices/scanners/gas.dm @@ -28,7 +28,7 @@ if (user.stat) return if (!user.IsAdvancedToolUser()) - to_chat(usr, span_warning("You don't have the dexterity to do this!")) + to_chat(user, span_warning("You don't have the dexterity to do this!")) return analyze_gases(src, user) diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 4e347a328e4..26a57d99845 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -201,7 +201,7 @@ operating = 1 while(selected_camera && Adjacent(user)) - selected_camera = tgui_input_list(usr, "Select camera to view.", "Camera Choice", cameras) + selected_camera = tgui_input_list(user, "Select camera to view.", "Camera Choice", cameras) selected_camera = null operating = 0 diff --git a/code/game/objects/items/devices/ticket_printer.dm b/code/game/objects/items/devices/ticket_printer.dm index b4b8ec41853..51b0d3e8ba5 100644 --- a/code/game/objects/items/devices/ticket_printer.dm +++ b/code/game/objects/items/devices/ticket_printer.dm @@ -20,13 +20,13 @@ var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)) if(length(ticket_name) > 100) - tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error") + tgui_alert_async(user, "Entered name too long. 100 character limit.","Error") return if(!ticket_name) return var/details = sanitize(tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200)) if(length(details) > 200) - tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error") + tgui_alert_async(user, "Entered details too long. 200 character limit.","Error") return if(!details) return @@ -71,13 +71,13 @@ var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100)) if(length(ticket_name) > 100) - tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error") + tgui_alert_async(user, "Entered name too long. 100 character limit.","Error") return if(!ticket_name) return var/details = sanitize(tgui_input_text(user, "What is the ticket for? This could be anything like travel to a destination or permission to do something! This is not official and does not override any rules or authorities on the station.", "Ticket Details", max_length = 200)) if(length(details) > 200) - tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error") + tgui_alert_async(user, "Entered details too long. 200 character limit.","Error") return if(!details) return diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 535809bc4fa..958ce7471cf 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -86,7 +86,7 @@ data["valve"] = valve_open return data -/obj/item/transfer_valve/tgui_act(action, params) +/obj/item/transfer_valve/tgui_act(action, params, datum/tgui/ui) if(..()) return . = TRUE @@ -99,7 +99,7 @@ toggle_valve() if("device") if(attached_device) - attached_device.attack_self(usr) + attached_device.attack_self(ui.user) if("remove_device") if(attached_device) attached_device.forceMove(get_turf(src)) @@ -110,7 +110,7 @@ . = FALSE if(.) update_icon() - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/item/transfer_valve/proc/process_activation(var/obj/item/D) if(toggle) diff --git a/code/game/objects/items/devices/translocator_vr.dm b/code/game/objects/items/devices/translocator_vr.dm index 1fe7de3c9a5..99a2dde7698 100644 --- a/code/game/objects/items/devices/translocator_vr.dm +++ b/code/game/objects/items/devices/translocator_vr.dm @@ -412,7 +412,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat var/mob/living/L = user var/confirm = tgui_alert(user, "You COULD eat the beacon...", "Eat beacon?", 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(user, "Which belly?","Select A Belly", L.vore_organs) if(bellychoice) user.visible_message(span_warning("[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice.name]!"),span_notice("You begin putting \the [src] into your [bellychoice.name]!")) if(do_after(user,5 SECONDS,src)) diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index c8be5fb6545..34b18d7b958 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -197,7 +197,7 @@ switch(action) if("buy") var/datum/uplink_item/UI = (locate(params["ref"]) in uplink.items) - UI.buy(src, usr) + UI.buy(src, ui.user) return TRUE if("lock") toggle() diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 32af47b31af..80e16d90c2f 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -235,7 +235,7 @@ var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN) if (!t) return - if (!in_range(src, usr) && src.loc != usr) + if (!in_range(src, user) && src.loc != user) return src.created_name = t diff --git a/code/game/objects/items/selectable_item_vr.dm b/code/game/objects/items/selectable_item_vr.dm index c5997966d46..3183971bcef 100644 --- a/code/game/objects/items/selectable_item_vr.dm +++ b/code/game/objects/items/selectable_item_vr.dm @@ -12,7 +12,7 @@ /obj/item/selectable_item/attack_self(mob/user as mob) tgui_alert(user, {"[preface_string]"}, preface_title) - var/chosen_item = tgui_input_list(usr, selection_string, selection_title, item_options) + var/chosen_item = tgui_input_list(user, selection_string, selection_title, item_options) chosen_item = item_options[chosen_item] if(!QDELETED(src) && chosen_item) user.drop_item() @@ -45,4 +45,4 @@ preface_title = "Gender Chemistry Kit" item_options = list("Androrovir" = /obj/item/reagent_containers/glass/beaker/vial/androrovir, "Gynorovir" = /obj/item/reagent_containers/glass/beaker/vial/gynorovir, - "Androgynorovir" = /obj/item/reagent_containers/glass/beaker/vial/androgynorovir) \ No newline at end of file + "Androgynorovir" = /obj/item/reagent_containers/glass/beaker/vial/androgynorovir) diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index 1a63c55db5a..66f3ce09d19 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -37,7 +37,7 @@ var/obj/item/weldingtool/WT = W.get_welder() if(WT.remove_fuel(0, user)) cut_overlays() - to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.") + to_chat(user, "You slice off [src]'s uneven chunks of aluminum and scorch marks.") return diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 8e5eb5e8c1f..1e3443524f0 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -137,7 +137,7 @@ var/multiplier = text2num(params["multiplier"]) if(!multiplier || (multiplier <= 0)) //href exploit protection return - produce_recipe(R, multiplier, usr) + produce_recipe(R, multiplier, ui.user) return TRUE /obj/item/stack/proc/is_valid_recipe(datum/stack_recipe/R, list/recipe_list) @@ -402,7 +402,7 @@ /obj/item/stack/attack_hand(mob/user as mob) if (user.get_inactive_hand() == src) - var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1) + var/N = tgui_input_number(user, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1) if(N != round(N)) to_chat(user, span_warning("You cannot separate a non-whole number of stacks!")) return @@ -413,8 +413,8 @@ src.add_fingerprint(user) F.add_fingerprint(user) spawn(0) - if (src && usr.machine==src) - src.interact(usr) + if (src && user.machine==src) + src.interact(user) else ..() return @@ -425,10 +425,10 @@ src.transfer_to(S) spawn(0) //give the stacks a chance to delete themselves if necessary - if (S && usr.machine==S) - S.interact(usr) - if (src && usr.machine==src) - src.interact(usr) + if (S && user.machine==S) + S.interact(user) + if (src && user.machine==src) + src.interact(user) else return ..() diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index ec3fcb8cc43..65ee1e6e0bf 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -53,8 +53,8 @@ return if(WT.remove_fuel(0,user)) - new welds_into(usr.loc) - usr.update_icon() + new welds_into(user.loc) + user.update_icon() visible_message(span_notice("\The [src] is shaped by [user.name] with the welding tool."),"You hear welding.") var/obj/item/stack/tile/T = src src = null diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 0aab2540071..6a444248c6a 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -197,8 +197,8 @@ to_chat(user, span_warning("You can't do that right now!")) return - if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") - var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null + if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") + var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) update_icon() diff --git a/code/game/objects/items/toys/toys_vr.dm b/code/game/objects/items/toys/toys_vr.dm index b6df0bcafd8..b7e2065157b 100644 --- a/code/game/objects/items/toys/toys_vr.dm +++ b/code/game/objects/items/toys/toys_vr.dm @@ -1052,9 +1052,9 @@ activate(user) /obj/item/toy/desk/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(!istype(usr, /mob/living/simple_mob)) - if( !usr.get_active_hand() ) //if active hand is empty + if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user)))))) + if(!istype(user, /mob/living/simple_mob)) + 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/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index 6fccf471ff4..25ae7e9f81a 100644 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -30,51 +30,51 @@ AI MODULES if (istype(AM, /obj/machinery/computer/aiupload)) var/obj/machinery/computer/aiupload/comp = AM if(comp.stat & NOPOWER) - to_chat(usr, "The upload computer has no power!") + to_chat(user, "The upload computer has no power!") return if(comp.stat & BROKEN) - to_chat(usr, "The upload computer is broken!") + to_chat(user, "The upload computer is broken!") return if (!comp.current) - to_chat(usr, "You haven't selected an AI to transmit laws to!") + to_chat(user, "You haven't selected an AI to transmit laws to!") return if (comp.current.stat == 2 || comp.current.control_disabled == 1) - to_chat(usr, "Upload failed. No signal is being detected from the AI.") + to_chat(user, "Upload failed. No signal is being detected from the AI.") else if (comp.current.see_in_dark == 0) - to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.") + to_chat(user, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.") else - src.transmitInstructions(comp.current, usr) + src.transmitInstructions(comp.current, user) to_chat(comp.current, "These are your laws now:") comp.current.show_laws() for(var/mob/living/silicon/robot/R in mob_list) if(R.lawupdate && (R.connected_ai == comp.current)) to_chat(R, "These are your laws now:") R.show_laws() - to_chat(usr, "Upload complete. The AI's laws have been modified.") + to_chat(user, "Upload complete. The AI's laws have been modified.") else if (istype(AM, /obj/machinery/computer/borgupload)) var/obj/machinery/computer/borgupload/comp = AM if(comp.stat & NOPOWER) - to_chat(usr, "The upload computer has no power!") + to_chat(user, "The upload computer has no power!") return if(comp.stat & BROKEN) - to_chat(usr, "The upload computer is broken!") + to_chat(user, "The upload computer is broken!") return if (!comp.current) - to_chat(usr, "You haven't selected a robot to transmit laws to!") + to_chat(user, "You haven't selected a robot to transmit laws to!") return if (comp.current.stat == 2 || comp.current.emagged) - to_chat(usr, "Upload failed. No signal is being detected from the robot.") + to_chat(user, "Upload failed. No signal is being detected from the robot.") else if (comp.current.connected_ai) - to_chat(usr, "Upload failed. The robot is slaved to an AI.") + to_chat(user, "Upload failed. The robot is slaved to an AI.") else - src.transmitInstructions(comp.current, usr) + src.transmitInstructions(comp.current, user) to_chat(comp.current, "These are your laws now:") comp.current.show_laws() - to_chat(usr, "Upload complete. The robot's laws have been modified.") + to_chat(user, "Upload complete. The robot's laws have been modified.") else if(istype(AM, /mob/living/silicon/robot)) var/mob/living/silicon/robot/R = AM @@ -133,13 +133,13 @@ AI MODULES /obj/item/aiModule/safeguard/attack_self(var/mob/user as mob) ..() - var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)) + var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)) targetName = targName desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName) /obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user) if(!targetName) - to_chat(usr, "No name detected on module, please enter one.") + to_chat(user, "No name detected on module, please enter one.") return 0 ..() @@ -159,13 +159,13 @@ AI MODULES /obj/item/aiModule/oneHuman/attack_self(var/mob/user as mob) ..() - var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name)) + var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name)) targetName = targName desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName) /obj/item/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user) if(!targetName) - to_chat(usr, "No name detected on module, please enter one.") + to_chat(user, "No name detected on module, please enter one.") return 0 return ..() @@ -240,11 +240,11 @@ AI MODULES /obj/item/aiModule/freeform/attack_self(var/mob/user as mob) ..() - var/new_lawpos = tgui_input_number(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) + var/new_lawpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos) if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER) var/newlaw = "" - var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) + var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'" @@ -257,7 +257,7 @@ AI MODULES /obj/item/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) - to_chat(usr, "No law detected on module, please create one.") + to_chat(user, "No law detected on module, please create one.") return 0 ..() @@ -362,7 +362,7 @@ AI MODULES /obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = sanitize(tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)) + var/targName = sanitize(tgui_input_text(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'" @@ -373,7 +373,7 @@ AI MODULES /obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) - to_chat(usr, "No law detected on module, please create one.") + to_chat(user, "No law detected on module, please create one.") return 0 ..() @@ -386,7 +386,7 @@ AI MODULES /obj/item/aiModule/syndicate/attack_self(var/mob/user as mob) ..() var/newlaw = "" - var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) + var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw)) newFreeFormLaw = targName desc = "A hacked AI law module: '[newFreeFormLaw]'" @@ -402,7 +402,7 @@ AI MODULES /obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user) if(!newFreeFormLaw) - to_chat(usr, "No law detected on module, please create one.") + to_chat(user, "No law detected on module, please create one.") return 0 ..() diff --git a/code/game/objects/items/weapons/RPD_vr.dm b/code/game/objects/items/weapons/RPD_vr.dm index eab54cac62e..b834d815006 100644 --- a/code/game/objects/items/weapons/RPD_vr.dm +++ b/code/game/objects/items/weapons/RPD_vr.dm @@ -112,10 +112,10 @@ return data -/obj/item/pipe_dispenser/tgui_act(action, params) +/obj/item/pipe_dispenser/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE - if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(!ui.user.canmove || ui.user.stat || ui.user.restrained() || !in_range(loc, ui.user)) return TRUE var/playeffect = TRUE switch(action) @@ -217,7 +217,7 @@ var/obj/item/pipe/P = new pipe_item_type(get_turf(A), path, queued_p_dir) P.update() - P.add_fingerprint(usr) + P.add_fingerprint(user) if(R.paintable) P.color = pipe_colors[paint_color] P.setPipingLayer(queued_piping_layer) @@ -248,7 +248,7 @@ activate() - C.add_fingerprint(usr) + C.add_fingerprint(user) C.update_icon() if(mode & WRENCH_MODE) do_wrench(C, user) diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm index 13e4e74b015..84666ffd4dc 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm @@ -74,14 +74,14 @@ to_chat(user, span_warning("Circuit controls are locked.")) return var/existing_networks = jointext(network,",") - var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) + var/input = sanitize(tgui_input_text(user, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks)) 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, ",") tempnetwork = difflist(tempnetwork,restricted_camera_networks,1) 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 network = tempnetwork return diff --git a/code/game/objects/items/weapons/circuitboards/computer/supply.dm b/code/game/objects/items/weapons/circuitboards/computer/supply.dm index 1a3d671b96b..30168a939cc 100644 --- a/code/game/objects/items/weapons/circuitboards/computer/supply.dm +++ b/code/game/objects/items/weapons/circuitboards/computer/supply.dm @@ -32,7 +32,7 @@ opposite_catastasis = "BROAD" catastasis = "STANDARD" - switch(tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel"))) + switch(tgui_alert(user, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel"))) if("Switch to STANDARD","Switch to BROAD") src.contraband_enabled = !src.contraband_enabled diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index c672280e437..1348a5860c0 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -101,7 +101,7 @@ /obj/item/dnainjector/attack(mob/M as mob, mob/user as mob) if (!istype(M, /mob)) return - if (!usr.IsAdvancedToolUser()) + if (!user.IsAdvancedToolUser()) return if(inuse) return 0 diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index ed05e9e8a0b..87dfe250718 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -39,7 +39,7 @@ ..() /obj/item/plastique/attack_self(mob/user as mob) - var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10) + var/newtime = tgui_input_number(user, "Please set the timer.", "Timer", 10, 60000, 10) if(user.get_active_hand() == src) newtime = CLAMP(newtime, 10, 60000) timer = newtime diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index e1b812f8801..80f3e194048 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -99,7 +99,7 @@ if (!safety) if (src.reagents.total_volume < 1) - to_chat(usr, span_notice("\The [src] is empty.")) + to_chat(user, span_notice("\The [src] is empty.")) return if (world.time < src.last_use + 20) @@ -136,7 +136,7 @@ W.set_color() W.set_up(my_target) - if((istype(usr.loc, /turf/space)) || (usr.lastarea.get_gravity() == 0)) + if((istype(user.loc, /turf/space)) || (user.lastarea.get_gravity() == 0)) user.inertia_dir = get_dir(target, user) step(user, user.inertia_dir) else diff --git a/code/game/objects/items/weapons/game_kit.dm b/code/game/objects/items/weapons/game_kit.dm index 47b39a164ee..e2eac323d23 100644 --- a/code/game/objects/items/weapons/game_kit.dm +++ b/code/game/objects/items/weapons/game_kit.dm @@ -11,15 +11,15 @@ THAT STUPID GAME KIT return src.attack_hand(user) /obj/item/game_kit/MouseDrop(mob/user as mob) - if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr))) - if (usr.hand) - if (!usr.l_hand) + if (user == usr && !user.restrained() && !user.stat && (user.contents.Find(src) || in_range(src, user))) + if (user.hand) + if (!user.l_hand) spawn (0) - src.attack_hand(usr, 1, 1) + src.attack_hand(user, 1, 1) else - if (!usr.r_hand) + if (!user.r_hand) spawn (0) - src.attack_hand(usr, 0, 1) + src.attack_hand(user, 0, 1) /obj/item/game_kit/proc/update() var/dat = text("
Game Board

[] remove
", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 01caf091bdd..efe0c92ae2f 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -32,7 +32,7 @@ if(detonator) // detonator.loc=src.loc detonator.detached() - usr.put_in_hands(detonator) + user.put_in_hands(detonator) detonator=null det_time = null stage=0 diff --git a/code/game/objects/items/weapons/id cards/cards.dm b/code/game/objects/items/weapons/id cards/cards.dm index 638fb5be4ae..861841a21ff 100644 --- a/code/game/objects/items/weapons/id cards/cards.dm +++ b/code/game/objects/items/weapons/id cards/cards.dm @@ -130,11 +130,11 @@ if(istype(O, /obj/item/stack/telecrystal)) var/obj/item/stack/telecrystal/T = O if(T.get_amount() < 1) - to_chat(usr, span_notice("You are not adding enough telecrystals to fuel \the [src].")) + to_chat(user, span_notice("You are not adding enough telecrystals to fuel \the [src].")) return uses += T.get_amount()*0.5 //Gives 5 uses per 10 TC uses = CEILING(uses, 1) //Ensures no decimal uses nonsense, rounds up to be nice - to_chat(usr, span_notice("You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses].")) + to_chat(user, span_notice("You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses].")) qdel(O) @@ -201,13 +201,13 @@ if(I) icon = I -/obj/item/card_fluff/attack_self() +/obj/item/card_fluff/attack_self(mob/user) - var/choice = tgui_input_list(usr, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset")) + var/choice = tgui_input_list(user, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset")) if(!choice) return if(choice == "Band") - var/bandchoice = tgui_input_list(usr, "Select colour", "Band colour", list("red","orange","green","dark green","medical blue","dark blue","purple","tan","pink","gold","white","black")) + var/bandchoice = tgui_input_list(user, "Select colour", "Band colour", list("red","orange","green","dark green","medical blue","dark blue","purple","tan","pink","gold","white","black")) if(!bandchoice) return if(bandchoice == "red") @@ -238,7 +238,7 @@ update_icon() return else if(choice == "Stamp") - var/stampchoice = tgui_input_list(usr, "Select image", "Stamp image", list("ship","cross","big ears","shield","circle-cross","target","smile","frown","peace","exclamation")) + var/stampchoice = tgui_input_list(user, "Select image", "Stamp image", list("ship","cross","big ears","shield","circle-cross","target","smile","frown","peace","exclamation")) if(!stampchoice) return if(stampchoice == "ship") diff --git a/code/game/objects/items/weapons/id cards/syndicate_ids.dm b/code/game/objects/items/weapons/id cards/syndicate_ids.dm index f95d49255e8..b6fe6fe37cc 100644 --- a/code/game/objects/items/weapons/id cards/syndicate_ids.dm +++ b/code/game/objects/items/weapons/id cards/syndicate_ids.dm @@ -38,7 +38,7 @@ if(!registered_user && register_user(user)) to_chat(user, span_notice("The microscanner marks you as its owner, preventing others from accessing its internals.")) if(registered_user == user) - switch(tgui_alert(usr, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show"))) + switch(tgui_alert(user, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show"))) if(null) return if("Edit") diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index fe4a98091f8..48be1714cb5 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -24,7 +24,7 @@ var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null, MAX_NAME_LEN) if (user.get_active_hand() != I) return - if((!in_range(src, usr) && src.loc != user)) + if((!in_range(src, user) && src.loc != user)) return t = sanitizeSafe(t, MAX_NAME_LEN) if(t) diff --git a/code/game/objects/items/weapons/implants/implantreagent_vr.dm b/code/game/objects/items/weapons/implants/implantreagent_vr.dm index 2188e08ff12..48a60b0f53e 100644 --- a/code/game/objects/items/weapons/implants/implantreagent_vr.dm +++ b/code/game/objects/items/weapons/implants/implantreagent_vr.dm @@ -92,7 +92,7 @@ if(container.reagents.total_volume < container.volume) var/container_name = container.name if(rimplant.reagents.trans_to(container, amount = rimplant.transfer_amount)) - user.visible_message(span_notice("[usr] [pick(rimplant.emote_descriptor)] into \the [container_name]."), + user.visible_message(span_notice("[user] [pick(rimplant.emote_descriptor)] into \the [container_name]."), span_notice("You [pick(rimplant.self_emote_descriptor)] some [rimplant.reagent_name] into \the [container_name].")) if(prob(5)) src.visible_message(span_notice("[src] [pick(rimplant.random_emote)].")) // M-mlem. diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm index d1631a2f11c..7984198f2ac 100644 --- a/code/game/objects/items/weapons/material/chainsaw.dm +++ b/code/game/objects/items/weapons/material/chainsaw.dm @@ -29,7 +29,7 @@ /obj/item/chainsaw/proc/turnOn(mob/user as mob) if(on) return - visible_message("You start pulling the string on \the [src].", "[usr] starts pulling the string on the [src].") + visible_message("You start pulling the string on \the [src].", "[user] starts pulling the string on the [src].") if(max_fuel <= 0) if(do_after(user, 15)) @@ -38,7 +38,7 @@ to_chat(user, "You fumble with the string.") else if(do_after(user, 15)) - visible_message("You start \the [src] up with a loud grinding!", "[usr] starts \the [src] up with a loud grinding!") + visible_message("You start \the [src] up with a loud grinding!", "[user] starts \the [src] up with a loud grinding!") attack_verb = list("shredded", "ripped", "torn") playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1) force = active_force @@ -91,7 +91,7 @@ Hyd.die() if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1) to_chat(user, span_notice("You begin filling the tank on the chainsaw.")) - if(do_after(usr, 15)) + if(do_after(user, 15)) A.reagents.trans_to_obj(src, max_fuel) playsound(src, 'sound/effects/refill.ogg', 50, 1, -6) to_chat(user, span_notice("Chainsaw succesfully refueled.")) diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index 9c5b04f5262..825376f6697 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -66,13 +66,13 @@ return 0 else to_chat(user, span_notice("You begin to place \the [src.name].")) - if(!do_after(usr, 10)) + if(!do_after(user, 10)) return 0 var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material()) to_chat(user, span_notice("You place \the [src.name].")) G.grave_name = grave_name G.epitaph = epitaph - G.add_fingerprint(usr) + G.add_fingerprint(user) G.dir = user.dir QDEL_NULL(src) return diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 5a1df7edea1..0a96d13303e 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -145,7 +145,7 @@ to_chat(M, "You should repair [src] first. Try using [kit] on it.") return FALSE M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].") - if(do_after(usr, sharpen_time)) + if(do_after(M, sharpen_time)) M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].") src.set_material(material) return TRUE diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index cd6478d6ff0..debbc5cdb4a 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -187,8 +187,8 @@ to_chat(user, span_warning("You can't do that right now!")) return - if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") - var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null + if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes") + var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) update_icon() diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 013b527e814..dd18c3a68a7 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -16,7 +16,7 @@ /obj/item/teleportation_scroll/attack_self(mob/user as mob) if((user.mind && !wizards.is_antagonist(user.mind))) - to_chat(usr, span_warning("You stare at the scroll but cannot make sense of the markings!")) + to_chat(user, span_warning("You stare at the scroll but cannot make sense of the markings!")) return user.set_machine(src) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 80da3eb459f..d5917f21796 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -208,8 +208,8 @@ if(user.incapacitated() || !istype(user)) to_chat(user, span_warning("You can't do that right now!")) return - if(tgui_alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes") - var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null + if(tgui_alert(user, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes") + var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null if(energy_color_input) lcolor = sanitize_hexcolor(energy_color_input) update_icon() diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index f7056d0a638..eeb20d7da98 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -79,7 +79,7 @@ /obj/item/storage/fancy/egg_box/open(mob/user as mob) if(open) return - if (isobserver(usr)) + if (isobserver(user)) return open = TRUE update_icon() diff --git a/code/game/objects/items/weapons/storage/mre.dm b/code/game/objects/items/weapons/storage/mre.dm index 5209591cf6a..c164aef1208 100644 --- a/code/game/objects/items/weapons/storage/mre.dm +++ b/code/game/objects/items/weapons/storage/mre.dm @@ -36,7 +36,7 @@ MRE Stuff /obj/item/storage/mre/open(mob/user) if(!opened) - to_chat(usr, span_notice("You tear open the bag, breaking the vacuum seal.")) + to_chat(user, span_notice("You tear open the bag, breaking the vacuum seal.")) opened = 1 update_icon() . = ..() @@ -236,7 +236,7 @@ MRE Stuff /obj/item/storage/mrebag/open(mob/user) if(!opened && !isobserver(user)) - to_chat(usr, span_notice("The pouch heats up as you break the vacuum seal.")) + to_chat(user, span_notice("The pouch heats up as you break the vacuum seal.")) opened = 1 update_icon() . = ..() diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 54007da3cf3..e3776dbaefa 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -52,7 +52,7 @@ if (istype(W, /obj/item/multitool) && (src.open == 1)&& (!src.l_hacking)) user.show_message(span_notice("Now attempting to reset internal memory, please hold."), 1) src.l_hacking = 1 - if (do_after(usr, 100)) + if (do_after(user, 100)) if (prob(40)) src.l_setshort = 1 src.l_set = 0 @@ -84,7 +84,7 @@ if (isliving(user) && Adjacent(user) && (src.locked == 1)) to_chat(user, span_warning("[src] is locked and cannot be opened!")) else if (isliving(user) && Adjacent(user) && (!src.locked)) - src.open(usr) + src.open(user) else for(var/mob/M in range(1)) if (M.s_active == src) @@ -110,7 +110,7 @@ data["l_set"] = l_set return data -/obj/item/storage/secure/tgui_act(action, params) +/obj/item/storage/secure/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch (action) @@ -132,12 +132,12 @@ src.locked = 1 cut_overlays() src.code = null - src.close(usr) + src.close(ui.user) else src.code += text("[]", digit) if (length(src.code) > 5) src.code = "ERROR" - src.add_fingerprint(usr) + src.add_fingerprint(ui.user) . = TRUE return @@ -172,7 +172,7 @@ if ((src.loc == user) && (src.locked == 1)) to_chat(user, span_warning("[src] is locked and cannot be opened!")) else if ((src.loc == user) && (!src.locked)) - src.open(usr) + src.open(user) else ..() for(var/mob/M in range(1)) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 6d6882e0b86..820995c12fc 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -141,12 +141,12 @@ var/list/global/tank_gauge_cache = list() var/obj/item/assembly_holder/assy = src.proxyassembly.assembly if(assy.a_left && assy.a_right) - assy.dropInto(usr.loc) + assy.dropInto(user.loc) assy.master = null src.proxyassembly.assembly = null else if(!src.proxyassembly.assembly.a_left) - assy.a_right.dropInto(usr.loc) + assy.a_right.dropInto(user.loc) assy.a_right.holder = null assy.a_right = null src.proxyassembly.assembly = null @@ -257,7 +257,7 @@ var/list/global/tank_gauge_cache = list() return data -/obj/item/tank/tgui_act(action, params) +/obj/item/tank/tgui_act(action, params, datum/tgui/ui) if(..()) return TRUE switch(action) @@ -278,10 +278,10 @@ var/list/global/tank_gauge_cache = list() if(.) distribute_pressure = clamp(round(pressure), 0, TANK_MAX_RELEASE_PRESSURE) if("toggle") - toggle_valve(usr) + toggle_valve(ui.user) . = TRUE - add_fingerprint(usr) + add_fingerprint(ui.user) /obj/item/tank/proc/toggle_valve(var/mob/user) if(istype(loc,/mob/living/carbon)) diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index 86c52420265..e0ce8ab19bf 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -330,17 +330,17 @@ if(H.nif && H.nif.flag_check(NIF_V_UVFILTER,NIF_FLAGS_VISION)) return //VOREStation Add - NIF switch(safety) if(1) - to_chat(usr, span_warning("Your eyes sting a little.")) + to_chat(user, span_warning("Your eyes sting a little.")) E.damage += rand(1, 2) if(E.damage > 12) user.eye_blurry += rand(3,6) if(0) - to_chat(usr, span_warning("Your eyes burn.")) + to_chat(user, span_warning("Your eyes burn.")) E.damage += rand(2, 4) if(E.damage > 10) E.damage += rand(4,10) if(-1) - to_chat(usr, span_danger("Your thermals intensify the welder's glow. Your eyes itch and burn severely.")) + to_chat(user, span_danger("Your thermals intensify the welder's glow. Your eyes itch and burn severely.")) user.eye_blurry += rand(12,20) E.damage += rand(12, 16) if(safety<2) diff --git a/code/game/objects/items/weapons/tools/wirecutters.dm b/code/game/objects/items/weapons/tools/wirecutters.dm index 031ab1a6f66..c4e073f0a2f 100644 --- a/code/game/objects/items/weapons/tools/wirecutters.dm +++ b/code/game/objects/items/weapons/tools/wirecutters.dm @@ -46,7 +46,7 @@ /obj/item/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob) if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/handcuffs/cable))) - usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\ + user.visible_message("\The [user] cuts \the [C]'s restraints with \the [src]!",\ "You cut \the [C]'s restraints with \the [src]!",\ "You hear cable being cut.") C.handcuffed = null diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index dd0d55cfcea..13db2e0c075 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -104,7 +104,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))) @@ -115,10 +115,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/structure/proc/climb_to(var/mob/living/user) diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index a7d06703ffc..8fd2723c55c 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -128,14 +128,13 @@ . = ..() tgui_interact(user) -/obj/item/canvas/tgui_act(action, params) +/obj/item/canvas/tgui_act(action, params, datum/tgui/ui) . = ..() if(. || finalized) return - var/mob/user = usr switch(action) if("paint") - var/obj/item/I = user.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() var/color = get_paint_tool_color(I) if(!color) return FALSE @@ -148,7 +147,7 @@ if("finalize") . = TRUE if(!finalized) - finalize(user) + finalize(ui.user) /obj/item/canvas/proc/finalize(mob/user) finalized = TRUE diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index e5c252bd174..9c1cba95829 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -319,7 +319,7 @@ return if(W.loc != user) // This should stop mounted modules ending up outside the module. return - usr.drop_item() + user.drop_item() if(W) W.forceMove(loc) else if(istype(W, /obj/item/packageWrap)) @@ -385,7 +385,7 @@ /obj/structure/closet/attack_self_tk(mob/user as mob) add_fingerprint(user) if(!toggle()) - to_chat(usr, span_notice("It won't budge!")) + to_chat(user, span_notice("It won't budge!")) /obj/structure/closet/verb/verb_toggleopen() set src in oview(1) diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index 6f4cd019da4..0fa429bbb53 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -100,7 +100,7 @@ return if(W.loc != user) // This should stop mounted modules ending up outside the module. return - usr.drop_item() + user.drop_item() if(W) W.forceMove(src.loc) else diff --git a/code/game/objects/structures/crates_lockers/closets/walllocker.dm b/code/game/objects/structures/crates_lockers/closets/walllocker.dm index ea27c4a4502..08519aa8450 100644 --- a/code/game/objects/structures/crates_lockers/closets/walllocker.dm +++ b/code/game/objects/structures/crates_lockers/closets/walllocker.dm @@ -34,10 +34,10 @@ if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc) if(!amount) - to_chat(usr, "It's empty..") + to_chat(user, "It's empty..") return if(amount) - to_chat(usr, "You take out some items from \the [src].") + to_chat(user, "You take out some items from \the [src].") for(var/path in spawnitems) new path(src.loc) amount-- @@ -448,4 +448,4 @@ /obj/structure/closet/walllocker_double/engineering/east pixel_x = 32 - dir = EAST \ No newline at end of file + dir = EAST diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 86e68cf8202..d376be9a3f1 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -72,10 +72,10 @@ update_icon() return else - to_chat(usr, span_warning("You kick the display case.")) + to_chat(user, span_warning("You kick the display case.")) for(var/mob/O in oviewers()) if ((O.client && !( O.blinded ))) - to_chat(O, span_warning("[usr] kicks the display case.")) + to_chat(O, span_warning("[user] kicks the display case.")) src.health -= 2 healthcheck() return diff --git a/code/game/objects/structures/fitness_vr.dm b/code/game/objects/structures/fitness_vr.dm index bf8be539025..f3d6aa082b2 100644 --- a/code/game/objects/structures/fitness_vr.dm +++ b/code/game/objects/structures/fitness_vr.dm @@ -27,7 +27,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) ? 20 : 34))) @@ -39,11 +39,11 @@ return if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) + user.forceMove(get_step(src, src.dir)) else - usr.forceMove(get_turf(src)) + user.forceMove(get_turf(src)) - usr.visible_message(span_warning("[user] climbed over \the [src]!")) + user.visible_message(span_warning("[user] climbed over \the [src]!")) LAZYREMOVE(climbers, user) /obj/structure/fitness/boxing_ropes/can_climb(var/mob/living/user, post_climb_check=0) //Sets it to keep people from climbing over into the next turf if it is occupied. diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 708bba5edd2..4c0a488a599 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -233,7 +233,7 @@ return 0 var/wall_fake - add_hiddenprint(usr) + add_hiddenprint(user) if(M.integrity < 50) to_chat(user, span_notice("This material is too soft for use in wall construction.")) @@ -256,7 +256,7 @@ T.set_material(M, reinf_material, girder_material) if(wall_fake) T.can_open = 1 - T.add_hiddenprint(usr) + T.add_hiddenprint(user) qdel(src) return 1 diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 5fe81e63187..7b7f7a6b644 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -151,7 +151,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) return 1 else if (istype(I, /obj/item/reagent_containers/glass/bucket) && mybucket) - I.afterattack(mybucket, usr, 1) + I.afterattack(mybucket, user, 1) update_icon() return 1 @@ -189,12 +189,12 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) //Altclick the cart with a reagent container to pour things into the bucket without putting the bottle in trash /obj/structure/janitorialcart/AltClick(mob/living/user) if(user.incapacitated() || !Adjacent(user)) return - var/obj/I = usr.get_active_hand() + var/obj/I = user.get_active_hand() if(istype(I, /obj/item/mop)) equip_janicart_item(user, I) else if(istype(I, /obj/item/reagent_containers) && mybucket) var/obj/item/reagent_containers/C = I - C.afterattack(mybucket, usr, 1) + C.afterattack(mybucket, user, 1) update_icon() @@ -226,62 +226,62 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) if(..()) return TRUE - var/obj/item/I = usr.get_active_hand() + var/obj/item/I = ui.user.get_active_hand() switch(action) if("bag") if(mybag) - usr.put_in_hands(mybag) - to_chat(usr, span_notice("You take [mybag] from [src].")) + ui.user.put_in_hands(mybag) + to_chat(ui.user, span_notice("You take [mybag] from [src].")) mybag = null nullTguiIcon("mybag") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("mop") if(mymop) - usr.put_in_hands(mymop) - to_chat(usr, span_notice("You take [mymop] from [src].")) + ui.user.put_in_hands(mymop) + to_chat(ui.user, span_notice("You take [mymop] from [src].")) mymop = null nullTguiIcon("mymop") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("spray") if(myspray) - usr.put_in_hands(myspray) - to_chat(usr, span_notice("You take [myspray] from [src].")) + ui.user.put_in_hands(myspray) + to_chat(ui.user, span_notice("You take [myspray] from [src].")) myspray = null nullTguiIcon("myspray") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("replacer") if(myreplacer) - usr.put_in_hands(myreplacer) - to_chat(usr, span_notice("You take [myreplacer] from [src].")) + ui.user.put_in_hands(myreplacer) + to_chat(ui.user, span_notice("You take [myreplacer] from [src].")) myreplacer = null nullTguiIcon("myreplacer") else if(is_type_in_typecache(I, equippable_item_whitelist)) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) if("sign") if(istype(I, /obj/item/clothing/suit/caution) && signs < 4) - equip_janicart_item(usr, I) + equip_janicart_item(ui.user, I) else if(signs) var/obj/item/clothing/suit/caution/sign = locate() in src if(sign) - usr.put_in_hands(sign) - to_chat(usr, span_notice("You take \a [sign] from [src].")) + ui.user.put_in_hands(sign) + to_chat(ui.user, span_notice("You take \a [sign] from [src].")) signs-- if(!signs) nullTguiIcon("signs") else - to_chat(usr, span_notice("[src] doesn't have any signs left.")) + to_chat(ui.user, span_notice("[src] doesn't have any signs left.")) if("bucket") if(mybucket) - mybucket.forceMove(get_turf(usr)) - to_chat(usr, span_notice("You unmount [mybucket] from [src].")) + mybucket.forceMove(get_turf(ui.user)) + to_chat(ui.user, span_notice("You unmount [mybucket] from [src].")) mybucket = null nullTguiIcon("mybucket") else - to_chat(usr, span_notice("((Drag and drop a mop bucket onto [src] to equip it.))")) + to_chat(ui.user, span_notice("((Drag and drop a mop bucket onto [src] to equip it.))")) return FALSE else return FALSE diff --git a/code/game/objects/structures/kitchen_foodcart_vr.dm b/code/game/objects/structures/kitchen_foodcart_vr.dm index d80b3456cfe..c15168e9f6b 100644 --- a/code/game/objects/structures/kitchen_foodcart_vr.dm +++ b/code/game/objects/structures/kitchen_foodcart_vr.dm @@ -24,9 +24,9 @@ /obj/structure/foodcart/attack_hand(var/mob/user as mob) if(contents.len) - var/obj/item/reagent_containers/food/choice = tgui_input_list(usr, "What would you like to grab from the cart?", "Grab Choice", contents) + var/obj/item/reagent_containers/food/choice = tgui_input_list(user, "What would you like to grab from the cart?", "Grab Choice", 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()) @@ -39,4 +39,4 @@ if(contents.len < 5) icon_state = "foodcart-[contents.len]" else - icon_state = "foodcart-5" \ No newline at end of file + icon_state = "foodcart-5" diff --git a/code/game/objects/structures/ledges.dm b/code/game/objects/structures/ledges.dm index 301488f38cd..6da40df1c1c 100644 --- a/code/game/objects/structures/ledges.dm +++ b/code/game/objects/structures/ledges.dm @@ -54,7 +54,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) ? 20 : 34))) @@ -66,11 +66,11 @@ return if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) + user.forceMove(get_step(src, src.dir)) else - usr.forceMove(get_turf(src)) + user.forceMove(get_turf(src)) - usr.visible_message(span_warning("[user] climbed over \the [src]!")) + user.visible_message(span_warning("[user] climbed over \the [src]!")) LAZYREMOVE(climbers, user) /obj/structure/ledge/can_climb(var/mob/living/user, post_climb_check=0) diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index db3284c760c..d3caa34c3ed 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -125,7 +125,7 @@ /obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user) if(istype(get_area(src),/area/syndicate_mothership)) if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != SPECIES_VOX && is_alien_whitelisted(user, SPECIES_VOX)) - var/choice = tgui_alert(usr, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes")) + var/choice = tgui_alert(user, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes")) if(choice && choice == "Yes") var/mob/living/carbon/human/vox/vox = new(get_turf(src),SPECIES_VOX) vox.gender = user.gender diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 5cb4e5c7078..5af4964bf58 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -124,7 +124,7 @@ var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null) if (user.get_active_hand() != P) return - if ((!in_range(src, usr) && src.loc != user)) + if ((!in_range(src, user) && src.loc != user)) return t = sanitizeSafe(t, MAX_NAME_LEN) if (t) @@ -220,7 +220,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) /obj/structure/morgue/crematorium/attack_hand(mob/user as mob) if (cremating) - to_chat(usr, span_warning("It's locked.")) + to_chat(user, span_warning("It's locked.")) return if ((src.connected) && (src.locked == 0)) for(var/atom/movable/A as mob|obj in src.connected.loc) @@ -250,7 +250,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium) var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null) if (user.get_active_hand() != P) return - if ((!in_range(src, usr) > 1 && src.loc != user)) + if ((!in_range(src, user) > 1 && src.loc != user)) return t = sanitizeSafe(t, MAX_NAME_LEN) if (t) diff --git a/code/game/objects/structures/morgue_vr.dm b/code/game/objects/structures/morgue_vr.dm index 4d341a1e563..d52ac601e2a 100644 --- a/code/game/objects/structures/morgue_vr.dm +++ b/code/game/objects/structures/morgue_vr.dm @@ -15,7 +15,7 @@ return else if(!isemptylist(src.search_contents_for(/obj/item/disk/nuclear))) - to_chat(usr, "You get the feeling that you shouldn't cremate one of the items in the cremator.") + to_chat(user, "You get the feeling that you shouldn't cremate one of the items in the cremator.") return for(var/I in contents) diff --git a/code/game/objects/structures/props/beam_prism.dm b/code/game/objects/structures/props/beam_prism.dm index 75174e6c0c2..33b7cf0c50b 100644 --- a/code/game/objects/structures/props/beam_prism.dm +++ b/code/game/objects/structures/props/beam_prism.dm @@ -50,7 +50,7 @@ to_chat(user, span_warning("\The [src]'s motors resist your efforts to rotate it. You may need to find some form of controller.")) return - var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) + var/confirm = tgui_alert(user, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) if(confirm != "Yes") visible_message(\ span_notice("[user.name] decides not to try turning \the [src]."),\ @@ -59,13 +59,13 @@ var/new_bearing if(free_rotate) - new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) + new_bearing = tgui_input_number(user, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) new_bearing = round(new_bearing) if(new_bearing <= -1 || new_bearing > 360) to_chat(user, span_warning("Rotating \the [src] [new_bearing] degrees would be a waste of time.")) return else - var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions) + var/choice = tgui_input_list(user, "What point do you want to set \the [src] to?", "[name]", compass_directions) new_bearing = round(compass_directions[choice]) var/rotate_degrees = new_bearing - degrees_from_north @@ -156,7 +156,7 @@ /obj/structure/prop/prismcontrol/attack_hand(mob/living/user) ..() - var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) + var/confirm = tgui_alert(user, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No")) if(confirm != "Yes") visible_message(\ span_notice("[user.name] decides not to try turning \the [src]."),\ @@ -176,16 +176,16 @@ var/new_bearing if(free_rotate) - new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) + new_bearing = tgui_input_number(user, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0) new_bearing = round(new_bearing) if(new_bearing <= -1 || new_bearing > 360) to_chat(user, span_warning("Rotating \the [src] [new_bearing] degrees would be a waste of time.")) return else - var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions) + var/choice = tgui_input_list(user, "What point do you want to set \the [src] to?", "[name]", compass_directions) new_bearing = round(compass_directions[choice]) - confirm = tgui_alert(usr, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No")) + confirm = tgui_alert(user, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No")) if(confirm != "Yes") visible_message(\ span_notice("[user.name] decides not to try turning \the [src]."),\ diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 69167f859cf..cb7048f66be 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -206,7 +206,7 @@ playsound(src, W.usesound, 50, 1) if(do_after(user, 20, src)) user.visible_message(span_infoplain(span_bold("\The [user]") + " dismantles \the [src]."), span_notice("You dismantle \the [src].")) - new /obj/item/stack/material/steel(get_turf(usr), 2) + new /obj/item/stack/material/steel(get_turf(user), 2) qdel(src) return @@ -285,7 +285,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) ? 20 : 34))) @@ -297,11 +297,11 @@ return if(get_turf(user) == get_turf(src)) - usr.forceMove(get_step(src, src.dir)) + user.forceMove(get_step(src, src.dir)) else - usr.forceMove(get_turf(src)) + user.forceMove(get_turf(src)) - usr.visible_message(span_warning("[user] climbed over \the [src]!")) + user.visible_message(span_warning("[user] climbed over \the [src]!")) if(!anchored) take_damage(maxhealth) // Fatboy LAZYREMOVE(climbers, user) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index f9585448e8d..65fbb86b1a0 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -37,7 +37,7 @@ /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction if(tool.has_tool_quality(TOOL_SCREWDRIVER) && isturf(user.loc)) - var/direction = tgui_input_list(usr, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel")) + var/direction = tgui_input_list(user, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel")) if(direction == "Cancel") return var/target_type = original_type || /obj/structure/sign var/obj/structure/sign/S = new target_type(user.loc) diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm index ac1fa248670..c9b71652be5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm @@ -42,7 +42,7 @@ #undef NEST_RESIST_TIME /obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob) - if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) + if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) ) return unbuckle_mob() @@ -56,7 +56,7 @@ if(istype(xenos) && !(locate(/obj/item/organ/internal/xenos/hivenode) in xenos.internal_organs)) return - if(M == usr) + if(M == user) return else M.visible_message(\ diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index 92d4af0acbb..fc106d1b6e7 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -148,7 +148,7 @@ /obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob) if (pulling) - MouseDrop(usr) + MouseDrop(user) else if(has_buckled_mobs()) for(var/A in buckled_mobs) @@ -169,7 +169,7 @@ user.set_dir(get_dir(user, src)) to_chat(user, "You grip \the [name]'s handles.") else - to_chat(usr, "You let go of \the [name]'s handles.") + to_chat(user, "You let go of \the [name]'s handles.") pulling.pulledby = null pulling = null return @@ -228,7 +228,7 @@ /obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob) if(M == pulling) pulling = null - usr.pulledby = null + user.pulledby = null ..() /obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 888d0174e66..678513ec03e 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -98,14 +98,14 @@ #undef TANK_DISPENSER_CAPACITY -/obj/structure/dispenser/tgui_act(action, params) +/obj/structure/dispenser/tgui_act(action, params, datum/tgui/ui) if(..()) return switch(action) if("plasma") var/obj/item/tank/phoron/tank = locate() in src - if(tank && Adjacent(usr)) - usr.put_in_hands(tank) + if(tank && Adjacent(ui.user)) + ui.user.put_in_hands(tank) phorontanks-- . = TRUE playsound(src, 'sound/items/drop/gascan.ogg', 100, 1, 1) @@ -115,8 +115,8 @@ if(istype(T, /obj/item/tank/oxygen) || istype(T, /obj/item/tank/air) || istype(T, /obj/item/tank/anesthetic)) tank = T break - if(tank && Adjacent(usr)) - usr.put_in_hands(tank) + if(tank && Adjacent(ui.user)) + ui.user.put_in_hands(tank) oxygentanks-- . = TRUE playsound(src, 'sound/items/drop/gascan.ogg', 100, 1, 1) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index c6bab800416..f94a30756a1 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -18,8 +18,8 @@ /obj/structure/toilet/attack_hand(mob/living/user as mob) if(swirlie) - usr.setClickCooldown(user.get_attack_speed()) - usr.visible_message(span_danger("[user] slams the toilet seat onto [swirlie.name]'s head!"), span_notice("You slam the toilet seat onto [swirlie.name]'s head!"), "You hear reverberating porcelain.") + user.setClickCooldown(user.get_attack_speed()) + user.visible_message(span_danger("[user] slams the toilet seat onto [swirlie.name]'s head!"), span_notice("You slam the toilet seat onto [swirlie.name]'s head!"), "You hear reverberating porcelain.") swirlie.adjustBruteLoss(5) return @@ -519,13 +519,13 @@ ..() if(!istype(thing) || !thing.is_open_container()) return ..() - if(!usr.Adjacent(src)) + if(!user.Adjacent(src)) return ..() if(!thing.reagents || thing.reagents.total_volume == 0) - to_chat(usr, span_warning("\The [thing] is empty.")) + to_chat(user, span_warning("\The [thing] is empty.")) return // Clear the vessel. - visible_message(span_infoplain(span_bold("\The [usr]") + " tips the contents of \the [thing] into \the [src].")) + visible_message(span_infoplain(span_bold("\The [user]") + " tips the contents of \the [thing] into \the [src].")) thing.reagents.clear_reagents() thing.update_icon() @@ -549,13 +549,13 @@ to_chat(user, span_warning("Someone's already washing here.")) return - to_chat(usr, span_notice("You start washing your hands.")) + to_chat(user, span_notice("You start washing your hands.")) playsound(src, 'sound/effects/sink_long.ogg', 75, 1) busy = 1 if(!do_after(user, 40, src)) busy = 0 - to_chat(usr, span_notice("You stop washing your hands.")) + to_chat(user, span_notice("You stop washing your hands.")) return busy = 0 @@ -620,12 +620,12 @@ var/obj/item/I = O if(!I || !istype(I,/obj/item)) return - to_chat(usr, span_notice("You start washing \the [I].")) + to_chat(user, span_notice("You start washing \the [I].")) busy = 1 if(!do_after(user, 40, src)) busy = 0 - to_chat(usr, span_notice("You stop washing \the [I].")) + to_chat(user, span_notice("You stop washing \the [I].")) return busy = 0 diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 61bb0bf6eef..eb30553d685 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -187,12 +187,12 @@ //Crowbar to complete the assembly, Step 7 complete. else if(W.has_tool_quality(TOOL_CROWBAR)) if(!src.electronics) - to_chat(usr,span_warning("The assembly is missing electronics.")) + to_chat(user,span_warning("The assembly is missing electronics.")) return if(src.electronics && istype(src.electronics, /obj/item/circuitboard/broken)) - to_chat(usr,span_warning("The assembly has broken airlock electronics.")) + to_chat(user,span_warning("The assembly has broken airlock electronics.")) return - usr << browse(null, "window=windoor_access") //Not sure what this actually does... -Ner + user << browse(null, "window=windoor_access") //Not sure what this actually does... -Ner playsound(src, W.usesound, 100, 1) user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.") diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 8751a723377..213627e6e6f 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -331,7 +331,7 @@ to_chat(vandal, span_warning("There's too much graffiti here to add more.")) return FALSE - var/message = sanitize(tgui_input_text(usr, "Enter a message to engrave.", "Graffiti"), trim = TRUE) + var/message = sanitize(tgui_input_text(vandal, "Enter a message to engrave.", "Graffiti"), trim = TRUE) if(!message) return FALSE diff --git a/code/modules/admin/admin_secrets.dm b/code/modules/admin/admin_secrets.dm index be0b5b8fb81..6c65a272e24 100644 --- a/code/modules/admin/admin_secrets.dm +++ b/code/modules/admin/admin_secrets.dm @@ -59,7 +59,7 @@ var/datum/admin_secrets/admin_secrets = new() /datum/admin_secret_item/proc/can_execute(var/mob/user) if(can_view(user)) - if(!warn_before_use || tgui_alert(usr, "Execute the command '[name]'?", name, list("No","Yes")) == "Yes") + if(!warn_before_use || tgui_alert(user, "Execute the command '[name]'?", name, list("No","Yes")) == "Yes") return 1 return 0 diff --git a/code/modules/admin/modify_robot.dm b/code/modules/admin/modify_robot.dm index f2847943f35..7141ae09f48 100644 --- a/code/modules/admin/modify_robot.dm +++ b/code/modules/admin/modify_robot.dm @@ -152,7 +152,7 @@ /datum/eventkit/modify_robot/tgui_state(mob/user) return GLOB.tgui_admin_state -/datum/eventkit/modify_robot/tgui_act(action, params) +/datum/eventkit/modify_robot/tgui_act(action, params, datum/tgui/ui) . = ..() if(.) return @@ -292,12 +292,12 @@ var/new_upgrade = text2path(params["upgrade"]) if(new_upgrade == /obj/item/borg/upgrade/utility/reset) var/obj/item/borg/upgrade/utility/reset/rmodul = new_upgrade - if(tgui_alert(usr, "Are you sure that you want to install [initial(rmodul.name)] and reset the robot's module?","Confirm",list("Yes","No"))!="Yes") + if(tgui_alert(ui.user, "Are you sure that you want to install [initial(rmodul.name)] and reset the robot's module?","Confirm",list("Yes","No"))!="Yes") return FALSE var/obj/item/borg/upgrade/U = new new_upgrade(null) if(new_upgrade == /obj/item/borg/upgrade/utility/rename) var/obj/item/borg/upgrade/utility/rename/UN = U - var/new_name = sanitizeSafe(tgui_input_text(usr, "Enter new robot name", "Robot Reclassification", UN.heldname, MAX_NAME_LEN), MAX_NAME_LEN) + var/new_name = sanitizeSafe(tgui_input_text(ui.user, "Enter new robot name", "Robot Reclassification", UN.heldname, MAX_NAME_LEN), MAX_NAME_LEN) if(new_name) UN.heldname = new_name U = UN @@ -487,7 +487,7 @@ target.lawsync() return TRUE if("change_supplied_law_position") - var/new_position = tgui_input_number(usr, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position, MAX_SUPPLIED_LAW_NUMBER, 1) + var/new_position = tgui_input_number(ui.user, "Enter new supplied law position between 1 and [MAX_SUPPLIED_LAW_NUMBER], inclusive. Inherent laws at the same index as a supplied law will not be stated.", "Law Position", supplied_law_position, MAX_SUPPLIED_LAW_NUMBER, 1) if(isnum(new_position)) supplied_law_position = CLAMP(new_position, 1, MAX_SUPPLIED_LAW_NUMBER) target.lawsync() @@ -495,7 +495,7 @@ if("edit_law") var/datum/ai_law/AL = locate(params["edit_law"]) in target.laws.all_laws() if(AL) - var/new_law = sanitize(tgui_input_text(usr, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) + var/new_law = sanitize(tgui_input_text(ui.user, "Enter new law. Leaving the field blank will cancel the edit.", "Edit Law", AL.law)) if(new_law && new_law != AL.law) AL.law = new_law target.lawsync() @@ -528,8 +528,8 @@ for(var/mob/living/silicon/robot/R in AI.connected_robots) to_chat(R, span_danger("Law Notice")) R.laws.show_laws(R) - if(usr != target) - to_chat(usr, span_notice("Laws displayed.")) + if(ui.user != target) + to_chat(ui.user, span_notice("Laws displayed.")) return TRUE if("select_ai") selected_ai = locate(params["new_ai"]) diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index 921795beb73..ce23bbd1529 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -39,11 +39,11 @@ /datum/eventkit/player_effects/tgui_state(mob/user) return GLOB.tgui_admin_state -/datum/eventkit/player_effects/tgui_act(action) +/datum/eventkit/player_effects/tgui_act(action, list/params, datum/tgui/ui) . = ..() if(.) return - if(!check_rights_for(usr.client, R_SPAWN)) + if(!check_rights_for(ui.user.client, R_SPAWN)) return log_and_message_admins("[key_name(user)] used player effect: [action] on [target.ckey] playing [target.name]") @@ -66,7 +66,7 @@ to_chat(user,"[target] didn't have any breakable legs, sorry.") if("bluespace_artillery") - bluespace_artillery(target,usr) + bluespace_artillery(target, ui.user) if("spont_combustion") var/mob/living/carbon/human/Tar = target @@ -137,14 +137,14 @@ "Orange Eyes (Light)" = /mob/living/simple_mob/shadekin/orange/white, "Orange Eyes (Brown)" = /mob/living/simple_mob/shadekin/orange/brown, "Rivyr (Unique)" = /mob/living/simple_mob/shadekin/blue/rivyr) - var/kin_type = tgui_input_list(usr, "Select the type of shadekin for [target] nomf","Shadekin Type Choice", kin_types) + var/kin_type = tgui_input_list(ui.user, "Select the type of shadekin for [target] nomf","Shadekin Type Choice", kin_types) if(!kin_type || !target) return kin_type = kin_types[kin_type] - var/myself = tgui_alert(usr, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete")) + var/myself = tgui_alert(ui.user, "Control the shadekin yourself or delete pred and prey after?","Control Shadekin?",list("Control","Cancel","Delete")) if(!myself || myself == "Cancel" || !target) return @@ -187,13 +187,13 @@ if("redspace_abduct") - redspace_abduction(target, usr) + redspace_abduction(target, ui.user) if("autosave") - fake_autosave(target, usr) + fake_autosave(target, ui.user) if("autosave2") - fake_autosave(target, usr, TRUE) + fake_autosave(target, ui.user, TRUE) if("adspam") if(target.client) @@ -718,7 +718,7 @@ if(where == "To Me") user.client.Getmob(target) if(where == "To Mob") - var/mob/selection = tgui_input_list(usr, "Select a mob to jump [target] to:", "Jump to mob", mob_list) + var/mob/selection = tgui_input_list(ui.user, "Select a mob to jump [target] to:", "Jump to mob", mob_list) target.on_mob_jump() target.forceMove(get_turf(selection)) log_admin("[key_name(user)] jumped [target] to [selection]") @@ -765,22 +765,22 @@ if("ai") if(!istype(target, /mob/living)) - to_chat(usr, span_notice("This can only be used on instances of type /mob/living")) + to_chat(ui.user, span_notice("This can only be used on instances of type /mob/living")) return var/mob/living/L = target if(L.client || L.teleop) - to_chat(usr, span_warning("This cannot be used on player mobs!")) + to_chat(ui.user, span_warning("This cannot be used on player mobs!")) return if(L.ai_holder) //Cleaning up the original ai var/ai_holder_old = L.ai_holder L.ai_holder = null qdel(ai_holder_old) //Only way I could make #TESTING - Unable to be GC'd to stop. del() logs show it works. - L.ai_holder_type = tgui_input_list(usr, "Choose AI holder", "AI Type", typesof(/datum/ai_holder/)) + L.ai_holder_type = tgui_input_list(ui.user, "Choose AI holder", "AI Type", typesof(/datum/ai_holder/)) L.initialize_ai_holder() - L.faction = sanitize(tgui_input_text(usr, "Please input AI faction", "AI faction", "neutral")) - L.a_intent = tgui_input_list(usr, "Please choose AI intent", "AI intent", list(I_HURT, I_HELP)) - if(tgui_alert(usr, "Make mob wake up? This is needed for carbon mobs.", "Wake mob?", list("Yes", "No")) == "Yes") + L.faction = sanitize(tgui_input_text(ui.user, "Please input AI faction", "AI faction", "neutral")) + L.a_intent = tgui_input_list(ui.user, "Please choose AI intent", "AI intent", list(I_HURT, I_HELP)) + if(tgui_alert(ui.user, "Make mob wake up? This is needed for carbon mobs.", "Wake mob?", list("Yes", "No")) == "Yes") L.AdjustSleeping(-100) if("cloaking") diff --git a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm index a4bdf523a45..0b7e542bc98 100644 --- a/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/prommie_blob.dm @@ -300,7 +300,7 @@ last_special = world.time + 25 - var/new_skin = input(usr, "Please select a new body color.", "Shapeshifter Colour", color) as null|color + var/new_skin = input(src, "Please select a new body color.", "Shapeshifter Colour", color) as null|color if(!new_skin) return color = new_skin diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm index b9043316123..9a7953ce2f0 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_powers.dm @@ -272,7 +272,7 @@ to_chat(src,span_warning("You must be awake and standing to perform this action!")) return - var/new_species = tgui_input_list(usr, "Please select a species to emulate.", "Shapeshifter Body", GLOB.playable_species) + var/new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", GLOB.playable_species) if(new_species) species?.base_species = new_species // Really though you better have a species regenerate_icons() //Expensive, but we need to recrunch all the icons we're wearing diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index 0eba8870997..fb8f73b9529 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -4,15 +4,15 @@ // Sanity is mostly handled in chimera_regenerate() if(stat == DEAD) - var/confirm = tgui_alert(usr, "Are you sure you want to regenerate your corpse? This process can take up to thirty minutes.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to regenerate your corpse? This process can take up to thirty minutes.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() else if (quickcheckuninjured()) - var/confirm = tgui_alert(usr, "Are you sure you want to regenerate? As you are uninjured this will only take 30 seconds and match your appearance to your character slot.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to regenerate? As you are uninjured this will only take 30 seconds and match your appearance to your character slot.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() else - var/confirm = tgui_alert(usr, "Are you sure you want to completely reconstruct your form? This process can take up to fifteen minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to completely reconstruct your form? This process can take up to fifteen minutes, depending on how hungry you are, and you will be unable to move.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") chimera_regenerate() @@ -113,7 +113,7 @@ remove_verb(src, /mob/living/carbon/human/proc/hatch) return - var/confirm = tgui_alert(usr, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", list("Yes", "No")) + var/confirm = tgui_alert(src, "Are you sure you want to hatch right now? This will be very obvious to anyone in view.", "Confirm Regeneration", list("Yes", "No")) if(confirm == "Yes") //Dead when hatching @@ -830,13 +830,13 @@ if(!T_ext) //Picking something here is critical. return if(T_ext.vital) - if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") + if(tgui_alert(src, "Are you sure you wish to severely damage their [T_ext]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") return //If they reconsider, don't continue. //Any internal organ, if there are any var/obj/item/organ/internal/T_int = tgui_input_list(src,"Do you wish to severely damage an internal organ, as well? If not, click 'cancel'", "Organ Choice", T_ext.internal_organs) if(T_int && T_int.vital) - if(tgui_alert(usr, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") + if(tgui_alert(src, "Are you sure you wish to severely damage their [T_int]? It will likely kill [T]...","Shred Limb",list("Yes", "No")) != "Yes") return //If they reconsider, don't continue. //And a belly, if they want @@ -1112,7 +1112,7 @@ to_chat(src, span_warning("You are not a weaver! How are you doing this? Tell a developer!")) return - var/new_silk_color = input(usr, "Pick a color for your woven products:","Silk Color", species.silk_color) as null|color + var/new_silk_color = input(src, "Pick a color for your woven products:","Silk Color", species.silk_color) as null|color if(new_silk_color) species.silk_color = new_silk_color @@ -1274,11 +1274,11 @@ return if(choice == "Color") //Easy way to set color so we don't bloat up the menu with even more buttons. - var/new_color = input(usr, "Choose a color to set your appendage to!", "", appendage_color) as color|null + var/new_color = input(src, "Choose a color to set your appendage to!", "", appendage_color) as color|null if(new_color) appendage_color = new_color if(choice == "Functionality") //Easy way to set color so we don't bloat up the menu with even more buttons. - var/choice2 = tgui_alert(usr, "Choose if you want to be pulled to the target or pull them to you!", "Functionality Setting", list("Pull target to self", "Pull self to target")) + var/choice2 = tgui_alert(src, "Choose if you want to be pulled to the target or pull them to you!", "Functionality Setting", list("Pull target to self", "Pull self to target")) if(!choice2) return if(choice2 == "Pull target to self") @@ -1564,19 +1564,19 @@ return if(choice == "Change reagent") - var/reagent_choice = tgui_input_list(usr, "Choose which reagent to inject!", "Select reagent", trait_injection_reagents) + var/reagent_choice = tgui_input_list(src, "Choose which reagent to inject!", "Select reagent", trait_injection_reagents) if(reagent_choice) trait_injection_selected = reagent_choice to_chat(src, span_notice("You prepare to inject [trait_injection_amount] units of [trait_injection_selected ? "[trait_injection_selected]" : "...nothing. Select a reagent before trying to inject anything."]")) return if(choice == "Change amount") - var/amount_choice = tgui_input_number(usr, "How much of the reagent do you want to inject? (Up to 5 units) (Can select 0 for a bite that doesn't inject venom!)", "How much?", trait_injection_amount, 5, 0, round_value = FALSE) + var/amount_choice = tgui_input_number(src, "How much of the reagent do you want to inject? (Up to 5 units) (Can select 0 for a bite that doesn't inject venom!)", "How much?", trait_injection_amount, 5, 0, round_value = FALSE) if(amount_choice >= 0) trait_injection_amount = amount_choice to_chat(src, span_notice("You prepare to inject [trait_injection_amount] units of [trait_injection_selected ? "[trait_injection_selected]" : "...nothing. Select a reagent before trying to inject anything."]")) return if(choice == "Change verb") - var/verb_choice = tgui_input_text(usr, "Choose the percieved manner of injection, such as 'bites' or 'stings', don't be misleading or abusive. This will show up in game as ('X' 'Verb' 'Y'. Example: X bites Y.)", "How are you injecting?", trait_injection_verb, max_length = 60) //Whoaa there cowboy don't put a novel in there. + var/verb_choice = tgui_input_text(src, "Choose the percieved manner of injection, such as 'bites' or 'stings', don't be misleading or abusive. This will show up in game as ('X' 'Verb' 'Y'. Example: X bites Y.)", "How are you injecting?", trait_injection_verb, max_length = 60) //Whoaa there cowboy don't put a novel in there. if(verb_choice) trait_injection_verb = verb_choice to_chat(src, span_notice("You will [trait_injection_verb] your targets.")) @@ -1611,7 +1611,7 @@ You can also bite synthetics, but due to how synths work, they won't have anything injected into them.
"} - usr << browse(output,"window=chemicalrefresher") + src << browse(output,"window=chemicalrefresher") return else var/list/targets = list() //IF IT IS NOT BROKEN. DO NOT FIX IT. AND KEEP COPYPASTING IT (Pointing Rick Dalton: "That's my code!" ~CL) @@ -1657,7 +1657,7 @@ add_attack_logs(src,target,"Injection trait ([trait_injection_selected], [trait_injection_amount])") if(target.reagents && (trait_injection_amount > 0) && !synth) target.reagents.add_reagent(trait_injection_selected, trait_injection_amount) - var/ourmsg = "[usr] [trait_injection_verb] [target] " + var/ourmsg = "[src] [trait_injection_verb] [target] " switch(zone_sel.selecting) if(BP_HEAD) ourmsg += "on the head!" diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 388600f0764..b39101d98a3 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -27,7 +27,7 @@ toggle_sensors(user) return if("internals") - visible_message(span_danger("\The [usr] is trying to set \the [src]'s internals!")) + visible_message(span_danger("\The [user] is trying to set \the [src]'s internals!")) if(do_after(user,HUMAN_STRIP_DELAY,src)) toggle_internals(user) return @@ -38,7 +38,7 @@ var/obj/item/clothing/accessory/A = suit.accessories[1] if(!istype(A)) return - visible_message(span_danger("\The [usr] is trying to remove \the [src]'s [A.name]!")) + visible_message(span_danger("\The [user] is trying to remove \the [src]'s [A.name]!")) if(!do_after(user,HUMAN_STRIP_DELAY,src)) return