From 540ac15652e6d0e97d08de49de51d7ed9a92f67a Mon Sep 17 00:00:00 2001 From: Spookerton Date: Fri, 29 Dec 2023 23:44:21 +0000 Subject: [PATCH] examine signature changed to include distance - distance is INFINITE, 0, or a positive integer based on get_dist() between the examiner and examinee's turfs when they are on the same Z. When the examiner is dead or a ghost, distance is always 0. - also updates /examine( implementations to use it! - adds w_class_to_name proc for reusing "It is a X item." examine behavior. --- .../components/binary_devices/dp_vent_pump.dm | 4 +-- code/ATMOSPHERICS/components/shutoff.dm | 2 +- .../components/unary/cold_sink.dm | 4 +-- .../components/unary/heat_source.dm | 2 +- .../components/unary/vent_pump.dm | 6 ++-- .../components/unary/vent_scrubber.dm | 4 +-- code/ATMOSPHERICS/components/valve.dm | 2 +- code/__defines/dcs/signals.dm | 2 +- code/game/atoms.dm | 2 +- code/game/gamemodes/cult/ritual.dm | 4 +-- code/game/gamemodes/nuclear/pinpointer.dm | 14 ++++---- .../devices/disposable_teleporter.dm | 2 +- code/game/machinery/CableLayer.dm | 2 +- code/game/machinery/atmoalter/meter.dm | 7 ++-- code/game/machinery/cell_charger.dm | 6 ++-- code/game/machinery/cloning.dm | 2 +- code/game/machinery/computer/arcade.dm | 4 +-- code/game/machinery/computer/guestpass.dm | 4 +-- code/game/machinery/doors/door.dm | 2 +- code/game/machinery/doors/firedoor.dm | 9 ++--- code/game/machinery/fire_alarm.dm | 2 +- code/game/machinery/floorlayer.dm | 4 +-- code/game/machinery/frame.dm | 2 +- code/game/machinery/iv_drip.dm | 6 ++-- code/game/machinery/lightswitch.dm | 6 ++-- code/game/machinery/oxygen_pump.dm | 2 +- code/game/machinery/pipe/pipelayer.dm | 2 +- code/game/machinery/recharger.dm | 7 ++-- code/game/machinery/rechargestation.dm | 4 +-- code/game/machinery/spaceheater.dm | 4 +-- code/game/machinery/status_display.dm | 4 +-- code/game/mecha/components/_component.dm | 2 +- code/game/mecha/equipment/mecha_equipment.dm | 2 +- code/game/mecha/mecha.dm | 9 +---- .../effects/decals/Cleanable/humans.dm | 2 +- code/game/objects/items.dm | 33 ++++++++++-------- code/game/objects/items/bells.dm | 2 +- code/game/objects/items/bodybag.dm | 6 ++-- code/game/objects/items/contraband.dm | 4 +-- .../devices/communicator/communicator.dm | 10 +++--- code/game/objects/items/devices/flashlight.dm | 2 +- .../objects/items/devices/floor_painter.dm | 2 +- code/game/objects/items/devices/geiger.dm | 2 +- .../game/objects/items/devices/holowarrant.dm | 6 ++-- .../objects/items/devices/lightreplacer.dm | 6 ++-- code/game/objects/items/devices/modkit.dm | 2 +- .../objects/items/devices/pipe_painter.dm | 2 +- .../objects/items/devices/radio/headset.dm | 3 +- .../game/objects/items/devices/radio/radio.dm | 5 ++- code/game/objects/items/devices/spy_bug.dm | 10 +++--- .../objects/items/devices/suit_cooling.dm | 12 +++---- code/game/objects/items/devices/tvcamera.dm | 3 +- code/game/objects/items/magazine.dm | 4 +-- code/game/objects/items/paintkit.dm | 4 +-- code/game/objects/items/robobag.dm | 2 +- code/game/objects/items/robot/robot_frame.dm | 2 +- .../objects/items/stacks/marker_beacons.dm | 4 +-- code/game/objects/items/stacks/stack.dm | 9 +++-- code/game/objects/items/toys/mech_toys.dm | 4 +-- code/game/objects/items/toys/toys.dm | 10 +++--- code/game/objects/items/weapons/RCD.dm | 2 +- code/game/objects/items/weapons/RSF.dm | 4 +-- .../objects/items/weapons/cigs_lighters.dm | 2 +- code/game/objects/items/weapons/ecigs.dm | 7 ++-- .../objects/items/weapons/extinguisher.dm | 6 ++-- .../objects/items/weapons/gift_wrappaper.dm | 4 +-- .../items/weapons/grenades/chem_grenade.dm | 2 +- .../objects/items/weapons/grenades/grenade.dm | 6 ++-- .../items/weapons/id cards/station_ids.dm | 4 +-- .../items/weapons/implants/implantcircuits.dm | 4 +-- .../items/weapons/material/chainsaw.dm | 4 +-- .../items/weapons/material/gravemarker.dm | 8 ++--- .../items/weapons/material/whetstone.dm | 6 ++-- .../objects/items/weapons/melee/energy.dm | 6 ++-- code/game/objects/items/weapons/shields.dm | 2 +- .../objects/items/weapons/storage/backpack.dm | 6 ++-- .../objects/items/weapons/storage/bags/ore.dm | 4 +-- .../objects/items/weapons/storage/fancy.dm | 12 +++---- .../game/objects/items/weapons/storage/mre.dm | 2 +- .../objects/items/weapons/storage/secure.dm | 4 +-- .../objects/items/weapons/storage/storage.dm | 2 +- code/game/objects/items/weapons/stunbaton.dm | 5 ++- .../objects/items/weapons/tanks/jetpack.dm | 4 +-- .../objects/items/weapons/tanks/tank_types.dm | 24 ++++++------- .../game/objects/items/weapons/tanks/tanks.dm | 4 +-- code/game/objects/items/weapons/tape.dm | 4 +-- .../items/weapons/tools/weldingtool.dm | 8 ++--- .../objects/items/weapons/weldbackpack.dm | 4 +-- code/game/objects/structures/animal_den.dm | 2 +- code/game/objects/structures/barsign.dm | 2 +- code/game/objects/structures/bedsheet_bin.dm | 2 +- .../structures/crates_lockers/__closets.dm | 6 ++-- .../structures/crates_lockers/vehiclecage.dm | 2 +- code/game/objects/structures/fence.dm | 4 +-- code/game/objects/structures/flora/flora.dm | 6 ++-- code/game/objects/structures/gravemarker.dm | 8 ++--- code/game/objects/structures/janicart.dm | 6 ++-- code/game/objects/structures/mop_bucket.dm | 4 +-- code/game/objects/structures/railing.dm | 2 +- code/game/objects/structures/signs.dm | 4 +-- code/game/objects/structures/window.dm | 2 +- .../game/turfs/simulated/outdoors/outdoors.dm | 2 +- code/game/turfs/simulated/walls.dm | 2 +- code/modules/assembly/assembly.dm | 4 +-- code/modules/assembly/holder.dm | 8 ++--- code/modules/assembly/mousetrap.dm | 2 +- code/modules/blob2/blobs/base_blob.dm | 2 +- code/modules/clothing/clothing.dm | 2 +- code/modules/clothing/clothing_accessories.dm | 2 +- code/modules/clothing/shoes/magboots.dm | 4 +-- code/modules/clothing/spacesuits/breaches.dm | 2 +- .../spacesuits/rig/modules/modules.dm | 2 +- code/modules/clothing/spacesuits/rig/rig.dm | 2 +- .../modules/clothing/spacesuits/spacesuits.dm | 4 +-- code/modules/clothing/spacesuits/void/void.dm | 4 +-- .../clothing/under/accessories/accessory.dm | 4 +-- .../clothing/under/accessories/holster.dm | 4 +-- .../detectivework/tools/evidencebag.dm | 2 +- code/modules/economy/cash.dm | 4 +-- code/modules/economy/cash_register.dm | 2 +- code/modules/economy/retail_scanner.dm | 2 +- code/modules/examine/examine.dm | 34 +++++++++++-------- code/modules/fishing/fishing_rod.dm | 4 +-- .../food/drinkingglass/drinkingglass.dm | 2 +- code/modules/food/food/drinks.dm | 4 +-- code/modules/food/food/sandwich.dm | 2 +- code/modules/food/food/snacks.dm | 6 ++-- .../kitchen/cooking_machines/_appliance.dm | 4 +-- .../food/kitchen/cooking_machines/_cooker.dm | 4 +-- .../food/kitchen/cooking_machines/_mixer.dm | 4 +-- .../kitchen/cooking_machines/container.dm | 2 +- .../food/kitchen/cooking_machines/fryer.dm | 4 +-- code/modules/food/kitchen/gibber.dm | 2 +- code/modules/games/cards.dm | 2 +- .../modules/hydroponics/beekeeping/beehive.dm | 2 +- code/modules/hydroponics/grown_sif.dm | 2 +- code/modules/hydroponics/seed_packets.dm | 2 +- code/modules/hydroponics/trays/tray.dm | 6 ++-- .../integrated_electronics/core/assemblies.dm | 6 ++-- .../core/assemblies/clothing.dm | 6 ++-- .../core/assemblies/device.dm | 3 +- .../core/integrated_circuit.dm | 4 +-- .../integrated_electronics/subtypes/memory.dm | 4 +-- .../materials/sheets/organic/tanning/hide.dm | 8 ++--- .../sheets/organic/tanning/hide_hairless.dm | 6 ++-- .../sheets/organic/tanning/leather_wet.dm | 2 +- .../sheets/organic/tanning/tanning_rack.dm | 4 +-- code/modules/mining/fulton.dm | 2 +- code/modules/mining/ore_box.dm | 4 +-- .../mine_point_items.dm | 2 +- code/modules/mob/dead/observer/observer.dm | 2 +- code/modules/mob/living/bot/medbot.dm | 2 +- code/modules/mob/living/carbon/brain/MMI.dm | 2 +- .../mob/living/carbon/human/examine.dm | 4 +-- .../species/xenomorphs/alien_facehugger.dm | 4 +-- code/modules/mob/living/silicon/ai/examine.dm | 6 ++-- .../modules/mob/living/silicon/pai/examine.dm | 5 ++- .../living/silicon/robot/drone/drone_items.dm | 4 +-- .../silicon/robot/drone/drone_manufacturer.dm | 2 +- .../mob/living/silicon/robot/examine.dm | 6 ++-- .../mob/living/silicon/robot/robot_items.dm | 2 +- .../robot/subtypes/thinktank/_thinktank.dm | 2 +- .../mob/living/simple_mob/harvesting.dm | 4 +-- .../simple_mob/subtypes/animal/pets/parrot.dm | 4 +-- .../animal/sif/grafadreka/grafadreka.dm | 2 +- .../simple_mob/subtypes/animal/sif/sif.dm | 2 +- .../simple_mob/subtypes/illusion/illusion.dm | 6 ++-- .../subtypes/occult/constructs/_construct.dm | 2 +- .../subtypes/slime/xenobio/xenobio.dm | 2 +- .../computers/modular_computer/damage.dm | 4 +-- .../modular_computers/hardware/_hardware.dm | 3 +- code/modules/multiz/turf.dm | 4 +-- code/modules/organs/internal/brain.dm | 2 +- code/modules/organs/organ.dm | 2 +- code/modules/organs/organ_external.dm | 4 +-- .../overmap/ships/computers/sensors.dm | 4 +-- code/modules/paperwork/folders.dm | 4 +-- code/modules/paperwork/paper.dm | 4 +-- code/modules/paperwork/paper_bundle.dm | 6 ++-- code/modules/paperwork/paper_sticky.dm | 4 +-- code/modules/paperwork/paperbin.dm | 4 +-- code/modules/paperwork/photocopier.dm | 4 +-- code/modules/paperwork/photography.dm | 4 +-- code/modules/pda/pda.dm | 4 +-- code/modules/persistence/graffiti.dm | 2 +- code/modules/persistence/noticeboard.dm | 4 +-- code/modules/persistence/specimens.dm | 4 +-- code/modules/power/apc.dm | 8 ++--- code/modules/power/breaker_box.dm | 2 +- code/modules/power/cable.dm | 6 ++-- code/modules/power/cell.dm | 6 ++-- code/modules/power/debug_items.dm | 2 +- code/modules/power/lighting.dm | 6 ++-- code/modules/power/port_gen.dm | 19 +++++------ code/modules/power/singularity/collector.dm | 5 ++- code/modules/power/singularity/emitter.dm | 4 +-- .../particle_accelerator.dm | 8 ++--- .../particle_accelerator/particle_smasher.dm | 6 ++-- code/modules/power/smes.dm | 4 +-- code/modules/power/tesla/energy_ball.dm | 2 +- code/modules/projectiles/ammunition.dm | 5 ++- .../projectiles/ammunition/magnetic.dm | 2 +- .../projectiles/ammunition/smartmag.dm | 4 +-- code/modules/projectiles/broken.dm | 4 +-- code/modules/projectiles/gun.dm | 2 +- code/modules/projectiles/guns/energy.dm | 2 +- .../projectiles/guns/launcher/crossbow.dm | 2 +- .../guns/launcher/grenade_launcher.dm | 6 ++-- .../projectiles/guns/launcher/pneumatic.dm | 6 ++-- .../projectiles/guns/launcher/rocket.dm | 4 +-- .../modules/projectiles/guns/magnetic/bore.dm | 4 +-- .../projectiles/guns/magnetic/magnetic.dm | 6 ++-- .../guns/magnetic/magnetic_construction.dm | 4 +-- .../guns/magnetic/magnetic_railgun.dm | 4 +-- code/modules/projectiles/guns/projectile.dm | 32 ++++++++--------- .../projectiles/guns/projectile/automatic.dm | 2 +- .../projectiles/guns/projectile/dartgun.dm | 2 +- .../projectiles/guns/projectile/revolver.dm | 2 +- code/modules/projectiles/guns/vox.dm | 2 +- .../reagents/machinery/dispenser/cartridge.dm | 2 +- .../machinery/dispenser/dispenser2.dm | 4 +-- .../machinery/dispenser/reagent_tank.dm | 10 +++--- code/modules/reagents/machinery/distillery.dm | 4 +-- code/modules/reagents/machinery/grinder.dm | 6 ++-- .../reagents/reagent_containers/borghypo.dm | 4 +-- .../reagents/reagent_containers/dropper.dm | 4 +-- .../reagents/reagent_containers/glass.dm | 6 ++-- .../reagents/reagent_containers/hypospray.dm | 2 +- .../reagents/reagent_containers/spray.dm | 6 ++-- code/modules/recycling/sortingmachinery.dm | 12 +++---- code/modules/research/message_server.dm | 2 +- code/modules/shieldgen/directional_shield.dm | 4 +-- code/modules/shieldgen/handheld_defuser.dm | 4 +-- code/modules/shieldgen/shield_diffuser.dm | 4 +-- code/modules/tables/tables.dm | 2 +- code/modules/vehicles/cargo_train.dm | 4 +-- code/modules/virus2/items_devices.dm | 2 +- code/modules/xenoarcheaology/sampling.dm | 4 +-- .../xenoarcheaology/tools/tools_pickaxe.dm | 2 +- code/modules/xenobio/items/extracts.dm | 2 +- 240 files changed, 527 insertions(+), 554 deletions(-) diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index 7709bb56580..710036b2b51 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -196,9 +196,9 @@ return 1 -/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user) +/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" diff --git a/code/ATMOSPHERICS/components/shutoff.dm b/code/ATMOSPHERICS/components/shutoff.dm index 7517cbd7efc..bbc9c4a905c 100644 --- a/code/ATMOSPHERICS/components/shutoff.dm +++ b/code/ATMOSPHERICS/components/shutoff.dm @@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves) /obj/machinery/atmospherics/valve/shutoff/update_icon() icon_state = "vclamp[open]" -/obj/machinery/atmospherics/valve/shutoff/examine(var/mob/user) +/obj/machinery/atmospherics/valve/shutoff/examine(mob/user, distance, infix, suffix) . = ..() . += "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"]." diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index c842da2d50c..740353f1bf8 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -87,7 +87,7 @@ /obj/machinery/atmospherics/unary/freezer/tgui_act(action, params) if(..()) return TRUE - + . = TRUE switch(action) if("toggleStatus") @@ -169,7 +169,7 @@ ..() -/obj/machinery/atmospherics/unary/freezer/examine(mob/user) +/obj/machinery/atmospherics/unary/freezer/examine(mob/user, distance, infix, suffix) . = ..() if(panel_open) . += "The maintenance hatch is open." diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 5fcc679adfc..de3a33cce29 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -156,7 +156,7 @@ ..() -/obj/machinery/atmospherics/unary/heater/examine(mob/user) +/obj/machinery/atmospherics/unary/heater/examine(mob/user, distance, infix, suffix) . = ..() if(panel_open) . += "The maintenance hatch is open." diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 7ed4040e66d..568f3bc383c 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -165,7 +165,7 @@ soundloop.stop() return 0 if(!use_power) - soundloop.stop() + soundloop.stop() return 0 if(welded) soundloop.stop() @@ -400,9 +400,9 @@ else ..() -/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user) +/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" else . += "You are too far away to read the gauge." diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 9b049f95f57..b1088e206fc 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -286,9 +286,9 @@ "You hear a ratchet.") deconstruct() -/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user) +/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" else . += "You are too far away to read the gauge." diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index fd1cf3e6433..2b91662aad2 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -306,6 +306,6 @@ "You hear a ratchet.") deconstruct() -/obj/machinery/atmospherics/valve/examine(mob/user) +/obj/machinery/atmospherics/valve/examine(mob/user, distance, infix, suffix) . = ..() . += "It is [open ? "open" : "closed"]." diff --git a/code/__defines/dcs/signals.dm b/code/__defines/dcs/signals.dm index 8bb95f0d899..a83b7957dc1 100644 --- a/code/__defines/dcs/signals.dm +++ b/code/__defines/dcs/signals.dm @@ -61,7 +61,7 @@ #define COMSIG_ATOM_HULK_ATTACK "hulk_attack" ///from base of atom/animal_attack(): (/mob/user) #define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal" -///from base of atom/examine(): (/mob) +///from base of atom/examine(mob/user, distance, infix, suffix): (/mob) #define COMSIG_PARENT_EXAMINE "atom_examine" ///from base of atom/get_examine_name(): (/mob, list/overrides) #define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e63a02358aa..8cb8aeab7a3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -215,7 +215,7 @@ var/global/list/pre_init_created_atoms // atom creation ordering means some stuf /atom/proc/get_examine_desc() return desc -/atom/proc/examine(mob/user, infix = "", suffix = "") +/atom/proc/examine(mob/user, distance, infix = "", suffix = "") var/f_name = "\a [src][infix]." if (blood_DNA && !istype(src, /obj/effect/decal)) if (gender == PLURAL) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index a1c94348a3f..e4706786489 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -83,7 +83,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," rune_list.Remove(src) ..() -/obj/effect/rune/examine(mob/user) +/obj/effect/rune/examine(mob/user, distance, infix, suffix) . = ..() if(iscultist(user)) . += "This spell circle reads: [word1] [word2] [word3]." @@ -425,7 +425,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," to_chat(user, "The book seems full of illegible scribbles. Is this a joke?") return -/obj/item/book/tome/examine(mob/user) +/obj/item/book/tome/examine(mob/user, distance, infix, suffix) . = ..() if(!iscultist(user)) . += "An old, dusty tome with frayed edges and a sinister looking cover." diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 1b7056f738f..b5d7c0941bd 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -33,15 +33,15 @@ /obj/item/pinpointer/process() if(!active) return PROCESS_KILL - + if(!the_disk) the_disk = locate() if(!the_disk) icon_state = "pinonnull" return - + set_dir(get_dir(src,the_disk)) - + switch(get_dist(src,the_disk)) if(0) icon_state = "pinondirect" @@ -52,7 +52,7 @@ if(16 to INFINITY) icon_state = "pinonfar" -/obj/item/pinpointer/examine(mob/user) +/obj/item/pinpointer/examine(mob/user, distance, infix, suffix) . = ..() for(var/obj/machinery/nuclearbomb/bomb in machines) if(bomb.timing) @@ -299,10 +299,10 @@ if(loc.z != our_shuttle.z) //If you are on a different z-level from the shuttle icon_state = "pinonnull" - + else set_dir(get_dir(src, our_shuttle)) - + switch(get_dist(src, our_shuttle)) if(0) icon_state = "pinondirect" @@ -318,4 +318,4 @@ shuttle_comp_id = "Mercenary" /obj/item/pinpointer/shuttle/heist - shuttle_comp_id = "Skipjack" \ No newline at end of file + shuttle_comp_id = "Skipjack" diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm index 814daf9bfa5..e0ac708dc06 100644 --- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm +++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm @@ -24,7 +24,7 @@ one has been provided to allow you to leave your hideout." uses = 1 -/obj/item/disposable_teleporter/examine(mob/user) +/obj/item/disposable_teleporter/examine(mob/user, distance, infix, suffix) . = ..() . += "[uses] uses remaining." diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index ed99b6e72c8..68c35715872 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -48,7 +48,7 @@ else to_chat(usr, "There's no more cable on the reel.") -/obj/machinery/cablelayer/examine(mob/user) +/obj/machinery/cablelayer/examine(mob/user, distance, infix, suffix) . = ..() . += "[src]'s cable reel has [cable.amount] length\s left." diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 608a01ab298..68ddf26ef97 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -76,15 +76,12 @@ ) radio_connection.post_signal(src, signal) -/obj/machinery/meter/examine(mob/user) +/obj/machinery/meter/examine(mob/user, distance, infix, suffix) . = ..() - - if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead))) + if(distance > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead))) . += "You are too far away to read it." - else if(stat & (NOPOWER|BROKEN)) . += "The display is off." - else if(target) var/datum/gas_mixture/environment = target.return_air() if(environment) diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 3cf16e808e6..06f24f918cd 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -34,9 +34,9 @@ else cut_overlays() -/obj/machinery/cell_charger/examine(mob/user) +/obj/machinery/cell_charger/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 5) + if(distance <= 5) . += "[charging ? "[charging]" : "Nothing"] is in [src]." if(charging) . += "Current charge: [charging.charge] / [charging.maxcharge]" @@ -128,4 +128,4 @@ var/E = 0 for(var/obj/item/stock_parts/capacitor/C in component_parts) E += C.rating - efficiency = active_power_usage * (1+ (E - 1)*0.5) \ No newline at end of file + efficiency = active_power_usage * (1+ (E - 1)*0.5) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 51eb39765cf..98625bbacc2 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -535,7 +535,7 @@ read_only = !read_only to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].") -/obj/item/disk/data/examine(mob/user) +/obj/item/disk/data/examine(mob/user, distance, infix, suffix) . = ..() . += "The write-protect tab is set to [read_only ? "protected" : "unprotected"]." diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index aa1b2152bb5..58673e2660f 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1033,9 +1033,9 @@ w_class = ITEMSIZE_SMALL var/active = 0 //if the ship is on -/obj/item/orion_ship/examine(mob/user) +/obj/item/orion_ship/examine(mob/user, distance, infix, suffix) . = ..() - if(in_range(user, src)) + if(distance < 2) if(!active) . += span("notice", "There's a little switch on the bottom. It's flipped down.") else diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index 53e97711cd6..db565944800 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -18,7 +18,7 @@ else return temp_access -/obj/item/card/id/guest/examine(mob/user) +/obj/item/card/id/guest/examine(mob/user, distance, infix, suffix) . = ..() if (world.time < expiration_time) . += "This pass expires at [worldtime2stationtime(expiration_time)]." @@ -244,4 +244,4 @@ to_chat(usr, "Cannot issue pass without issuing ID.") src.add_fingerprint(usr) - SSnanoui.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 2d433f6b7de..84fd6f7694f 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -334,7 +334,7 @@ return -/obj/machinery/door/examine(mob/user) +/obj/machinery/door/examine(mob/user, distance, infix, suffix) . = ..() if(src.health <= 0) . += "It is broken!" diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index addcf65b5d7..33b879a29a4 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -57,7 +57,7 @@ if(F != src) log_debug("Duplicate firedoors at [x],[y],[z]") return INITIALIZE_HINT_QDEL - + var/area/A = get_area(src) ASSERT(istype(A)) @@ -78,15 +78,12 @@ /obj/machinery/door/firedoor/get_material() return get_material_by_name(DEFAULT_WALL_MATERIAL) -/obj/machinery/door/firedoor/examine(mob/user) +/obj/machinery/door/firedoor/examine(mob/user, distance, infix, suffix) . = ..() - - if(!Adjacent(user)) + if(distance > 1) return . - if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF) . += "WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!" - . += "Sensor readings:" for(var/index = 1; index <= tile_info.len; index++) var/o = "  " diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm index 908abef4bd0..1ce1e76c09a 100644 --- a/code/game/machinery/fire_alarm.dm +++ b/code/game/machinery/fire_alarm.dm @@ -26,7 +26,7 @@ FIRE ALARM /obj/machinery/firealarm/alarms_hidden alarms_hidden = TRUE -/obj/machinery/firealarm/examine() +/obj/machinery/firealarm/examine(mob/user, distance, infix, suffix) . = ..() . += "Current security level: [seclevel]" diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 5dcfe90d6e0..5d9187d0f33 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -63,7 +63,7 @@ return ..() -/obj/machinery/floorlayer/examine(mob/user) +/obj/machinery/floorlayer/examine(mob/user, distance, infix, suffix) . = ..() var/dismantle = mode["dismantle"] var/laying = mode["laying"] @@ -107,4 +107,4 @@ /obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf) for(var/obj/item/stack/tile/tile in w_turf) - TakeTile(tile) \ No newline at end of file + TakeTile(tile) diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index c8370fb8ab8..bcf0f790b26 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -256,7 +256,7 @@ anchored = TRUE density = TRUE -/obj/structure/frame/examine(mob/user) +/obj/structure/frame/examine(mob/user, distance, infix, suffix) . = ..() if(circuit) . += "It has \a [circuit] installed." diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 99efb2b3650..00162a847bd 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -164,12 +164,10 @@ mode = !mode to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].") -/obj/machinery/iv_drip/examine(mob/user) +/obj/machinery/iv_drip/examine(mob/user, distance, infix, suffix) . = ..() - - if(get_dist(user, src) <= 2) + if(distance < 3) . += "The IV drip is [mode ? "injecting" : "taking blood"]." - if(beaker) if(beaker.reagents?.reagent_list?.len) . += "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid." diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index d87f8cc5804..1f12076a0ab 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -50,9 +50,9 @@ add_overlay(overlay) set_light(2, 0.1, on ? "#82FF4C" : "#F86060") -/obj/machinery/light_switch/examine(mob/user) +/obj/machinery/light_switch/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "A light switch. It is [on? "on" : "off"]." /obj/machinery/light_switch/attack_hand(mob/user) @@ -84,4 +84,4 @@ ..(severity) return power_change() - ..(severity) \ No newline at end of file + ..(severity) diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index c848f15b94a..e388575700f 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -150,7 +150,7 @@ if(istype(W, /obj/item/tank) && !stat) to_chat(user, "Please open the maintenance hatch first.") -/obj/machinery/oxygen_pump/examine(var/mob/user) +/obj/machinery/oxygen_pump/examine(mob/user, distance, infix, suffix) . = ..() if(tank) . += "The meter shows [round(tank.air_contents.return_pressure())] kPa." diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index be5550e7960..3b9831c477c 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -114,7 +114,7 @@ ..() -/obj/machinery/pipelayer/examine(mob/user) +/obj/machinery/pipelayer/examine(mob/user, distance, infix, suffix) . = ..() . += "[src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated." diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 87a993afd49..ed96812226b 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -21,10 +21,9 @@ . = ..() default_apply_parts() -/obj/machinery/recharger/examine(mob/user) +/obj/machinery/recharger/examine(mob/user, distance, infix, suffix) . = ..() - - if(get_dist(user, src) <= 5) + if(distance < 6) . += "[charging ? "[charging]" : "Nothing"] is in [src]." if(charging) var/obj/item/cell/C = charging.get_cell() @@ -171,4 +170,4 @@ icon_state_charging = "wrecharger1" icon_state_idle = "wrecharger0" portable = 0 - circuit = /obj/item/circuitboard/recharger/wrecharger \ No newline at end of file + circuit = /obj/item/circuitboard/recharger/wrecharger diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 18287be44c6..55953c37992 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -125,7 +125,7 @@ var/charge_used = cell.use(diff) rigcell.give(charge_used) -/obj/machinery/recharge_station/examine(mob/user) +/obj/machinery/recharge_station/examine(mob/user, distance, infix, suffix) . = ..() . += "The charge meter reads: [round(chargepercentage())]%" @@ -322,4 +322,4 @@ icon_state = "borg_pod_opened" if(icon_update_tick == 0) - build_overlays() \ No newline at end of file + build_overlays() diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 975a67a0155..b04a35285dd 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -40,15 +40,13 @@ add_overlay("sheater-open") -/obj/machinery/space_heater/examine(mob/user) +/obj/machinery/space_heater/examine(mob/user, distance, infix, suffix) . = ..() - . += "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]." if(panel_open) . += "The power cell is [cell ? "installed" : "missing"]." else . += "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" - return /obj/machinery/space_heater/powered() if(cell && cell.charge) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 4ead0b6d15f..2a027c8a593 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -146,7 +146,7 @@ return 1 return 0 -/obj/machinery/status_display/examine(mob/user) +/obj/machinery/status_display/examine(mob/user, distance, infix, suffix) . = ..() if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT) . += "The display says:
\t[sanitize(message1)]
\t[sanitize(message2)]" @@ -264,4 +264,4 @@ #undef FONT_SIZE #undef FONT_COLOR #undef FONT_STYLE -#undef SCROLL_SPEED \ No newline at end of file +#undef SCROLL_SPEED diff --git a/code/game/mecha/components/_component.dm b/code/game/mecha/components/_component.dm index a12bf6c90f6..0f668ee5e42 100644 --- a/code/game/mecha/components/_component.dm +++ b/code/game/mecha/components/_component.dm @@ -25,7 +25,7 @@ var/internal_damage_flag // If set, the component will toggle the flag on or off if it is destroyed / severely damaged. -/obj/item/mecha_parts/component/examine(mob/user) +/obj/item/mecha_parts/component/examine(mob/user, distance, infix, suffix) . = ..() var/show_integrity = round(integrity/max_integrity*100, 0.1) switch(show_integrity) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 64cc2e6d46a..f1483ea332b 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -35,7 +35,7 @@ return 1 return 0 -/obj/item/mecha_parts/mecha_equipment/examine(mob/user) +/obj/item/mecha_parts/mecha_equipment/examine(mob/user, distance, infix, suffix) . = ..() . += "[src] will fill [equip_type?"a [equip_type]":"any"] slot." diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 622b8f89d36..a71f67e9154 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -501,28 +501,21 @@ else return 0 -/obj/mecha/examine(mob/user) +/obj/mecha/examine(mob/user, distance, infix, suffix) . = ..() - var/obj/item/mecha_parts/component/armor/AC = internal_components[MECH_ARMOR] - var/obj/item/mecha_parts/component/hull/HC = internal_components[MECH_HULL] - if(AC) . += "It has [AC] attached. [AC.get_efficiency()<0.5?"It is severely damaged.":""]" else . += "It has no armor plating." - if(HC) if(!AC || AC.get_efficiency() < 0.7) . += "It has [HC] attached. [HC.get_efficiency()<0.5?"It is severely damaged.":""]" else . += "You cannot tell what type of hull it has." - else . += "It does not seem to have a completed hull." - - var/integrity = health/initial(health)*100 switch(integrity) if(85 to 100) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index cd2a5741162..13852cacd79 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -161,7 +161,7 @@ var/global/list/image/splatter_cache=list() else icon_state = "writing1" -/obj/effect/decal/cleanable/blood/writing/examine(mob/user) +/obj/effect/decal/cleanable/blood/writing/examine(mob/user, distance, infix, suffix) . = ..() . += "It reads: \"[message]\"" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 53eb3d5fcff..a7c3daf8366 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -200,20 +200,8 @@ src.loc = T // See inventory_sizes.dm for the defines. -/obj/item/examine(mob/user) - var/size - switch(src.w_class) - if(ITEMSIZE_TINY) - size = "tiny" - if(ITEMSIZE_SMALL) - size = "small" - if(ITEMSIZE_NORMAL) - size = "normal-sized" - if(ITEMSIZE_LARGE) - size = "bulky" - if(ITEMSIZE_HUGE) - size = "huge" - return ..(user, "", "It is a [size] item.") +/obj/item/examine(mob/user, distance, infix, suffix) + return ..(user, distance, infix, "It is a [w_class_to_name(w_class)] item.") /obj/item/attack_hand(mob/living/user as mob) if (!user) return @@ -977,3 +965,20 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. /obj/item/proc/handle_movement(var/turf/walking, var/running) return FALSE + + +/// Returns the item's w_class as text. +/proc/w_class_to_name(w_class) + switch (w_class) + if (ITEMSIZE_TINY) + return "tiny" + if (ITEMSIZE_SMALL) + return "small" + if (ITEMSIZE_NORMAL) + return "normal" + if (ITEMSIZE_LARGE) + return "large" + if (ITEMSIZE_HUGE) + return "huge" + else + return "buggy" diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm index 27ba85d9986..2c824ed34fd 100644 --- a/code/game/objects/items/bells.dm +++ b/code/game/objects/items/bells.dm @@ -13,7 +13,7 @@ var/static/radial_use = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_use") var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup") -/obj/item/deskbell/examine(mob/user) +/obj/item/deskbell/examine(mob/user, distance, infix, suffix) . = ..() if(broken) . += "It looks damaged, the ringer is stuck firmly inside." diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index bbb111b5dc2..b342dace1d9 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -214,14 +214,14 @@ if(H.reagents) syringe.reagents.trans_to_mob(H, 30, CHEM_BLOOD) -/obj/structure/closet/body_bag/cryobag/examine(mob/user) +/obj/structure/closet/body_bag/cryobag/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) //The bag's rather thick and opaque from a distance. + if(distance < 2) //The bag's rather thick and opaque from a distance. . += "You peer into \the [src]." if(syringe) . += "It has a syringe added to it." for(var/mob/living/L in contents) - . += L.examine(user) + . += L.examine(user, distance, infix, suffix) /obj/structure/closet/body_bag/cryobag/attackby(obj/item/W, mob/user) if(opened) diff --git a/code/game/objects/items/contraband.dm b/code/game/objects/items/contraband.dm index 3f4a7b002fc..3b240f033d0 100644 --- a/code/game/objects/items/contraband.dm +++ b/code/game/objects/items/contraband.dm @@ -69,9 +69,9 @@ color = reagents.get_color() -/obj/item/reagent_containers/powder/examine(mob/user) +/obj/item/reagent_containers/powder/examine(mob/user, distance, infix, suffix) . = ..() - if (isliving(user) && get_dist(user, src) > 2) + if (distance > 2 && isliving(user)) return . += "It seems to be about [reagents.total_volume] units of [main_reagent_name]." diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index ea459ac34ac..185a9a1c488 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -112,9 +112,9 @@ var/global/list/obj/item/communicator/all_communicators = list() // Proc: examine() // Parameters: user - the user doing the examining // Description: Allows the user to click a link when examining to look at video if one is going. -/obj/item/communicator/examine(mob/user) +/obj/item/communicator/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user) && video_source) + if(distance < 2 && video_source) . += "It looks like it's on a video call: \[view\]" // Proc: initialize_exonet() @@ -135,12 +135,10 @@ var/global/list/obj/item/communicator/all_communicators = list() // Proc: examine() // Parameters: 1 (user - the person examining the device) // Description: Shows all the voice mobs inside the device, and their status. -/obj/item/communicator/examine(mob/user) +/obj/item/communicator/examine(mob/user, distance, infix, suffix) . = ..() - for(var/mob/living/voice/voice in contents) . += "On the screen, you can see a image feed of [voice]." - if(voice && voice.key) switch(voice.stat) if(CONSCIOUS) @@ -371,4 +369,4 @@ var/global/list/obj/item/communicator/all_communicators = list() /obj/item/communicator/rugged desc = "The RB-65, voted most robust communicator 2566!" icon_state = "commrugged" - note = "Thank you for choosing the RB-65 Communicator, this is your notepad!" //Current note in the notepad function \ No newline at end of file + note = "Thank you for choosing the RB-65 Communicator, this is your notepad!" //Current note in the notepad function diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index e53662893ce..3a543706305 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -82,7 +82,7 @@ icon_state = "[initial(icon_state)]" set_light(0) -/obj/item/flashlight/examine(mob/user) +/obj/item/flashlight/examine(mob/user, distance, infix, suffix) . = ..() if(power_use && brightness_level) . += "\The [src] is set to [brightness_level]." diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index e2c6e07917e..099884527ce 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -113,7 +113,7 @@ else if(choice == "Colour") choose_colour() -/obj/item/floor_painter/examine(mob/user) +/obj/item/floor_painter/examine(mob/user, distance, infix, suffix) . = ..() . += "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint." diff --git a/code/game/objects/items/devices/geiger.dm b/code/game/objects/items/devices/geiger.dm index 06850322141..1b69bf5853b 100644 --- a/code/game/objects/items/devices/geiger.dm +++ b/code/game/objects/items/devices/geiger.dm @@ -34,7 +34,7 @@ update_icon() update_sound() -/obj/item/geiger/examine(mob/user) +/obj/item/geiger/examine(mob/user, distance, infix, suffix) . = ..() get_radiation() . += "[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq." diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index e3cef6166b1..ff71f3b39cc 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -13,11 +13,11 @@ var/datum/data/record/warrant/active //look at it -/obj/item/holowarrant/examine(mob/user) +/obj/item/holowarrant/examine(mob/user, distance, infix, suffix) . = ..() if(active) . += "It's a holographic warrant for '[active.fields["namewarrant"]]'." - if(in_range(user, src) || istype(user, /mob/observer/dead)) + if(distance < 2 || istype(user, /mob/observer/dead)) show_content(user) //Opens a browse window, not chatbox related else . += "You have to go closer if you want to read it." @@ -110,4 +110,4 @@ Vessel or habitat: _[using_map.station_name]____
"} - show_browser(user, output, "window=Search warrant for [active.fields["namewarrant"]]") \ No newline at end of file + show_browser(user, output, "window=Search warrant for [active.fields["namewarrant"]]") diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 3f1ce0128c4..5a5b9247b71 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -63,9 +63,9 @@ failmsg = "The [name]'s refill light blinks red." . = ..() -/obj/item/lightreplacer/examine(mob/user) +/obj/item/lightreplacer/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += "It has [uses] lights remaining." /obj/item/lightreplacer/attackby(obj/item/W, mob/user) @@ -228,4 +228,4 @@ #undef LIGHT_OK #undef LIGHT_EMPTY #undef LIGHT_BROKEN -#undef LIGHT_BURNED \ No newline at end of file +#undef LIGHT_BURNED diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index 282c6ab7e91..626d357d240 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -65,7 +65,7 @@ user.drop_from_inventory(src) qdel(src) -/obj/item/modkit/examine(mob/user) +/obj/item/modkit/examine(mob/user, distance, infix, suffix) . = ..() . += "It looks as though it modifies hardsuits to fit [target_species] users." diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index 7e33ccb576e..9245884c280 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -26,6 +26,6 @@ /obj/item/pipe_painter/attack_self(mob/user as mob) mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes -/obj/item/pipe_painter/examine(mob/user) +/obj/item/pipe_painter/examine(mob/user, distance, infix, suffix) . = ..() . += "It is in [mode] mode." diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 57b6139d880..88aeeb41217 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -39,9 +39,8 @@ /obj/item/radio/headset/list_channels(var/mob/user) return list_secure_channels() -/obj/item/radio/headset/examine(mob/user) +/obj/item/radio/headset/examine(mob/user, distance, infix, suffix) . = ..() - if(radio_desc && Adjacent(user)) . += "The following channels are available:" . += radio_desc diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ed4483cfc04..aa0976e4c29 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -596,10 +596,9 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer) return get_mobs_or_objects_in_view(range, src) -/obj/item/radio/examine(mob/user) +/obj/item/radio/examine(mob/user, distance, infix, suffix) . = ..() - - if((in_range(src, user) || loc == user)) + if(distance < 2 || loc == user) if(b_stat) . += "\The [src] can be attached and modified!" else diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 0a0c9b9e211..923e81b0118 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -83,9 +83,9 @@ origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) camtype = /obj/machinery/camera/bug/spy -/obj/item/camerabug/examine(mob/user) +/obj/item/camerabug/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) == 0) + if(!distance) . += "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional." /obj/item/camerabug/update_icon() @@ -234,9 +234,9 @@ item_state = "electronic" origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) -/obj/item/bug_monitor/spy/examine(mob/user) +/obj/item/bug_monitor/spy/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made." /obj/machinery/camera/bug/check_eye(var/mob/user as mob) @@ -275,4 +275,4 @@ canhear_range = 1 name = "spy device" icon_state = "syn_cypherkey" - */ \ No newline at end of file + */ diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 41a42f12596..212a7e72e34 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -182,29 +182,25 @@ else icon_state = "suitcooler0" -/obj/item/suit_cooling_unit/examine(mob/user) +/obj/item/suit_cooling_unit/examine(mob/user, distance, infix, suffix) . = ..() - - if(Adjacent(user)) - + if(distance < 2) if (on) - if (attached_to_suit(src.loc)) + if (attached_to_suit(loc)) . += "It's switched on and running." else . += "It's switched on, but not attached to anything." else . += "It is switched off." - if (cover_open) if(cell) . += "The panel is open, exposing the [cell]." else . += "The panel is open." - if (cell) . += "The charge meter reads [round(cell.percent())]%." else . += "It doesn't have a power cell installed." /obj/item/suit_cooling_unit/empty //No duplicating cells with autolathes any more. - starts_with_cell = FALSE \ No newline at end of file + starts_with_cell = FALSE diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm index a97724fe21f..dd62317e7b6 100644 --- a/code/game/objects/items/devices/tvcamera.dm +++ b/code/game/objects/items/devices/tvcamera.dm @@ -20,7 +20,7 @@ radio = null ..() -/obj/item/tvcamera/examine() +/obj/item/tvcamera/examine(mob/user, distance, infix, suffix) . = ..() . += "Video feed is [camera.status ? "on" : "off"]" . += "Audio feed is [radio.broadcasting ? "on" : "off"]" @@ -92,4 +92,3 @@ H.update_inv_r_hand() H.update_inv_l_hand() H.update_inv_belt() - diff --git a/code/game/objects/items/magazine.dm b/code/game/objects/items/magazine.dm index 59640c4c010..1fbbc8974c2 100644 --- a/code/game/objects/items/magazine.dm +++ b/code/game/objects/items/magazine.dm @@ -81,10 +81,10 @@ headline = pick(tabloid_headlines) name = pick(tabloid_publishers) -/obj/item/tabloid/examine(mob/user, distance) +/obj/item/tabloid/examine(mob/user, distance, infix, suffix) . = ..() if(headline) - to_chat(user, "The headline screams, \"[headline]\"") + . += "The headline screams, \"[headline]\"" /obj/item/tabloid/attack_self(mob/user) user.visible_message(SPAN_NOTICE("\The [user] leafs idly through \the [src].")) diff --git a/code/game/objects/items/paintkit.dm b/code/game/objects/items/paintkit.dm index 4481c22d21f..0bbe7710e0e 100644 --- a/code/game/objects/items/paintkit.dm +++ b/code/game/objects/items/paintkit.dm @@ -12,7 +12,7 @@ var/uses = 1 // Uses before the kit deletes itself. var/list/allowed_types = list() -/obj/item/kit/examine() +/obj/item/kit/examine(mob/user, distance, infix, suffix) . = ..() . += "It has [uses] use\s left." @@ -247,7 +247,7 @@ allowed_types = splittext(additional_data, ", ") -/obj/item/kit/paint/examine() +/obj/item/kit/paint/examine(mob/user, distance, infix, suffix) . = ..() . += "This kit will convert an exosuit into: [new_name]." . += "This kit can be used on the following exosuit models:" diff --git a/code/game/objects/items/robobag.dm b/code/game/objects/items/robobag.dm index 6734f334349..a5c6cb67ddf 100644 --- a/code/game/objects/items/robobag.dm +++ b/code/game/objects/items/robobag.dm @@ -26,7 +26,7 @@ stasis_level = 2 // Lower than the normal cryobag, because it's not made for meat that dies. It's made for robots and is freezing. var/obj/item/clothing/accessory/medal/badge/corptag // The tag on the bag. -/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user) +/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user, distance, infix, suffix) . = ..() if(corptag && Adjacent(user)) . += "[src] has a [corptag] attached to it." diff --git a/code/game/objects/items/robot/robot_frame.dm b/code/game/objects/items/robot/robot_frame.dm index ae4b2b57804..da0fc69411c 100644 --- a/code/game/objects/items/robot/robot_frame.dm +++ b/code/game/objects/items/robot/robot_frame.dm @@ -14,7 +14,7 @@ var/created_name = "" var/product = /mob/living/silicon/robot -/obj/item/robot_parts/frame/examine(mob/user) +/obj/item/robot_parts/frame/examine(mob/user, distance, infix, suffix) . = ..() if(check_completion()) . += SPAN_NOTICE("It is ready to receive a controlling intelligence.") diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm index 4d3b43873a5..cd8cab2e42b 100644 --- a/code/game/objects/items/stacks/marker_beacons.dm +++ b/code/game/objects/items/stacks/marker_beacons.dm @@ -41,7 +41,7 @@ var/global/list/marker_beacon_colors = list( . = ..() update_icon() -/obj/item/stack/marker_beacon/examine(mob/user) +/obj/item/stack/marker_beacon/examine(mob/user, distance, infix, suffix) . = ..() . += "Use in-hand to place a [singular_name]." . += "Alt-click to select a color. Current color is [picked_color]." @@ -97,7 +97,7 @@ var/global/list/marker_beacon_colors = list( picked_color = mapped_in_color update_icon() -/obj/structure/marker_beacon/examine(mob/user) +/obj/structure/marker_beacon/examine(mob/user, distance, infix, suffix) . = ..() if(!perma) . += "Alt-click to select a color. Current color is [picked_color]." diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index bc367286c8c..7d85f5aab29 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -56,10 +56,9 @@ icon_state = "[initial(icon_state)]_3" item_state = initial(icon_state) -/obj/item/stack/examine(mob/user) +/obj/item/stack/examine(mob/user, distance, infix, suffix) . = ..() - - if(Adjacent(user)) + if(distance < 2) if(!uses_charge) . += "There [src.amount == 1? "is" : "are"] [src.amount] [src.singular_name]\s in the stack." else @@ -76,7 +75,7 @@ /obj/item/stack/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() - + data["amount"] = get_amount() return data @@ -120,7 +119,7 @@ if(get_amount() < 1) qdel(src) return - + var/datum/stack_recipe/R = locate(params["ref"]) if(!is_valid_recipe(R, recipes)) //href exploit protection return FALSE diff --git a/code/game/objects/items/toys/mech_toys.dm b/code/game/objects/items/toys/mech_toys.dm index 88ae41f0492..898c9cd0180 100644 --- a/code/game/objects/items/toys/mech_toys.dm +++ b/code/game/objects/items/toys/mech_toys.dm @@ -197,7 +197,7 @@ wants_to_battle = FALSE to_chat(user, "You get the feeling they don't want to battle.") -/obj/item/toy/mecha/examine() +/obj/item/toy/mecha/examine(mob/user, distance, infix, suffix) . = ..() . += "This toy's special attack is [special_attack_cry], [special_attack_type_message] " if(in_combat) @@ -643,4 +643,4 @@ #undef SPECIAL_ATTACK_DAMAGE #undef SPECIAL_ATTACK_UTILITY #undef SPECIAL_ATTACK_OTHER -#undef MAX_BATTLE_LENGTH \ No newline at end of file +#undef MAX_BATTLE_LENGTH diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 6643815acb4..2d80bddf0db 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -287,7 +287,7 @@ lcolor = sanitize_hexcolor(energy_color_input) update_icon() -/obj/item/toy/sword/examine(mob/user) +/obj/item/toy/sword/examine(mob/user, distance, infix, suffix) . = ..() . += "Alt-click to recolor it." @@ -790,11 +790,11 @@ var/opened = FALSE // has this been slit open? this will allow you to store an object in a plushie. var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself. -/obj/structure/plushie/examine(mob/user) +/obj/structure/plushie/examine(mob/user, distance, infix, suffix) . = ..() if(opened) . += "You notice an incision has been made on [src]." - if(in_range(user, src) && stored_item) + if(distance < 2 && stored_item) . += "You can see something in there..." /obj/structure/plushie/attack_hand(mob/user) @@ -888,11 +888,11 @@ var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself. -/obj/item/toy/plushie/examine(mob/user) +/obj/item/toy/plushie/examine(mob/user, distance, infix, suffix) . = ..() if(opened) . += "You notice an incision has been made on [src]." - if(in_range(user, src) && stored_item) + if(distance < 2 && stored_item) . += "You can see something in there..." /obj/item/toy/plushie/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 3565a24bd63..cb6df34bd32 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -41,7 +41,7 @@ spark_system = null return ..() -/obj/item/rcd/examine(mob/user) +/obj/item/rcd/examine(mob/user, distance, infix, suffix) . = ..() . += display_resources() diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 182dc45e6b5..15c830f34b2 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -33,9 +33,9 @@ RSF w_class = ITEMSIZE_NORMAL -/obj/item/rsf/examine(mob/user) +/obj/item/rsf/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) == 0) + if(!distance) . += "It currently holds [stored_matter]/30 fabrication-units." /obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 258aba92223..23b4fba92d5 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -149,7 +149,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM M.update_inv_r_hand(1) ..() -/obj/item/clothing/mask/smokable/examine(mob/user) +/obj/item/clothing/mask/smokable/examine(mob/user, distance, infix, suffix) . = ..() if(!is_pipe) diff --git a/code/game/objects/items/weapons/ecigs.dm b/code/game/objects/items/weapons/ecigs.dm index d40442d206a..db9db0654a1 100644 --- a/code/game/objects/items/weapons/ecigs.dm +++ b/code/game/objects/items/weapons/ecigs.dm @@ -22,14 +22,13 @@ . = ..() ec_cartridge = new cartridge_type(src) -/obj/item/clothing/mask/smokable/ecig/examine(mob/user) +/obj/item/clothing/mask/smokable/ecig/examine(mob/user, distance, infix, suffix) . = ..() - if(active) . += "It is turned on." else . += "It is turned off." - if(Adjacent(user)) + if(distance < 2) if(ec_cartridge) if(!ec_cartridge.reagents?.total_volume) . += "Its cartridge is empty!" @@ -159,7 +158,7 @@ . = ..() create_reagents(volume) -/obj/item/reagent_containers/ecig_cartridge/examine(mob/user as mob)//to see how much left +/obj/item/reagent_containers/ecig_cartridge/examine(mob/user, distance, infix, suffix) . = ..() . += "The cartridge has [reagents.total_volume] units of liquid remaining." diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 01c47e56293..28eb06d807b 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -40,10 +40,10 @@ reagents.add_reagent("water", max_water) . = ..() -/obj/item/extinguisher/examine(mob/user) +/obj/item/extinguisher/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) == 0) - . += "[src] has [src.reagents.total_volume] units of water left!" + if(!distance) + . += "[src] has [reagents.total_volume] units of water left!" /obj/item/extinguisher/attack_self(mob/user as mob) safety = !safety diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index b3211453355..93720faa76d 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -166,9 +166,9 @@ return -/obj/item/wrapping_paper/examine(mob/user) +/obj/item/wrapping_paper/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "There is about [src.amount] square units of paper left!" /obj/item/wrapping_paper/attack(mob/target as mob, mob/user as mob) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index dd624ec5f0d..8e289a00865 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -116,7 +116,7 @@ else to_chat(user, "\The [W] is empty.") -/obj/item/grenade/chem_grenade/examine(mob/user) +/obj/item/grenade/chem_grenade/examine(mob/user, distance, infix, suffix) . = ..() if(detonator) . += "It has [detonator.name] attached to it." diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 66c035141d8..884fe8a0003 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -46,9 +46,9 @@ return*/ -/obj/item/grenade/examine(mob/user) +/obj/item/grenade/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) == 0) + if(!distance) if(det_time > 1) . += "The timer is set to [det_time/10] seconds." else if(det_time == null) @@ -116,4 +116,4 @@ return /obj/item/grenade/vendor_action(var/obj/machinery/vending/V) - activate(V) \ No newline at end of file + activate(V) diff --git a/code/game/objects/items/weapons/id cards/station_ids.dm b/code/game/objects/items/weapons/id cards/station_ids.dm index 425ae16f042..41c68343f7f 100644 --- a/code/game/objects/items/weapons/id cards/station_ids.dm +++ b/code/game/objects/items/weapons/id cards/station_ids.dm @@ -31,9 +31,9 @@ var/mining_points = 0 // For redeeming at mining equipment vendors var/survey_points = 0 // For redeeming at explorer equipment vendors. -/obj/item/card/id/examine(mob/user) +/obj/item/card/id/examine(mob/user, distance, infix, suffix) . = ..() - if(in_range(user, src)) + if(distance < 2) show_tgui(user) else . += "It is too far away to read." diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 734f970cf91..1582710a2f3 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -35,8 +35,8 @@ /obj/item/implant/integrated_circuit/emp_act(severity) IC.emp_act(severity) -/obj/item/implant/integrated_circuit/examine(mob/user) - return IC.examine(user) +/obj/item/implant/integrated_circuit/examine(mob/user, distance, infix, suffix) + return IC.examine(user, distance, infix, suffix) /obj/item/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user) if(O.is_crowbar() || istype(O, /obj/item/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/cell/device) ) diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm index ecc1cf96049..8cd4405e3b1 100644 --- a/code/game/objects/items/weapons/material/chainsaw.dm +++ b/code/game/objects/items/weapons/material/chainsaw.dm @@ -113,9 +113,9 @@ /obj/item/chainsaw/proc/get_fuel() return reagents.get_reagent_amount("fuel") -/obj/item/chainsaw/examine(mob/user) +/obj/item/chainsaw/examine(mob/user, distance, infix, suffix) . = ..() - if(max_fuel && get_dist(user, src) == 0) + if(max_fuel && !distance) . += "The [src] feels like it contains roughtly [get_fuel()] units of fuel left." /obj/item/chainsaw/update_icon() diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index 570459ef312..a93c8361df9 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -36,11 +36,11 @@ qdel(src) ..() -/obj/item/material/gravemarker/examine(mob/user) +/obj/item/material/gravemarker/examine(mob/user, distance, infix, suffix) . = ..() - if(grave_name && get_dist(src, user) < 4) + if(grave_name && distance < 4) . += "Here Lies [grave_name]" - if(epitaph && get_dist(src, user) < 2) + if(epitaph && distance < 2) . += epitaph /obj/item/material/gravemarker/update_icon() @@ -76,4 +76,4 @@ G.add_fingerprint(usr) G.dir = user.dir QDEL_NULL(src) - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/material/whetstone.dm b/code/game/objects/items/weapons/material/whetstone.dm index 413feea02f6..e9716bd8edc 100644 --- a/code/game/objects/items/weapons/material/whetstone.dm +++ b/code/game/objects/items/weapons/material/whetstone.dm @@ -10,7 +10,7 @@ w_class = ITEMSIZE_SMALL var/repair_amount = 5 var/repair_time = 40 - + /obj/item/whetstone/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/stack/material)) var/obj/item/stack/material/M = I @@ -40,7 +40,7 @@ var/sharpen_time = 100 var/uses = 0 -/obj/item/material/sharpeningkit/examine(mob/user, distance) +/obj/item/material/sharpeningkit/examine(mob/user, distance, infix, suffix) . = ..() . += "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use." @@ -75,4 +75,4 @@ to_chat(user, "Not enough material to sharpen [M]. You need [M.w_class*2] [M.material.sheet_plural_name].") return else - to_chat(user, "You can't sharpen [W] with [src]!") + to_chat(user, "You can't sharpen [W] with [src]!") diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index e8fb351219c..91b1163c831 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -91,9 +91,9 @@ return 0 return null -/obj/item/melee/energy/examine(mob/user) +/obj/item/melee/energy/examine(mob/user, distance, infix, suffix) . = ..() - if(use_cell && Adjacent(user)) + if(use_cell && distance < 2) if(bcell) . += "The blade is [round(bcell.percent())]% charged." else @@ -196,7 +196,7 @@ lcolor = sanitize_hexcolor(energy_color_input) update_icon() -/obj/item/melee/energy/examine(mob/user) +/obj/item/melee/energy/examine(mob/user, distance, infix, suffix) . = ..() . += "Alt-click to recolor it." diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index e742fa96fcb..8ff7cb37990 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -214,7 +214,7 @@ lcolor = sanitize_hexcolor(energy_color_input) update_icon() -/obj/item/shield/energy/examine(mob/user) +/obj/item/shield/energy/examine(mob/user, distance, infix, suffix) . = ..() . += "Alt-click to recolor it." diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index f081e8ea106..d126768a826 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -514,9 +514,9 @@ item_state_slots = list(slot_r_hand_str = "backpack", slot_l_hand_str = "backpack") max_storage_space = ITEMSIZE_COST_NORMAL * 5 -/obj/item/storage/backpack/parachute/examine(mob/user) +/obj/item/storage/backpack/parachute/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) if(parachute) . += "It seems to be packed." else @@ -585,4 +585,4 @@ icon_state = "teshbag" species_restricted = list(SPECIES_TESHARI) max_w_class = ITEMSIZE_NORMAL - max_storage_space = ITEMSIZE_COST_NORMAL * 5 \ No newline at end of file + max_storage_space = ITEMSIZE_COST_NORMAL * 5 diff --git a/code/game/objects/items/weapons/storage/bags/ore.dm b/code/game/objects/items/weapons/storage/bags/ore.dm index af57b009410..7d628fa3e8d 100644 --- a/code/game/objects/items/weapons/storage/bags/ore.dm +++ b/code/game/objects/items/weapons/storage/bags/ore.dm @@ -16,9 +16,9 @@ var/stored_ore -/obj/item/storage/bag/ore/examine(mob/user) +/obj/item/storage/bag/ore/examine(mob/user, distance, infix, suffix) . = ..() - if (!Adjacent(user) && !isobserver(user)) + if (distance > 1 && !isobserver(user)) return if (isliving(user)) add_fingerprint(user) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index e38dc739b52..899c2a4007b 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -27,16 +27,16 @@ icon_state = "[icon_type]box[total_contents]" return -/obj/item/storage/fancy/examine(mob/user) +/obj/item/storage/fancy/examine(mob/user, distance, infix, suffix) . = ..() - - if(Adjacent(user)) - if(!contents.len) + if(distance < 2) + var/len = length(contents) + if(!len) . += "There are no [icon_type]s left in the box." - else if(contents.len == 1) + else if(len == 1) . += "There is one [icon_type] left in the box." else - . += "There are [contents.len] [icon_type]s in the box." + . += "There are [len] [icon_type]\s in the box." /* * Egg Box diff --git a/code/game/objects/items/weapons/storage/mre.dm b/code/game/objects/items/weapons/storage/mre.dm index b2ba497e8a3..2619d0794cb 100644 --- a/code/game/objects/items/weapons/storage/mre.dm +++ b/code/game/objects/items/weapons/storage/mre.dm @@ -22,7 +22,7 @@ MRE Stuff /obj/item/material/kitchen/utensil/spoon/plastic ) -/obj/item/storage/mre/examine(mob/user) +/obj/item/storage/mre/examine(mob/user, distance, infix, suffix) . = ..() . += meal_desc diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 7acfafdee3a..181143e70f5 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -28,9 +28,9 @@ max_storage_space = ITEMSIZE_SMALL * 7 use_sound = 'sound/items/storage/briefcase.ogg' -/obj/item/storage/secure/examine(mob/user) +/obj/item/storage/secure/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "The service panel is [src.open ? "open" : "closed"]." /obj/item/storage/secure/attackby(obj/item/W, mob/user) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 26024a90a50..ad1d4bbfe53 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -725,7 +725,7 @@ update_icon() ..() -/obj/item/storage/trinketbox/examine(mob/user) +/obj/item/storage/trinketbox/examine(mob/user, distance, infix, suffix) . = ..() if(open && contents.len) var/display_item = contents[1] diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index b426147afe6..e461fc6d35a 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -90,10 +90,9 @@ else set_light(0) -/obj/item/melee/baton/examine(mob/user) +/obj/item/melee/baton/examine(mob/user, distance, infix, suffix) . = ..() - - if(Adjacent(user, src)) + if(distance < 2) if(bcell) . += "The baton is [round(bcell.percent())]% charged." if(!bcell) diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index c4da52530ee..2f4b6967cb8 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -27,7 +27,7 @@ QDEL_NULL(ion_trail) return ..() -/obj/item/tank/jetpack/examine(mob/user) +/obj/item/tank/jetpack/examine(mob/user, distance, infix, suffix) . = ..() if(air_contents.total_moles < 5) . += "The meter on \the [src] indicates you are almost out of gas!" @@ -118,7 +118,7 @@ name = "jetpack" var/obj/item/rig/holder -/obj/item/tank/jetpack/rig/examine() +/obj/item/tank/jetpack/rig/examine(mob/user, distance, infix, suffix) . = ..() . += "It's a jetpack. If you can see this, report it on the bug tracker." diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index acf0787042c..c0983953976 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -20,10 +20,10 @@ . = ..() air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) -/obj/item/tank/oxygen/examine(mob/user) +/obj/item/tank/oxygen/examine(mob/user, distance, infix, suffix) . = ..() - if(loc == user && (air_contents.gas["oxygen"] < 10)) - . += "The meter on \the [src] indicates you are almost out of oxygen!" + if(distance < 2 && (air_contents.gas["oxygen"] < 10)) + . += "The meter on \the [src] indicates it is almost out of oxygen!" /obj/item/tank/oxygen/yellow desc = "A tank of oxygen, this one is yellow." @@ -56,10 +56,10 @@ desc = "Mixed anyone?" icon_state = "oxygen" -/obj/item/tank/air/examine(mob/user) +/obj/item/tank/air/examine(mob/user, distance, infix, suffix) . = ..() - if(loc == user && (air_contents.gas["oxygen"] < 1)) - . += "The meter on \the [src] indicates you are almost out of air!" + if(distance < 2 && (air_contents.gas["oxygen"] < 1)) + . += "The meter on \the [src] indicates it is almost out of air!" user << sound('sound/effects/alert.ogg') /obj/item/tank/air/Initialize() @@ -139,10 +139,10 @@ . = ..() src.air_contents.adjust_gas("oxygen", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)) -/obj/item/tank/emergency/oxygen/examine(mob/user) +/obj/item/tank/emergency/oxygen/examine(mob/user, distance, infix, suffix) . = ..() - if(loc == user && (air_contents.gas["oxygen"] < 0.2)) - . += "The meter on the [src.name] indicates you are almost out of air!" + if(distance < 2 && (air_contents.gas["oxygen"] < 0.2)) + . += "The meter on the [src.name] indicates it is almost out of air!" user << sound('sound/effects/alert.ogg') /obj/item/tank/emergency/oxygen/engi @@ -212,10 +212,10 @@ . = ..() src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)) -/obj/item/tank/nitrogen/examine(mob/user) +/obj/item/tank/nitrogen/examine(mob/user, distance, infix, suffix) . = ..() - if(loc == user && (air_contents.gas["nitrogen"] < 10)) - . += "The meter on \the [src] indicates you are almost out of nitrogen!" + if(distance < 2 && (air_contents.gas["nitrogen"] < 10)) + . += "The meter on \the [src] indicates it is almost out of nitrogen!" //playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/tank/stasis/nitro_cryo // Synthbody bags need to have initial pressure within safe bounds for human atmospheric pressure, but low temperature to stop unwanted degredation. diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index ad7a8f2fbd7..9e368e26f53 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -90,9 +90,9 @@ var/global/list/tank_gauge_cache = list() // This could be optimized more, but it's a start! START_PROCESSING(SSobj, src) // This has a built in safety to avoid multi-processing -/obj/item/tank/examine(mob/user) +/obj/item/tank/examine(mob/user, distance, infix, suffix) . = ..() - if(loc == user) + if(distance < 2) var/celsius_temperature = air_contents.temperature - T0C var/descriptive switch(celsius_temperature) diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 9cb1ae03b4b..7c913e30868 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -124,8 +124,8 @@ var/obj/item/stuck = null -/obj/item/ducttape/examine(mob/user) - return stuck.examine(user) +/obj/item/ducttape/examine(mob/user, distance, infix, suffix) + return stuck.examine(user, distance, infix, suffix) /obj/item/ducttape/proc/attach(var/obj/item/W) stuck = W diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index 9af46a1e5a7..2586575f7f5 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -58,9 +58,9 @@ STOP_PROCESSING(SSobj, src) return ..() -/obj/item/weldingtool/examine(mob/user) +/obj/item/weldingtool/examine(mob/user, distance, infix, suffix) . = ..() - if(max_fuel && loc == user) + if(max_fuel && distance < 2) . += "It contains [get_fuel()]/[src.max_fuel] units of fuel!" /obj/item/weldingtool/attack(atom/A, mob/living/user, def_zone) @@ -557,9 +557,9 @@ /obj/item/weldingtool/electric/get_cell() return power_supply -/obj/item/weldingtool/electric/examine(mob/user) +/obj/item/weldingtool/electric/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) if(power_supply) . += "It [src.name] has [get_fuel()] charge left." else diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index 8cecd4ec419..bf4f8e389bb 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -144,9 +144,9 @@ usr.put_in_l_hand(src) src.add_fingerprint(usr) -/obj/item/weldpack/examine(mob/user) +/obj/item/weldpack/examine(mob/user, distance, infix, suffix) . = ..() - . += "It has [src.reagents.total_volume] units of fuel left!" + . += "It has [reagents.total_volume] units of fuel left!" /obj/item/weldpack/survival name = "emergency welding kit" diff --git a/code/game/objects/structures/animal_den.dm b/code/game/objects/structures/animal_den.dm index 181b86746d3..1edaee795d0 100644 --- a/code/game/objects/structures/animal_den.dm +++ b/code/game/objects/structures/animal_den.dm @@ -113,7 +113,7 @@ . = ..() name = "den" // to remove mapping identifiers. -/obj/structure/animal_den/ghost_join/examine(mob/user, infix, suffix) +/obj/structure/animal_den/ghost_join/examine(mob/user, distance, infix, suffix) var/list/output = ..() if(isobserver(user)) if(critter) diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index 5ef27ebcaeb..483f722ea15 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -15,7 +15,7 @@ if(initial) . -= "Off" -/obj/structure/sign/double/barsign/examine(mob/user) +/obj/structure/sign/double/barsign/examine(mob/user, distance, infix, suffix) . = ..() switch(icon_state) if("Off") diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index c2aebd1eec7..7dcbd60e000 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -172,7 +172,7 @@ LINEN BINS var/obj/item/hidden = null -/obj/structure/bedsheetbin/examine(mob/user) +/obj/structure/bedsheetbin/examine(mob/user, distance, infix, suffix) . = ..() if(amount < 1) diff --git a/code/game/objects/structures/crates_lockers/__closets.dm b/code/game/objects/structures/crates_lockers/__closets.dm index 24070844736..a7ab04a67fb 100644 --- a/code/game/objects/structures/crates_lockers/__closets.dm +++ b/code/game/objects/structures/crates_lockers/__closets.dm @@ -82,9 +82,9 @@ . = ..() QDEL_NULL(door_obj) -/obj/structure/closet/examine(mob/user) +/obj/structure/closet/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user) || isobserver(user)) + if(distance < 2 || isobserver(user)) var/content_size = 0 for(var/obj/item/I in contents) if(!I.anchored) @@ -539,4 +539,4 @@ M.Translate(-door_hinge, 0) M.Multiply(matrix(cos(angle), 0, 0, -sin(angle) * door_anim_squish, 1, 0)) M.Translate(door_hinge, 0) - return M \ No newline at end of file + return M diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm index c8bcc5af5e5..990e96b66dd 100644 --- a/code/game/objects/structures/crates_lockers/vehiclecage.dm +++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm @@ -8,7 +8,7 @@ var/my_vehicle_type var/paint_color = "#666666" -/obj/structure/vehiclecage/examine(mob/user) +/obj/structure/vehiclecage/examine(mob/user, distance, infix, suffix) . = ..() if(my_vehicle) . += "It seems to contain \the [my_vehicle]." diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index bf04da98702..69de8cc1816 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -27,7 +27,7 @@ update_cut_status() return ..() -/obj/structure/fence/examine(mob/user) +/obj/structure/fence/examine(mob/user, distance, infix, suffix) . = ..() switch(hole_size) @@ -176,4 +176,4 @@ #undef NO_HOLE #undef MEDIUM_HOLE #undef LARGE_HOLE -#undef MAX_HOLE_SIZE \ No newline at end of file +#undef MAX_HOLE_SIZE diff --git a/code/game/objects/structures/flora/flora.dm b/code/game/objects/structures/flora/flora.dm index e58780f0dd5..0445c0aef5a 100644 --- a/code/game/objects/structures/flora/flora.dm +++ b/code/game/objects/structures/flora/flora.dm @@ -36,7 +36,7 @@ if(randomize_harvest_count) max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value. -/obj/structure/flora/examine(mob/user) +/obj/structure/flora/examine(mob/user, distance, infix, suffix) . = ..() if(harvest_count < max_harvests) . += get_harvestable_desc() @@ -277,9 +277,9 @@ plane = OBJ_PLANE var/obj/item/stored_item -/obj/structure/flora/pottedplant/examine(mob/user) +/obj/structure/flora/pottedplant/examine(mob/user, distance, infix, suffix) . = ..() - if(in_range(user, src) && stored_item) + if(distance < 2 && stored_item) . += "You can see something in there..." /obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index b6f0c4fbe60..9e0c13d8a05 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -29,11 +29,11 @@ return color = material.icon_colour -/obj/structure/gravemarker/examine(mob/user) +/obj/structure/gravemarker/examine(mob/user, distance, infix, suffix) . = ..() - if(grave_name && get_dist(src, user) < 4) + if(grave_name && distance < 4) . += "Here Lies [grave_name]" - if(epitaph && get_dist(src, user) < 2) + if(epitaph && distance < 2) . += epitaph /obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target) @@ -126,4 +126,4 @@ return src.set_dir(turn(src.dir, 270)) - return \ No newline at end of file + return diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 8f81c2b9cce..5228635fda4 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -31,7 +31,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) QDEL_NULL(mybucket) return ..() -/obj/structure/janitorialcart/examine(mob/user) +/obj/structure/janitorialcart/examine(mob/user, distance, infix, suffix) . = ..(user) if(istype(mybucket)) var/contains = mybucket.reagents.total_volume @@ -317,9 +317,9 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) update_layer() -/obj/structure/bed/chair/janicart/examine(mob/user) +/obj/structure/bed/chair/janicart/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "This [callme] contains [reagents.total_volume] unit\s of water!" if(mybag) . += "\A [mybag] is hanging on the [callme]." diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 6a7fea6f186..d2f5a2295e2 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -16,9 +16,9 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket) create_reagents(300) . = ..() -/obj/structure/mopbucket/examine(mob/user) +/obj/structure/mopbucket/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "It contains [reagents.total_volume] unit\s of water!" /obj/structure/mopbucket/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 4699c6bb289..83cecd9cb65 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -45,7 +45,7 @@ return !density return TRUE -/obj/structure/railing/examine(mob/user) +/obj/structure/railing/examine(mob/user, distance, infix, suffix) . = ..() if(health < maxhealth) switch(health / maxhealth) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index a127bcccd76..da00e7dc94e 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -1119,7 +1119,7 @@ desc = "A basic wall clock, synced to the current system time." icon_state = "clock" -/obj/structure/sign/clock/examine(mob/user) +/obj/structure/sign/clock/examine(mob/user, distance, infix, suffix) . = ..() . += "The clock shows that the time is [stationtime2text()]." @@ -1128,7 +1128,7 @@ desc = "It's an old-school, NanoTrasen branded wall calendar. Sure, it might be obsolete with modern technology, but it's still hard to imagine an office without one." icon_state = "calendar" -/obj/structure/sign/calendar/examine(mob/user) +/obj/structure/sign/calendar/examine(mob/user, distance, infix, suffix) . = ..() . += "The calendar shows that the date is [stationdate2text()]." if (Holiday.len) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 02faa8d3073..73531432398 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -24,7 +24,7 @@ var/silicate = 0 // number of units of silicate var/fulltile = FALSE // Set to true on full-tile variants. -/obj/structure/window/examine(mob/user) +/obj/structure/window/examine(mob/user, distance, infix, suffix) . = ..() if(health == maxhealth) diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm index d7f7ce57070..35aeb118716 100644 --- a/code/game/turfs/simulated/outdoors/outdoors.dm +++ b/code/game/turfs/simulated/outdoors/outdoors.dm @@ -27,7 +27,7 @@ var/global/list/turf_edge_cache = list() var/can_dig = FALSE var/loot_count -/turf/simulated/floor/outdoors/examine(var/mob/user) +/turf/simulated/floor/outdoors/examine(mob/user, distance, infix, suffix) . = ..() if(!has_snow()) . += "A shovel could be used on help intent to dig up worms or rocks, harm intent to dig a grave, or any other intent to dig a plot for planting." diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index cec217df983..653435837fe 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -131,7 +131,7 @@ ..(N, tell_universe, force_lighting_update, preserve_outdoors) //Appearance -/turf/simulated/wall/examine(mob/user) +/turf/simulated/wall/examine(mob/user, distance, infix, suffix) . = ..() if(!damage) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 0df77d754ac..1c89c45f860 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -81,9 +81,9 @@ /obj/item/assembly/process() return PROCESS_KILL -/obj/item/assembly/examine(mob/user) +/obj/item/assembly/examine(mob/user, distance, infix, suffix) . = ..() - if((in_range(src, user) || loc == user)) + if(distance < 2) if(secured) . += "\The [src] is ready!" else diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 29d8ae96db2..08816fc6aa0 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -16,13 +16,13 @@ /obj/item/assembly_holder/proc/attach(var/obj/item/assembly/D, var/obj/item/assembly/D2, var/mob/user) if(!D || !D2) return FALSE - + if(!istype(D) || !istype(D2)) return FALSE if(D.secured || D2.secured) return FALSE - + if(user) user.remove_from_mob(D) user.remove_from_mob(D2) @@ -55,9 +55,9 @@ if(master) master.update_icon() -/obj/item/assembly_holder/examine(mob/user) +/obj/item/assembly_holder/examine(mob/user, distance, infix, suffix) . = ..() - if ((in_range(src, user) || src.loc == user)) + if (distance < 2) if (src.secured) . += "\The [src] is ready!" else diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 431a8985cc2..d7686cae501 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -7,7 +7,7 @@ var/armed = 0 -/obj/item/assembly/mousetrap/examine(var/mob/user) +/obj/item/assembly/mousetrap/examine(mob/user, distance, infix, suffix) . = ..(user) if(armed) . += "It looks like it's armed." diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 05a231dbfa7..e0896f751d1 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -69,7 +69,7 @@ GLOBAL_LIST_EMPTY(all_blobs) return TRUE return FALSE -/obj/structure/blob/examine(mob/user) +/obj/structure/blob/examine(mob/user, distance, infix, suffix) . = ..() if(!overmind) . += "It seems inert." // Dead blob. diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 5ddff3ddb5c..59e46028bcf 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -920,7 +920,7 @@ var/global/list/light_overlay_cache = list() //see get_worn_overlay() on helmets set_clothing_index() -/obj/item/clothing/under/examine(mob/user) +/obj/item/clothing/under/examine(mob/user, distance, infix, suffix) . = ..() switch(src.sensor_mode) if(0) diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index 3d5c61287b3..73e4d9b5dc6 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -66,7 +66,7 @@ usr.put_in_l_hand(src) src.add_fingerprint(usr) -/obj/item/clothing/examine(var/mob/user) +/obj/item/clothing/examine(mob/user, distance, infix, suffix) . = ..(user) if(LAZYLEN(accessories)) . += "It has the following attached: [counting_english_list(accessories)]" diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 64cc41fa681..995fba5bb4d 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -78,7 +78,7 @@ src.shoes = null wearer = null -/obj/item/clothing/shoes/magboots/examine(mob/user) +/obj/item/clothing/shoes/magboots/examine(mob/user, distance, infix, suffix) . = ..() . += "Its mag-pulse traction system appears to be [item_flags & NOSLIP ? "enabled" : "disabled"]." @@ -123,7 +123,7 @@ magpulse = 0 canremove = 1 -/obj/item/clothing/shoes/magboots/vox/examine(mob/user) +/obj/item/clothing/shoes/magboots/vox/examine(mob/user, distance, infix, suffix) . = ..() if(magpulse) . += "It would be hard to take these off without relaxing your grip first." // Theoretically this message should only be seen by the wearer when the claws are equipped. diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index b306fd92cc9..9ac69478b77 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -223,7 +223,7 @@ var/global/list/breach_burn_descriptors = list( ..() -/obj/item/clothing/suit/space/examine(mob/user) +/obj/item/clothing/suit/space/examine(mob/user, distance, infix, suffix) . = ..() if(can_breach && breaches?.len) for(var/datum/breach/B in breaches) diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index 524e0507931..b0143aeecdf 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -54,7 +54,7 @@ var/list/stat_rig_module/stat_modules = new() -/obj/item/rig_module/examine() +/obj/item/rig_module/examine(mob/user, distance, infix, suffix) . = ..() switch(damage) if(0) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 7429608d949..004dc100787 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -95,7 +95,7 @@ var/datum/effect_system/spark_spread/spark_system var/datum/mini_hud/rig/minihud -/obj/item/rig/examine() +/obj/item/rig/examine(mob/user, distance, infix, suffix) . = ..() if(wearer) for(var/obj/item/piece in list(helmet,gloves,chest,boots)) diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 591a861c394..ef43c69b2da 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -58,9 +58,9 @@ camera.c_tag = usr.name to_chat(usr, "User scanned as [camera.c_tag]. Camera activated.") -/obj/item/clothing/head/helmet/space/examine(mob/user) +/obj/item/clothing/head/helmet/space/examine(mob/user, distance, infix, suffix) . = ..() - if(camera_networks && Adjacent(user)) + if(camera_networks && distance < 2) . += "This helmet has a built-in camera. It's [camera ? "" : "in"]active." /obj/item/clothing/suit/space diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 612d62c6bb2..fc697c366a2 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -70,11 +70,11 @@ //Cycler settings var/no_cycle = FALSE //stop this item from being put in a cycler -/obj/item/clothing/suit/space/void/examine(user) +/obj/item/clothing/suit/space/void/examine(mob/user, distance, infix, suffix) . = ..() for(var/obj/item/I in list(helmet,boots,tank,cooler)) . += "It has \a [I] installed." - if(tank && in_range(src,user)) + if(tank && distance < 2) . += "The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank]." /obj/item/clothing/suit/space/void/refit_for_species(var/target_species) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index a027668f36d..4f824e292e6 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -575,9 +575,9 @@ icon_state = "watch" slot_flags = SLOT_GLOVES | SLOT_TIE -/obj/item/clothing/accessory/watch/examine(mob/user) +/obj/item/clothing/accessory/watch/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "The watch shows that the time is [stationtime2text()]." /obj/item/clothing/accessory/watch/silver diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index e99a816e86f..03d4bcbb9a6 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -84,7 +84,7 @@ holstered.emp_act(severity) ..() -/obj/item/clothing/accessory/holster/examine(mob/user) +/obj/item/clothing/accessory/holster/examine(mob/user, distance, infix, suffix) . = ..(user) if(holstered) . += "A [holstered] is holstered here." @@ -165,4 +165,4 @@ concealed_holster = 0 /obj/item/clothing/accessory/holster/leg/black - icon_state = "holster_b_leg" \ No newline at end of file + icon_state = "holster_b_leg" diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index d01279f2a1f..6612bfeea41 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -90,7 +90,7 @@ icon_state = "evidenceobj" return -/obj/item/evidencebag/examine(mob/user) +/obj/item/evidencebag/examine(mob/user, distance, infix, suffix) . = ..() if(stored_item) user.examinate(stored_item) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index b6cbdbe54ed..16af54cb61e 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -162,7 +162,7 @@ /obj/item/spacecash/ewallet/attackby() return //like actual /obj/item/spacecash/ewallet/update_icon() return //space cash -/obj/item/spacecash/ewallet/examine(mob/user) +/obj/item/spacecash/ewallet/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]." diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index a594e453f71..7b1de38e50d 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -30,7 +30,7 @@ transaction_devices += src // Global reference list to be properly set up by /proc/setup_economy() . = ..() -/obj/machinery/cash_register/examine(mob/user as mob) +/obj/machinery/cash_register/examine(mob/user, distance, infix, suffix) . = ..(user) if(transaction_amount) . += "It has a purchase of [transaction_amount] pending[transaction_purpose ? " for [transaction_purpose]" : ""]." diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index 1fd99600e36..006daea6c7f 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -59,7 +59,7 @@ user.set_machine(src) interact(user) -/obj/item/retail_scanner/examine(mob/user as mob) +/obj/item/retail_scanner/examine(mob/user, distance, infix, suffix) . = ..() if(transaction_amount) . += "It has a purchase of [transaction_amount] pending[transaction_purpose ? " for [transaction_purpose]" : ""]." diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index c33ecae6b9d..500167603e4 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -76,25 +76,29 @@ stat(null,"[description_holders["antag"]]") //Red, malicious antag-related text //override examinate verb to update description holders when things are examined -//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine() -/mob/verb/examinate(atom/A as mob|obj|turf in _validate_atom(A)) +//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 +/mob/verb/examinate(atom/target as mob | obj | turf in _validate_atom(target)) set name = "Examine" set category = "IC" - - if((is_blind(src) || usr.stat) && !isobserver(src)) - to_chat(src, "Something is there but you can't see it.") - return 1 - - //Could be gone by the time they finally pick something - if(!A) - return 1 - - face_atom(A) - var/list/results = A.examine(src) - if(!results || !results.len) + if ((is_blind(src) || usr.stat) && !isobserver(src)) + to_chat(src, SPAN_NOTICE("Something is there but you can't see it.")) + return TRUE + if (!target) + return TRUE + var/distance = INFINITY + if (usr.stat == DEAD || isobserver(usr)) + distance = 0 + else + var/turf/turf1 = get_turf(src) + var/turf/turf2 = get_turf(target) + if(turf1 && turf1.z == turf2?.z) + distance = get_dist(turf1, turf2) + face_atom(target) + var/list/results = target.examine(src, distance) + if(!length(results)) results = list("You were unable to examine that. Tell a developer!") to_chat(src, "[jointext(results, "
")]
") - update_examine_panel(A) + update_examine_panel(target) /mob/proc/update_examine_panel(var/atom/A) if(client) diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm index a823c414356..3c77150eacf 100644 --- a/code/modules/fishing/fishing_rod.dm +++ b/code/modules/fishing/fishing_rod.dm @@ -32,11 +32,11 @@ /obj/item/material/fishing_rod/built strung = FALSE -/obj/item/material/fishing_rod/examine(mob/user) +/obj/item/material/fishing_rod/examine(mob/user, distance, infix, suffix) . = ..() if(Bait) . += "It has [Bait] hanging on its hook: " - . += Bait.examine(user) + . += Bait.examine(user, distance, infix, suffix) /obj/item/material/fishing_rod/CtrlClick(mob/user) if((src.loc == user || Adjacent(user)) && Bait) diff --git a/code/modules/food/drinkingglass/drinkingglass.dm b/code/modules/food/drinkingglass/drinkingglass.dm index d50d50aaef4..fce37076d3a 100644 --- a/code/modules/food/drinkingglass/drinkingglass.dm +++ b/code/modules/food/drinkingglass/drinkingglass.dm @@ -27,7 +27,7 @@ var/global/const/DRINK_ICON_NOISY = "_noise" matter = list("glass" = 60) -/obj/item/reagent_containers/food/drinks/glass2/examine(mob/M as mob) +/obj/item/reagent_containers/food/drinks/glass2/examine(mob/user, distance, infix, suffix) . = ..() for(var/I in extras) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index b10c95586f6..76d3b59b8a7 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -94,9 +94,9 @@ /obj/item/reagent_containers/food/drinks/feed_sound(var/mob/user) playsound(src, 'sound/items/drink.ogg', rand(10, 50), 1) -/obj/item/reagent_containers/food/drinks/examine(mob/user) +/obj/item/reagent_containers/food/drinks/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) if(!reagents?.total_volume) . += "It is empty!" else if (reagents.total_volume <= volume * 0.25) diff --git a/code/modules/food/food/sandwich.dm b/code/modules/food/food/sandwich.dm index 8a2dfc2ad72..dc699f680f8 100644 --- a/code/modules/food/food/sandwich.dm +++ b/code/modules/food/food/sandwich.dm @@ -78,7 +78,7 @@ qdel(O) ..() -/obj/item/reagent_containers/food/snacks/csandwich/examine(mob/user) +/obj/item/reagent_containers/food/snacks/csandwich/examine(mob/user, distance, infix, suffix) . = ..() if(contents.len) var/obj/item/O = pick(contents) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index d0bef2fa211..98096be744e 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -190,9 +190,9 @@ return 0 -/obj/item/reagent_containers/food/snacks/examine(mob/user) +/obj/item/reagent_containers/food/snacks/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) if(coating) . += "It's coated in [coating.name]!" if(bitecount==0) @@ -7148,7 +7148,7 @@ if(!sealed) unseal() -/obj/item/reagent_containers/food/snacks/canned/examine(mob/user) +/obj/item/reagent_containers/food/snacks/canned/examine(mob/user, distance, infix, suffix) . = ..() to_chat(user, "It is [sealed ? "" : "un"]sealed.") diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index 2a9fe3d2054..1585c0cca57 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -66,9 +66,9 @@ qdel(CI) return ..() -/obj/machinery/appliance/examine(var/mob/user) +/obj/machinery/appliance/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += list_contents(user) /obj/machinery/appliance/proc/list_contents(var/mob/user) diff --git a/code/modules/food/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm index 1c20f007cf6..6fb0184ac87 100644 --- a/code/modules/food/kitchen/cooking_machines/_cooker.dm +++ b/code/modules/food/kitchen/cooking_machines/_cooker.dm @@ -14,7 +14,7 @@ mobdamagetype = BURN can_burn_food = TRUE -/obj/machinery/appliance/cooker/examine(var/mob/user) +/obj/machinery/appliance/cooker/examine(mob/user, distance, infix, suffix) . = ..() if(.) //no need to duplicate adjacency check if(!stat) @@ -143,4 +143,4 @@ var/datum/cooking_item/CI = ..() if (CI && CI.combine_target) to_chat(user, "\The [I] will be used to make a [selected_option]. Output selection is returned to default for future items.") - selected_option = null \ No newline at end of file + selected_option = null diff --git a/code/modules/food/kitchen/cooking_machines/_mixer.dm b/code/modules/food/kitchen/cooking_machines/_mixer.dm index 09b5e3e3e03..5844fa82a1f 100644 --- a/code/modules/food/kitchen/cooking_machines/_mixer.dm +++ b/code/modules/food/kitchen/cooking_machines/_mixer.dm @@ -15,9 +15,9 @@ fundamental differences idle_power_usage = 50 var/datum/looping_sound/mixer/mixer_loop -/obj/machinery/appliance/mixer/examine(var/mob/user) +/obj/machinery/appliance/mixer/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "It is currently set to make a [selected_option]" /obj/machinery/appliance/mixer/Initialize() diff --git a/code/modules/food/kitchen/cooking_machines/container.dm b/code/modules/food/kitchen/cooking_machines/container.dm index 80fb80b542d..a542967b65c 100644 --- a/code/modules/food/kitchen/cooking_machines/container.dm +++ b/code/modules/food/kitchen/cooking_machines/container.dm @@ -27,7 +27,7 @@ atom_flags |= ATOM_REAGENTS_IS_OPEN | ATOM_REAGENTS_SKIP_REACTIONS -/obj/item/reagent_containers/cooking_container/examine(var/mob/user) +/obj/item/reagent_containers/cooking_container/examine(mob/user, distance, infix, suffix) . = ..() if (contents.len) var/string = "It contains....
" diff --git a/code/modules/food/kitchen/cooking_machines/fryer.dm b/code/modules/food/kitchen/cooking_machines/fryer.dm index ce3df708cfc..8ea5c1b10e2 100644 --- a/code/modules/food/kitchen/cooking_machines/fryer.dm +++ b/code/modules/food/kitchen/cooking_machines/fryer.dm @@ -52,9 +52,9 @@ QDEL_NULL(oil) return ..() -/obj/machinery/appliance/cooker/fryer/examine(var/mob/user) +/obj/machinery/appliance/cooker/fryer/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) to_chat(user, "Oil Level: [oil.total_volume]/[optimal_oil]") /obj/machinery/appliance/cooker/fryer/update_icon() // We add our own version of the proc to use the special fryer double-lights. diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm index 1554e0787cf..73f6c7c54e1 100644 --- a/code/modules/food/kitchen/gibber.dm +++ b/code/modules/food/kitchen/gibber.dm @@ -86,7 +86,7 @@ else src.startgibbing(user) -/obj/machinery/gibber/examine() +/obj/machinery/gibber/examine(mob/user, distance, infix, suffix) . = ..() . += "The safety guard is [emagged ? "disabled" : "enabled"]." diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 4aefa3b78d0..c136fd1b2ca 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -427,7 +427,7 @@ update_icon() user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.") -/obj/item/cardhand/examine(mob/user) +/obj/item/cardhand/examine(mob/user, distance, infix, suffix) . = ..() if((!concealed) && cards.len) . += "It contains: " diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 46ba09225c2..e5a74796e3f 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -30,7 +30,7 @@ if(81 to 100) add_overlay("bees3") -/obj/machinery/beehive/examine(var/mob/user) +/obj/machinery/beehive/examine(mob/user, distance, infix, suffix) . = ..() if(!closed) . += "The lid is open." diff --git a/code/modules/hydroponics/grown_sif.dm b/code/modules/hydroponics/grown_sif.dm index 95735614fb2..2db1c683305 100644 --- a/code/modules/hydroponics/grown_sif.dm +++ b/code/modules/hydroponics/grown_sif.dm @@ -5,7 +5,7 @@ . = ..() seeds = rand(1, 2) -/obj/item/reagent_containers/food/snacks/grown/sif/examine(mob/user) +/obj/item/reagent_containers/food/snacks/grown/sif/examine(mob/user, distance, infix, suffix) . = ..() if(seeds) . += SPAN_NOTICE("You can see [seeds] seed\s in \the [src]. You might be able to extract them with a sharp object.") diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index ad3ebd7ccae..754d46972bd 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -61,7 +61,7 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds) src.name = "sample of [seed.seed_name] [seed.seed_noun]" src.desc = "It's labelled as coming from [seed.display_name]." -/obj/item/seeds/examine(mob/user) +/obj/item/seeds/examine(mob/user, distance, infix, suffix) . = ..() if(seed && !seed.roundstart) . += "It's tagged as variety #[seed.uid]." diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 6e519d8f6b0..d204b446f40 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -635,7 +635,7 @@ else if(dead) remove_dead(user) -/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user) +/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user, distance, infix, suffix) . = ..() if(seed) @@ -643,8 +643,8 @@ else . += "It is empty." - if(!Adjacent(user)) - return . + if(distance > 2) + return . += "Water: [round(waterlevel,0.1)]/100" . += "Nutrient: [round(nutrilevel,0.1)]/10" diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 9ed6db8f66a..d57a0070b26 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -171,9 +171,9 @@ if(id_card) return id_card -/obj/item/electronic_assembly/examine(mob/user) +/obj/item/electronic_assembly/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) for(var/obj/item/integrated_circuit/IC in contents) . += IC.external_examine(user) if(opened) @@ -359,4 +359,4 @@ // Returns TRUE if I is something that could/should have a valid interaction. Used to tell circuitclothes to hit the circuit with something instead of the clothes /obj/item/electronic_assembly/proc/is_valid_tool(var/obj/item/I) - return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/cell/device) || istype(I, /obj/item/integrated_electronics) \ No newline at end of file + return I.is_crowbar() || I.is_screwdriver() || istype(I, /obj/item/integrated_circuit) || istype(I, /obj/item/cell/device) || istype(I, /obj/item/integrated_electronics) diff --git a/code/modules/integrated_electronics/core/assemblies/clothing.dm b/code/modules/integrated_electronics/core/assemblies/clothing.dm index 8174817a44f..9af02c5fed0 100644 --- a/code/modules/integrated_electronics/core/assemblies/clothing.dm +++ b/code/modules/integrated_electronics/core/assemblies/clothing.dm @@ -46,10 +46,10 @@ IC.emp_act(severity) ..() -/obj/item/clothing/examine(mob/user) +/obj/item/clothing/examine(mob/user, distance, infix, suffix) . = ..() if(IC) - . += IC.examine(user) + . += IC.examine(user, distance, infix, suffix) /obj/item/clothing/CtrlShiftClick(mob/user) var/turf/T = get_turf(src) @@ -178,4 +178,4 @@ /obj/item/clothing/suit/circuitry/Initialize() setup_integrated_circuit(/obj/item/electronic_assembly/clothing/large) - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm index a43350f7799..02309db575e 100644 --- a/code/modules/integrated_electronics/core/assemblies/device.dm +++ b/code/modules/integrated_electronics/core/assemblies/device.dm @@ -45,7 +45,7 @@ I.do_work() return -/obj/item/assembly/electronic_assembly/examine(mob/user) +/obj/item/assembly/electronic_assembly/examine(mob/user, distance, infix, suffix) . = ..() if(EA) for(var/obj/item/integrated_circuit/IC in EA.contents) @@ -81,4 +81,3 @@ if(!CanInteract(user, state = deep_inventory_state)) return 0 return 1 - diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index d3d72e1738f..8f999e8ac46 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -3,7 +3,7 @@ a creative player the means to solve many problems. Circuits are held inside an electronic assembly, and are wired using special tools. */ -/obj/item/integrated_circuit/examine(mob/user) +/obj/item/integrated_circuit/examine(mob/user, distance, infix, suffix) . = ..() . += external_examine(user) interact(user) @@ -401,4 +401,4 @@ a creative player the means to solve many problems. Circuits are held inside an return /obj/item/integrated_circuit/proc/on_unanchored() - return \ No newline at end of file + return diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index e56474fb02f..287b5c0ea48 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -18,7 +18,7 @@ complexity = number_of_pins . = ..() -/obj/item/integrated_circuit/memory/examine(mob/user) +/obj/item/integrated_circuit/memory/examine(mob/user, distance, infix, suffix) . = ..() var/i for(i = 1, i <= outputs.len, i++) @@ -121,4 +121,4 @@ visible_message("[user] slides \a [src]'s over \the [target].") to_chat(user, "You set \the [src]'s memory to a reference to [O.display_data(O.data)]. The ref scanner is \ now off.") - accepting_refs = 0 \ No newline at end of file + accepting_refs = 0 diff --git a/code/modules/materials/sheets/organic/tanning/hide.dm b/code/modules/materials/sheets/organic/tanning/hide.dm index a2ed1abfdb3..99fb61d16bf 100644 --- a/code/modules/materials/sheets/organic/tanning/hide.dm +++ b/code/modules/materials/sheets/organic/tanning/hide.dm @@ -10,7 +10,7 @@ stacktype = "hide" no_variants = TRUE // This needs to be very clearly documented for players. Whether it should stay in the main description is up for debate. -/obj/item/stack/animalhide/examine(var/mob/user) +/obj/item/stack/animalhide/examine(mob/user, distance, infix, suffix) . = ..() . += description_info @@ -27,7 +27,7 @@ if(HS.amount < HS.max_amount) H = HS break - + // Either we found a valid stack, in which case increment amount, // Or we need to make a new stack if(istype(H)) @@ -38,7 +38,7 @@ // Increment the amount src.use(1) scraped++ - + if(scraped) to_chat(user, SPAN_NOTICE("You scrape the hair off [scraped] hide\s.")) else @@ -87,4 +87,4 @@ desc = "The skin of a terrible creature." singular_name = "alien hide piece" icon_state = "sheet-xeno" - stacktype = "hide-xeno" \ No newline at end of file + stacktype = "hide-xeno" diff --git a/code/modules/materials/sheets/organic/tanning/hide_hairless.dm b/code/modules/materials/sheets/organic/tanning/hide_hairless.dm index 72b235e415d..cea079b16b3 100644 --- a/code/modules/materials/sheets/organic/tanning/hide_hairless.dm +++ b/code/modules/materials/sheets/organic/tanning/hide_hairless.dm @@ -11,7 +11,7 @@ max_amount = 20 stacktype = "hairlesshide" -/obj/item/stack/hairlesshide/examine(var/mob/user) +/obj/item/stack/hairlesshide/examine(mob/user, distance, infix, suffix) . = ..() . += description_info @@ -24,7 +24,7 @@ if(HS.amount < HS.max_amount) H = HS break - + // Either we found a valid stack, in which case increment amount, // Or we need to make a new stack if(istype(H)) @@ -45,4 +45,4 @@ I.dry() use(1) - stacknum -= 1 \ No newline at end of file + stacknum -= 1 diff --git a/code/modules/materials/sheets/organic/tanning/leather_wet.dm b/code/modules/materials/sheets/organic/tanning/leather_wet.dm index 64f672512ce..97e1e5569fe 100644 --- a/code/modules/materials/sheets/organic/tanning/leather_wet.dm +++ b/code/modules/materials/sheets/organic/tanning/leather_wet.dm @@ -16,7 +16,7 @@ var/dry_type = /obj/item/stack/material/leather -/obj/item/stack/wetleather/examine(var/mob/user) +/obj/item/stack/wetleather/examine(mob/user, distance, infix, suffix) . = ..() . += description_info . += "\The [src] is [get_dryness_text()]." diff --git a/code/modules/materials/sheets/organic/tanning/tanning_rack.dm b/code/modules/materials/sheets/organic/tanning/tanning_rack.dm index 885b65dd8fe..7ddc184003b 100644 --- a/code/modules/materials/sheets/organic/tanning/tanning_rack.dm +++ b/code/modules/materials/sheets/organic/tanning/tanning_rack.dm @@ -21,7 +21,7 @@ visible_message("The [drying] is dry!") update_icon() -/obj/structure/tanning_rack/examine(var/mob/user) +/obj/structure/tanning_rack/examine(mob/user, distance, infix, suffix) . = ..() if(drying) . += "\The [drying] is [drying.get_dryness_text()]." @@ -65,4 +65,4 @@ update_icon() /obj/structure/tanning_rack/attack_robot(var/mob/user) - attack_hand(user) // That has checks to \ No newline at end of file + attack_hand(user) // That has checks to diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index 98195c7b4e6..9a1706e85a5 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -12,7 +12,7 @@ var/global/list/total_extraction_beacons = list() var/can_use_indoors = FALSE var/safe_for_living_creatures = 1 -/obj/item/extraction_pack/examine() +/obj/item/extraction_pack/examine(mob/user, distance, infix, suffix) . = ..() . += "It has [uses_left] use\s remaining." diff --git a/code/modules/mining/ore_box.dm b/code/modules/mining/ore_box.dm index cf79c8f671f..4afc2896f6b 100644 --- a/code/modules/mining/ore_box.dm +++ b/code/modules/mining/ore_box.dm @@ -13,9 +13,9 @@ var/stored_ore -/obj/structure/ore_box/examine(mob/user) +/obj/structure/ore_box/examine(mob/user, distance, infix, suffix) . = ..() - if (!Adjacent(user) && !isobserver(user)) + if (distance > 2 && !isobserver(user)) return if (isliving(user)) add_fingerprint(user) diff --git a/code/modules/mining/ore_redemption_machine/mine_point_items.dm b/code/modules/mining/ore_redemption_machine/mine_point_items.dm index 42886cdd150..278701f137e 100644 --- a/code/modules/mining/ore_redemption_machine/mine_point_items.dm +++ b/code/modules/mining/ore_redemption_machine/mine_point_items.dm @@ -37,7 +37,7 @@ ..() -/obj/item/card/mining_point_card/examine(mob/user) +/obj/item/card/mining_point_card/examine(mob/user, distance, infix, suffix) . = ..() . += "There's [mine_points] excavation points on the card." . += "There's [survey_points] survey points on the card." diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 495142026a5..ed281a363c9 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -169,7 +169,7 @@ set_cached_examine_icon(src, I, 200 SECONDS) return I -/mob/observer/dead/examine(mob/user) +/mob/observer/dead/examine(mob/user, distance, infix, suffix) . = ..() if(is_admin(user)) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 1aed01d1e28..b69ceee8cba 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -416,7 +416,7 @@ else if(prob(tipped_status * 0.2)) playsound(src, 'sound/machines/warning-buzzer.ogg', 30, extrarange=-2) -/mob/living/bot/medbot/examine(mob/user) +/mob/living/bot/medbot/examine(mob/user, distance, infix, suffix) . = ..() if(tipped_status == MEDBOT_PANIC_NONE) return diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 7d909aa9f38..a1bf6a8bdbd 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -197,7 +197,7 @@ /obj/item/mmi/digital/attackby(var/obj/item/O as obj, var/mob/user as mob) return //Doesn't do anything right now because none of the things that can be done to a regular MMI make any sense for these -/obj/item/mmi/digital/examine(mob/user) +/obj/item/mmi/digital/examine(mob/user, distance, infix, suffix) . = ..() if(src.brainmob && src.brainmob.key) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index a343a5c6387..f825ac5997b 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -1,11 +1,11 @@ -/mob/living/carbon/human/examine(mob/user) +/mob/living/carbon/human/examine(mob/user, distance, infix, suffix) // . = ..() //Note that we don't call parent. We build the list by ourselves. var/skip_gear = 0 var/skip_body = 0 if(alpha <= EFFECTIVE_INVIS) - return src.loc.examine(user) // Returns messages as if they examined wherever the human was + return loc.examine(user, distance, infix, suffix) // Returns messages as if they examined wherever the human was var/looks_synth = looksSynthetic() diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm index 83388b1255b..3d1a2d21042 100644 --- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm +++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm @@ -41,7 +41,7 @@ var/global/const/MAX_ACTIVE_TIME = 400 if(!config.aliens_allowed) return INITIALIZE_HINT_QDEL -/obj/item/clothing/mask/facehugger/examine(mob/user) +/obj/item/clothing/mask/facehugger/examine(mob/user, distance, infix, suffix) ..(user) switch(stat) if(DEAD,UNCONSCIOUS) @@ -217,4 +217,4 @@ var/global/const/MAX_ACTIVE_TIME = 400 if(H.head && (H.head.body_parts_covered & FACE) && !(H.head.item_flags & FLEXIBLEMATERIAL)) return 0 return 1 -*/ \ No newline at end of file +*/ diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index 7f25b87e21e..79b7c145de2 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -1,4 +1,4 @@ -/mob/living/silicon/ai/examine(mob/user) +/mob/living/silicon/ai/examine(mob/user, distance, infix, suffix) . = ..() if (src.stat == DEAD) @@ -29,10 +29,10 @@ . += "The wireless networking light is blinking." . += "*---------*" - + if(hardware && (hardware.owner == src)) . += hardware.get_examine_desc() - + user.showLaws(src) /mob/proc/showLaws(var/mob/living/silicon/S) diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 757fbfbbeae..2cb5988c5ee 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -1,5 +1,5 @@ -/mob/living/silicon/pai/examine(mob/user) - . = ..(user, infix = ", personal AI") +/mob/living/silicon/pai/examine(mob/user, distance, infix, suffix) + . = ..(user, distance, ", personal AI", suffix) switch(src.stat) if(CONSCIOUS) @@ -15,4 +15,3 @@ if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!] pose = addtext(pose,".") //Makes sure all emotes end with a period. . += "
It is [pose]" //Extra
intentional - \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index 17b50223ecd..12b65d63eaa 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -30,11 +30,11 @@ var/force_holder = null // -/obj/item/gripper/examine(mob/user) +/obj/item/gripper/examine(mob/user, distance, infix, suffix) . = ..() if(wrapped) . += "\The [src] is holding \the [wrapped]." - . += wrapped.examine(user) + . += wrapped.examine(user, distance, infix, suffix) /obj/item/gripper/CtrlClick(mob/user) drop_item() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 20977b27680..50514014e89 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -59,7 +59,7 @@ if(drone_progress >= 100) visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.") -/obj/machinery/drone_fabricator/examine(mob/user) +/obj/machinery/drone_fabricator/examine(mob/user, distance, infix, suffix) . = ..() if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones) . += "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone." diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 814104fbbdb..61d171fcd24 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,6 +1,6 @@ -/mob/living/silicon/robot/examine(mob/user) - var/custom_infix = custom_name ? ", [modtype] [braintype]" : "" - . = ..(user, infix = custom_infix) +/mob/living/silicon/robot/examine(mob/user, distance, infix, suffix) + var/custom_infix = custom_name ? ", [modtype] [braintype]" : infix + . = ..(user, distance, custom_infix, suffix) if (src.getBruteLoss()) if (src.getBruteLoss() < 75) diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 113b733b65f..346b69db1a8 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -433,7 +433,7 @@ max_walls = 10 max_doors = 5 -/obj/item/inflatable_dispenser/examine(var/mob/user) +/obj/item/inflatable_dispenser/examine(mob/user, distance, infix, suffix) . = ..() . += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored." . += "It is set to deploy [mode ? "doors" : "walls"]" diff --git a/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm b/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm index db4c8dd97db..af91e19ecb8 100644 --- a/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm +++ b/code/modules/mob/living/silicon/robot/subtypes/thinktank/_thinktank.dm @@ -72,7 +72,7 @@ recharging = null . = ..() -/mob/living/silicon/robot/platform/examine(mob/user, distance) +/mob/living/silicon/robot/platform/examine(mob/user, distance, infix, suffix) . = ..() if(distance <= 3) diff --git a/code/modules/mob/living/simple_mob/harvesting.dm b/code/modules/mob/living/simple_mob/harvesting.dm index dc7f2d55588..1813a528e22 100644 --- a/code/modules/mob/living/simple_mob/harvesting.dm +++ b/code/modules/mob/living/simple_mob/harvesting.dm @@ -15,10 +15,10 @@ // Associative list of paths and their chances. path = straws in the lot var/list/harvest_results -/mob/living/simple_mob/examine(mob/user) +/mob/living/simple_mob/examine(mob/user, distance, infix, suffix) . = ..() - if(user && (isobserver(user) || get_dist(user, src) <= 3)) + if(user && (isobserver(user) || distance <= 3)) var/datum/gender/G = gender_datums[get_visible_gender()] if(stat == DEAD) diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm index 7180370c6b9..0ddf99bcbac 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm @@ -89,7 +89,7 @@ to_chat(src, span("warning", "\The [user] takes your [my_headset.name] away! How cruel!")) my_headset = null -/mob/living/simple_mob/animal/passive/bird/parrot/examine(mob/user) +/mob/living/simple_mob/animal/passive/bird/parrot/examine(mob/user, distance, infix, suffix) . = ..() if(my_headset) . += "It is wearing \a [my_headset]." @@ -250,4 +250,4 @@ if(holder.stat || !holder.say_list || !message || speaker == holder) return var/datum/say_list/S = holder.say_list - S.speak |= message \ No newline at end of file + S.speak |= message diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm index 5aebefb2cae..6f46a228b66 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/grafadreka/grafadreka.dm @@ -163,7 +163,7 @@ You can eat glowing tree fruit to fuel your ranged spitting attack and broken_damage) . += "It is heavily damaged!" @@ -52,4 +52,4 @@ if(HALLOSS) take_damage(Proj.damage, Proj.damage / 3, 0) if(BURN) - take_damage(Proj.damage, Proj.damage / 1.5) \ No newline at end of file + take_damage(Proj.damage, Proj.damage / 1.5) diff --git a/code/modules/modular_computers/hardware/_hardware.dm b/code/modules/modular_computers/hardware/_hardware.dm index c979b1732d3..95ec1394305 100644 --- a/code/modules/modular_computers/hardware/_hardware.dm +++ b/code/modules/modular_computers/hardware/_hardware.dm @@ -72,7 +72,7 @@ // Good to go. return 1 -/obj/item/computer_hardware/examine(var/mob/user) +/obj/item/computer_hardware/examine(mob/user, distance, infix, suffix) . = ..() if(damage > damage_failure) . += "It seems to be severely damaged!" @@ -85,4 +85,3 @@ /obj/item/computer_hardware/take_damage(var/amount) damage += round(amount) // We want nice rounded numbers here. damage = between(0, damage, max_damage) // Clamp the value. - diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index c833a6251c9..b21cf0e0411 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -88,7 +88,7 @@ /turf/simulated/open/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) var/depth = 1 for(var/T = GetBelow(src); isopenspace(T); T = GetBelow(T)) depth += 1 @@ -189,4 +189,4 @@ for(var/obj/O in contents) if(!O.CanFallThru(L, GetBelow(src))) return TRUE // Can't fall through this, like lattice or catwalk. - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index c0deb2906e6..4c1a33cef6f 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -122,7 +122,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) to_chat(brainmob, "You feel slightly disoriented. That's normal when you're just \a [initial(src.name)].") callHook("debrain", list(brainmob)) -/obj/item/organ/internal/brain/examine(mob/user) // -- TLE +/obj/item/organ/internal/brain/examine(mob/user, distance, infix, suffix) // -- TLE . = ..() if(brainmob && brainmob.client)//if thar be a brain inside... the brain. . += "You can feel the small spark of life still left in this one." diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index d6025465306..8c144195fc0 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -191,7 +191,7 @@ var/global/list/organ_cache = list() handle_rejection() handle_germ_effects() -/obj/item/organ/examine(mob/user) +/obj/item/organ/examine(mob/user, distance, infix, suffix) . = ..() if(status & ORGAN_DEAD) . += "Decay appears to have set in." diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 72668a37f10..a1b177e304a 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -148,9 +148,9 @@ return //no eating the limb until everything's been removed return ..() -/obj/item/organ/external/examine() +/obj/item/organ/external/examine(mob/user, distance, infix, suffix) . = ..() - if(in_range(usr, src) || istype(usr, /mob/observer/dead)) + if(distance < 2 || istype(usr, /mob/observer/dead)) for(var/obj/item/I in contents) if(istype(I, /obj/item/organ)) continue diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index fb2d5f4dee3..c556e37f485 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -164,7 +164,7 @@ icon_state = "sensors_off" ..() -/obj/machinery/shipsensors/examine(mob/user) +/obj/machinery/shipsensors/examine(mob/user, distance, infix, suffix) . = ..() if(health <= 0) . += "It is wrecked." @@ -226,4 +226,4 @@ /obj/machinery/shipsensors/weak heat_reduction = 0.2 - desc = "Miniaturized gravity scanner with various other sensors, used to detect irregularities in surrounding space. Can only run in vacuum to protect delicate quantum bluespace elements." \ No newline at end of file + desc = "Miniaturized gravity scanner with various other sensors, used to detect irregularities in surrounding space. Can only run in vacuum to protect delicate quantum bluespace elements." diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index c8c6c798895..ca9f19dfac1 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -191,9 +191,9 @@ icon_state = "envelope_empty" -/obj/item/folder/envelope/examine(mob/user) +/obj/item/folder/envelope/examine(mob/user, distance, infix, suffix) . = ..() - if (get_dist(src, user) > 3 && !isobserver(user)) + if (distance > 3 && !isobserver(user)) return if (envelope_seal) . += "It has an [SPAN_NOTICE("intact [envelope_seal] seal")]." diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 36f313dfb87..01ef61183ad 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -149,9 +149,9 @@ free_space -= length(strip_html_properly(new_text)) -/obj/item/paper/examine(mob/user) +/obj/item/paper/examine(mob/user, distance, infix, suffix) . = ..() - if(in_range(user, src) || istype(user, /mob/observer/dead)) + if(distance < 2 || istype(user, /mob/observer/dead)) show_content(usr) else . += "You have to go closer if you want to read it." diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index c0ebfb5bb92..3529dbc7e00 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -96,9 +96,9 @@ else to_chat(user, "You must hold \the [P] steady to burn \the [src].") -/obj/item/paper_bundle/examine(mob/user) +/obj/item/paper_bundle/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) show_content(user) else . += "It is too far away." @@ -243,4 +243,4 @@ if(photo) desc += "\nThere is a photo attached to it." add_overlay(image('icons/obj/bureaucracy.dmi', "clip")) - return \ No newline at end of file + return diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm index 63c5353c259..d540870695e 100644 --- a/code/modules/paperwork/paper_sticky.dm +++ b/code/modules/paperwork/paper_sticky.dm @@ -48,7 +48,7 @@ return ..() -/obj/item/sticky_pad/examine(var/mob/user) +/obj/item/sticky_pad/examine(mob/user, distance, infix, suffix) . = ..() if(.) to_chat(user, SPAN_NOTICE("It has [papers] [papername]\s left in the stack.")) @@ -150,4 +150,4 @@ if(dir_offset & NORTH) pixel_y += 32 else if(dir_offset & SOUTH) - pixel_y -= 32 \ No newline at end of file + pixel_y -= 32 diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index ef1765c2fc3..c2539d19052 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -95,9 +95,9 @@ amount++ -/obj/item/paper_bin/examine(mob/user) +/obj/item/paper_bin/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) if(amount) . += "There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin." else diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index e2e3c56530a..d53f746db7c 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -21,9 +21,9 @@ . = ..() default_apply_parts() -/obj/machinery/photocopier/examine(mob/user as mob) +/obj/machinery/photocopier/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "The screen shows there's [toner ? "[toner]" : "no"] toner left in the printer." /obj/machinery/photocopier/attack_ai(mob/user as mob) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 923b68cd373..33f6f7220e3 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -51,9 +51,9 @@ var/global/photo_count = 0 scribble = txt ..() -/obj/item/photo/examine(mob/user) +/obj/item/photo/examine(mob/user, distance, infix, suffix) //This is one time we're not going to call parent, because photos are 'secret' unless you're close enough. - if(in_range(user, src)) + if(distance < 2) show(user) return list(desc) else diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm index 63846e3601f..1c455bbf92d 100644 --- a/code/modules/pda/pda.dm +++ b/code/modules/pda/pda.dm @@ -62,9 +62,9 @@ var/global/list/obj/item/pda/PDAs = list() var/list/notifying_programs = list() var/retro_mode = 0 -/obj/item/pda/examine(mob/user) +/obj/item/pda/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "The time [stationtime2text()] is displayed in the corner of the screen." /obj/item/pda/CtrlClick() diff --git a/code/modules/persistence/graffiti.dm b/code/modules/persistence/graffiti.dm index ef94ad27376..d2d6f9a9d59 100644 --- a/code/modules/persistence/graffiti.dm +++ b/code/modules/persistence/graffiti.dm @@ -37,7 +37,7 @@ SSpersistence.forget_value(src, /datum/persistent/graffiti) . = ..() -/obj/effect/decal/writing/examine(mob/user) +/obj/effect/decal/writing/examine(mob/user, distance, infix, suffix) . = ..() to_chat(user, "It reads \"[message]\".") diff --git a/code/modules/persistence/noticeboard.dm b/code/modules/persistence/noticeboard.dm index 2958dedae7d..180d72f8bc3 100644 --- a/code/modules/persistence/noticeboard.dm +++ b/code/modules/persistence/noticeboard.dm @@ -130,7 +130,7 @@ /obj/structure/noticeboard/attack_hand(var/mob/user) examine(user) -/obj/structure/noticeboard/examine(var/mob/user) +/obj/structure/noticeboard/examine(mob/user, distance, infix, suffix) . = ..() if(.) var/list/dat = list("") @@ -187,7 +187,7 @@ /obj/structure/noticeboard/anomaly/Initialize() . = ..() - + var/obj/item/paper/P = new() P.name = "Memo RE: proper analysis procedure" P.info = "
We keep test dummies in pens here for a reason, so standard procedure should be to activate newfound alien artifacts and place the two in close proximity. Promising items I might even approve monkey testing on." diff --git a/code/modules/persistence/specimens.dm b/code/modules/persistence/specimens.dm index 819602df8c9..60574551df2 100644 --- a/code/modules/persistence/specimens.dm +++ b/code/modules/persistence/specimens.dm @@ -36,7 +36,7 @@ to_chat(usr, "You set the tracker tag to '[tag_id]'.") return TRUE -/obj/item/specimen_tagger/examine(mob/user) +/obj/item/specimen_tagger/examine(mob/user, distance, infix, suffix) . = ..() . += "Use this on a living animal on help intent to read an existing tracker, grab intent to tag an animal with a tracker, and any other intent to remove an existing tracker." @@ -226,7 +226,7 @@ return // Mob helpers/overrides. -/mob/living/examine(mob/user, infix, suffix) +/mob/living/examine(mob/user, distance, infix, suffix) . = ..() var/obj/item/gps/specimen_tag/xenotag = locate() in src if(istype(xenotag) && xenotag.has_been_implanted()) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 32b3c678b64..104dc5f935b 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -134,7 +134,7 @@ GLOBAL_LIST_EMPTY(apcs) var/static/list/status_overlays_lighting var/static/list/status_overlays_environ var/alarms_hidden = FALSE //If power alarms from this APC are visible on consoles - + var/nightshift_lights = FALSE var/nightshift_setting = NIGHTSHIFT_AUTO var/last_nightshift_switch = 0 @@ -271,9 +271,9 @@ GLOBAL_LIST_EMPTY(apcs) spawn(5) update() -/obj/machinery/power/apc/examine(mob/user) +/obj/machinery/power/apc/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) if(stat & BROKEN) . += "This APC is broken." @@ -1387,4 +1387,4 @@ GLOBAL_LIST_EMPTY(apcs) #undef APC_HAS_ELECTRONICS_NONE #undef APC_HAS_ELECTRONICS_WIRED -#undef APC_HAS_ELECTRONICS_SECURED \ No newline at end of file +#undef APC_HAS_ELECTRONICS_SECURED diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index 714eb16dab5..99a01b9ecc8 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -44,7 +44,7 @@ ..() set_state(1) -/obj/machinery/power/breakerbox/examine(mob/user) +/obj/machinery/power/breakerbox/examine(mob/user, distance, infix, suffix) . = ..() if(on) . += "It seems to be online." diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 1dabb93d56e..ae09b9a7a6f 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -110,7 +110,7 @@ var/global/list/possible_cable_coil_colours = list( cable_list -= src //remove it from global cable list return ..() // then go ahead and delete the cable -/obj/structure/cable/examine(mob/user) +/obj/structure/cable/examine(mob/user, distance, infix, suffix) . = ..() if(isobserver(user)) . += "[powernet?.avail > 0 ? "[DisplayPower(powernet.avail)] in power network." : "The cable is not powered."]" @@ -966,10 +966,10 @@ var/global/list/possible_cable_coil_colours = list( /obj/item/stack/cable_coil/alien/update_wclass() return 0 -/obj/item/stack/cable_coil/alien/examine(mob/user) +/obj/item/stack/cable_coil/alien/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "It doesn't seem to have a beginning, or an end." /obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 90d528a4841..ed10550c38c 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -155,9 +155,9 @@ return amount_used -/obj/item/cell/examine(mob/user) +/obj/item/cell/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "It has a power rating of [maxcharge]." . += "The charge meter reads [round(src.percent() )]%." @@ -270,4 +270,4 @@ if (1000 to 50000-1) return min(rand(10,20),rand(10,20)) else - return 0 \ No newline at end of file + return 0 diff --git a/code/modules/power/debug_items.dm b/code/modules/power/debug_items.dm index c7ca43705b3..47bae056e9e 100644 --- a/code/modules/power/debug_items.dm +++ b/code/modules/power/debug_items.dm @@ -5,7 +5,7 @@ density = 1 var/show_extended_information = 1 // Set to 0 to disable extra information on examining (for example, when used on admin events) -/obj/machinery/power/debug_items/examine(mob/user) +/obj/machinery/power/debug_items/examine(mob/user, distance, infix, suffix) . = ..() if(show_extended_information) . += show_info(user) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3f0f298c33d..0fdb375d5d7 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -55,9 +55,9 @@ var/global/list/light_type_cache = list() if(3) icon_state = "tube-empty" -/obj/machinery/light_construct/examine(mob/user) +/obj/machinery/light_construct/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance <= 2) switch(stage) if(1) . += "It's an empty frame." @@ -459,7 +459,7 @@ var/global/list/light_type_cache = list() return cell // examine verb -/obj/machinery/light/examine(mob/user) +/obj/machinery/light/examine(mob/user, distance, infix, suffix) . = ..() var/fitting = get_fitting_name() switch(status) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 94e2fa32567..5a0f675b9d6 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -57,13 +57,12 @@ if(!anchored) return -/obj/machinery/power/port_gen/examine(mob/user) +/obj/machinery/power/port_gen/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) //It literally has a light on the sprite, are you sure this is necessary? - if(active) - . += "The generator is on." - else - . += "The generator is off." + if(active) + . += "The generator is on." + else + . += "The generator is off." /obj/machinery/power/port_gen/emp_act(severity) var/duration = 6000 //ten minutes @@ -125,7 +124,7 @@ default_apply_parts() if(anchored) connect_to_network() - + /obj/machinery/power/port_gen/pacman/Destroy() DropFuel() return ..() @@ -145,7 +144,7 @@ power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2)) -/obj/machinery/power/port_gen/pacman/examine(mob/user) +/obj/machinery/power/port_gen/pacman/examine(mob/user, distance, infix, suffix) . = ..() . += "It appears to be producing [power_gen*power_output] W." . += "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper." @@ -312,7 +311,7 @@ if(!ui) ui = new(user, src, "PortableGenerator", name) ui.open() - + /obj/machinery/power/port_gen/pacman/tgui_data(mob/user) var/list/data = list() @@ -324,7 +323,7 @@ data["is_ai"] = TRUE else data["is_ai"] = FALSE - + data["sheet_name"] = capitalize(sheet_name) data["fuel_stored"] = round((sheets * 1000) + (sheet_left * 1000)) data["fuel_capacity"] = round(max_sheets * 1000, 0.1) diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index d42c330ea62..bfabbe953d4 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -102,9 +102,9 @@ var/global/list/rad_collectors = list() return 1 return ..() -/obj/machinery/power/rad_collector/examine(mob/user) +/obj/machinery/power/rad_collector/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 3) + if(distance <= 3) . += "The meter indicates that it is collecting [last_power] W." /obj/machinery/power/rad_collector/ex_act(severity) @@ -157,4 +157,3 @@ var/global/list/rad_collectors = list() flick("ca_deactive", src) update_icons() return - diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 695935bfeee..3d1a9ed49b6 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -266,7 +266,7 @@ if(src) qdel(src) -/obj/machinery/power/emitter/examine(mob/user) +/obj/machinery/power/emitter/examine(mob/user, distance, infix, suffix) . = ..() var/integrity_percentage = round((integrity / initial(integrity)) * 100) switch(integrity_percentage) @@ -288,4 +288,4 @@ return burst_delay /obj/machinery/power/emitter/proc/get_emitter_beam() - return new /obj/item/projectile/beam/emitter(get_turf(src)) \ No newline at end of file + return new /obj/item/projectile/beam/emitter(get_turf(src)) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 6d7108fbd6e..7b42b2dfc35 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -111,9 +111,9 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin src.set_dir(turn(src.dir, 90)) return 1 -/obj/structure/particle_accelerator/examine(mob/user) +/obj/structure/particle_accelerator/examine(mob/user, distance, infix, suffix) . = ..() - + switch(construction_state) if(0) . += "Looks like it's not attached to the flooring." @@ -290,9 +290,9 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin /obj/machinery/particle_accelerator/update_icon() return -/obj/machinery/particle_accelerator/examine(mob/user) +/obj/machinery/particle_accelerator/examine(mob/user, distance, infix, suffix) . = ..() - + switch(construction_state) if(0) . += "Looks like it's not attached to the flooring." diff --git a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm index 122251cf445..1378b02d946 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm @@ -36,9 +36,9 @@ recipes.Cut() ..() -/obj/machinery/particle_smasher/examine(mob/user) +/obj/machinery/particle_smasher/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "\The [src] contains:" for(var/obj/item/I in contents) . += "\the [I]" @@ -378,4 +378,4 @@ required_atmos_temp_min = 3000 required_atmos_temp_max = 10000 - probability = 1 \ No newline at end of file + probability = 1 diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 741c516d9d6..3ef6c8f0925 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -468,7 +468,7 @@ GLOBAL_LIST_EMPTY(smeses) // Given the SMES creates another explosion on it's destruction it sounds fairly reasonable. take_damage(250 / severity) -/obj/machinery/power/smes/examine(var/mob/user) +/obj/machinery/power/smes/examine(mob/user, distance, infix, suffix) . = ..() . += "The service hatch is [panel_open ? "open" : "closed"]." if(!damage) @@ -482,4 +482,4 @@ GLOBAL_LIST_EMPTY(smeses) if(25 to 49) . += "It's casing is quite seriously damaged." if(0 to 24) - . += "It's casing has some minor damage." \ No newline at end of file + . += "It's casing has some minor damage." diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index dd6c4b005c8..c4b645d18bb 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -67,7 +67,7 @@ else energy = 0 // ensure we dont have miniballs of miniballs -/obj/singularity/energy_ball/examine(mob/user) +/obj/singularity/energy_ball/examine(mob/user, distance, infix, suffix) . = ..() if(orbiting_balls.len) . += "The amount of orbiting mini-balls is [orbiting_balls.len]." diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 8398913528f..a03656a5b83 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -84,7 +84,7 @@ if(!BB) icon_state = "[initial(icon_state)]-spent" -/obj/item/ammo_casing/examine(mob/user) +/obj/item/ammo_casing/examine(mob/user, distance, infix, suffix) . = ..() if (!BB) . += "This one is spent." @@ -217,7 +217,7 @@ break icon_state = (new_state)? new_state : initial(icon_state) -/obj/item/ammo_magazine/examine(mob/user) +/obj/item/ammo_magazine/examine(mob/user, distance, infix, suffix) . = ..() . += "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!" @@ -245,4 +245,3 @@ magazine_icondata_keys["[M.type]"] = icon_keys magazine_icondata_states["[M.type]"] = ammo_states - diff --git a/code/modules/projectiles/ammunition/magnetic.dm b/code/modules/projectiles/ammunition/magnetic.dm index febb0b8c861..c79a71ef16d 100644 --- a/code/modules/projectiles/ammunition/magnetic.dm +++ b/code/modules/projectiles/ammunition/magnetic.dm @@ -9,7 +9,7 @@ var/remaining = 9 preserve_item = 1 -/obj/item/magnetic_ammo/examine(mob/user) +/obj/item/magnetic_ammo/examine(mob/user, distance, infix, suffix) . = ..() . += "There [(remaining == 1)? "is" : "are"] [remaining] flechette\s left!" diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm index ee3f3a00df3..69b2071064d 100644 --- a/code/modules/projectiles/ammunition/smartmag.dm +++ b/code/modules/projectiles/ammunition/smartmag.dm @@ -49,7 +49,7 @@ last_production_time = world.time produce() -/obj/item/ammo_magazine/smart/examine(mob/user) +/obj/item/ammo_magazine/smart/examine(mob/user, distance, infix, suffix) . = ..() if(attached_cell) @@ -223,4 +223,4 @@ ammo_type = null production_cost = null - return \ No newline at end of file + return diff --git a/code/modules/projectiles/broken.dm b/code/modules/projectiles/broken.dm index 47bbf709806..d570a2068f9 100644 --- a/code/modules/projectiles/broken.dm +++ b/code/modules/projectiles/broken.dm @@ -22,10 +22,10 @@ if(!my_guntype && !QDELETED(src)) qdel(src) -/obj/item/broken_gun/examine(mob/user) +/obj/item/broken_gun/examine(mob/user, distance, infix, suffix) . = ..() spawn() - if(get_dist(get_turf(user),get_turf(src)) <= 1) + if(distance < 2) to_chat(user, "You begin inspecting \the [src].") if(do_after(user, 5 SECONDS)) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index a91f67d17f9..86fa239c82b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -713,7 +713,7 @@ accuracy = initial(accuracy) recoil = initial(recoil) -/obj/item/gun/examine(mob/user) +/obj/item/gun/examine(mob/user, distance, infix, suffix) . = ..() if(firemodes.len > 1) var/datum/firemode/current_mode = firemodes[sel_mode] diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 2b782e3ecf1..58369fd5ad9 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -182,7 +182,7 @@ return suit.cell return null -/obj/item/gun/energy/examine(mob/user) +/obj/item/gun/energy/examine(mob/user, distance, infix, suffix) . = ..() if(power_supply) if(charge_cost) diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index bfd5c4d8587..a26ee94dbf7 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -253,7 +253,7 @@ /obj/item/crossbowframe/update_icon() icon_state = "crossbowframe[buildstate]" -/obj/item/crossbowframe/examine(mob/user) +/obj/item/crossbowframe/examine(mob/user, distance, infix, suffix) . = ..() switch(buildstate) if(1) diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index 2d06df48c7b..e839f2e6b30 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -35,9 +35,9 @@ to_chat(M, "You pump [src], but the magazine is empty.") update_icon() -/obj/item/gun/launcher/grenade/examine(mob/user) +/obj/item/gun/launcher/grenade/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) var/grenade_count = grenades.len + (chambered? 1 : 0) . += "Has [grenade_count] grenade\s remaining." if(chambered) @@ -122,4 +122,4 @@ playsound(src, 'sound/weapons/empty.ogg', 50, 1) chambered = null else - to_chat(user, "[src] is empty.") \ No newline at end of file + to_chat(user, "[src] is empty.") diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm index 91a430835db..2e8eae25459 100644 --- a/code/modules/projectiles/guns/launcher/pneumatic.dm +++ b/code/modules/projectiles/guns/launcher/pneumatic.dm @@ -98,9 +98,9 @@ item_storage.remove_from_storage(launched, src) return launched -/obj/item/gun/launcher/pneumatic/examine(mob/user) +/obj/item/gun/launcher/pneumatic/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += "The valve is dialed to [pressure_setting]%." if(tank) . += "The tank dial reads [tank.air_contents.return_pressure()] kPa." @@ -150,7 +150,7 @@ /obj/item/cannonframe/update_icon() icon_state = "pneumatic[buildstate]" -/obj/item/cannonframe/examine(mob/user) +/obj/item/cannonframe/examine(mob/user, distance, infix, suffix) . = ..() switch(buildstate) if(1) diff --git a/code/modules/projectiles/guns/launcher/rocket.dm b/code/modules/projectiles/guns/launcher/rocket.dm index 5aa93ff296a..4b9f256583e 100644 --- a/code/modules/projectiles/guns/launcher/rocket.dm +++ b/code/modules/projectiles/guns/launcher/rocket.dm @@ -16,9 +16,9 @@ var/max_rockets = 1 var/list/rockets = new/list() -/obj/item/gun/launcher/rocket/examine(mob/user) +/obj/item/gun/launcher/rocket/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += "[rockets.len] / [max_rockets] rockets." /obj/item/gun/launcher/rocket/attackby(obj/item/I as obj, mob/user as mob) diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm index f2440436228..747a6639385 100644 --- a/code/modules/projectiles/guns/magnetic/bore.dm +++ b/code/modules/projectiles/guns/magnetic/bore.dm @@ -27,7 +27,7 @@ QDEL_NULL(manipulator) . = ..() -/obj/item/gun/magnetic/matfed/examine(mob/user) +/obj/item/gun/magnetic/matfed/examine(mob/user, distance, infix, suffix) . = ..() if(manipulator) . += "The installed [manipulator.name] consumes [mat_cost] units of [ammo_material] per shot." @@ -192,7 +192,7 @@ return new projectile_type(src, rating_modifier) -/obj/item/gun/magnetic/matfed/phoronbore/examine(mob/user) +/obj/item/gun/magnetic/matfed/phoronbore/examine(mob/user, distance, infix, suffix) . = ..() if(rating_modifier) . += "A display on the side slowly scrolls the text \"BLAST EFFICIENCY [rating_modifier]\"." diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm index 4c71a41c493..54ee7816f42 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic.dm @@ -123,9 +123,9 @@ return ammotext -/obj/item/gun/magnetic/examine(var/mob/user) +/obj/item/gun/magnetic/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += show_ammo() if(cell) @@ -313,4 +313,4 @@ #undef ICON_BAD #undef ICON_CHARGE #undef ICON_READY -#undef ICON_LOADED \ No newline at end of file +#undef ICON_LOADED diff --git a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm index bc1be44620a..0969dc63749 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm @@ -87,9 +87,9 @@ construction_stage++ icon_state = "coilgun_construction_[construction_stage]" -/obj/item/coilgun_assembly/examine(var/mob/user) +/obj/item/coilgun_assembly/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) switch(construction_stage) if(2) . += "It has a metal frame loosely shaped around the stock." diff --git a/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm b/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm index 5f676852ae7..4c50312fd39 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm @@ -72,9 +72,9 @@ list(mode_name="long bursts", burst=6, fire_delay=null, move_delay=10, one_handed_penalty=30, burst_accuracy=list(0,-15,-15,-15,-30), dispersion=list(0.6, 0.6, 1.0, 1.0, 1.2)), ) -/obj/item/gun/magnetic/railgun/automatic/examine(var/mob/user) +/obj/item/gun/magnetic/railgun/automatic/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "Someone has scratched Ultima Ratio Regum onto the side of the barrel." /obj/item/gun/magnetic/railgun/flechette diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 02390162206..6a64d4fce86 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -54,9 +54,9 @@ chambered = ammo_magazine.stored_ammo[ammo_magazine.stored_ammo.len] if(handle_casings != HOLD_CASINGS) ammo_magazine.stored_ammo -= chambered - - var/mob/living/M = loc - if(istype(M)) + + var/mob/living/M = loc + if(istype(M)) M?.hud_used.update_ammo_hud(M, src) if (chambered) @@ -102,9 +102,9 @@ if(handle_casings != HOLD_CASINGS) chambered = null - - var/mob/living/M = loc - if(istype(M)) + + var/mob/living/M = loc + if(istype(M)) M?.hud_used.update_ammo_hud(M, src) @@ -140,10 +140,10 @@ loaded += C AM.stored_ammo -= C //should probably go inside an ammo_magazine proc, but I guess less proc calls this way... count++ - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) if(count) user.visible_message("[user] reloads [src].", "You load [count] round\s into [src].") - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) playsound(src, 'sound/weapons/empty.ogg', 50, 1) AM.update_icon() else if(istype(A, /obj/item/ammo_casing)) @@ -179,7 +179,7 @@ sleep(1 SECOND) update_icon() - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) //attempts to unload src. If allow_dump is set to 0, the speedloader unloading method will be disabled /obj/item/gun/projectile/proc/unload_ammo(mob/user, var/allow_dump=1) @@ -189,7 +189,7 @@ playsound(src, 'sound/weapons/empty.ogg', 50, 1) ammo_magazine.update_icon() ammo_magazine = null - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) else if(loaded.len) //presumably, if it can be speed-loaded, it can be speed-unloaded. if(allow_dump && (load_method & SPEEDLOADER)) @@ -208,11 +208,11 @@ user.put_in_hands(C) user.visible_message("[user] removes \a [C] from [src].", "You remove \a [C] from [src].") playsound(src, 'sound/weapons/empty.ogg', 50, 1) - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) else to_chat(user, "[src] is empty.") update_icon() - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) /obj/item/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob) ..() @@ -243,9 +243,9 @@ ammo_magazine.update_icon() ammo_magazine = null update_icon() //make sure to do this after unsetting ammo_magazine - user.hud_used.update_ammo_hud(user, src) + user.hud_used.update_ammo_hud(user, src) -/obj/item/gun/projectile/examine(mob/user) +/obj/item/gun/projectile/examine(mob/user, distance, infix, suffix) . = ..() if(ammo_magazine) . += "It has \a [ammo_magazine] loaded." @@ -320,7 +320,7 @@ for(var/obj/item/ammo_casing/bullet in ammo_magazine.stored_ammo) if(bullet.BB) shots_left++ - + if(shots_left > 0) return shots_left else @@ -332,7 +332,7 @@ for(var/obj/item/ammo_casing/bullet in loaded) if(bullet.BB) // Only increment how many shots we have left if we're loaded. shots_left++ - + if(shots_left > 0) return shots_left else diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index bdd7e6c74c3..651bceb1235 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -196,7 +196,7 @@ if(!ignore_inhands) update_held_icon() return -/obj/item/gun/projectile/automatic/z8/examine(mob/user) +/obj/item/gun/projectile/automatic/z8/examine(mob/user, distance, infix, suffix) . = ..() if(launcher.chambered) . += "\The [launcher] has \a [launcher.chambered] loaded." diff --git a/code/modules/projectiles/guns/projectile/dartgun.dm b/code/modules/projectiles/guns/projectile/dartgun.dm index 19d979023c7..937dd32f7ed 100644 --- a/code/modules/projectiles/guns/projectile/dartgun.dm +++ b/code/modules/projectiles/guns/projectile/dartgun.dm @@ -99,7 +99,7 @@ if(istype(dart)) fill_dart(dart) -/obj/item/gun/projectile/dartgun/examine(mob/user) +/obj/item/gun/projectile/dartgun/examine(mob/user, distance, infix, suffix) . = ..() if(beakers.len) . += "[src] contains:" diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index a199c71c8e7..77dfe82cd78 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -268,7 +268,7 @@ if(rand(1,max_shells) > loaded.len) chamber_offset = rand(0,max_shells - loaded.len) -/obj/item/gun/projectile/revolver/lemat/examine(mob/user) +/obj/item/gun/projectile/revolver/lemat/examine(mob/user, distance, infix, suffix) . = ..() if(secondary_loaded) var/to_print diff --git a/code/modules/projectiles/guns/vox.dm b/code/modules/projectiles/guns/vox.dm index 65f4a980ff0..81443f48d51 100644 --- a/code/modules/projectiles/guns/vox.dm +++ b/code/modules/projectiles/guns/vox.dm @@ -58,7 +58,7 @@ last_regen = world.time update_icon() -/obj/item/gun/launcher/spikethrower/examine(mob/user) +/obj/item/gun/launcher/spikethrower/examine(mob/user, distance, infix, suffix) . = ..() . += "It has [spikes] spike\s remaining." diff --git a/code/modules/reagents/machinery/dispenser/cartridge.dm b/code/modules/reagents/machinery/dispenser/cartridge.dm index f01b8c1f046..ebd137a3a17 100644 --- a/code/modules/reagents/machinery/dispenser/cartridge.dm +++ b/code/modules/reagents/machinery/dispenser/cartridge.dm @@ -21,7 +21,7 @@ var/datum/reagent/R = SSchemistry.chemical_reagents[spawn_reagent] setLabel(R.name) -/obj/item/reagent_containers/chem_disp_cartridge/examine(mob/user) +/obj/item/reagent_containers/chem_disp_cartridge/examine(mob/user, distance, infix, suffix) . = ..() . += "It has a capacity of [volume] units." if(reagents.total_volume <= 0) diff --git a/code/modules/reagents/machinery/dispenser/dispenser2.dm b/code/modules/reagents/machinery/dispenser/dispenser2.dm index 2ad13c690fe..a53100cac05 100644 --- a/code/modules/reagents/machinery/dispenser/dispenser2.dm +++ b/code/modules/reagents/machinery/dispenser/dispenser2.dm @@ -25,7 +25,7 @@ for(var/type in spawn_cartridges) add_cartridge(new type(src)) -/obj/machinery/chemical_dispenser/examine(mob/user) +/obj/machinery/chemical_dispenser/examine(mob/user, distance, infix, suffix) . = ..() . += "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more." @@ -133,7 +133,7 @@ data["amount"] = amount data["isBeakerLoaded"] = container ? 1 : 0 data["glass"] = accept_drinking - + var/beakerContents[0] if(container && container.reagents && container.reagents.reagent_list.len) for(var/datum/reagent/R in container.reagents.reagent_list) diff --git a/code/modules/reagents/machinery/dispenser/reagent_tank.dm b/code/modules/reagents/machinery/dispenser/reagent_tank.dm index bfe7dc58114..b8e5ced0adb 100644 --- a/code/modules/reagents/machinery/dispenser/reagent_tank.dm +++ b/code/modules/reagents/machinery/dispenser/reagent_tank.dm @@ -39,9 +39,9 @@ . = ..() -/obj/structure/reagent_dispensers/examine(mob/user) +/obj/structure/reagent_dispensers/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += "It contains:" if(reagents && reagents.reagent_list.len) for(var/datum/reagent/R in reagents.reagent_list) @@ -114,9 +114,9 @@ . = ..() reagents.add_reagent("fuel",1000) -/obj/structure/reagent_dispensers/fueltank/examine(mob/user) +/obj/structure/reagent_dispensers/fueltank/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) if(modded) . += "Fuel faucet is wrenched open, leaking the fuel!" if(rig) @@ -248,7 +248,7 @@ reagents.add_reagent("water",120) update_icon() -/obj/structure/reagent_dispensers/water_cooler/examine(mob/user) +/obj/structure/reagent_dispensers/water_cooler/examine(mob/user, distance, infix, suffix) . = ..() if(cupholder) . += "There are [cups] cups in the cup dispenser." diff --git a/code/modules/reagents/machinery/distillery.dm b/code/modules/reagents/machinery/distillery.dm index 30be88cd247..517430e5cc5 100644 --- a/code/modules/reagents/machinery/distillery.dm +++ b/code/modules/reagents/machinery/distillery.dm @@ -101,9 +101,9 @@ ..() -/obj/machinery/portable_atmospherics/powered/reagent_distillery/examine(mob/user) +/obj/machinery/portable_atmospherics/powered/reagent_distillery/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += "\The [src] is powered [on ? "on" : "off"]." . += "\The [src]'s gauges read:" diff --git a/code/modules/reagents/machinery/grinder.dm b/code/modules/reagents/machinery/grinder.dm index 478257413cc..b52ba264421 100644 --- a/code/modules/reagents/machinery/grinder.dm +++ b/code/modules/reagents/machinery/grinder.dm @@ -41,9 +41,9 @@ beaker = new /obj/item/reagent_containers/glass/beaker/large(src) default_apply_parts() -/obj/machinery/reagentgrinder/examine(mob/user) +/obj/machinery/reagentgrinder/examine(mob/user, distance, infix, suffix) . = ..() - if(!in_range(user, src) && !issilicon(user) && !isobserver(user)) + if(distance > 1 && !issilicon(user) && !isobserver(user)) . += "You're too far away to examine [src]'s contents and display!" return @@ -260,4 +260,4 @@ if(new_beaker) beaker = new_beaker update_icon() - return TRUE \ No newline at end of file + return TRUE diff --git a/code/modules/reagents/reagent_containers/borghypo.dm b/code/modules/reagents/reagent_containers/borghypo.dm index 5abe71432e8..ee5e53c7860 100644 --- a/code/modules/reagents/reagent_containers/borghypo.dm +++ b/code/modules/reagents/reagent_containers/borghypo.dm @@ -117,9 +117,9 @@ var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]] to_chat(usr, "Synthesizer is now producing '[R.name]'.") -/obj/item/reagent_containers/borghypo/examine(mob/user) +/obj/item/reagent_containers/borghypo/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]] . += "It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left." diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index fb2b2cb741c..358d133adb1 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -14,9 +14,9 @@ drop_sound = 'sound/items/drop/glass.ogg' pickup_sound = 'sound/items/pickup/glass.ogg' -/obj/item/reagent_containers/dropper/examine(var/mob/user) +/obj/item/reagent_containers/dropper/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) if(reagents && reagents.reagent_list.len) . += "It contains [reagents.total_volume] units of liquid." else diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index ad6877fd37f..7c0a3c5427d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -60,9 +60,9 @@ base_name = name base_desc = desc -/obj/item/reagent_containers/glass/examine(var/mob/user) +/obj/item/reagent_containers/glass/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) if(reagents && reagents.reagent_list.len) . += "It contains [reagents.total_volume] units of liquid." else @@ -362,7 +362,7 @@ QDEL_NULL(holding) return ..() -/obj/item/reagent_containers/glass/bucket/examine(mob/user) +/obj/item/reagent_containers/glass/bucket/examine(mob/user, distance, infix, suffix) . = ..() if(loc == user && holding) . += "There is \a [holding] in \the [src]." diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index b6ffbaf90f6..48be46616b1 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -167,7 +167,7 @@ else icon_state = "[initial(icon_state)]0" -/obj/item/reagent_containers/hypospray/autoinjector/examine(mob/user) +/obj/item/reagent_containers/hypospray/autoinjector/examine(mob/user, distance, infix, suffix) . = ..() if(reagents && reagents.reagent_list.len) . += "It is currently loaded." diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index f9fdd0963ea..d0f31c047e7 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -78,7 +78,7 @@ spray_size = next_in_list(spray_size, spray_sizes) to_chat(user, "You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray.") -/obj/item/reagent_containers/spray/examine(mob/user) +/obj/item/reagent_containers/spray/examine(mob/user, distance, infix, suffix) . = ..() if(loc == user) . += "[round(reagents.total_volume)] units left." @@ -132,9 +132,9 @@ . = ..() reagents.add_reagent("condensedcapsaicin", volume) -/obj/item/reagent_containers/spray/pepper/examine(mob/user) +/obj/item/reagent_containers/spray/pepper/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "The safety is [safety ? "on" : "off"]." /obj/item/reagent_containers/spray/pepper/attack_self(var/mob/user) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index dc2f4583f18..498061b728d 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -100,9 +100,9 @@ I.pixel_y = -3 add_overlay(I) -/obj/structure/bigDelivery/examine(mob/user) +/obj/structure/bigDelivery/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 4) + if(distance < 5) if(sortTag) . += "It is labeled \"[sortTag]\"" if(examtext) @@ -208,9 +208,9 @@ I.pixel_y = -3 add_overlay(I) -/obj/item/smallDelivery/examine(mob/user) +/obj/item/smallDelivery/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 4) + if(distance < 5) if(sortTag) . += "It is labeled \"[sortTag]\"" if(examtext) @@ -311,9 +311,9 @@ return return -/obj/item/packageWrap/examine(mob/user) +/obj/item/packageWrap/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 0) + if(distance < 2) . += "There are [amount] units of package wrap left!" /obj/structure/bigDelivery/Destroy() diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 04ce8c0bdfb..dafe74fb2d1 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -423,4 +423,4 @@ var/global/obj/machinery/blackbox_recorder/blackbox if(!FV) return - FV.add_details(details) \ No newline at end of file + FV.add_details(details) diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index e4252103e22..675f32761e4 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -209,9 +209,9 @@ else playsound(src, 'sound/machines/defib_safetyOff.ogg', 75, 0) -/obj/item/shield_projector/examine(var/mob/user) +/obj/item/shield_projector/examine(mob/user, distance, infix, suffix) . = ..() - if(Adjacent(user)) + if(distance < 2) . += "Its shield matrix is at [round( (shield_health / max_shield_health) * 100, 0.01)]% strength." /obj/item/shield_projector/emp_act(var/severity) diff --git a/code/modules/shieldgen/handheld_defuser.dm b/code/modules/shieldgen/handheld_defuser.dm index 1e8204953d5..2c82c0096bc 100644 --- a/code/modules/shieldgen/handheld_defuser.dm +++ b/code/modules/shieldgen/handheld_defuser.dm @@ -47,7 +47,7 @@ STOP_PROCESSING(SSobj, src) to_chat(usr, "You turn \the [src] [enabled ? "on" : "off"].") -/obj/item/shield_diffuser/examine(mob/user) +/obj/item/shield_diffuser/examine(mob/user, distance, infix, suffix) . = ..() . += "The charge meter reads [cell ? cell.percent() : 0]%" - . += "It is [enabled ? "enabled" : "disabled"]." \ No newline at end of file + . += "It is [enabled ? "enabled" : "disabled"]." diff --git a/code/modules/shieldgen/shield_diffuser.dm b/code/modules/shieldgen/shield_diffuser.dm index f331013b610..422f2a22d1b 100644 --- a/code/modules/shieldgen/shield_diffuser.dm +++ b/code/modules/shieldgen/shield_diffuser.dm @@ -67,8 +67,8 @@ alarm = round(max(alarm, duration)) update_icon() -/obj/machinery/shield_diffuser/examine(var/mob/user) +/obj/machinery/shield_diffuser/examine(mob/user, distance, infix, suffix) . = ..() . += "It is [enabled ? "enabled" : "disabled"]." if(alarm) - . += "A red LED labeled \"Proximity Alarm\" is blinking on the control panel." \ No newline at end of file + . += "A red LED labeled \"Proximity Alarm\" is blinking on the control panel." diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index f5bc40c97c1..52156a29560 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -86,7 +86,7 @@ T.update_icon() . = ..() -/obj/structure/table/examine(mob/user) +/obj/structure/table/examine(mob/user, distance, infix, suffix) . = ..() if(health < maxhealth) switch(health / maxhealth) diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 15f453cf8ce..0194a2fd0c6 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -195,9 +195,9 @@ else return ..() -/obj/vehicle/train/engine/examine(mob/user) +/obj/vehicle/train/engine/examine(mob/user, distance, infix, suffix) . = ..() - if(ishuman(user) && Adjacent(user)) + if(distance < 2 && ishuman(user)) . += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." . += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" diff --git a/code/modules/virus2/items_devices.dm b/code/modules/virus2/items_devices.dm index 405c7196dbd..858355ae14a 100644 --- a/code/modules/virus2/items_devices.dm +++ b/code/modules/virus2/items_devices.dm @@ -68,7 +68,7 @@ infect_virus2(target, src.virus2) qdel(src) -/obj/item/virusdish/examine(mob/user) +/obj/item/virusdish/examine(mob/user, distance, infix, suffix) . = ..() if(basic_info) . += "[basic_info] : More Information" diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm index 87a6fba8c32..a8b0ff5861f 100644 --- a/code/modules/xenoarcheaology/sampling.dm +++ b/code/modules/xenoarcheaology/sampling.dm @@ -95,9 +95,9 @@ var/num_stored_bags = 10 var/obj/item/evidencebag/filled_bag -/obj/item/core_sampler/examine(var/mob/user) +/obj/item/core_sampler/examine(mob/user, distance, infix, suffix) . = ..() - if(get_dist(user, src) <= 2) + if(distance < 3) . += "Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining." /obj/item/core_sampler/attackby(var/obj/item/I, var/mob/living/user) diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index d5337e3251b..45786b28f8e 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -197,6 +197,6 @@ if(25 to 30) icon_state = "excavationdrill5" //The other 2 sprites are comically long. Let's just cut it at 5. -/obj/item/pickaxe/excavationdrill/examine(mob/user) +/obj/item/pickaxe/excavationdrill/examine(mob/user, distance, infix, suffix) . = ..() . += "It is currently set at [excavation_amount]cms." diff --git a/code/modules/xenobio/items/extracts.dm b/code/modules/xenobio/items/extracts.dm index 7dc38c4dbb1..b792da9a862 100644 --- a/code/modules/xenobio/items/extracts.dm +++ b/code/modules/xenobio/items/extracts.dm @@ -32,7 +32,7 @@ qdel(O) ..() -/obj/item/slime_extract/examine(mob/user) +/obj/item/slime_extract/examine(mob/user, distance, infix, suffix) . = ..() if(uses) . += "This extract has [uses] more use\s."