From 9d9a657acf8787dfe0c5cbaf25c070d95be38ebc Mon Sep 17 00:00:00 2001 From: MrPerson Date: Thu, 1 May 2014 09:56:39 -0700 Subject: [PATCH 1/4] Change examine() from an atom verb to a mob verb Just in time for the feature freeze, a big change that will introduce bugs! Yay! Mob verb is called verb/examinate(target), which just calls target.examine(user) and face_atom(target) For explanation why, see http://www.byond.com/forum/?post=1326139&page=2#comment8198716 Long story short, mob verbs are much faster than object verbs. The goal is to make right-click menus populate faster. Also changes a bunch of examine() procs to always, ALWAYS call the parent. Except mobs, but you have 1 guess why I'm not touching them. Mostly this affects obj/item/examine(). And also remove a whole shitload of pointless set src in view(2) kind of crap. Also span classes. --- .../components/unary/vent_pump.dm | 5 +-- code/_onclick/click.dm | 3 +- code/_onclick/observer.dm | 2 +- code/game/atoms.dm | 34 ++++++++++----- code/game/gamemodes/cult/ritual.dm | 21 ++++----- code/game/gamemodes/cult/talisman.dm | 7 --- code/game/gamemodes/nuclear/pinpointer.dm | 4 +- code/game/machinery/atmoalter/meter.dm | 5 +-- code/game/machinery/bots/bots.dm | 8 ++-- code/game/machinery/cell_charger.dm | 7 ++- code/game/machinery/cloning.dm | 6 +-- code/game/machinery/cryo.dm | 12 +++--- code/game/machinery/lightswitch.dm | 7 ++- code/game/machinery/recycler.dm | 9 ++-- code/game/machinery/spaceheater.dm | 13 ++---- code/game/machinery/status_display.dm | 5 +-- code/game/machinery/syndicatebomb.dm | 4 +- code/game/mecha/mecha.dm | 17 ++++---- code/game/objects/effects/decals/crayon.dm | 7 --- code/game/objects/items.dm | 19 ++------ code/game/objects/items/devices/flashlight.dm | 4 -- .../objects/items/devices/lightreplacer.dm | 5 +-- .../game/objects/items/devices/radio/radio.dm | 10 ++--- .../objects/items/devices/taperecorder.dm | 5 +-- code/game/objects/items/stacks/stack.dm | 12 +++--- code/game/objects/items/toys.dm | 22 ++++------ .../objects/items/weapons/airlock_painter.dm | 6 +-- code/game/objects/items/weapons/cards_ids.dm | 4 +- .../objects/items/weapons/cigs_lighters.dm | 4 +- .../objects/items/weapons/extinguisher.dm | 6 --- .../items/weapons/grenades/chem_grenade.dm | 3 +- .../items/weapons/grenades/ghettobomb.dm | 5 +-- .../objects/items/weapons/grenades/grenade.dm | 7 ++- .../objects/items/weapons/storage/fancy.dm | 13 ++---- .../objects/items/weapons/storage/secure.dm | 5 +-- code/game/objects/items/weapons/stunbaton.dm | 7 ++- .../objects/items/weapons/tanks/tank_types.dm | 25 +++++------ .../game/objects/items/weapons/tanks/tanks.dm | 10 ++--- .../objects/items/weapons/tanks/watertank.dm | 8 ---- code/game/objects/items/weapons/tools.dm | 5 +-- .../objects/items/weapons/vending_items.dm | 7 ++- code/game/objects/structures/bedsheet_bin.dm | 13 +++--- code/game/objects/structures/janicart.dm | 11 ++--- code/game/objects/structures/mop_bucket.dm | 6 --- code/modules/assembly/assembly.dm | 10 ++--- code/modules/assembly/bomb.dm | 4 +- code/modules/assembly/holder.dm | 12 +++--- code/modules/assembly/mousetrap.dm | 4 +- code/modules/clothing/clothing.dm | 13 +++--- code/modules/clothing/shoes/magboots.dm | 5 +-- code/modules/events/ninja.dm | 36 +++++++--------- code/modules/mining/equipment_locker.dm | 15 +++---- code/modules/mob/dead/observer/observer.dm | 4 -- .../living/carbon/alien/special/facehugger.dm | 13 +++--- .../mob/living/carbon/brain/brain_item.dm | 9 ++-- .../mob/living/carbon/human/examine.dm | 20 +++------ .../mob/living/carbon/metroid/examine.dm | 10 +---- .../mob/living/carbon/monkey/examine.dm | 12 +----- code/modules/mob/living/silicon/ai/examine.dm | 12 +----- .../modules/mob/living/silicon/pai/examine.dm | 25 ----------- .../mob/living/silicon/robot/examine.dm | 12 +----- .../mob/living/simple_animal/constructs.dm | 7 +-- .../living/simple_animal/hostile/mushroom.dm | 6 +-- code/modules/mob/mob.dm | 7 +++ code/modules/paperwork/clipboard.dm | 2 +- code/modules/paperwork/folders.dm | 2 +- code/modules/paperwork/paper.dm | 20 ++++----- code/modules/paperwork/paperbin.dm | 7 ++- code/modules/paperwork/photography.dm | 15 +++---- code/modules/power/apc.dm | 43 +++++++++---------- code/modules/power/cable.dm | 11 +---- code/modules/power/cell.dm | 15 +++---- code/modules/power/lighting.dm | 35 ++++++--------- code/modules/power/port_gen.dm | 14 +++--- .../particle_accelerator.dm | 6 +-- code/modules/projectiles/guns/magic/wand.dm | 5 +-- code/modules/projectiles/guns/projectile.dm | 5 +-- .../projectiles/guns/projectile/revolver.dm | 4 +- .../projectiles/guns/projectile/shotgun.dm | 4 +- code/modules/reagents/grenade_launcher.dm | 7 +-- .../reagents/reagent_containers/borghydro.dm | 5 ++- .../reagent_containers/food/drinks.dm | 14 +++--- .../reagent_containers/food/snacks.dm | 11 ++--- .../reagents/reagent_containers/glass.dm | 10 ----- .../reagents/reagent_containers/spray.dm | 8 ---- code/modules/reagents/reagent_dispenser.dm | 11 ----- code/modules/reagents/syringe_gun.dm | 5 +-- code/modules/recycling/sortingmachinery.dm | 6 +-- code/modules/telesci/telepad.dm | 5 ++- code/modules/telesci/telesci_computer.dm | 4 +- 90 files changed, 335 insertions(+), 573 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 348ab417363..38d49daf2c5 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -301,11 +301,10 @@ else return ..() - examine() - set src in oview(1) + examine(mob/user) ..() if(welded) - usr << "It seems welded shut." + user << "It seems welded shut." power_change() if(powered(power_channel)) diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 3cb13df7651..774576624a5 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -206,8 +206,7 @@ return /atom/proc/ShiftClick(var/mob/user) if(user.client && user.client.eye == user) - examine() - user.face_atom(src) + user.examinate(src) return /* diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 5c81116661e..6e67138e402 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -55,7 +55,7 @@ // Oh by the way this didn't work with old click code which is why clicking shit didn't spam you /atom/proc/attack_ghost(mob/dead/observer/user as mob) if(user.client && user.client.inquisitive_ghost) - examine() + user.examinate(src) return // --------------------------------------- diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 8b7dc07052f..86780a76d54 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -205,19 +205,33 @@ its easier to just keep the beam vertical. //All atoms -/atom/verb/examine() - set name = "Examine" - set category = "IC" - set src in oview(12) //make it work from farther away +/atom/proc/examine(mob/user) + //This reformat names to get a/an properly working on item descriptions when they are bloody + var/determiner = "This is" + if(src.gender == PLURAL) + determiner = "These are" + var/f_name = "\a [src]." + if(src.blood_DNA) + if(gender == PLURAL) + f_name = "some " + else + f_name = "a " + f_name += "bloody [name]!" + + user << "\icon[src][determiner] [f_name]" - if (!( usr )) - return - usr << "\icon[src]That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn if(desc) - usr << desc + user << desc // *****RM - //usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]" - return + //user << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]" + + if(reagents && is_open_container()) //is_open_container() isn't really the right proc for this, but w/e + user << "It contains:" + if(reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + user << "[R.volume] units of [R.name]" + else + user << "Nothing." /atom/proc/relaymove() return diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 1a3e6e188cd..afdc18d21dc 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -146,11 +146,9 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", for(var/mob/living/silicon/ai/AI in player_list) AI.client.images += blood - examine() - set src in view(2) - - if(!iscultist(usr)) - usr << "A strange collection of symbols drawn in blood." + examine(mob/user) + if(!iscultist(user)) + user << "A strange collection of symbols drawn in blood." return /* Explosions... really? if(desc && !usr.stat) @@ -160,9 +158,9 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", qdel(src) */ if(!desc) - usr << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." + user << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." else - usr << "Explosive Runes inscription in blood. It reads: [desc]." + user << "Explosive Runes inscription in blood. It reads: [desc]." return @@ -696,13 +694,12 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", user << "You copy the translation notes from your tome." - examine() - set src in usr + examine(mob/user) ..() - if(!iscultist(usr)) - usr << "An old, dusty tome with frayed edges and a sinister looking cover." + if(!iscultist(user)) + user << "An old, dusty tome with frayed edges and a sinister looking cover." else - usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though." + user << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of." /obj/item/weapon/tome/imbued //admin tome, spawns working runes without waiting w_class = 2.0 diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 7c5fbe7f19f..430d8511548 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -3,13 +3,6 @@ var/imbue = null var/uses = 0 - - examine() - set src in view(2) - ..() - return - - attack_self(mob/living/user as mob) if(iscultist(user)) var/delete = 1 diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 6f1413fb71c..8ffbe435178 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -54,11 +54,11 @@ the_disk = locate() point_at(the_disk) - examine() + examine(mob/user) ..() for(var/obj/machinery/nuclearbomb/bomb in world) if(bomb.timing) - usr << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]" + user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]" /obj/item/weapon/pinpointer/advpinpointer diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 896e042696b..9bd060fa124 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -80,10 +80,9 @@ t += "The connect error light is blinking." return t -/obj/machinery/meter/examine() - set src in view(3) +/obj/machinery/meter/examine(mob/user) ..() - usr << status() + user << status() /obj/machinery/meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index f957a2d3a46..a4b0a962063 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -41,15 +41,13 @@ if(!locked && open) emagged = 2 -/obj/machinery/bot/examine() - set src in view() +/obj/machinery/bot/examine(mob/user) ..() if (src.health < maxhealth) if (src.health > maxhealth/3) - usr << "[src]'s parts look loose." + user << "[src]'s parts look loose." else - usr << "[src]'s parts look very loose!" - return + user << "[src]'s parts look very loose!" /obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob) src.health -= rand(15,30)*brute_dam_coeff diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 875f983fcbd..c5da88da486 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -26,12 +26,11 @@ else overlays.Cut() -/obj/machinery/cell_charger/examine() - set src in oview(5) +/obj/machinery/cell_charger/examine(mob/user) ..() - usr << "There's [charging ? "a" : "no"] cell in the charger." + user << "There's [charging ? "a" : "no"] cell in the charger." if(charging) - usr << "Current charge: [charging.charge]" + user << "Current charge: [charging.charge]" /obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user) if(stat & BROKEN) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 631d2eb9700..fcb48666f47 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -85,11 +85,9 @@ read_only = !read_only user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]." -/obj/item/weapon/disk/data/examine() - set src in oview(5) +/obj/item/weapon/disk/data/examine(mob/user) ..() - usr << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]." - return + user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]." //Health Tracker Implant diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 12114bbc399..370d25d5704 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -85,19 +85,19 @@ open_machine() return -/obj/machinery/atmospherics/unary/cryo_cell/examine() +/obj/machinery/atmospherics/unary/cryo_cell/examine(mob/user) ..() - if(in_range(usr, src)) - usr << "You can just about make out some loose objects floating in the murk:" + if(in_range(user, src)) + user << "You can just about make out some loose objects floating in the murk:" for(var/obj/O in src) if(O != beaker) - usr << O.name + user << O.name for(var/mob/M in src) if(M != occupant) - usr << M.name + user << M.name else - usr << "Too far away to view contents." + user << "Too far away to view contents." /obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user) ui_interact(user) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 05ca63b045c..136d819d34b 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -36,11 +36,10 @@ else icon_state = "light0" -/obj/machinery/light_switch/examine() - set src in oview(1) +/obj/machinery/light_switch/examine(mob/user) ..() - if(usr && !usr.stat) - usr << "It is [on? "on" : "off"]." + if(user && !user.stat) + user << "It is [on? "on" : "off"]." /obj/machinery/light_switch/attack_paw(mob/user) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 1daa307ba85..327cfb77130 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -19,12 +19,11 @@ var/const/SAFETY_COOLDOWN = 100 ..() update_icon() -/obj/machinery/recycler/examine() - set src in view() +/obj/machinery/recycler/examine(mob/user) ..() - usr << "The power light is [(stat & NOPOWER) ? "off" : "on"]." - usr << "The safety-mode light is [safety_mode ? "on" : "off"]." - usr << "The safety-sensors status light is [emagged ? "off" : "on"]." + user << "The power light is [(stat & NOPOWER) ? "off" : "on"]." + user << "The safety-mode light is [safety_mode ? "on" : "off"]." + user << "The safety-sensors status light is [emagged ? "off" : "on"]." /obj/machinery/recycler/power_change() ..() diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 2c8c6e91c6e..e5738bfb24b 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -27,18 +27,13 @@ overlays += "sheater-open" return - examine() - set src in oview(12) - if (!( usr )) - return + examine(mob/user) ..() - - usr << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]." + user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]." if(open) - usr << "The power cell is [cell ? "installed" : "missing"]." + user << "The power cell is [cell ? "installed" : "missing"]." else - usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" - return + user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" emp_act(severity) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 9f85aa337b6..bb2d0fa0584 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -122,12 +122,11 @@ line1 = "" update_display(line1, line2) - examine() - set src in view() + examine(mob/user) . = ..() switch(mode) if(1,2,4) - usr << "The display says:
\t[message1]
\t[message2]" + user << "The display says:
\t[message1]
\t[message2]" proc/set_message(m1, m2) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index d8d0b0c3e70..9b0e48ce3a2 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -41,9 +41,9 @@ ..() -/obj/machinery/syndicatebomb/examine() +/obj/machinery/syndicatebomb/examine(mob/user) ..() - usr << "A digital display on it reads \"[timer]\"." + user << "A digital display on it reads \"[timer]\"." /obj/machinery/syndicatebomb/update_icon() icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index e0c2c72e051..96b6ed3763b 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -166,25 +166,24 @@ else return 0 -/obj/mecha/examine() - set src in view() +/obj/mecha/examine(mob/user) ..() var/integrity = health/initial(health)*100 switch(integrity) if(85 to 100) - usr << "It's fully intact." + user << "It's fully intact." if(65 to 85) - usr << "It's slightly damaged." + user << "It's slightly damaged." if(45 to 65) - usr << "It's badly damaged." + user << "It's badly damaged." if(25 to 45) - usr << "It's heavily damaged." + user << "It's heavily damaged." else - usr << "It's falling apart." + user << "It's falling apart." if(equipment && equipment.len) - usr << "It's equipped with:" + user << "It's equipped with:" for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment) - usr << "\icon[ME] [ME]" + user << "\icon[ME] [ME]" return diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index 32308c33174..9c56b14f261 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -6,13 +6,6 @@ layer = 2.1 anchored = 1 - - examine() - set src in view(2) - ..() - return - - New(location,main = "#FFFFFF", var/type = "rune") ..() loc = location diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2425331ded6..40f24b73df6 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -84,9 +84,8 @@ src.loc = T -/obj/item/examine() - set src in view() - +/obj/item/examine(mob/user) //This might be spammy. Remove? + ..() var/size switch(src.w_class) if(1.0) @@ -104,25 +103,13 @@ else //if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking" - //This reformat names to get a/an properly working on item descriptions when they are bloody - var/f_name = "\a [src]" - if(src.blood_DNA) - f_name = "a bloody [name]" - - var/determiner var/pronoun if(src.gender == PLURAL) - determiner = "These are" pronoun = "They are" else - determiner = "This is" pronoun = "It is" - usr << "\icon[src][determiner] [f_name]. [pronoun] a [size] item." //e.g. These are some gloves. They are a small item. or This is a toolbox. It is a bulky item. - - if(src.desc) - usr << src.desc - return + user << "[pronoun] a [size] item." //e.g. They are a small item. or It is a bulky item. /obj/item/attack_hand(mob/user as mob) if (!user) return diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 46561815e44..6dc096b94b9 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -249,10 +249,6 @@ emp_cur_charges = min(emp_cur_charges+1, emp_max_charges) return 1 -/obj/item/device/flashlight/emp/examine() - ..() - return - /obj/item/device/flashlight/emp/attack(mob/living/M as mob, mob/living/user as mob) if(on && user.zone_sel.selecting == "eyes") // call original attack proc only if aiming at the eyes ..() diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 9c6dbbdb37c..90cc724cf50 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -66,10 +66,9 @@ failmsg = "The [name]'s refill light blinks red." ..() -/obj/item/device/lightreplacer/examine() - set src in view(2) +/obj/item/device/lightreplacer/examine(mob/user) ..() - usr << "It has [uses] lights remaining." + user << "It has [uses] light\s remaining." /obj/item/device/lightreplacer/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/weapon/card/emag) && emagged == 0) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 8dca2985541..30590c250a1 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -658,15 +658,13 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use return get_mobs_in_view(canhear_range, src) -/obj/item/device/radio/examine() - set src in view() - +/obj/item/device/radio/examine(mob/user) ..() - if ((in_range(src, usr) || loc == usr)) + if ((in_range(src, user) || loc == user)) if (b_stat) - usr.show_message("\blue \the [src] can be attached and modified!") + user.show_message("\The [src] can be attached and modified.") else - usr.show_message("\blue \the [src] can not be modified or attached!") + user.show_message("\The [src] can not be modified or attached.") return /obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 7c54c3a434b..071f359e7ce 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -24,10 +24,9 @@ update_icon() -/obj/item/device/taperecorder/examine() - set src in view(1) +/obj/item/device/taperecorder/examine(mob/user) ..() - usr << "The wire panel is [open_panel ? "opened" : "closed"]." + user << "The wire panel is [open_panel ? "opened" : "closed"]." /obj/item/device/taperecorder/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index f622413ce9c..d1096cf329d 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -26,19 +26,17 @@ usr << browse(null, "window=stack") ..() -/obj/item/stack/examine() - set src in view(1) +/obj/item/stack/examine(mob/user) ..() if(src.singular_name) if(src.amount>1) - usr << "There are [src.amount] [src.singular_name]\s in the stack." + user << "There are [src.amount] [src.singular_name]\s in the stack." else - usr << "There is [src.amount] [src.singular_name] in the stack." + user << "There is [src.amount] [src.singular_name] in the stack." else if(src.amount>1) - usr << "There are [src.amount] in the stack." + user << "There are [src.amount] in the stack." else - usr << "There is [src.amount] in the stack." - return + user << "There is [src.amount] in the stack." /obj/item/stack/attack_self(mob/user as mob) interact(user) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 71e978a4529..846c091e496 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -109,7 +109,7 @@ */ /obj/item/toy/gun name = "cap gun" - desc = "There are 0 caps left. Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!" + desc = "Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!" icon = 'icons/obj/gun.dmi' icon_state = "revolver" item_state = "gun" @@ -121,12 +121,9 @@ attack_verb = list("struck", "pistol whipped", "hit", "bashed") var/bullets = 7.0 - examine() - set src in usr - - src.desc = text("There are [] cap\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets) + examine(mob/user) ..() - return + user << "There are [bullets] cap\s left." attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob) @@ -193,11 +190,9 @@ attack_verb = list("attacked", "struck", "hit") var/bullets = 5 - examine() - set src in view(2) + examine(mob/user) ..() - if (bullets) - usr << "\blue It is loaded with [bullets] foam darts!" + user << "\blue It is loaded with [bullets] foam dart\s." attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/toy/ammo/crossbow)) @@ -815,10 +810,9 @@ obj/item/toy/cards/singlecard pixel_x = -5 -obj/item/toy/cards/singlecard/examine() - set src in usr.contents - if(ishuman(usr)) - var/mob/living/carbon/human/cardUser = usr +obj/item/toy/cards/singlecard/examine(mob/user) + if(ishuman(user)) + var/mob/living/carbon/human/cardUser = user if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src) cardUser.visible_message("[cardUser] checks \his card.", "The card reads: [src.cardname]") else diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm index 648ed2a7967..96f4b49762e 100644 --- a/code/game/objects/items/weapons/airlock_painter.dm +++ b/code/game/objects/items/weapons/airlock_painter.dm @@ -42,10 +42,10 @@ else return 1 - examine() + examine(mob/user) ..() if(!ink) - usr << "It doesn't have a toner cardridge installed." + user << "It doesn't have a toner cardridge installed." return var/ink_level = "high" if(ink.charges < 1) @@ -54,7 +54,7 @@ ink_level = "low" else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit) ink_level = "dangerously high" - usr << "Its ink levels look [ink_level]." + user << "Its ink levels look [ink_level]." attackby(obj/item/weapon/W, mob/user) ..() diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 1458d24fd1a..35acdce3cc2 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -79,10 +79,10 @@ src.add_fingerprint(user) return -/obj/item/weapon/card/id/examine() +/obj/item/weapon/card/id/examine(mob/user) ..() if(mining_points) - usr << "There's [mining_points] mining equipment redemption points loaded onto this card." + user << "There's [mining_points] mining equipment redemption points loaded onto this card." /obj/item/weapon/card/id/GetAccess() return access diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 35f0eadaa47..2665f028013 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -557,6 +557,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM user << "You take the last paper out of the pack, and throw the pack away." qdel(src) -/obj/item/weapon/rollingpaperpack/examine() +/obj/item/weapon/rollingpaperpack/examine(mob/user) ..() - usr << "There are [src.papers] left" \ No newline at end of file + user << "There are [src.papers] left" \ No newline at end of file diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 8713c39b2ce..0d18c64a68a 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -36,12 +36,6 @@ create_reagents(max_water) reagents.add_reagent("water", max_water) -/obj/item/weapon/extinguisher/examine() - set src in usr - ..() - usr << "It contains [src.reagents.total_volume] units of water!" - return - /obj/item/weapon/extinguisher/attack_self(mob/user as mob) safety = !safety src.icon_state = "[sprite_name][!safety]" diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index a75c08fecf2..d4ad32a92c1 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -20,8 +20,7 @@ create_reagents(1000) -/obj/item/weapon/grenade/chem_grenade/examine() - set src in usr +/obj/item/weapon/grenade/chem_grenade/examine(mob/user) display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state ..() diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index df3e801863f..614f5df9e23 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -86,8 +86,7 @@ explosion(src.loc,-1,0,2) qdel(src) -/obj/item/weapon/grenade/iedcasing/examine() - set src in usr +/obj/item/weapon/grenade/iedcasing/examine(mob/user) ..() if(assembled == 3) - usr << "You can't tell when it will explode!" + user << "You can't tell when it will explode!" diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 66f2a70d0e6..a049f4e795a 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -45,14 +45,13 @@ return*/ -/obj/item/weapon/grenade/examine() - set src in usr +/obj/item/weapon/grenade/examine(mob/user) ..() if(display_timer) if(det_time > 1) - usr << "The timer is set to [det_time/10] seconds." + user << "The timer is set to [det_time/10] second\s." else - usr << "\The [src] is set for instant detonation." + user << "\The [src] is set for instant detonation." /obj/item/weapon/grenade/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index b959c652871..1c474d6b156 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -24,19 +24,14 @@ src.icon_state = "[src.icon_type]box[total_contents]" return -/obj/item/weapon/storage/fancy/examine() - set src in oview(1) +/obj/item/weapon/storage/fancy/examine(mob/user) ..() if(contents.len <= 0) - usr << "There are no [src.icon_type]s left in the box." + user << "There are no [src.icon_type]s left in the box." else if(contents.len == 1) - usr << "There is one [src.icon_type] left in the box." + user << "There is one [src.icon_type] left in the box." else - usr << "There are [src.contents.len] [src.icon_type]s in the box." - - return - - + user << "There are [src.contents.len] [src.icon_type]s in the box." /* * Donut Box diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 7eec058615b..b9cc9634768 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -27,10 +27,9 @@ max_w_class = 2 max_combined_w_class = 14 - examine() - set src in oview(1) + examine(mob/user) ..() - usr << text("The service panel is [src.open ? "open" : "closed"].") + user << text("The service panel is [src.open ? "open" : "closed"].") attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 45cff3703d0..7824623855b 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -50,13 +50,12 @@ else icon_state = "[initial(name)]" -/obj/item/weapon/melee/baton/examine() - set src in view(1) +/obj/item/weapon/melee/baton/examine(mob/user) ..() if(bcell) - usr <<"The baton is [round(bcell.percent())]% charged." + user <<"The baton is [round(bcell.percent())]% charged." if(!bcell) - usr <<"The baton does not have a power source installed." + user <<"The baton does not have a power source installed." /obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user) if(istype(W, /obj/item/weapon/stock_parts/cell)) diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index cab866cfe3c..98d391e8e63 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -23,12 +23,11 @@ return - examine() - set src in usr + examine(mob/user) ..() if(air_contents.oxygen < 10) - usr << text("\red The meter on the [src.name] indicates you are almost out of air!") - playsound(usr, 'sound/effects/alert.ogg', 50, 1) + user << text("The meter on the [src.name] indicates you are almost out of air!") + playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/oxygen/yellow @@ -69,12 +68,11 @@ icon_state = "oxygen" - examine() - set src in usr + examine(mob/user) ..() - if(air_contents.oxygen < 1 && loc==usr) - usr << "\red The meter on the [src.name] indicates you are almost out of air!" - usr << sound('sound/effects/alert.ogg') + if(air_contents.oxygen < 1 && loc==user) + user << text("The meter on the [src.name] indicates you are almost out of air!") + playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/air/New() ..() @@ -139,12 +137,11 @@ return - examine() - set src in usr + examine(mob/user) ..() - if(air_contents.oxygen < 0.2 && loc==usr) - usr << text("\red The meter on the [src.name] indicates you are almost out of air!") - usr << sound('sound/effects/alert.ogg') + if(air_contents.oxygen < 0.2 && loc==user) + user << text("The meter on the [src.name] indicates you are almost out of air!") + playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/emergency_oxygen/engi name = "extended-capacity emergency oxygen tank" diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 74393eafbe3..e64aac32e4e 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -36,13 +36,13 @@ ..() -/obj/item/weapon/tank/examine() +/obj/item/weapon/tank/examine(mob/user) var/obj/icon = src ..() if (istype(src.loc, /obj/item/assembly)) icon = src.loc - if (!in_range(src, usr)) - if (icon == src) usr << "\blue If you want any more information you'll need to get closer." + if (!in_range(src, user)) + if (icon == src) user << "If you want any more information you'll need to get closer." return var/celsius_temperature = src.air_contents.temperature-T0C @@ -61,9 +61,7 @@ else descriptive = "furiously hot" - usr << "\blue It feels [descriptive]" - - return + user << "It feels [descriptive]." /obj/item/weapon/tank/blob_act() if(prob(50)) diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 1df8270a496..b82ff3b8939 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -18,14 +18,6 @@ ..() create_reagents(volume) noz = make_noz() - return - -/obj/item/weapon/watertank/examine() - set src in usr - ..() - for(var/datum/reagent/R in reagents.reagent_list) - usr << "[round(R.volume)] units of [R.name] left." - return /obj/item/weapon/watertank/ui_action_click() if (usr.get_item_by_slot(slot_back) == src) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 07c08f3f4f2..5dc8a81473d 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -151,10 +151,9 @@ reagents.add_reagent("fuel", max_fuel) -/obj/item/weapon/weldingtool/examine() - set src in usr +/obj/item/weapon/weldingtool/examine(mob/user) ..() - usr << "It contains [get_fuel()]/[max_fuel] units of fuel!" + user << "It contains [get_fuel()] unit\s of fuel out of [max_fuel]." /obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm index b78713e389f..a45dbf4e606 100644 --- a/code/game/objects/items/weapons/vending_items.dm +++ b/code/game/objects/items/weapons/vending_items.dm @@ -20,13 +20,12 @@ if(isnum(amt) && amt > -1) charges = amt -/obj/item/weapon/vending_refill/examine() - set src in usr +/obj/item/weapon/vending_refill/examine(mob/user) ..() if(charges) - usr << "It can restock [charges] item(s)." + user << "It can restock [charges] item(s)." else - usr << "It's empty!" + user << "It's empty!" //NOTE I decided to go for about 1/3 of a machine's capacity diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 3418f4f337e..f63214e24a2 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -163,15 +163,14 @@ LINEN BINS var/obj/item/hidden = null -/obj/structure/bedsheetbin/examine() +/obj/structure/bedsheetbin/examine(mob/user) ..() if(amount < 1) - usr << "There are no bed sheets in the bin." - return - if(amount == 1) - usr << "There is one bed sheet in the bin." - return - usr << "There are [amount] bed sheets in the bin." + user << "There are no bed sheets in the bin." + else if(amount == 1) + user << "There is one bed sheet in the bin." + else + user << "There are [amount] bed sheets in the bin." /obj/structure/bedsheetbin/update_icon() diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 5fe1ebf7ca5..7ad8da27c2c 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -20,10 +20,9 @@ create_reagents(100) -/obj/structure/janitorialcart/examine() - set src in usr +/obj/structure/janitorialcart/examine(mob/user) ..() - usr << "It contains [reagents.total_volume] unit\s of liquid!" + user << "It contains [reagents.total_volume] unit\s of liquid." //everything else is visible, so doesn't need to be mentioned /obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user) @@ -176,12 +175,10 @@ create_reagents(100) -/obj/structure/stool/bed/chair/janicart/examine() - set src in usr +/obj/structure/stool/bed/chair/janicart/examine(mob/user) ..() - usr << "It contains [reagents.total_volume] unit\s of water!" if(mybag) - usr << "\A [mybag] is hanging on the [callme]." + user << "\A [mybag] is hanging on \the [callme]." /obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 7a98605ce26..43975af4b0f 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -12,12 +12,6 @@ /obj/structure/mopbucket/New() create_reagents(100) - -/obj/structure/mopbucket/examine() - set src in usr - ..() - usr << "It contains [reagents.total_volume] unit\s of water!" - /obj/structure/mopbucket/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/mop)) if(reagents.total_volume < 1) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 506a9a988cf..7d1be7bd9df 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -124,15 +124,13 @@ return - examine() - set src in view() + examine(mob/user) ..() - if((in_range(src, usr) || loc == usr)) + if((in_range(src, user) || loc == user)) if(secured) - usr << "\The [src] is ready!" + user << "\The [src] is secured and ready to be used." else - usr << "\The [src] can be attached!" - return + user << "\The [src] can be attached to other things." attack_self(mob/user as mob) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index f17048048f6..f25355018c9 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -11,9 +11,9 @@ var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a plasma tank -/obj/item/device/onetankbomb/examine() +/obj/item/device/onetankbomb/examine(mob/user) ..() - bombtank.examine() + bombtank.examine(user) /obj/item/device/onetankbomb/update_icon() if(bombtank) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 795ca471f84..886e81600e9 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -57,15 +57,13 @@ master.update_icon() - examine() - set src in view() + examine(mob/user) ..() - if ((in_range(src, usr) || src.loc == usr)) - if (src.secured) - usr << "\The [src] is ready!" + if ((in_range(src, user) || src.loc == user)) + if(secured) + user << "\The [src] is secured and ready to be used." else - usr << "\The [src] can be attached!" - return + user << "\The [src] can be attached to other things." HasProximity(atom/movable/AM as mob|obj) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 61cce72718b..9e7db54a9db 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -7,10 +7,10 @@ var/armed = 0 - examine() + examine(mob/user) ..() if(armed) - usr << "It looks like it's armed." + user << "It looks like it's armed." activate() if(..()) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index afe5dd34ab9..14be587b9b8 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -194,20 +194,19 @@ BLIND // can't see anything return -/obj/item/clothing/under/examine() - set src in view() +/obj/item/clothing/under/examine(mob/user) ..() switch(src.sensor_mode) if(0) - usr << "Its sensors appear to be disabled." + user << "Its sensors appear to be disabled." if(1) - usr << "Its binary life sensors appear to be enabled." + user << "Its binary life sensors appear to be enabled." if(2) - usr << "Its vital tracker appears to be enabled." + user << "Its vital tracker appears to be enabled." if(3) - usr << "Its vital tracker and tracking beacon appear to be enabled." + user << "Its vital tracker and tracking beacon appear to be enabled." if(hastie) - usr << "\A [hastie] is attached to it." + user << "\A [hastie] is attached to it." atom/proc/generate_uniform(index,t_color) var/icon/female_uniform_icon = icon("icon"='icons/mob/uniform.dmi', "icon_state"="[t_color]_s") diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 2900a5dc63d..2465f0ce8bc 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -28,10 +28,9 @@ user.update_inv_shoes(0) //so our mob-overlays update -/obj/item/clothing/shoes/magboots/examine() - set src in view() +/obj/item/clothing/shoes/magboots/examine(mob/user) ..() - usr << "Its mag-pulse traction system appears to be [magpulse ? "enabled" : "disabled"]." + user << "Its mag-pulse traction system appears to be [magpulse ? "enabled" : "disabled"]." /obj/item/clothing/shoes/magboots/advance diff --git a/code/modules/events/ninja.dm b/code/modules/events/ninja.dm index 0e26fc11d69..dea7f7a7f3b 100644 --- a/code/modules/events/ninja.dm +++ b/code/modules/events/ninja.dm @@ -2244,21 +2244,20 @@ ________________________________________________________________________________ U.drop_item() return 0 -/obj/item/clothing/suit/space/space_ninja/examine() - set src in view() +/obj/item/clothing/suit/space/space_ninja/examine(mob/user) ..() if(s_initialized) - var/mob/living/carbon/human/U = affecting - if(s_control) - U << "All systems operational. Current energy capacity: [cell.charge]." - if(!kamikaze) - U << "The CLOAK-tech device is [s_active?"active":"inactive"]." + if(user == affecting) + if(s_control) + user << "All systems operational. Current energy capacity: [cell.charge]." + if(!kamikaze) + user << "The CLOAK-tech device is [s_active?"active":"inactive"]." + else + user << "KAMIKAZE MODE ENGAGED!" + user << "There are [s_bombs] smoke bomb\s remaining." + user << "There are [a_boost] adrenaline booster\s remaining." else - U << "\red KAMIKAZE MODE ENGAGED!" - U << "There are [s_bombs] smoke bombs remaining." - U << "There are [a_boost] adrenaline boosters remaining." - else - U << "�rr�R �a��a�� No-�-� f��N� 3RR�r" + user << "�rr�R �a��a�� No-�-� f��N� 3RR�r" /* =================================================================================== @@ -2503,12 +2502,10 @@ ________________________________________________________________________________ U << "You [candrain?"disable":"enable"] special interaction." candrain=!candrain -/obj/item/clothing/gloves/space_ninja/examine() - set src in view() +/obj/item/clothing/gloves/space_ninja/examine(mob/user) ..() if(flags & NODROP) - var/mob/living/carbon/human/U = loc - U << "The energy drain mechanism is: [candrain?"active":"inactive"]." + user << "The energy drain mechanism is: [candrain?"active":"inactive"]." /* =================================================================================== @@ -2608,8 +2605,7 @@ ________________________________________________________________________________ U.sight &= ~SEE_TURFS U << "Switching mode to Scouter." -/obj/item/clothing/mask/gas/voice/space_ninja/examine() - set src in view() +/obj/item/clothing/mask/gas/voice/space_ninja/examine(mob/user) ..() var/mode @@ -2622,8 +2618,8 @@ ________________________________________________________________________________ mode = "Thermal Scanner" if(3) mode = "Meson Scanner" - usr << "[mode] is active."//Leaving usr here since it may be on the floor or on a person. - usr << "Voice mimicking algorithm is set [!vchange?"inactive":"active"]." + user << "[mode] is active."//Leaving usr here since it may be on the floor or on a person. + user << "Voice mimicking algorithm is set [!vchange?"inactive":"active"]." /* =================================================================================== diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index f86ed7fce72..5df1f3fc5fa 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -295,9 +295,9 @@ user << "There's no points left on [src]." ..() -/obj/item/weapon/card/mining_point_card/examine() +/obj/item/weapon/card/mining_point_card/examine(mob/user) ..() - usr << "There's [points] points on the card." + user << "There's [points] point\s on the card." /**********************Jaunter**********************/ @@ -436,13 +436,10 @@ /obj/item/clothing/mask/facehugger/toy desc = "A toy often used to play pranks on other miners by putting it in their beds. It takes a bit to recharge after latching onto something." throwforce = 0 + real = 0 sterile = 1 tint = 3 //Makes it feel more authentic when it latches on -/obj/item/clothing/mask/facehugger/toy/examine()//So that giant red text about probisci doesn't show up. - if(desc) - usr << desc - /obj/item/clothing/mask/facehugger/toy/Die() return @@ -628,12 +625,12 @@ if(!malfunctioning) malfunctioning = 1 -/obj/item/weapon/lazarus_injector/examine() +/obj/item/weapon/lazarus_injector/examine(mob/user) ..() if(!loaded) - usr << "[src] is empty." + user << "[src] is empty." if(malfunctioning) - usr << "The display on [src] seems to be flickering." + user << "The display on [src] seems to be flickering." /**********************Mining Scanner**********************/ /obj/item/device/mining_scanner diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 6a19e4dc852..f39cb0bec41 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -103,10 +103,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb S.Crossed(src) -/mob/dead/observer/examine() - if(usr) - usr << desc - /mob/dead/observer/can_use_hands() return 0 /mob/dead/observer/is_active() return 0 diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index d337e56d4dd..250b29dc61a 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -21,7 +21,7 @@ var/const/MAX_ACTIVE_TIME = 400 var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case var/sterile = 0 - + var/real = 1 //0 for the toy, 1 for real. Sure I could istype, but fuck that. var/strength = 5 var/attached = 0 @@ -43,16 +43,17 @@ var/const/MAX_ACTIVE_TIME = 400 user.unEquip(src) Attach(M) -/obj/item/clothing/mask/facehugger/examine() +/obj/item/clothing/mask/facehugger/examine(mob/user) ..() + if(!real) + return switch(stat) if(DEAD,UNCONSCIOUS) - usr << "\red \b [src] is not moving." + user << "[src] is not moving." if(CONSCIOUS) - usr << "\red \b [src] seems to be active." + user << "[src] seems to be active!" if (sterile) - usr << "\red \b It looks like the proboscis has been removed." - return + user << "It looks like the proboscis has been removed." /obj/item/clothing/mask/facehugger/attackby(var/obj/item/O,var/mob/m) if(O.force) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 45c4ee7b62f..0c98d53c218 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -33,15 +33,12 @@ brainmob << "You feel slightly disoriented. That's normal when you're just a brain." -/obj/item/organ/brain/examine() - set src in oview(12) - if(!usr) return - +/obj/item/organ/brain/examine(mob/user) ..() if(brainmob && brainmob.client) - usr << "You can feel the small spark of life still left in this one." + user << "You can feel the small spark of life still left in this one." else - usr << "This one seems particularly lifeless. Perhaps it will regain some of it's luster later.." + user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later." /obj/item/organ/brain/attack(mob/living/carbon/M, mob/user) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 0f7690a1a4d..8a65fd16442 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -1,10 +1,4 @@ -/mob/living/carbon/human/examine() - set src in view() - - if(!usr || !src) return - if( usr.sdisabilities & BLIND || usr.blinded || usr.stat==UNCONSCIOUS ) - usr << "Something is there but you can't see it." - return +/mob/living/carbon/human/examine(mob/user) var/skipgloves = 0 var/skipsuitstorage = 0 @@ -176,7 +170,7 @@ else if(istype(wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[ var/obj/item/weapon/card/id/idcard = wear_id id = idcard.registered_name - if(id && (id != real_name) && (get_dist(src, usr) <= 1) && prob(10)) + if(id && (id != real_name) && (get_dist(src, user) <= 1) && prob(10)) msg += "[t_He] [t_is] wearing \icon[wear_id] \a [wear_id] yet something doesn't seem right...\n" else*/ msg += "[t_He] [t_is] wearing \icon[wear_id] \a [wear_id].\n" @@ -253,7 +247,7 @@ if(nutrition < 100) msg += "[t_He] [t_is] severely malnourished.\n" else if(nutrition >= 500) - if(usr.nutrition < 100) + if(user.nutrition < 100) msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n" else msg += "[t_He] [t_is] quite chubby.\n" @@ -276,10 +270,10 @@ msg += "[t_He] [t_is] repulsively uncanny!\n" - if(istype(usr, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = usr + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses)) - if(!usr.stat && usr != src) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at. + if(!user.stat && user != src) //|| !user.canmove || user.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at. var/criminal = "None" var/perpname = get_face_name(get_id_name("")) @@ -292,4 +286,4 @@ msg += "*---------*" - usr << msg + user << msg diff --git a/code/modules/mob/living/carbon/metroid/examine.dm b/code/modules/mob/living/carbon/metroid/examine.dm index f8fc23ad2e9..609addde9f5 100644 --- a/code/modules/mob/living/carbon/metroid/examine.dm +++ b/code/modules/mob/living/carbon/metroid/examine.dm @@ -1,10 +1,4 @@ -/mob/living/carbon/slime/examine() - set src in oview() - - if(!usr || !src) return - if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) ) - usr << "Something is there but you can't see it." - return +/mob/living/carbon/slime/examine(mob/user) var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" if (src.stat == DEAD) @@ -33,5 +27,5 @@ msg += "It is radiating with massive levels of electrical activity!\n" msg += "*---------*" - usr << msg + user << msg return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/examine.dm b/code/modules/mob/living/carbon/monkey/examine.dm index fa16619e4d2..e7e515f4e99 100644 --- a/code/modules/mob/living/carbon/monkey/examine.dm +++ b/code/modules/mob/living/carbon/monkey/examine.dm @@ -1,11 +1,4 @@ -/mob/living/carbon/monkey/examine() - set src in oview() - - if(!usr || !src) return - if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) ) - usr << "Something is there but you can't see it." - return - +/mob/living/carbon/monkey/examine(mob/user) var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" if (src.handcuffed) @@ -47,5 +40,4 @@ msg += "*---------*" - usr << msg - return \ No newline at end of file + user << msg \ 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 1a36ce5a9b7..033a5bcd970 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -1,11 +1,4 @@ -/mob/living/silicon/ai/examine() - set src in oview() - - if(!usr || !src) return - if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) ) - usr << "Something is there but you can't see it." - return - +/mob/living/silicon/ai/examine(mob/user) var/msg = "*---------*\nThis is \icon[src] [src]!\n" if (src.stat == DEAD) msg += "It appears to be powered-down.\n" @@ -27,5 +20,4 @@ msg += "" msg += "*---------*" - usr << msg - return \ No newline at end of file + user << msg \ No newline at end of file diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 26010d63535..79268c87673 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -1,27 +1,2 @@ /mob/living/silicon/pai/examine() //removed as it was pointless...moved to the pai-card instead. - /* This is totaly pointless because this mob is contained inside a card! - set src in oview() - - var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" - if (src.stat == DEAD) - msg += "It appears to be offline.\n" - else - msg += "" - if (src.getBruteLoss()) - if (src.getBruteLoss() < 30) - msg += "It looks slightly dented.\n" - else - msg += "Its casing appears cracked and broken!\n" - if (src.getFireLoss()) - if (src.getFireLoss() < 30) - msg += "It looks slightly charred!\n" - else - msg += "Its casing is melted and heat-warped!\n" - if (src.stat == UNCONSCIOUS) - msg += "It doesn't seem to be responding and its text-output is lagging.\n" - msg += "" - msg += "*---------*" - - usr << msg - */ return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 0b8521249ca..15457054fbc 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,11 +1,4 @@ -/mob/living/silicon/robot/examine() - set src in oview() - - if(!usr || !src) return - if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) ) - usr << "Something is there but you can't see it." - return - +/mob/living/silicon/robot/examine(mob/user) var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" var/obj/act_module = get_active_hand() if(act_module) @@ -41,5 +34,4 @@ if(DEAD) msg += "It looks like its system is corrupted and requires a reset.\n" msg += "*---------*" - usr << msg - return + user << msg diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 783b3e53585..0e25d944e7d 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -43,9 +43,7 @@ qdel(src) return -/mob/living/simple_animal/construct/examine() - set src in oview() - +/mob/living/simple_animal/construct/examine(mob/user) var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" if (src.health < src.maxHealth) msg += "" @@ -56,8 +54,7 @@ msg += "" msg += "*---------*" - usr << msg - return + user << msg /mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes) if ((!( yes ) || now_pushing)) diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 07e835267f3..53c8ab4fcdc 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -30,12 +30,12 @@ var/image/cap_living = null //Where we store our cap icons so we dont generate them constantly to update our icon var/image/cap_dead = null -/mob/living/simple_animal/hostile/mushroom/examine() +/mob/living/simple_animal/hostile/mushroom/examine(mob/user) ..() if(health >= maxHealth) - usr << "It looks healthy." + user << "It looks healthy." else - usr << "It looks like it's been roughed up." + user << "It looks like it's been roughed up." /mob/living/simple_animal/hostile/mushroom/Life() ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5aae6fa1b3f..fd91c17346e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -249,6 +249,13 @@ var/list/slot_equipment_priority = list( \ user << browse(dat, "window=mob\ref[src];size=325x500") onclose(user, "mob\ref[src]") +//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 +/mob/verb/examinate(atom/A as mob|obj|turf in view()) //It used to be oview(12), but I can't really say why + set name = "Examine" + set category = "IC" + + face_atom(A) + A.examine(src) /mob/verb/mode() set name = "Activate Held Object" diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index d71b89782c6..1928575ed38 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -103,7 +103,7 @@ if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if(istype(P) && P.loc == src) - P.examine() + usr.examine(P) if(href_list["top"]) var/obj/item/P = locate(href_list["top"]) diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 747272afe97..15c80bb373a 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -69,7 +69,7 @@ if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if(istype(P) && P.loc == src) - P.examine() + usr.examine(P) //Update everything attack_self(usr) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index b2663a00cdc..7fcfb21aa4d 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -48,20 +48,18 @@ icon_state = "paper" -/obj/item/weapon/paper/examine() - set src in oview(1) - - if(is_blind(usr)) +/obj/item/weapon/paper/examine(mob/user) + if(is_blind(user)) return - if(in_range(usr, src)) - if( !(ishuman(usr) || isobserver(usr) || issilicon(usr)) ) - usr << browse("[name][stars(info)]
[stamps]", "window=[name]") + if(in_range(user, src)) + if( !(ishuman(user) || isobserver(user) || issilicon(user)) ) + user << browse("[name][stars(info)]
[stamps]", "window=[name]") onclose(usr, "[name]") else - usr << browse("[name][info]
[stamps]", "window=[name]") + user << browse("[name][info]
[stamps]", "window=[name]") onclose(usr, "[name]") else - usr << "It is too far away." + user << "It is too far away." /obj/item/weapon/paper/verb/rename() @@ -80,7 +78,7 @@ /obj/item/weapon/paper/attack_self(mob/user) - examine() + user.examine(src) if(rigged && (events.holiday == "April Fool's Day")) if(spam_flag == 0) spam_flag = 1 @@ -252,7 +250,7 @@ return t = parsepencode(t, i, usr, iscrayon) // Encode everything from pencode to html - + if(t != null) //No input from the user means nothing needs to be added if(id!="end") addtofield(text2num(id), t) // He wants to edit a field, let him. diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 3d3bbbcf63c..6632e754829 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -74,13 +74,12 @@ update_icon() -/obj/item/weapon/paper_bin/examine() - set src in oview(1) +/obj/item/weapon/paper_bin/examine(mob/user) ..() if(amount) - usr << "It contains " + (amount > 1 ? "[amount] papers" : " one paper")+"." + user << "It contains " + (amount > 1 ? "[amount] papers" : " one paper")+"." else - usr << "It doesn't contain anything." + user << "It doesn't contain anything." /obj/item/weapon/paper_bin/update_icon() diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 7a052ab2aa4..36695d532dc 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -33,7 +33,7 @@ /obj/item/weapon/photo/attack_self(mob/user) - examine() + user.examine(src) /obj/item/weapon/photo/attackby(obj/item/weapon/P, mob/user) @@ -45,15 +45,12 @@ ..() -/obj/item/weapon/photo/examine() - set src in oview(1) - if(is_blind(usr)) return +/obj/item/weapon/photo/examine(mob/user) + ..() + if(is_blind(user)) return - if(in_range(usr, src)) - show(usr) - usr << desc - else - usr << "It is too far away." + if(in_range(user, src)) + show(user) /obj/item/weapon/photo/proc/show(mob/user) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 9735c4fbaa4..82884ba93fa 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -184,31 +184,28 @@ spawn(5) src.update() -/obj/machinery/power/apc/examine() - set src in oview(1) - - if(usr /*&& !usr.stat*/) - ..() - if(stat & BROKEN) - usr << "Looks broken." - return - if(opened) - if(has_electronics && terminal) - usr << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]." - else if (!has_electronics && terminal) - usr << "There are some wires but no any electronics." - else if (has_electronics && !terminal) - usr << "Electronics installed but not wired." - else /* if (!has_electronics && !terminal) */ - usr << "There is no electronics nor connected wires." +/obj/machinery/power/apc/examine(mob/user) + ..() + if(stat & BROKEN) + user << "Looks broken." + return + if(opened) + if(has_electronics && terminal) + user << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]." + else if (!has_electronics && terminal) + user << "There are some wires but not any electronics." + else if (has_electronics && !terminal) + user << "There are lectronics installed but not any wires." + else /* if (!has_electronics && !terminal) */ + user << "There are no electronics nor connected wires." + else + if (stat & MAINT) + user << "The cover is closed. Something wrong with it: it doesn't work." + else if (malfhack) + user << "The cover is broken. It may be hard to force it open." else - if (stat & MAINT) - usr << "The cover is closed. Something wrong with it: it doesn't work." - else if (malfhack) - usr << "The cover is broken. It may be hard to force it open." - else - usr << "The cover is closed." + user << "The cover is closed." // update the APC icon to show the three base states diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index ba011c6777c..6d8aa6f7997 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -206,6 +206,7 @@ flags = CONDUCT slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined", "flogged") + singular_name = "cable piece" suicide_act(mob/user) if(locate(/obj/structure/stool) in user.loc) @@ -248,16 +249,6 @@ icon_state = "coil_[item_color]" name = "cable coil" -/obj/item/stack/cable_coil/examine() - set src in view(1) - - if(amount == 1) - usr << "A short piece of power cable." - else if(amount == 2) - usr << "A piece of power cable." - else - usr << "A coil of power cable. There are [amount] lengths of cable in the coil." - /obj/item/stack/cable_coil/verb/make_restraint() set name = "Make Cable Restraints" set category = "Object" diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index bc6cad2a655..96a84396d35 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -5,9 +5,9 @@ /obj/item/weapon/stock_parts/cell/New() ..() charge = maxcharge + desc = "This cell has a power rating of [maxcharge], and you should not swallow it." - spawn(5) - updateicon() + updateicon() /obj/item/weapon/stock_parts/cell/proc/updateicon() overlays.Cut() @@ -50,13 +50,12 @@ return power_used -/obj/item/weapon/stock_parts/cell/examine() - set src in view(1) +/obj/item/weapon/stock_parts/cell/examine(mob/user) ..() - if(usr /*&& !usr.stat*/) - usr << "This cell has a power rating of [maxcharge], and you should not swallow it.\nThe charge meter reads [round(src.percent() )]%." - if(crit_fail) - usr << "\red This power cell seems to be faulty." + if(crit_fail || rigged) + user << "This power cell seems to be faulty!" + else + user << "The charge meter reads [round(src.percent() )]%." /obj/item/weapon/stock_parts/cell/attack_self(mob/user as mob) src.add_fingerprint(user) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 36789ac7d87..b6f401fc73a 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -84,20 +84,15 @@ if (fixture_type == "bulb") icon_state = "bulb-construct-stage1" -/obj/machinery/light_construct/examine() - set src in view() +/obj/machinery/light_construct/examine(mob/user) ..() - if (!(usr in view(2))) return switch(src.stage) if(1) - usr << "It's an empty frame." - return + user << "It's an empty frame." if(2) - usr << "It's wired." - return + user << "It's wired." if(3) - usr << "The casing is closed." - return + user << "The casing is closed." /obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/user as mob) src.add_fingerprint(user) @@ -309,19 +304,17 @@ update() // examine verb -/obj/machinery/light/examine() - set src in oview(1) +/obj/machinery/light/examine(mob/user) ..() - if(usr && !usr.stat) - switch(status) - if(LIGHT_OK) - usr << "It is turned [on? "on" : "off"]." - if(LIGHT_EMPTY) - usr << "The [fitting] has been removed." - if(LIGHT_BURNED) - usr << "The [fitting] is burnt out." - if(LIGHT_BROKEN) - usr << "The [fitting] has been smashed." + switch(status) + if(LIGHT_OK) + user << "It is turned [on? "on" : "off"]." + if(LIGHT_EMPTY) + user << "The [fitting] has been removed." + if(LIGHT_BURNED) + user << "The [fitting] is burnt out." + if(LIGHT_BROKEN) + user << "The [fitting] has been smashed." diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 92db2f7aaf8..0f7962662c5 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -86,13 +86,9 @@ display round(lastgen) and plasmatank amount if(!anchored) return -/obj/machinery/power/port_gen/examine() - set src in oview(1) +/obj/machinery/power/port_gen/examine(mob/user) ..() - if(active) - usr << "It is running." - else - usr << "It isn't running." + user << "It is[active?"n't":""] running." /obj/machinery/power/port_gen/pacman name = "\improper P.A.C.M.A.N.-type portable generator" @@ -144,10 +140,10 @@ display round(lastgen) and plasmatank amount power_gen = round(initial(power_gen) * temp_rating * 2) consumption = consumption_coeff -/obj/machinery/power/port_gen/pacman/examine() +/obj/machinery/power/port_gen/pacman/examine(mob/user) ..() - usr << "\blue The generator has [sheets] units of [sheet_name] fuel left, producing [power_gen] per cycle." - if(crit_fail) usr << "\red The generator seems to have broken down." + user << "The generator has [sheets] units of [sheet_name] fuel left, producing [power_gen] per cycle." + if(crit_fail) user << "The generator seems to have broken down." /obj/machinery/power/port_gen/pacman/HasFuel() if(sheets >= 1 / (time_per_sheet / power_output) - sheet_left) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 2e037f8e76e..10f4ee7de0b 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -110,7 +110,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin src.dir = turn(src.dir, 90) return 1 -/obj/structure/particle_accelerator/examine() +/obj/structure/particle_accelerator/examine(mob/user) switch(src.construction_state) if(0) src.desc = text("A [name], looks like it's not attached to the flooring") @@ -123,7 +123,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(powered) src.desc = src.desc_holder ..() - return /obj/structure/particle_accelerator/attackby(obj/item/W, mob/user) @@ -304,7 +303,7 @@ 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() +/obj/machinery/particle_accelerator/examine(mob/user) switch(src.construction_state) if(0) src.desc = text("A [name], looks like it's not attached to the flooring") @@ -317,7 +316,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(powered) src.desc = src.desc_holder ..() - return /obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index f6c236ca156..28bfcbb712d 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -17,10 +17,9 @@ max_charges = Ceiling(max_charges / 2) ..() -/obj/item/weapon/gun/magic/wand/examine() +/obj/item/weapon/gun/magic/wand/examine(mob/user) ..() - usr << "Has [charges] charge\s remaining." - return + user << "Has [charges] charge\s remaining." /obj/item/weapon/gun/magic/wand/update_icon() icon_state = "[initial(icon_state)][charges ? "" : "-drained"]" diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 5edc83056b7..4b215e8759a 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -67,10 +67,9 @@ return -/obj/item/weapon/gun/projectile/examine() +/obj/item/weapon/gun/projectile/examine(mob/user) ..() - usr << "Has [get_ammo()] round\s remaining." - return + user << "Has [get_ammo()] round\s remaining." /obj/item/weapon/gun/projectile/proc/get_ammo(var/countchambered = 1) var/boolets = 0 //mature var names for mature people diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index eb8a702762a..1efd0199019 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -44,9 +44,9 @@ boolets += magazine.ammo_count(countempties) return boolets -/obj/item/weapon/gun/projectile/revolver/examine() +/obj/item/weapon/gun/projectile/revolver/examine(mob/user) ..() - usr << "[get_ammo(0,0)] of those are live rounds." + user << "[get_ammo(0,0)] of those are live rounds." /obj/item/weapon/gun/projectile/revolver/detective desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds." diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 60f94f2fe63..d5d4ae795c0 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -46,10 +46,10 @@ update_icon() //I.E. fix the desc return 1 -/obj/item/weapon/gun/projectile/shotgun/examine() +/obj/item/weapon/gun/projectile/shotgun/examine(mob/user) ..() if (chambered) - usr << "A [chambered.BB ? "live" : "spent"] one is in the chamber." + user << "A [chambered.BB ? "live" : "spent"] one is in the chamber." /obj/item/weapon/gun/projectile/shotgun/combat name = "combat shotgun" diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm index 149712525d1..b9008da24be 100644 --- a/code/modules/reagents/grenade_launcher.dm +++ b/code/modules/reagents/grenade_launcher.dm @@ -12,12 +12,9 @@ var/max_grenades = 3 m_amt = 2000 - examine() - set src in view() + examine(mob/user) ..() - if(!(usr in view(2)) && usr != loc) - return - usr << "[grenades] / [max_grenades] grenades." + user << "[grenades] / [max_grenades] grenades loaded." attackby(obj/item/I as obj, mob/user as mob) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 89742ffce5a..4d3474856c1 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -108,9 +108,10 @@ Borg Hypospray user << "[src] is now dispensing '[R.name]'." return -/obj/item/weapon/reagent_containers/borghypo/examine() +/obj/item/weapon/reagent_containers/borghypo/examine(mob/user) + usr = user ..() - DescribeContents() + DescribeContents() //Because using the standardized reagents datum was just too cool for whatever fuckwit wrote this /obj/item/weapon/reagent_containers/borghypo/proc/DescribeContents() var/empty = 1 diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index c7619dafcd0..6026717db50 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -100,20 +100,18 @@ return - examine() - set src in view() + examine(mob/user) ..() - if (!(usr in range(0)) && usr!=src.loc) return if(!reagents || reagents.total_volume==0) - usr << "\blue \The [src] is empty!" + user << "\The [src] is empty!" else if (reagents.total_volume<=src.volume/4) - usr << "\blue \The [src] is almost empty!" + user << "\The [src] is almost empty!" else if (reagents.total_volume<=src.volume*0.66) - usr << "\blue \The [src] is half full!" + user << "\The [src] is half full!" else if (reagents.total_volume<=src.volume*0.90) - usr << "\blue \The [src] is almost full!" + user << "\The [src] is almost full!" else - usr << "\blue \The [src] is full!" + user << "\The [src] is full!" //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 710f8bc9543..ddcef26651c 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -107,19 +107,16 @@ return -/obj/item/weapon/reagent_containers/food/snacks/examine() - set src in view() +/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user) ..() - if(!(usr in range(1)) && usr != loc) - return if(bitecount == 0) return else if(bitecount == 1) - usr << "[src] was bitten by someone!" + user << "[src] was bitten by someone!" else if(bitecount <= 3) - usr << "[src] was bitten [bitecount] times!" + user << "[src] was bitten [bitecount] times!" else - usr << "[src] was bitten multiple times!" + user << "[src] was bitten multiple times!" /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 98e6210c366..06faf6af2f9 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -32,16 +32,6 @@ /mob/living/simple_animal/hostile/retaliate/goat ) - examine() - set src in view() - ..() - if(!(usr in view(2)) && usr != loc) - return - if(reagents && reagents.reagent_list.len) - usr << "It contains:" - for(var/datum/reagent/R in reagents.reagent_list) - usr << "[R.volume] units of [R.name]" - afterattack(obj/target, mob/user, proximity) if(!proximity) return // not adjacent for(var/type in can_be_placed_into) diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 03d610af63f..95829e5152a 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -76,14 +76,6 @@ spray_currentrange = (spray_currentrange == 1 ? spray_maxrange : 1) user << "You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray." - -/obj/item/weapon/reagent_containers/spray/examine() - set src in usr - ..() - for(var/datum/reagent/R in reagents.reagent_list) - usr << "[round(R.volume)] units of [R.name] left." - return - /obj/item/weapon/reagent_containers/spray/verb/empty() set name = "Empty Spray Bottle" diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 8544ea9bb72..46a9dfa4da0 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -39,17 +39,6 @@ src.verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT ..() -/obj/structure/reagent_dispensers/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return - usr << "\blue It contains:" - if(reagents && reagents.reagent_list.len) - for(var/datum/reagent/R in reagents.reagent_list) - usr << "\blue [R.volume] units of [R.name]" - else - usr << "\blue Nothing." - /obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this set name = "Set transfer amount" set category = "Object" diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm index 83c5f3dcfb4..6e913260b32 100644 --- a/code/modules/reagents/syringe_gun.dm +++ b/code/modules/reagents/syringe_gun.dm @@ -39,10 +39,9 @@ newshot() ..() -/obj/item/weapon/gun/syringe/examine() +/obj/item/weapon/gun/syringe/examine(mob/user) ..() - usr << "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining." - return + user << "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining." /obj/item/weapon/gun/syringe/attack_self(mob/living/user as mob) if(!syringes.len) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 043116087bf..b445ca0753a 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -161,11 +161,9 @@ return - examine() - if(src in usr) - usr << "There are [amount] units of package wrap left." + examine(mob/user) ..() - return + user << "There are [amount] units of package wrap left." /obj/item/device/destTagger diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index e9873c7c732..3182d2030b7 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -120,9 +120,10 @@ /obj/item/weapon/rcs/New() ..() processing_objects.Add(src) -/obj/item/weapon/rcs/examine() - desc = "Use this to send crates and closets to cargo telepads. There are [rcharges] charges left." + +/obj/item/weapon/rcs/examine(mob/user) ..() + user << "There are [rcharges] charge\s left." /obj/item/weapon/rcs/Destroy() processing_objects.Remove(src) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index edb9916eb06..82c0ae2a817 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -40,9 +40,9 @@ inserted_gps = null ..() -/obj/machinery/computer/telescience/examine() +/obj/machinery/computer/telescience/examine(mob/user) ..() - usr << "There are [crystals.len ? crystals.len : "no"] bluespace crystals in the crystal slots." + user << "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots." /obj/machinery/computer/telescience/initialize() ..() From 59d64656c4f9f7d876d93bc33eaa6fb70b01f110 Mon Sep 17 00:00:00 2001 From: MrPerson Date: Mon, 9 Jun 2014 11:35:29 -0700 Subject: [PATCH 2/4] Some fixes and minor improvements to examining. --- code/game/atoms.dm | 9 ++------- code/game/objects/items/devices/radio/radio.dm | 10 ++++------ code/game/objects/items/toys.dm | 18 ++++++++++-------- code/game/objects/items/weapons/cards_ids.dm | 2 +- code/modules/assembly/bomb.dm | 2 +- code/modules/events/ninja.dm | 2 +- code/modules/mob/mob.dm | 2 +- code/modules/paperwork/clipboard.dm | 2 +- code/modules/paperwork/paper.dm | 6 +++--- code/modules/paperwork/photography.dm | 6 +++--- code/modules/power/apc.dm | 4 ++-- code/modules/power/port_gen.dm | 2 +- code/modules/power/switch.dm | 6 +++--- .../reagents/reagent_containers/food/drinks.dm | 13 ------------- 14 files changed, 33 insertions(+), 51 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index fe80975020f..f707e11c9ce 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -200,22 +200,17 @@ its easier to just keep the beam vertical. //I've found that 3 ticks provided a nice balance for my use. for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) qdel(O) - -//All atoms /atom/proc/examine(mob/user) //This reformat names to get a/an properly working on item descriptions when they are bloody - var/determiner = "This is" - if(src.gender == PLURAL) - determiner = "These are" var/f_name = "\a [src]." if(src.blood_DNA) if(gender == PLURAL) f_name = "some " else f_name = "a " - f_name += "bloody [name]!" + f_name += "bloody [name]!" - user << "\icon[src][determiner] [f_name]" + user << "\icon[src] That's [f_name]" if(desc) user << desc diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 30590c250a1..e1cfb7544bf 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -660,12 +660,10 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use /obj/item/device/radio/examine(mob/user) ..() - if ((in_range(src, user) || loc == user)) - if (b_stat) - user.show_message("\The [src] can be attached and modified.") - else - user.show_message("\The [src] can not be modified or attached.") - return + if (b_stat) + user << "[name] can be attached and modified." + else + user << "[name] can not be modified or attached." /obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index bd4767583a8..3ec8e37983d 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -109,7 +109,7 @@ */ /obj/item/toy/gun name = "cap gun" - desc = "Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!" + desc = "Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps." icon = 'icons/obj/gun.dmi' icon_state = "revolver" item_state = "gun" @@ -121,9 +121,9 @@ attack_verb = list("struck", "pistol whipped", "hit", "bashed") var/bullets = 7.0 -/obj/item/toy/gun/examine() - desc = text("There are [] cap\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets) +/obj/item/toy/gun/examine(mob/user) ..() + user << "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left." /obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob) @@ -163,7 +163,7 @@ /obj/item/toy/ammo/gun name = "ammo-caps" - desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty." + desc = "Make sure to recyle the box in an autolathe when it gets empty." icon = 'icons/obj/ammo.dmi' icon_state = "357-7" w_class = 1.0 @@ -173,8 +173,10 @@ /obj/item/toy/ammo/gun/update_icon() src.icon_state = text("357-[]", src.amount_left) - src.desc = text("There are [] cap\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left) - return + +/obj/item/toy/ammo/gun/examine(mob/user) + ..() + user << "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left." /* * Toy crossbow @@ -190,10 +192,10 @@ attack_verb = list("attacked", "struck", "hit") var/bullets = 5 -/obj/item/toy/crossbow/examine() +/obj/item/toy/crossbow/examine(mob/user) ..() if (bullets) - usr << "It is loaded with [bullets] foam darts." + user << "It is loaded with [bullets] foam dart\s." /obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/toy/ammo/crossbow)) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index a9fa75d0998..1fa3b83bd9e 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -82,7 +82,7 @@ /obj/item/weapon/card/id/examine(mob/user) ..() if(mining_points) - user << "There's [mining_points] mining equipment redemption points loaded onto this card." + user << "There's [mining_points] mining equipment redemption point\s loaded onto this card." /obj/item/weapon/card/id/GetAccess() return access diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index f25355018c9..f04bcd56094 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -13,7 +13,7 @@ /obj/item/device/onetankbomb/examine(mob/user) ..() - bombtank.examine(user) + user.examinate(bombtank) /obj/item/device/onetankbomb/update_icon() if(bombtank) diff --git a/code/modules/events/ninja.dm b/code/modules/events/ninja.dm index 4e85920640f..765a9b621ab 100644 --- a/code/modules/events/ninja.dm +++ b/code/modules/events/ninja.dm @@ -2618,7 +2618,7 @@ ________________________________________________________________________________ mode = "Thermal Scanner" if(3) mode = "Meson Scanner" - user << "[mode] is active."//Leaving usr here since it may be on the floor or on a person. + user << "[mode] is active." user << "Voice mimicking algorithm is set [!vchange?"inactive":"active"]." /* diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5633d01a4ad..923cc34d590 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -249,7 +249,7 @@ var/list/slot_equipment_priority = list( \ user << browse(dat, "window=mob\ref[src];size=325x500") onclose(user, "mob\ref[src]") -//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 +//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 view()) //It used to be oview(12), but I can't really say why set name = "Examine" set category = "IC" diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 1928575ed38..78a8fe94662 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -103,7 +103,7 @@ if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if(istype(P) && P.loc == src) - usr.examine(P) + usr.examinate(P) if(href_list["top"]) var/obj/item/P = locate(href_list["top"]) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index a7e416df508..468e00554c4 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -54,10 +54,10 @@ if(in_range(user, src)) if( !(ishuman(user) || isobserver(user) || issilicon(user)) ) user << browse("[name][stars(info)]
[stamps]", "window=[name]") - onclose(usr, "[name]") + onclose(user, "[name]") else user << browse("[name][info]
[stamps]", "window=[name]") - onclose(usr, "[name]") + onclose(user, "[name]") else user << "It is too far away." @@ -78,7 +78,7 @@ /obj/item/weapon/paper/attack_self(mob/user) - user.examine(src) + user.examinate(src) if(rigged && (events.holiday == "April Fool's Day")) if(spam_flag == 0) spam_flag = 1 diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 37e8bf7ad25..8d1a5efa380 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -33,7 +33,7 @@ /obj/item/weapon/photo/attack_self(mob/user) - user.examine(src) + user.examinate(src) /obj/item/weapon/photo/attackby(obj/item/weapon/P, mob/user) @@ -142,9 +142,9 @@ ..() -/obj/item/device/camera/examine() +/obj/item/device/camera/examine(mob/user) ..() - usr << "It has [pictures_left] photos left." + user << "It has [pictures_left] photos left." /obj/item/device/camera/proc/camera_get_icon(list/turfs, turf/center) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 9ef70134c32..1703c7bb367 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -195,13 +195,13 @@ else if (!has_electronics && terminal) user << "There are some wires but not any electronics." else if (has_electronics && !terminal) - user << "There are lectronics installed but not any wires." + user << "There are electronics installed but not any wires." else /* if (!has_electronics && !terminal) */ user << "There are no electronics nor connected wires." else if (stat & MAINT) - user << "The cover is closed. Something wrong with it: it doesn't work." + user << "The cover is closed. Something is wrong with it. It doesn't work." else if (malfhack) user << "The cover is broken. It may be hard to force it open." else diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 0f7962662c5..a0aa9636384 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -32,7 +32,7 @@ tank [un]loading stuff /obj/machinery/power/port_gen/attack_hand(mob/user) turn on/off -/obj/machinery/power/port_gen/examine() +/obj/machinery/power/port_gen/examine(mob/user) display round(lastgen) and plasmatank amount */ diff --git a/code/modules/power/switch.dm b/code/modules/power/switch.dm index 844c88a0b83..1a03f03de29 100644 --- a/code/modules/power/switch.dm +++ b/code/modules/power/switch.dm @@ -21,12 +21,12 @@ icon_state_off = "switch-up" -/obj/structure/powerswitch/examine() +/obj/structure/powerswitch/examine(mob/user) ..() if(on) - usr << "The switch is in the on position" + user << "The switch is in the on position" else - usr << "The switch is in the off position" + user << "The switch is in the off position" /obj/structure/powerswitch/attack_ai(mob/user) user << "\red You're an AI. This is a manual switch. It's not going to work." diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 6026717db50..22cd4db11b9 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -100,19 +100,6 @@ return - examine(mob/user) - ..() - if(!reagents || reagents.total_volume==0) - user << "\The [src] is empty!" - else if (reagents.total_volume<=src.volume/4) - user << "\The [src] is almost empty!" - else if (reagents.total_volume<=src.volume*0.66) - user << "\The [src] is half full!" - else if (reagents.total_volume<=src.volume*0.90) - user << "\The [src] is almost full!" - else - user << "\The [src] is full!" - //////////////////////////////////////////////////////////////////////////////// /// Drinks. END From c43518351f6dc72b90150e2e99d3bb7ab8ae6b0a Mon Sep 17 00:00:00 2001 From: MrPerson Date: Mon, 9 Jun 2014 11:35:29 -0700 Subject: [PATCH 3/4] Some fixes and minor improvements to examining. --- code/game/atoms.dm | 9 ++------- code/game/machinery/bots/bots.dm | 6 ++++-- code/game/machinery/cell_charger.dm | 2 +- code/game/machinery/cryo.dm | 13 +++++-------- code/game/machinery/spaceheater.dm | 2 +- code/game/objects/items/devices/radio/radio.dm | 10 ++++------ code/game/objects/items/toys.dm | 18 ++++++++++-------- code/game/objects/items/weapons/cards_ids.dm | 2 +- code/modules/assembly/bomb.dm | 2 +- code/modules/events/ninja.dm | 2 +- code/modules/mob/mob.dm | 2 +- code/modules/paperwork/clipboard.dm | 2 +- code/modules/paperwork/paper.dm | 6 +++--- code/modules/paperwork/photography.dm | 6 +++--- code/modules/power/apc.dm | 4 ++-- code/modules/power/cable.dm | 1 + code/modules/power/port_gen.dm | 2 +- code/modules/power/switch.dm | 6 +++--- .../reagents/reagent_containers/food/drinks.dm | 13 ------------- tgstation.dme | 2 +- 20 files changed, 46 insertions(+), 64 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index fe80975020f..6f7544727d4 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -200,22 +200,17 @@ its easier to just keep the beam vertical. //I've found that 3 ticks provided a nice balance for my use. for(var/obj/effect/overlay/beam/O in orange(10,src)) if(O.BeamSource==src) qdel(O) - -//All atoms /atom/proc/examine(mob/user) //This reformat names to get a/an properly working on item descriptions when they are bloody - var/determiner = "This is" - if(src.gender == PLURAL) - determiner = "These are" var/f_name = "\a [src]." if(src.blood_DNA) if(gender == PLURAL) f_name = "some " else f_name = "a " - f_name += "bloody [name]!" + f_name += "blood-stained [name]!" - user << "\icon[src][determiner] [f_name]" + user << "\icon[src] That's [f_name]" if(desc) user << desc diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index 0d91632c24b..826bf863c6e 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -46,9 +46,11 @@ ..() if (src.health < maxhealth) if (src.health > maxhealth/3) - user << "[src]'s parts look loose." + user << "[src]'s parts look loose." else - user << "[src]'s parts look very loose!" + user << "[src]'s parts look very loose." + else + user << "[src] is in pristine condition." /obj/machinery/bot/attack_alien(var/mob/living/carbon/alien/user as mob) src.health -= rand(15,30)*brute_dam_coeff diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index c5da88da486..543516c36a7 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -30,7 +30,7 @@ ..() user << "There's [charging ? "a" : "no"] cell in the charger." if(charging) - user << "Current charge: [charging.charge]" + user << "Current charge: [round(charging.percent(), 1)]%" /obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user) if(stat & BROKEN) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 370d25d5704..baa7b4fbb65 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -88,16 +88,13 @@ /obj/machinery/atmospherics/unary/cryo_cell/examine(mob/user) ..() - if(in_range(user, src)) + var/list/otherstuff = contents - beaker + if(otherstuff.len > 0) user << "You can just about make out some loose objects floating in the murk:" - for(var/obj/O in src) - if(O != beaker) - user << O.name - for(var/mob/M in src) - if(M != occupant) - user << M.name + for(var/atom/movable/floater in otherstuff) + user << "\icon[floater] [floater.name]" else - user << "Too far away to view contents." + user << "Seems empty." /obj/machinery/atmospherics/unary/cryo_cell/attack_hand(mob/user) ui_interact(user) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index e5738bfb24b..65e04c626e3 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -33,7 +33,7 @@ if(open) user << "The power cell is [cell ? "installed" : "missing"]." else - user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" + user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%." emp_act(severity) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 30590c250a1..e1cfb7544bf 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -660,12 +660,10 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use /obj/item/device/radio/examine(mob/user) ..() - if ((in_range(src, user) || loc == user)) - if (b_stat) - user.show_message("\The [src] can be attached and modified.") - else - user.show_message("\The [src] can not be modified or attached.") - return + if (b_stat) + user << "[name] can be attached and modified." + else + user << "[name] can not be modified or attached." /obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index bd4767583a8..3ec8e37983d 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -109,7 +109,7 @@ */ /obj/item/toy/gun name = "cap gun" - desc = "Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps!" + desc = "Looks almost like the real thing! Ages 8 and up. Please recycle in an autolathe when you're out of caps." icon = 'icons/obj/gun.dmi' icon_state = "revolver" item_state = "gun" @@ -121,9 +121,9 @@ attack_verb = list("struck", "pistol whipped", "hit", "bashed") var/bullets = 7.0 -/obj/item/toy/gun/examine() - desc = text("There are [] cap\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets) +/obj/item/toy/gun/examine(mob/user) ..() + user << "There [bullets == 1 ? "is" : "are"] [bullets] cap\s left." /obj/item/toy/gun/attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob) @@ -163,7 +163,7 @@ /obj/item/toy/ammo/gun name = "ammo-caps" - desc = "There are 7 caps left! Make sure to recyle the box in an autolathe when it gets empty." + desc = "Make sure to recyle the box in an autolathe when it gets empty." icon = 'icons/obj/ammo.dmi' icon_state = "357-7" w_class = 1.0 @@ -173,8 +173,10 @@ /obj/item/toy/ammo/gun/update_icon() src.icon_state = text("357-[]", src.amount_left) - src.desc = text("There are [] cap\s left! Make sure to recycle the box in an autolathe when it gets empty.", src.amount_left) - return + +/obj/item/toy/ammo/gun/examine(mob/user) + ..() + user << "There [amount_left == 1 ? "is" : "are"] [amount_left] cap\s left." /* * Toy crossbow @@ -190,10 +192,10 @@ attack_verb = list("attacked", "struck", "hit") var/bullets = 5 -/obj/item/toy/crossbow/examine() +/obj/item/toy/crossbow/examine(mob/user) ..() if (bullets) - usr << "It is loaded with [bullets] foam darts." + user << "It is loaded with [bullets] foam dart\s." /obj/item/toy/crossbow/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/toy/ammo/crossbow)) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index a9fa75d0998..1fa3b83bd9e 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -82,7 +82,7 @@ /obj/item/weapon/card/id/examine(mob/user) ..() if(mining_points) - user << "There's [mining_points] mining equipment redemption points loaded onto this card." + user << "There's [mining_points] mining equipment redemption point\s loaded onto this card." /obj/item/weapon/card/id/GetAccess() return access diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index f25355018c9..f04bcd56094 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -13,7 +13,7 @@ /obj/item/device/onetankbomb/examine(mob/user) ..() - bombtank.examine(user) + user.examinate(bombtank) /obj/item/device/onetankbomb/update_icon() if(bombtank) diff --git a/code/modules/events/ninja.dm b/code/modules/events/ninja.dm index 4e85920640f..765a9b621ab 100644 --- a/code/modules/events/ninja.dm +++ b/code/modules/events/ninja.dm @@ -2618,7 +2618,7 @@ ________________________________________________________________________________ mode = "Thermal Scanner" if(3) mode = "Meson Scanner" - user << "[mode] is active."//Leaving usr here since it may be on the floor or on a person. + user << "[mode] is active." user << "Voice mimicking algorithm is set [!vchange?"inactive":"active"]." /* diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5633d01a4ad..923cc34d590 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -249,7 +249,7 @@ var/list/slot_equipment_priority = list( \ user << browse(dat, "window=mob\ref[src];size=325x500") onclose(user, "mob\ref[src]") -//mob verbs are faster than object verbs. See http://www.byond.com/forum/?post=1326139&page=2#comment8198716 +//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 view()) //It used to be oview(12), but I can't really say why set name = "Examine" set category = "IC" diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 1928575ed38..78a8fe94662 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -103,7 +103,7 @@ if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) if(istype(P) && P.loc == src) - usr.examine(P) + usr.examinate(P) if(href_list["top"]) var/obj/item/P = locate(href_list["top"]) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index a7e416df508..468e00554c4 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -54,10 +54,10 @@ if(in_range(user, src)) if( !(ishuman(user) || isobserver(user) || issilicon(user)) ) user << browse("[name][stars(info)]
[stamps]", "window=[name]") - onclose(usr, "[name]") + onclose(user, "[name]") else user << browse("[name][info]
[stamps]", "window=[name]") - onclose(usr, "[name]") + onclose(user, "[name]") else user << "It is too far away." @@ -78,7 +78,7 @@ /obj/item/weapon/paper/attack_self(mob/user) - user.examine(src) + user.examinate(src) if(rigged && (events.holiday == "April Fool's Day")) if(spam_flag == 0) spam_flag = 1 diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 37e8bf7ad25..8d1a5efa380 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -33,7 +33,7 @@ /obj/item/weapon/photo/attack_self(mob/user) - user.examine(src) + user.examinate(src) /obj/item/weapon/photo/attackby(obj/item/weapon/P, mob/user) @@ -142,9 +142,9 @@ ..() -/obj/item/device/camera/examine() +/obj/item/device/camera/examine(mob/user) ..() - usr << "It has [pictures_left] photos left." + user << "It has [pictures_left] photos left." /obj/item/device/camera/proc/camera_get_icon(list/turfs, turf/center) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 9ef70134c32..1703c7bb367 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -195,13 +195,13 @@ else if (!has_electronics && terminal) user << "There are some wires but not any electronics." else if (has_electronics && !terminal) - user << "There are lectronics installed but not any wires." + user << "There are electronics installed but not any wires." else /* if (!has_electronics && !terminal) */ user << "There are no electronics nor connected wires." else if (stat & MAINT) - user << "The cover is closed. Something wrong with it: it doesn't work." + user << "The cover is closed. Something is wrong with it. It doesn't work." else if (malfhack) user << "The cover is broken. It may be hard to force it open." else diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 75997722e4b..28f27b965c1 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -448,6 +448,7 @@ obj/structure/cable/proc/avail() /obj/item/stack/cable_coil name = "cable coil" + gender = NEUTER //That's a cable coil sounds better than that's some cable coil. icon = 'icons/obj/power.dmi' icon_state = "coil_red" item_state = "coil_red" diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 0f7962662c5..a0aa9636384 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -32,7 +32,7 @@ tank [un]loading stuff /obj/machinery/power/port_gen/attack_hand(mob/user) turn on/off -/obj/machinery/power/port_gen/examine() +/obj/machinery/power/port_gen/examine(mob/user) display round(lastgen) and plasmatank amount */ diff --git a/code/modules/power/switch.dm b/code/modules/power/switch.dm index 844c88a0b83..1a03f03de29 100644 --- a/code/modules/power/switch.dm +++ b/code/modules/power/switch.dm @@ -21,12 +21,12 @@ icon_state_off = "switch-up" -/obj/structure/powerswitch/examine() +/obj/structure/powerswitch/examine(mob/user) ..() if(on) - usr << "The switch is in the on position" + user << "The switch is in the on position" else - usr << "The switch is in the off position" + user << "The switch is in the off position" /obj/structure/powerswitch/attack_ai(mob/user) user << "\red You're an AI. This is a manual switch. It's not going to work." diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 6026717db50..22cd4db11b9 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -100,19 +100,6 @@ return - examine(mob/user) - ..() - if(!reagents || reagents.total_volume==0) - user << "\The [src] is empty!" - else if (reagents.total_volume<=src.volume/4) - user << "\The [src] is almost empty!" - else if (reagents.total_volume<=src.volume*0.66) - user << "\The [src] is half full!" - else if (reagents.total_volume<=src.volume*0.90) - user << "\The [src] is almost full!" - else - user << "\The [src] is full!" - //////////////////////////////////////////////////////////////////////////////// /// Drinks. END diff --git a/tgstation.dme b/tgstation.dme index 86fb4497c89..30cdcfc9ec0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -13,7 +13,7 @@ // END_PREFERENCES // BEGIN_INCLUDE -#include "_maps\tgstation2.dm" +#include "_maps\teststation.dm" #include "code\_compile_options.dm" #include "code\hub.dm" #include "code\world.dm" From 13b03a6d43adacd62c2dc4172633c882b97e9cf0 Mon Sep 17 00:00:00 2001 From: MrPerson Date: Wed, 20 Aug 2014 07:07:30 -0700 Subject: [PATCH 4/4] Hopefully final pass of object -> mob examine switch --- .../components/unary/vent_pump.dm | 2 +- code/game/gamemodes/cult/ritual.dm | 23 ++++++++----------- code/game/gamemodes/nuclear/pinpointer.dm | 2 +- code/game/machinery/spaceheater.dm | 2 +- code/game/machinery/status_display.dm | 2 +- .../objects/items/weapons/airlock_painter.dm | 2 +- .../objects/items/weapons/storage/secure.dm | 2 +- .../objects/items/weapons/tanks/tank_types.dm | 6 ++--- code/modules/assembly/assembly.dm | 11 ++++----- code/modules/assembly/holder.dm | 11 ++++----- code/modules/assembly/mousetrap.dm | 2 +- code/modules/food&drinks/drinks/drinks.dm | 16 ------------- code/modules/food&drinks/food/snacks.dm | 11 ++++----- code/modules/mining/laborcamp/laborstacker.dm | 4 ++-- code/modules/reagents/grenade_launcher.dm | 2 +- code/modules/recycling/sortingmachinery.dm | 2 +- tgstation.dme | 2 +- 17 files changed, 38 insertions(+), 64 deletions(-) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index cb12eb7b96b..27216a3bc3d 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -301,7 +301,7 @@ else return ..() -/obj/machinery/atmospherics/unary/vent_pump/examine() +/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user) ..() if(welded) user << "It seems welded shut." diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index dc2ecff0c6c..f123e24c9b2 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -99,7 +99,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", /obj/effect/rune - desc = "" + desc = "A strange collection of symbols drawn in blood." anchored = 1 icon = 'icons/obj/rune.dmi' icon_state = "1" @@ -146,15 +146,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", for(var/mob/living/silicon/ai/AI in player_list) AI.client.images += blood -/obj/effect/rune/examine() - ..() if(iscultist(user)) +/obj/effect/rune/examine(mob/user) + ..() + if(iscultist(user)) user << "This spell circle reads: [word1] [word2] [word3]." - if(!desc) - usr << "A spell circle drawn in blood. It reads: [word1] [word2] [word3]." - else - usr << "Explosive Runes inscription in blood. It reads: [desc]." - return /obj/effect/rune/attackby(I as obj, user as mob) @@ -337,6 +333,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", /obj/item/weapon/tome name = "arcane tome" + desc = "An old, dusty tome with frayed edges and a sinister looking cover." icon_state ="tome" throw_speed = 2 throw_range = 5 @@ -683,12 +680,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", user << "You copy the translation notes from your tome." -/obj/item/weapon/tome/examine() - ..() - if(!iscultist(user)) - user << "An old, dusty tome with frayed edges and a sinister looking cover." - else - user << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of." +/obj/item/weapon/tome/examine(mob/user) + ..() + if(iscultist(user)) + user << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of." /obj/item/weapon/tome/imbued //admin tome, spawns working runes without waiting w_class = 2.0 diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 20c5a48595b..e65a3df23e7 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -54,7 +54,7 @@ the_disk = locate() point_at(the_disk) -/obj/item/weapon/pinpointer/examine() +/obj/item/weapon/pinpointer/examine(mob/user) ..() for(var/obj/machinery/nuclearbomb/bomb in world) if(bomb.timing) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 6b151dd7dc9..a34e1e4f900 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -27,7 +27,7 @@ overlays += "sheater-open" return -/obj/machinery/space_heater/examine() +/obj/machinery/space_heater/examine(mob/user) ..() user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]." diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 5ddf08cba88..252a39e6504 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -122,7 +122,7 @@ line1 = "" update_display(line1, line2) -/obj/machinery/status_display/examine() +/obj/machinery/status_display/examine(mob/user) . = ..() switch(mode) if(1,2,4) diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm index 60c5939ffd2..209ef6c386f 100644 --- a/code/game/objects/items/weapons/airlock_painter.dm +++ b/code/game/objects/items/weapons/airlock_painter.dm @@ -42,7 +42,7 @@ else return 1 -/obj/item/weapon/airlock_painter/examine() +/obj/item/weapon/airlock_painter/examine(mob/user) ..() if(!ink) user << "It doesn't have a toner cardridge installed." diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 82646e3c9c7..7d823ea9017 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -27,7 +27,7 @@ max_w_class = 2 max_combined_w_class = 14 -/obj/item/weapon/storage/secure/examine() +/obj/item/weapon/storage/secure/examine(mob/user) ..() user << text("The service panel is [src.open ? "open" : "closed"].") diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index cea00bc3d70..a6c37d0f272 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -23,7 +23,7 @@ return -/obj/item/weapon/tank/oxygen/examine() +/obj/item/weapon/tank/oxygen/examine(mob/user) ..() if(air_contents.oxygen < 10) user << text("The meter on the [src.name] indicates you are almost out of air!") @@ -69,7 +69,7 @@ icon_state = "oxygen" -/obj/item/weapon/tank/air/examine() +/obj/item/weapon/tank/air/examine(mob/user) ..() if(air_contents.oxygen < 1 && loc==user) user << text("The meter on the [src.name] indicates you are almost out of air!") @@ -139,7 +139,7 @@ return -/obj/item/weapon/tank/emergency_oxygen/examine() +/obj/item/weapon/tank/emergency_oxygen/examine(mob/user) ..() if(air_contents.oxygen < 0.2 && loc==user) user << text("The meter on the [src.name] indicates you are almost out of air!") diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 47697d02297..d6a25338fe7 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -124,13 +124,12 @@ return -/obj/item/device/assembly/examine() +/obj/item/device/assembly/examine(mob/user) ..() - if((in_range(src, user) || loc == user)) - if(secured) - user << "\The [src] is secured and ready to be used." - else - user << "\The [src] can be attached to other things." + if(secured) + user << "\The [src] is secured and ready to be used." + else + user << "\The [src] can be attached to other things." /obj/item/device/assembly/attack_self(mob/user as mob) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 2ce24330bb8..fce047b05dd 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -57,13 +57,12 @@ master.update_icon() -/obj/item/device/assembly_holder/examine() +/obj/item/device/assembly_holder/examine(mob/user) ..() - if ((in_range(src, user) || src.loc == user)) - if(secured) - user << "\The [src] is secured and ready to be used." - else - user << "\The [src] can be attached to other things." + if(secured) + user << "\The [src] is secured and ready to be used." + else + user << "\The [src] can be attached to other things." diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 10a5301ac6f..8db67d33468 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -7,7 +7,7 @@ var/armed = 0 -/obj/item/device/assembly/mousetrap/examine() +/obj/item/device/assembly/mousetrap/examine(mob/user) ..() if(armed) user << "It looks like it's armed." diff --git a/code/modules/food&drinks/drinks/drinks.dm b/code/modules/food&drinks/drinks/drinks.dm index b3ec99101bf..798ab613253 100644 --- a/code/modules/food&drinks/drinks/drinks.dm +++ b/code/modules/food&drinks/drinks/drinks.dm @@ -87,22 +87,6 @@ return -/obj/item/weapon/reagent_containers/food/drinks/examine() - set src in view() - ..() - if (!(usr in range(0)) && usr!=src.loc) return - if(!reagents || reagents.total_volume==0) - usr << "\The [src] is empty!" - else if (reagents.total_volume<=src.volume/4) - usr << "\The [src] is almost empty!" - else if (reagents.total_volume<=src.volume*0.66) - usr << "\The [src] is half full!" - else if (reagents.total_volume<=src.volume*0.90) - usr << "\The [src] is almost full!" - else - usr << "\The [src] is full!" - - //////////////////////////////////////////////////////////////////////////////// /// Drinks. END //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/food&drinks/food/snacks.dm b/code/modules/food&drinks/food/snacks.dm index 2d066e7b8c0..8dd14cb79ef 100644 --- a/code/modules/food&drinks/food/snacks.dm +++ b/code/modules/food&drinks/food/snacks.dm @@ -107,19 +107,16 @@ return -/obj/item/weapon/reagent_containers/food/snacks/examine() - set src in view() +/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user) ..() - if(!(usr in range(1)) && usr != loc) - return if(bitecount == 0) return else if(bitecount == 1) - usr << "[src] was bitten by someone!" + user << "[src] was bitten by someone!" else if(bitecount <= 3) - usr << "[src] was bitten [bitecount] times!" + user << "[src] was bitten [bitecount] times!" else - usr << "[src] was bitten multiple times!" + user << "[src] was bitten multiple times!" /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user) diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 81c682355d5..9497f8baede 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -148,8 +148,8 @@ density = 0 anchored = 1 -/obj/machinery/mineral/labor_points_checker/attack_hand(user as mob) - examine(user) +/obj/machinery/mineral/labor_points_checker/attack_hand(mob/user) + user.examinate(src) /obj/machinery/mineral/labor_points_checker/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/weapon/card/id)) diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm index c220432ef99..6168b9e1378 100644 --- a/code/modules/reagents/grenade_launcher.dm +++ b/code/modules/reagents/grenade_launcher.dm @@ -12,7 +12,7 @@ var/max_grenades = 3 m_amt = 2000 -/obj/item/weapon/gun/grenadelauncher/examine() +/obj/item/weapon/gun/grenadelauncher/examine(mob/user) ..() user << "[grenades] / [max_grenades] grenades loaded." diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 012a11e53c0..7698669a53e 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -161,7 +161,7 @@ return -/obj/item/weapon/packageWrap/examine() +/obj/item/weapon/packageWrap/examine(mob/user) ..() user << "There are [amount] units of package wrap left." diff --git a/tgstation.dme b/tgstation.dme index 8a555d0b43d..da6e81f5e41 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -13,7 +13,7 @@ // END_PREFERENCES // BEGIN_INCLUDE -#include "_maps\teststation.dm" +#include "_maps\tgstation2.dm" #include "code\_compile_options.dm" #include "code\hub.dm" #include "code\world.dm"