diff --git a/code/ATMOSPHERICS/chiller.dm b/code/ATMOSPHERICS/chiller.dm index e2e4bd471e6..6c3449cbdc6 100644 --- a/code/ATMOSPHERICS/chiller.dm +++ b/code/ATMOSPHERICS/chiller.dm @@ -25,19 +25,14 @@ overlays += "sheater-open" return -/obj/machinery/space_heater/air_conditioner/examine() - set src in oview(12) - if (!( usr )) - return - usr << "This is \icon[src] \an [src.name]." - usr << src.desc - - usr << "The air conditioner is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]." +/obj/machinery/space_heater/air_conditioner/examine(mob/user) + ..(user) + user << "The air conditioner 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]%" + /obj/machinery/space_heater/air_conditioner/emp_act(severity) if(stat & (BROKEN|NOPOWER)) diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 359be880d7f..2687abec540 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -346,11 +346,10 @@ else ..() -/obj/machinery/atmospherics/unary/vent_pump/examine() - set src in oview(1) - ..() +/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user) + ..(user) if(welded) - usr << "It seems welded shut." + user << "It seems welded shut." /obj/machinery/atmospherics/unary/vent_pump/power_change() var/old_stat = stat diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index e10a1fa32d7..9b042b64427 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -18,7 +18,7 @@ var/frequency = 1439 var/datum/radio_frequency/radio_connection var/advcontrol = 0//does this device listen to the AAC? - + var/list/turf/simulated/adjacent_turfs = list() var/on = 0 @@ -28,7 +28,7 @@ var/scrub_CO2 = 1 var/scrub_Toxins = 0 var/scrub_N2O = 0 - + var/volume_rate = 200 var/widenet = 0 //is this scrubber acting on the 3x3 area around it. @@ -48,13 +48,18 @@ assign_uid() id_tag = num2text(uid) ..() - + /obj/machinery/atmospherics/unary/vent_scrubber/Destroy() if(initial_loc && frequency == 1439) initial_loc.air_scrub_info -= id_tag initial_loc.air_scrub_names -= id_tag return ..() - + +/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user) + ..(user) + if(welded) + user << "It seems welded shut." + /obj/machinery/atmospherics/unary/vent_scrubber/auto_use_power() if(!powered(power_channel)) return 0 @@ -171,27 +176,27 @@ /obj/machinery/atmospherics/unary/vent_scrubber/process() ..() - + if (widenet) - check_turfs() - + check_turfs() + if(stat & (NOPOWER|BROKEN)) return - + if (!node) on = 0 - + if(welded) return 0 //broadcast_status() if(!on) return 0 - + scrub(loc) if (widenet) for (var/turf/simulated/tile in adjacent_turfs) scrub(tile) - + //we populate a list of turfs with nonatmos-blocked cardinal turfs AND // diagonal turfs that can share atmos with *both* of the cardinal turfs /obj/machinery/atmospherics/unary/vent_scrubber/proc/check_turfs() @@ -199,7 +204,7 @@ var/turf/T = loc if (istype(T)) adjacent_turfs = T.GetAtmosAdjacentTurfs(alldir=1) - + /obj/machinery/atmospherics/unary/vent_scrubber/proc/scrub(var/turf/simulated/tile) if (!tile || !istype(tile)) return 0 diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index ed0e976c5da..5b9dd3bc6c7 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -117,7 +117,7 @@ /atom/proc/AICtrlShiftClick(var/mob/user) // Examines if(user.client) - examine() + user.examinate(src) return /atom/proc/AIAltShiftClick() @@ -129,7 +129,7 @@ else Topic(src, list("src"= "\ref[src]", "command"="emergency", "activate" = "0"), 1) return - + /atom/proc/AIShiftClick() return diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 5c05e27b3c6..a40a9e16e55 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -223,8 +223,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/cyborg.dm b/code/_onclick/cyborg.dm index 70e5be37934..1dcd785db7d 100644 --- a/code/_onclick/cyborg.dm +++ b/code/_onclick/cyborg.dm @@ -53,8 +53,8 @@ aiCamera.captureimage(A, usr) else src << "Your camera isn't functional." - return - + return + /* cyborg restrained() currently does nothing if(restrained()) @@ -129,19 +129,18 @@ /atom/proc/BorgCtrlShiftClick(var/mob/user) // Examines if(user.client && user.client.eye == user) - examine() - user.face_atom(src) + user.examinate(src) return /atom/proc/BorgAltShiftClick() - return - + return + /obj/machinery/door/airlock/BorgAltShiftClick() // Enables emergency override on doors! Forwards to AI code. AIAltShiftClick() - + /atom/proc/BorgShiftClick() - return - + return + /obj/machinery/door/airlock/BorgShiftClick() // Opens and closes doors! Forwards to AI code. AIShiftClick() @@ -165,8 +164,8 @@ AIAltClick() /obj/machinery/turretid/BorgAltClick() //turret lethal on/off. Forwards to AI code. - AIAltClick() - + AIAltClick() + /* As with AI, these are not used in click code, because the code for robots is specific, not generic. diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 9a7cd21ce3f..47ed53749bc 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -36,7 +36,7 @@ // We don't need a fucking toggle. /mob/dead/observer/ShiftClickOn(var/atom/A) - A.examine() + examinate(A) /atom/proc/attack_ghost(mob/user as mob) return diff --git a/code/game/atoms.dm b/code/game/atoms.dm index eadaf5704ff..230af9f10c0 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -219,19 +219,23 @@ its easier to just keep the beam vertical. //All atoms -/atom/verb/examine() - set name = "Examine" - set category = "IC" - set src in view(usr.client) //If it can be seen, it can be examined. - set popup_menu = 0 +/atom/proc/examine(mob/user, var/distance = -1, var/infix = "", var/suffix = "") + //This reformat names to get a/an properly working on item descriptions when they are bloody + var/f_name = "\a [src][infix]." + if(src.blood_DNA && !istype(src, /obj/effect/decal)) + if(gender == PLURAL) + f_name = "some " + else + f_name = "a " + if(blood_color != "#030303") + f_name += "blood-stained [name][infix]!" + else + f_name += "oil-stained [name][infix]." - if (!( usr )) - return - usr << "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 - usr << desc - // *****RM - //usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]" - return + user << "\icon[src] That's [f_name] [suffix]" + user << desc + + return distance == -1 || (get_dist(src, user) <= distance) || isobserver(user) //observers do not have a range limit /atom/proc/relaymove() return diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 044ce3ed636..2853964215b 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -190,9 +190,9 @@ return /obj/effect/blob/examine(mob/user) - ..() + ..(user) user << "It looks like it's of a [get_chem_name()] kind." - return + /obj/effect/blob/proc/get_chem_name() for(var/mob/camera/blob/B in mob_list) diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 0d5a399b892..0734c97b7a8 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -78,18 +78,15 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", cult_viewpoints -= src return ..() -/obj/effect/rune/examine() - set src in view(2) - - if(!iscultist(usr) && !isSpirit(usr)) - usr << "A strange collection of symbols drawn in blood." +/obj/effect/rune/examine(mob/user) + ..(user) + if(!iscultist(user) && !isSpirit(user)) + user << "A strange collection of symbols drawn in blood." return 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]." - - return + user << "Explosive Runes inscription in blood. It reads: [desc]." /obj/effect/rune/attackby(I as obj, user as mob, params) @@ -509,12 +506,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", user << "You copy the translation notes from your tome." - examine() - set src in usr - if(!iscultist(usr)) - usr << "An old, dusty tome with frayed edges and a sinister looking cover." + examine(mob/user) + 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. Most of these are useless, though." /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 bb5378cfac3..3a19a60a1ff 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -4,12 +4,6 @@ var/uses = 0 info = "


" - 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/mutiny/emergency_authentication_device.dm b/code/game/gamemodes/mutiny/emergency_authentication_device.dm index 36a8c354caa..538e6d0a793 100644 --- a/code/game/gamemodes/mutiny/emergency_authentication_device.dm +++ b/code/game/gamemodes/mutiny/emergency_authentication_device.dm @@ -106,7 +106,6 @@ return ..() -/obj/machinery/emergency_authentication_device/examine() - usr << {" -This is a specialized communications device that is able to instantly send a message to Nanotrasen High Command via quantum entanglement with a sister device at CentCom. -The EAD's status is [get_status()]."} +/obj/machinery/emergency_authentication_device/examine(mob/user) + user << {"This is a specialized communications device that is able to instantly send a message to Nanotrasen High Command via quantum entanglement with a sister device at CentCom.
+ The EAD's status is [get_status()]."} diff --git a/code/game/gamemodes/mutiny/key_pinpointer.dm b/code/game/gamemodes/mutiny/key_pinpointer.dm index c481fd5bbc8..7e8d628d85b 100644 --- a/code/game/gamemodes/mutiny/key_pinpointer.dm +++ b/code/game/gamemodes/mutiny/key_pinpointer.dm @@ -25,14 +25,14 @@ icon_state = "pinoff" usr << "\blue You switch \the [src] off." -/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine() +/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine(mob/user) switch(mode) if (1) - usr << "Is is calibrated for the Captain's Authentication Key." + user << "Is is calibrated for the Captain's Authentication Key." if (2) - usr << "It is calibrated for the Emergency Secondary Authentication Key." + user << "It is calibrated for the Emergency Secondary Authentication Key." else - usr << "It is switched off." + user << "It is switched off." /datum/supply_packs/key_pinpointer name = "Authentication Key Pinpointer crate" diff --git a/code/game/gamemodes/nations/flag_pinpointer.dm b/code/game/gamemodes/nations/flag_pinpointer.dm index 91a6b20ec3a..028f3cbb357 100644 --- a/code/game/gamemodes/nations/flag_pinpointer.dm +++ b/code/game/gamemodes/nations/flag_pinpointer.dm @@ -36,20 +36,20 @@ icon_state = "pinoff" usr << "\blue You switch \the [src] off." -/obj/item/weapon/pinpointer/advpinpointer/flag/examine() +/obj/item/weapon/pinpointer/advpinpointer/flag/examine(mob/user) switch(mode) if (1) - usr << "Is is calibrated for the [target.name]" + user << "Is is calibrated for the [target.name]" if (2) - usr << "Is is calibrated for the [target.name]" + user << "Is is calibrated for the [target.name]" if (3) - usr << "Is is calibrated for the [target.name]" + user << "Is is calibrated for the [target.name]" if (4) - usr << "Is is calibrated for the [target.name]" + user << "Is is calibrated for the [target.name]" if (5) - usr << "Is is calibrated for the [target.name]" + user << "Is is calibrated for the [target.name]" else - usr << "It is switched off." + user << "It is switched off." /datum/supply_packs/key_pinpointer_nations name = "Nations Flag Pinpointer crate" diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 9505a0c48a1..df0ddd24674 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -46,11 +46,11 @@ icon_state = "pinonfar" spawn(5) .() - examine() - ..() + examine(mob/user) + ..(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 @@ -318,10 +318,10 @@ used = 1 - examine() - ..() + examine(mob/user) + ..(user) if (target) - usr << "\blue Tracking [target]" + user << "\blue Tracking [target]" proc/point_at(atom/target) if(!active) @@ -386,7 +386,7 @@ .() /obj/item/weapon/pinpointer/operative/examine(mob/user) - ..() + ..(user) if(nearest_op != null) user << "Nearest operative: [nearest_op]." if(nearest_op == null && active) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 0f2921db564..3c7d9a2de33 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -1087,12 +1087,12 @@ spawn(rand(0,15)) update_icon() -/obj/machinery/alarm/examine() - ..() +/obj/machinery/alarm/examine(mob/user) + ..(user) if (buildstage < 2) - usr << "It is not wired." + user << "It is not wired." if (buildstage < 1) - usr << "The circuit is missing." + user << "The circuit is missing." /* AIR ALARM CIRCUIT @@ -1104,4 +1104,4 @@ Just an object used in constructing air alarms icon_state = "door_electronics" desc = "Looks like a circuit. Probably is." w_class = 2.0 - materials = list(MAT_METAL=50, MAT_GLASS=50) + materials = list(MAT_METAL=50, MAT_GLASS=50) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index f1a35688314..9562c69c1a1 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -88,10 +88,10 @@ t += "The connect error light is blinking." return t -/obj/machinery/meter/examine() +/obj/machinery/meter/examine(mob/user) var/t = "A gas flow meter. " - if(get_dist(usr, src) > 3 && !(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead))) + if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead))) t += "\blue You are too far away to read it." else if(stat & (NOPOWER|BROKEN)) @@ -106,11 +106,11 @@ else t += "The connect error light is blinking." - usr << t + user << t /obj/machinery/meter/Click() if(istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine - src.examine() + usr.examinate(src) return 1 return ..() diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index f45ffa43de8..b7cba392b2e 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -141,7 +141,7 @@ user << "You need to open maintenance panel first." /obj/machinery/bot/examine(mob/user) - ..() + ..(user) if (health < maxhealth) if (health > maxhealth/3) user << "[src]'s parts look loose." diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 823671c2019..9cce9c200b1 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -27,12 +27,11 @@ chargelevel = newlevel else overlays.Cut() - examine() - set src in oview(5) - ..() - usr << "There's [charging ? "a" : "no"] cell in the charger." - if(charging) - usr << "Current charge: [charging.charge]" + examine(mob/user) + if(..(user, 5)) + user << "There's [charging ? "a" : "no"] cell in the charger." + if(charging) + user << "Current charge: [charging.charge]" attackby(obj/item/weapon/W, mob/user, params) if(stat & BROKEN) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index c599390bdcd..2df598a5001 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -150,11 +150,10 @@ src.read_only = !src.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) - ..() - usr << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].") - return +/obj/item/weapon/disk/data/examine(mob/user) + ..(user) + user << "The write-protect tab is set to [src.read_only ? "protected" : "unprotected"]." + //Health Tracker Implant diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 3be065b3d02..16849268b35 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -16,16 +16,16 @@ else return temp_access -/obj/item/weapon/card/id/guest/examine() - ..() +/obj/item/weapon/card/id/guest/examine(mob/user) + ..(user) if (world.time < expiration_time) - usr << "This pass expires at [worldtime2text(expiration_time)]." + user << "This pass expires at [worldtime2text(expiration_time)]." else - usr << "It expired at [worldtime2text(expiration_time)]." - usr << "It grants access to following areas:" + user << "It expired at [worldtime2text(expiration_time)]." + user << "It grants access to following areas:" for (var/A in temp_access) - usr << "[get_access_desc(A)]." - usr << "Issuing reason: [reason]." + user << "[get_access_desc(A)]." + user << "Issuing reason: [reason]." ///////////////////////////////////////////// //Guest pass terminal//////////////////////// diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index 31b41770259..870018c54b3 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -37,10 +37,10 @@ /obj/machinery/iv_drip/MouseDrop(over_object, src_location, over_location) ..() - + if(!ishuman(usr) && !isrobot(usr)) return - + var/turf/T = get_turf(src) if(!usr in range(1, T)) return @@ -153,19 +153,18 @@ mode = !mode usr << "The IV drip is now [mode ? "injecting" : "taking blood"]." -/obj/machinery/iv_drip/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return +/obj/machinery/iv_drip/examine(mob/user) + ..(user) + if (!(user in view(2)) && usr != src.loc) return usr << "The IV drip is [mode ? "injecting" : "taking blood"]." if(beaker) if(beaker.reagents && beaker.reagents.reagent_list.len) - usr << "\blue Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid." + user << "\blue Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid." else - usr << "\blue Attached is an empty [beaker]." + user << "\blue Attached is an empty [beaker]." else - usr << "\blue No chemicals are attached." + user << "\blue No chemicals are attached." - usr << "\blue [attached ? attached : "No one"] is attached." \ No newline at end of file + user << "\blue [attached ? attached : "No one"] is attached." \ No newline at end of file diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index 2edd028bde1..839c63a6bc9 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -37,10 +37,9 @@ else icon_state = "light0" -/obj/machinery/light_switch/examine() - set src in oview(1) - if(usr && !usr.stat) - usr << "A light switch. It is [on? "on" : "off"]." +/obj/machinery/light_switch/examine(mob/user) + if(..(user, 1)) + user << "A light switch. It is [on? "on" : "off"]." /obj/machinery/light_switch/attack_hand(mob/user) diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 0fc00e068c4..2f2e2a9dbf8 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -38,12 +38,11 @@ var/const/SAFETY_COOLDOWN = 100 materials.max_amount = mat_mod amount_produced = min(100, amt_made) -/obj/machinery/recycler/examine() - set src in view() - ..() - 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"]." +/obj/machinery/recycler/examine(mob/user) + ..(user) + 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 c92b77ef47c..7e4efb3a751 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -11,192 +11,165 @@ var/set_temperature = 50 // in celcius, add T0C for kelvin var/heating_power = 40000 - - - New() - ..() - cell = new(src) - cell.charge = 1000 - cell.maxcharge = 1000 - update_icon() - return - +/obj/machinery/space_heater/New() + ..() + cell = new(src) + cell.charge = 1000 + cell.maxcharge = 1000 update_icon() - overlays.Cut() - icon_state = "sheater[on]" - if(open) - overlays += "sheater-open" - return + return - examine() - set src in oview(12) - if (!( usr )) - return - usr << "This is \icon[src] \an [src.name]." - usr << src.desc +/obj/machinery/space_heater/update_icon() + overlays.Cut() + icon_state = "sheater[on]" + if(open) + overlays += "sheater-open" + return - usr << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]." - if(open) - usr << "The power cell is [cell ? "installed" : "missing"]." - else - usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" - return +/obj/machinery/space_heater/examine(mob/user) + ..(user) + user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]." + if(open) + user << "The power cell is [cell ? "installed" : "missing"]." + else + user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" - emp_act(severity) - if(stat & (BROKEN|NOPOWER)) - ..(severity) - return - if(cell) - cell.emp_act(severity) + +/obj/machinery/space_heater/emp_act(severity) + if(stat & (BROKEN|NOPOWER)) ..(severity) + return + if(cell) + cell.emp_act(severity) + ..(severity) - attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/weapon/stock_parts/cell)) - if(open) - if(cell) - user << "There is already a power cell inside." - return - else - // insert cell +/obj/machinery/space_heater/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/weapon/stock_parts/cell)) + if(open) + if(cell) + user << "There is already a power cell inside." + return + else + // insert cell + var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand() + if(istype(C)) + user.drop_item() + cell = C + C.loc = src + C.add_fingerprint(usr) + + user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].") + else + user << "The hatch must be open to insert a power cell." + return + else if(istype(I, /obj/item/weapon/screwdriver)) + open = !open + user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].") + update_icon() + if(!open && user.machine == src) + user << browse(null, "window=spaceheater") + user.unset_machine() + else + ..() + return + +/obj/machinery/space_heater/attack_hand(mob/user as mob) + src.add_fingerprint(user) + interact(user) + +/obj/machinery/space_heater/interact(mob/user as mob) + if(open) + var/dat + dat = "Power cell: " + if(cell) + dat += "Installed
" + else + dat += "Removed
" + + dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%

" + + dat += "Set Temperature: " + + dat += "-" + + dat += " [set_temperature]°C " + dat += "+
" + + user.set_machine(src) + user << browse("Space Heater Control Panel[dat]", "window=spaceheater") + onclose(user, "spaceheater") + + else + on = !on + user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].") + update_icon() + return + + +/obj/machinery/space_heater/Topic(href, href_list) + if (..()) + return 1 + if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon))) + usr.set_machine(src) + + switch(href_list["op"]) + + if("temp") + var/value = text2num(href_list["val"]) + + // limit to 20-90 degC + set_temperature = dd_range(0, 90, set_temperature + value) + + if("cellremove") + if(open && cell && !usr.get_active_hand()) + cell.updateicon() + usr.put_in_hands(cell) + cell.add_fingerprint(usr) + cell = null + usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].") + + + if("cellinstall") + if(open && !cell) var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand() if(istype(C)) - user.drop_item() + usr.drop_item() cell = C C.loc = src C.add_fingerprint(usr) - user.visible_message("\blue [user] inserts a power cell into [src].", "\blue You insert the power cell into [src].") - else - user << "The hatch must be open to insert a power cell." - return - else if(istype(I, /obj/item/weapon/screwdriver)) - open = !open - user.visible_message("\blue [user] [open ? "opens" : "closes"] the hatch on the [src].", "\blue You [open ? "open" : "close"] the hatch on the [src].") - update_icon() - if(!open && user.machine == src) - user << browse(null, "window=spaceheater") - user.unset_machine() + usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].") + + updateDialog() + else + usr << browse(null, "window=spaceheater") + usr.unset_machine() + return + + + +/obj/machinery/space_heater/process() + if(on) + if(cell && cell.charge > 0) + var/turf/simulated/L = loc + if(istype(L)) + var/datum/gas_mixture/env = L.return_air() + if(env.temperature != set_temperature + T0C) + var/transfer_moles = 0.25 * env.total_moles() + + var/datum/gas_mixture/removed = env.remove(transfer_moles) + + if(removed) + var/heat_capacity = removed.heat_capacity() + + if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE + if(removed.temperature < set_temperature + T0C) + removed.temperature = min(removed.temperature + heating_power/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE + else + removed.temperature = max(removed.temperature - heating_power/heat_capacity, TCMB) + cell.use(heating_power/20000) + env.merge(removed) + air_update_turf() else - ..() - return - - attack_hand(mob/user as mob) - src.add_fingerprint(user) - interact(user) - - interact(mob/user as mob) - - if(open) - - var/dat - dat = "Power cell: " - if(cell) - dat += "Installed
" - else - dat += "Removed
" - - dat += "Power Level: [cell ? round(cell.percent(),1) : 0]%

" - - dat += "Set Temperature: " - - dat += "-" - - dat += " [set_temperature]°C " - dat += "+
" - - user.set_machine(src) - user << browse("Space Heater Control Panel[dat]", "window=spaceheater") - onclose(user, "spaceheater") - - - - - else - on = !on - user.visible_message("\blue [user] switches [on ? "on" : "off"] the [src].","\blue You switch [on ? "on" : "off"] the [src].") - update_icon() - return - - - Topic(href, href_list) - if (..()) - return 1 - if ((in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon))) - usr.set_machine(src) - - switch(href_list["op"]) - - if("temp") - var/value = text2num(href_list["val"]) - - // limit to 20-90 degC - set_temperature = dd_range(0, 90, set_temperature + value) - - if("cellremove") - if(open && cell && !usr.get_active_hand()) - cell.updateicon() - usr.put_in_hands(cell) - cell.add_fingerprint(usr) - cell = null - usr.visible_message("\blue [usr] removes the power cell from \the [src].", "\blue You remove the power cell from \the [src].") - - - if("cellinstall") - if(open && !cell) - var/obj/item/weapon/stock_parts/cell/C = usr.get_active_hand() - if(istype(C)) - usr.drop_item() - cell = C - C.loc = src - C.add_fingerprint(usr) - - usr.visible_message("\blue [usr] inserts a power cell into \the [src].", "\blue You insert the power cell into \the [src].") - - updateDialog() - else - usr << browse(null, "window=spaceheater") - usr.unset_machine() - return - - - - process() - if(on) - if(cell && cell.charge > 0) - - var/turf/simulated/L = loc - if(istype(L)) - var/datum/gas_mixture/env = L.return_air() - if(env.temperature != set_temperature + T0C) - - var/transfer_moles = 0.25 * env.total_moles() - - var/datum/gas_mixture/removed = env.remove(transfer_moles) - - //world << "got [transfer_moles] moles at [removed.temperature]" - - if(removed) - - var/heat_capacity = removed.heat_capacity() - //world << "heating ([heat_capacity])" - if(heat_capacity) // Added check to avoid divide by zero (oshi-) runtime errors -- TLE - if(removed.temperature < set_temperature + T0C) - removed.temperature = min(removed.temperature + heating_power/heat_capacity, 1000) // Added min() check to try and avoid wacky superheating issues in low gas scenarios -- TLE - else - removed.temperature = max(removed.temperature - heating_power/heat_capacity, TCMB) - cell.use(heating_power/20000) - - //world << "now at [removed.temperature]" - - env.merge(removed) - air_update_turf() - - //world << "turf now at [env.temperature]" - - - else - on = 0 - update_icon() - - - return \ No newline at end of file + on = 0 + update_icon() \ No newline at end of file diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 94030dc5cd4..ed070faeabc 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -134,11 +134,10 @@ return 1 return 0 -/obj/machinery/status_display/examine() - set src in view() - . = ..() +/obj/machinery/status_display/examine(mob/user) + . = ..(user) if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT) - usr << "The display says:
\t[sanitize(message1)]
\t[sanitize(message2)]" + user << "The display says:
\t[sanitize(message1)]
\t[sanitize(message2)]" /obj/machinery/status_display/proc/set_message(m1, m2) if(m1) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 04a5d3e45dd..2dd4073ae9a 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -41,9 +41,9 @@ ..() -/obj/machinery/syndicatebomb/examine() - ..() - usr << "A digital display on it reads \"[timer]\"." +/obj/machinery/syndicatebomb/examine(mob/user) + ..(user) + user << "A digital display on it reads \"[timer]\"." /obj/machinery/syndicatebomb/update_icon() icon_state = "[initial(icon_state)][active ? "-active" : "-inactive"][open_panel ? "-wires" : ""]" @@ -311,7 +311,7 @@ var/turf/T = get_turf(src) var/area/A = get_area(T) detonated-- - message_admins("[key_name_admin(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP).") + message_admins("[key_name_admin(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] (JMP).") bombers += "[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])" log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [A.name] ([T.x],[T.y],[T.z])") detonated = 0 diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index f78c1e61b17..d2245fd04cb 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) + ..(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 db1952f145e..c953993197c 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -6,11 +6,6 @@ layer = 2.1 anchored = 1 -/obj/effect/decal/cleanable/crayon/examine() - set src in view(2) - ..() - return - /obj/effect/decal/cleanable/crayon/New(location, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune") ..() diff --git a/code/game/objects/effects/decals/misc.dm b/code/game/objects/effects/decals/misc.dm index 3f42dab850f..4f80ff5e4fe 100644 --- a/code/game/objects/effects/decals/misc.dm +++ b/code/game/objects/effects/decals/misc.dm @@ -6,10 +6,6 @@ layer = 16.0 anchored = 1 -/obj/effect/decal/point/point() - set src in oview() - set hidden = 1 - return // Used for spray that you spray at walls, tables, hydrovats etc /obj/effect/decal/spraystill diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 00def7263cf..e2d587ccf39 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -110,9 +110,7 @@ src.loc = T -/obj/item/examine() - set src in view() - +/obj/item/examine(mob/user) var/size switch(src.w_class) if(1.0) @@ -127,10 +125,10 @@ size = "huge" else //if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking" - usr << "This is a [src.blood_DNA ? "bloody " : ""]\icon[src][src.name]. It is a [size] item." + user << "This is a [src.blood_DNA ? "bloody " : ""]\icon[src][src.name]. It is a [size] item." if(src.desc) - usr << src.desc - return + user << src.desc + /obj/item/attack_hand(mob/user as mob) if (!user) return 0 diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 087f1fa209b..c87f4c7ff24 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) - ..() - usr << "It has [uses] lights remaining." +/obj/item/device/lightreplacer/examine(mob/user) + if(..(user, 2)) + user << "It has [uses] lights remaining." /obj/item/device/lightreplacer/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/stack/sheet/glass)) diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index a0359e62362..e32bdf764cd 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -62,9 +62,9 @@ user.unEquip(src) qdel(src) -/obj/item/device/modkit/examine() - ..() - usr << "It looks as though it modifies hardsuits to fit [target_species] users." +/obj/item/device/modkit/examine(mob/user) + ..(user) + user << "It looks as though it modifies hardsuits to fit [target_species] users." /obj/item/device/modkit/tajaran name = "Tajaran hardsuit modification kit" diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index 74374297cc0..f5607e1ac0c 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -28,6 +28,6 @@ /obj/item/device/pipe_painter/attack_self(mob/user as mob) mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes -/obj/item/device/pipe_painter/examine() - ..() - usr << "It is in [mode] mode." \ No newline at end of file +/obj/item/device/pipe_painter/examine(mob/user) + ..(user) + user << "It is in [mode] mode." \ No newline at end of file diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 68ba62a7539..1d024ac648e 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -66,7 +66,7 @@ var/global/list/default_medbay_channels = list( wires = new(src) if(radio_controller) initialize() - + internal_channels = default_internal_channels.Copy() /obj/item/device/radio/initialize() @@ -78,8 +78,8 @@ var/global/list/default_medbay_channels = list( secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT) /obj/item/device/radio/attack_ghost(mob/user) - interact(user) - + interact(user) + /obj/item/device/radio/attack_self(mob/user as mob) user.set_machine(src) interact(user) @@ -141,18 +141,18 @@ var/global/list/default_medbay_channels = list( return 0 return user.has_internal_radio_channel_access(user, internal_channels[freq]) - -/mob/proc/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses) + +/mob/proc/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses) var/obj/item/weapon/card/id/I = user.get_id_card() return has_access(list(), req_one_accesses, I ? I.GetAccess() : list()) - -/mob/living/silicon/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses) + +/mob/living/silicon/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses) var/list/access = get_all_accesses() return has_access(list(), req_one_accesses, access) - + /mob/dead/observer/has_internal_radio_channel_access(var/mob/user, var/list/req_one_accesses) return can_admin_interact() - + /obj/item/device/radio/proc/text_wires() if (b_stat) return wires.GetInteractWindow() @@ -515,7 +515,7 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/examine(mob/user) - . = ..() + ..(user) if ((in_range(src, user) || loc == user)) if (b_stat) user.show_message("\blue \the [src] can be attached and modified!") @@ -564,11 +564,11 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/borg/syndicate syndie = 1 keyslot = new /obj/item/device/encryptionkey/syndicate - + /obj/item/device/radio/borg/Destroy() myborg = null return ..() - + /obj/item/device/radio/borg/list_channels(var/mob/user) return list_secure_channels(user) @@ -732,7 +732,7 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/off listening = 0 - + /obj/item/device/radio/phone broadcasting = 0 icon = 'icons/obj/items.dmi' diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index d0a58b571cf..4ab3dff82a7 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -23,10 +23,9 @@ update_icon() -/obj/item/device/taperecorder/examine() - set src in view(1) - ..() - usr << "The wire panel is [open_panel ? "opened" : "closed"]." +/obj/item/device/taperecorder/examine(mob/user) + if(..(user, 1)) + 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 c41d26c9bc2..c99415ea5b5 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -26,11 +26,10 @@ usr << browse(null, "window=stack") return ..() -/obj/item/stack/examine() - set src in view(1) - ..() - usr << "There are [src.amount] [src.singular_name]\s in the stack." - return +/obj/item/stack/examine(mob/user) + if(..(user, 1)) + user << "There are [src.amount] [src.singular_name]\s in the stack." + /obj/item/stack/attack_self(mob/user as mob) list_recipes(user) @@ -191,7 +190,7 @@ /obj/item/stack/proc/get_amount() return amount - + /obj/item/stack/proc/get_max_amount() return max_amount diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 5a05aa0b9cc..cdde8b6f566 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -138,12 +138,9 @@ attack_verb = list("struck", "pistol whipped", "hit", "bashed") var/bullets = 7.0 - examine() - set src in usr - - src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets) - ..() - return + examine(mob/user) + if(..(user, 0)) + user << "There are [bullets] caps\s left. Looks almost like the real thing! Ages 8 and up." attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob, params) @@ -211,11 +208,10 @@ attack_verb = list("attacked", "struck", "hit") var/bullets = 5 - examine() - set src in view(2) - ..() + examine(mob/user) + ..(user) if (bullets) - usr << "\blue It is loaded with [bullets] foam darts!" + user << "\blue It is loaded with [bullets] foam darts!" attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/toy/ammo/crossbow)) @@ -844,14 +840,14 @@ 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 - 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 - cardUser << "You need to have the card in your hand to check it." +obj/item/toy/cards/singlecard/examine(mob/user) + if(..(user, 0)) + 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 + cardUser << "You need to have the card in your hand to check it." obj/item/toy/cards/singlecard/verb/Flip() diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 92dd491943d..f9de1b2cd6b 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -116,18 +116,16 @@ SetOwnerInfo(H) /obj/item/weapon/card/id/examine(mob/user) - set src in oview(1) - if(in_range(usr, src)) + if(..(user, 1)) show(usr) - usr << desc else - usr << "It is too far away." + user << "It is too far away." /obj/item/weapon/card/id/proc/show(mob/user as mob) if(user.client) // Send the stamp images to the client var/datum/asset/simple/S = new/datum/asset/simple/paper() - send_asset_list(user.client, S.assets) - + send_asset_list(user.client, S.assets) + if(!front) front = new(photo, dir = SOUTH) if(!side) @@ -177,7 +175,7 @@ /obj/item/weapon/card/id/GetID() return src - + /obj/item/weapon/card/id/proc/is_untrackable() return untrackable @@ -222,15 +220,15 @@ origin_tech = "syndicate=3" var/registered_user = null untrackable = 1 - + /obj/item/weapon/card/id/syndicate/New() access = initial_access.Copy() ..() - + /obj/item/weapon/card/id/syndicate/vox name = "agent card" initial_access = list(access_maint_tunnels, access_vox, access_external_airlocks) - + /obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob, proximity) if(!proximity) return @@ -476,7 +474,7 @@ /obj/item/weapon/card/id/centcom/New() access = get_all_centcom_access() ..() - + /obj/item/weapon/card/id/nanotrasen name = "nanotrasen ID card" icon_state = "nanotrasen" diff --git a/code/game/objects/items/weapons/cash.dm b/code/game/objects/items/weapons/cash.dm index 67e7194f256..4269ddb283d 100644 --- a/code/game/objects/items/weapons/cash.dm +++ b/code/game/objects/items/weapons/cash.dm @@ -32,12 +32,12 @@ var/global/list/moneytypes=list( amount = new_amount update_icon() -/obj/item/weapon/spacecash/examine() +/obj/item/weapon/spacecash/examine(mob/user) if(amount>1) - usr << "\icon[src] This is a stack of [amount] [src]s." + user << "\icon[src] This is a stack of [amount] [src]s." else - usr << "\icon[src] This is \a [src]s." - usr << "It's worth [worth*amount] credits." + user << "\icon[src] This is \a [src]s." + user << "It's worth [worth*amount] credits." /obj/item/weapon/spacecash/update_icon() icon_state = "cash[worth]" @@ -60,12 +60,12 @@ var/global/list/moneytypes=list( icon_state = "cash10" worth = 10 stack_color = "#663200" - + /obj/item/weapon/spacecash/c20 icon_state = "cash10" worth = 20 stack_color = "#663200" - + /obj/item/weapon/spacecash/c50 icon_state = "cash10" worth = 50 @@ -75,7 +75,7 @@ var/global/list/moneytypes=list( icon_state = "cash100" worth = 100 stack_color = "#663200" - + /obj/item/weapon/spacecash/c200 icon_state = "cash100" worth = 200 diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index df5a6af8cf3..554392cb44e 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -402,6 +402,6 @@ obj/item/weapon/rollingpaperpack/attack_self(mob/user) M.unEquip(src) M.put_in_l_hand(src) -/obj/item/weapon/rollingpaperpack/examine() - ..() - usr << "There are [src.papers] left" +/obj/item/weapon/rollingpaperpack/examine(mob/user) + ..(user) + user << "There are [src.papers] left" diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index d36cf7c367c..56115511185 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -35,15 +35,13 @@ max_water = 30 sprite_name = "miniFE" -/obj/item/weapon/extinguisher/examine() - set src in usr +/obj/item/weapon/extinguisher/examine(mob/user) + if(..(user, 0)) + usr << "\icon[src] [src.name] contains:" + if(reagents && reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + user << "\blue [R.volume] units of [R.name]" - usr << "\icon[src] [src.name] contains:" - if(reagents && reagents.reagent_list.len) - for(var/datum/reagent/R in reagents.reagent_list) - usr << "\blue [R.volume] units of [R.name]" - ..() - return /obj/item/weapon/extinguisher/New() create_reagents(max_water) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index c5705d31069..9732d685b1a 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -28,8 +28,9 @@ /obj/item/weapon/grenade/chem_grenade/examine(mob/user) + ..(user) display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state - ..() + /obj/item/weapon/grenade/chem_grenade/proc/get_trigger() @@ -257,7 +258,7 @@ if(!has_reagents) playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1) - return + return if(nadeassembly) var/mob/M = get_mob_by_ckey(assemblyattacher) diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index d7d3dfb88e2..6a4fe395384 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -126,5 +126,5 @@ qdel(src) /obj/item/weapon/grenade/iedcasing/examine(mob/user) - ..() + ..(user) 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 a2b5dccd963..7eb4ff27981 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -46,13 +46,13 @@ return*/ -/obj/item/weapon/grenade/examine() - ..() +/obj/item/weapon/grenade/examine(mob/user) + ..(user) if(display_timer) if(det_time > 1) - usr << "The timer is set to [det_time/10] second\s." + 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) if(!active) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index bdb1e497caa..0774dc29f42 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -24,17 +24,16 @@ 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(!..(user, 1)) + return 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." diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index ddbed058f6d..1b3f96e3058 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) - ..() - usr << text("The service panel is [src.open ? "open" : "closed"].") + examine(mob/user) + if(..(user, 1)) + user << text("The service panel is [src.open ? "open" : "closed"].") attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(locked) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 1416602d4fd..0c5df41adb0 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -53,7 +53,7 @@ icon_state = "[initial(icon_state)]" /obj/item/weapon/melee/baton/examine(mob/user) - ..() + ..(user) if(bcell) user <<"The baton is [round(bcell.percent())]% charged." if(!bcell) diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 14edc242cc2..15fc8a7b0b5 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -13,63 +13,63 @@ var/volume_rate = 500 //Needed for borg jetpack transfer action_button_name = "Toggle Jetpack" - New() - ..() - src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() - src.ion_trail.set_up(src) +/obj/item/weapon/tank/jetpack/New() + ..() + src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() + src.ion_trail.set_up(src) + return + + +/obj/item/weapon/tank/jetpack/examine(mob/user) + if(!..(user, 0)) return - - examine() - set src in usr - ..() - 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) - return + if(air_contents.oxygen < 10) + user << text("\red The meter on the [src.name] indicates you are almost out of air!") + playsound(user, 'sound/effects/alert.ogg', 50, 1) - verb/toggle_rockets() - set name = "Toggle Jetpack Stabilization" - set category = "Object" - src.stabilization_on = !( src.stabilization_on ) - usr << "You toggle the stabilization [stabilization_on? "on":"off"]." - return +/obj/item/weapon/tank/jetpack/verb/toggle_rockets() + set name = "Toggle Jetpack Stabilization" + set category = "Object" + src.stabilization_on = !( src.stabilization_on ) + usr << "You toggle the stabilization [stabilization_on? "on":"off"]." + return - verb/toggle() - set name = "Toggle Jetpack" - set category = "Object" - on = !on - if(on) - icon_state = "[icon_state]-on" +/obj/item/weapon/tank/jetpack/verb/toggle() + set name = "Toggle Jetpack" + set category = "Object" + on = !on + if(on) + icon_state = "[icon_state]-on" // item_state = "[item_state]-on" - ion_trail.start() - else - icon_state = initial(icon_state) + ion_trail.start() + else + icon_state = initial(icon_state) // item_state = initial(item_state) - ion_trail.stop() - return + ion_trail.stop() + return - proc/allow_thrust(num, mob/living/user as mob) - if(!(src.on)) - return 0 - if((num < 0.005 || src.air_contents.total_moles() < num)) - src.ion_trail.stop() - return 0 +/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user as mob) + if(!(src.on)) + return 0 + if((num < 0.005 || src.air_contents.total_moles() < num)) + src.ion_trail.stop() + return 0 - var/datum/gas_mixture/G = src.air_contents.remove(num) + var/datum/gas_mixture/G = src.air_contents.remove(num) - var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete - if(allgases >= 0.005) - return 1 + var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete + if(allgases >= 0.005) + return 1 - qdel(G) - return + qdel(G) + return - ui_action_click() - toggle() +/obj/item/weapon/tank/jetpack/ui_action_click() + toggle() /obj/item/weapon/tank/jetpack/void @@ -78,9 +78,9 @@ icon_state = "jetpack-void" item_state = "jetpack-void" - New() - ..() - air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) +/obj/item/weapon/tank/jetpack/void/New() + ..() + air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) /obj/item/weapon/tank/jetpack/oxygen @@ -89,9 +89,9 @@ icon_state = "jetpack" item_state = "jetpack" - New() - ..() - air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) +/obj/item/weapon/tank/jetpack/oxygen/New() + ..() + air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) /obj/item/weapon/tank/jetpack/oxygen/harness name = "jet harness (oxygen)" @@ -108,9 +108,9 @@ icon_state = "jetpack-black" item_state = "jetpack-black" - New() - ..() - air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) +/obj/item/weapon/tank/jetpack/oxygenblack/New() + ..() + air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) /obj/item/weapon/tank/jetpack/carbondioxide name = "Jetpack (Carbon Dioxide)" @@ -119,16 +119,16 @@ icon_state = "jetpack-black" item_state = "jetpack-black" - New() - ..() - src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() - src.ion_trail.set_up(src) - air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) +/obj/item/weapon/tank/jetpack/carbondioxide/New() + ..() + src.ion_trail = new /datum/effect/effect/system/ion_trail_follow() + src.ion_trail.set_up(src) + air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) - examine() - set src in usr - ..() - if(air_contents.carbon_dioxide < 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) +/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user) + if(!..(0)) return + + if(air_contents.carbon_dioxide < 10) + user << text("\red The meter on the [src.name] indicates you are almost out of air!") + playsound(user, 'sound/effects/alert.ogg', 50, 1) diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 6ed37dac59f..f0d273e58fc 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 - ..() - 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) + examine(mob/user) + if(..(user, 0)) + if(air_contents.oxygen < 10) + user << text("\red The meter on the [src.name] indicates you are almost out of air!") + //playsound(usr, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/oxygen/yellow @@ -69,12 +68,11 @@ icon_state = "oxygen" - examine() - set src in usr - ..() - 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') + examine(mob/user) + if(..(user, 0)) + if(air_contents.oxygen < 1 && loc==usr) + user << "\red The meter on the [src.name] indicates you are almost out of air!" + user << sound('sound/effects/alert.ogg') /obj/item/weapon/tank/air/New() ..() @@ -122,12 +120,11 @@ icon_state = "plasma_fr" distribute_pressure = ONE_ATMOSPHERE*O2STANDARD -/obj/item/weapon/tank/plasma/plasmaman/examine() - set src in usr - ..() - if(air_contents.toxins < 0.2 && loc==usr) - usr << text("\red The meter on the [src.name] indicates you are almost out of plasma!") - usr << sound('sound/effects/alert.ogg') +/obj/item/weapon/tank/plasma/plasmaman/examine(mob/user) + if(..(user, 0)) + if(air_contents.toxins < 0.2 && loc==usr) + user << text("\red The meter on the [src.name] indicates you are almost out of plasma!") + user << sound('sound/effects/alert.ogg') /* * Emergency Oxygen @@ -150,12 +147,11 @@ return - examine() - set src in usr - ..() - 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') + examine(mob/user) + if(..(user, 0)) + if(air_contents.oxygen < 0.2 && loc==usr) + user << text("\red The meter on the [src.name] indicates you are almost out of air!") + user << sound('sound/effects/alert.ogg') /obj/item/weapon/tank/emergency_oxygen/engi name = "extended-capacity emergency oxygen tank" @@ -192,12 +188,11 @@ src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) return -/obj/item/weapon/tank/nitrogen/examine() - set src in usr - ..() - if(air_contents.nitrogen < 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) +/obj/item/weapon/tank/nitrogen/examine(mob/user) + if(..(user, 0)) + if(air_contents.nitrogen < 10) + user << text("\red The meter on the [src.name] indicates you are almost out of air!") + //playsound(usr, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/emergency_oxygen/vox diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 8e2f2d62b92..9fdb1c0e73e 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -39,12 +39,12 @@ return ..() -/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 It's \a \icon[icon][src]! If you want any more information you'll need to get closer." + if (!in_range(src, user)) + if (icon == src) user << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer." return var/celsius_temperature = src.air_contents.temperature-T0C @@ -63,7 +63,7 @@ else descriptive = "furiously hot" - usr << "\blue \The \icon[icon][src] feels [descriptive]" + user << "\blue \The \icon[icon][src] feels [descriptive]" return diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index af98d810510..8de3b2b0483 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -166,10 +166,10 @@ return -/obj/item/weapon/weldingtool/examine() - set src in usr - usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel ) - return +/obj/item/weapon/weldingtool/examine(mob/user) + if(!..(user, 0)) + user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel ) + /obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob, params) diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm index 8387e556fda..517ec5ce2cb 100644 --- a/code/game/objects/items/weapons/vending_items.dm +++ b/code/game/objects/items/weapons/vending_items.dm @@ -21,7 +21,7 @@ charges = amt /obj/item/weapon/vending_refill/examine(mob/user) - ..() + ..(user) if(charges) user << "It can restock [charges] item(s)." else diff --git a/code/game/objects/structures/artstuff.dm b/code/game/objects/structures/artstuff.dm index 64f09d7e803..90792b54602 100644 --- a/code/game/objects/structures/artstuff.dm +++ b/code/game/objects/structures/artstuff.dm @@ -133,8 +133,8 @@ var/global/list/globalBlankCanvases[AMT_OF_CANVASES] user.visible_message("[user] cleans the canvas.","You clean the canvas.") //Examine to enlarge -/obj/item/weapon/canvas/examine(var/mob/user = usr) - ..() +/obj/item/weapon/canvas/examine(mob/user) + ..(user) if(in_range(user, src) && get_turf(src) && user.client && ishuman(user)) //Let only humans be the robust zoominators. I'm too spooked other mobs trying to use it may get broken huds. if(src.loc == user || get_turf(src) == get_turf(user)) user << "[src] has to be on the ground to focus on it!" diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 1c4936112a2..1f4f085aa87 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -160,15 +160,15 @@ LINEN BINS var/obj/item/hidden = null -/obj/structure/bedsheetbin/examine() - usr << desc +/obj/structure/bedsheetbin/examine(mob/user) + ..(user) if(amount < 1) - usr << "There are no bed sheets in the bin." + user << "There are no bed sheets in the bin." return if(amount == 1) - usr << "There is one bed sheet in the bin." + user << "There is one bed sheet in the bin." return - usr << "There are [amount] bed sheets in the bin." + user << "There are [amount] bed sheets in the bin." /obj/structure/bedsheetbin/update_icon() diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 5b5109a8b9c..d693a574c18 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -81,13 +81,13 @@ /obj/structure/proc/getPrint(mob/user as mob) return md5(user:dna:uni_identity) -/obj/structure/displaycase/examine() - ..() - usr << "\blue Peering through the glass, you see that it contains:" +/obj/structure/displaycase/examine(mob/user) + ..(user) + user << "\blue Peering through the glass, you see that it contains:" if(occupant) - usr << "\icon[occupant] \blue \A [occupant]" - else: - usr << "Nothing." + user << "\icon[occupant] \blue \A [occupant]" + else + user << "Nothing." /obj/structure/displaycase/proc/dump() if(occupant) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 5676b8e0c6d..3f4035b7462 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -26,17 +26,17 @@ processing_objects |= src handle_rotation() -/obj/structure/stool/bed/chair/cart/examine() - set src in usr - switch(health) - if(75 to 99) - usr << "\blue It appears slightly dented." - if(40 to 74) - usr << "\red It appears heavily dented." - if(1 to 39) - usr << "\red It appears severely dented." - if((INFINITY * -1) to 0) - usr << "It appears completely unsalvageable" +/obj/structure/stool/bed/chair/cart/examine(mob/user) + if(..(user, 1)) + switch(health) + if(75 to 99) + usr << "\blue It appears slightly dented." + if(40 to 74) + usr << "\red It appears heavily dented." + if(1 to 39) + usr << "\red It appears severely dented." + if((INFINITY * -1) to 0) + usr << "It appears completely unsalvageable" /obj/structure/stool/bed/chair/cart/attackby(obj/item/W, mob/user, params) if (istype(W, /obj/item/weapon/weldingtool)) @@ -281,11 +281,13 @@ R.my_atom = src -/obj/structure/stool/bed/chair/cart/janicart/examine() - ..() - usr << "\icon[src] This [name] contains [reagents.total_volume] unit\s of [reagents]!" +/obj/structure/stool/bed/chair/cart/janicart/examine(mob/user) + if(!..(user, 1)) + return + + user << "\icon[src] This [name] contains [reagents.total_volume] unit\s of [reagents]!" if(mybag) - usr << "\A [mybag] is hanging on the [name]." + user << "\A [mybag] is hanging on the [name]." /obj/structure/stool/bed/chair/cart/janicart/attackby(obj/item/W, mob/user, params) ..() diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index fd3372692e6..f14e9ec246d 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -16,10 +16,9 @@ ..() reagents.add_reagent("water", 100) -/obj/structure/mopbucket/examine() - set src in usr - usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume) - ..() +/obj/structure/mopbucket/examine(mob/user) + if(..(user, 1)) + usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume) /obj/structure/mopbucket/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if (istype(W, /obj/item/weapon/mop)) diff --git a/code/game/objects/structures/spirit_board.dm b/code/game/objects/structures/spirit_board.dm index 664bbaf1c18..f4ba32b3286 100644 --- a/code/game/objects/structures/spirit_board.dm +++ b/code/game/objects/structures/spirit_board.dm @@ -17,9 +17,9 @@ if(A) O << "\blue Someone has begun playing with a [src.name] in [A.name]!. (Teleport)" -/obj/structure/spirit_board/examine() - desc = "[initial(desc)] The planchette is sitting at \"[planchette]\"." - ..() +/obj/structure/spirit_board/examine(mob/user) + ..(user) + user << "[initial(desc)] The planchette is sitting at \"[planchette]\"." /obj/structure/spirit_board/attack_hand(mob/user as mob) if(..()) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 88539a52284..51c2a3d2b3a 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -50,22 +50,22 @@ //Appearance -/turf/simulated/wall/examine() - . = ..() +/turf/simulated/wall/examine(mob/user) + . = ..(user) if(!damage) - usr << "It looks fully intact." + user << "It looks fully intact." else var/dam = damage / damage_cap if(dam <= 0.3) - usr << "It looks slightly damaged." + user << "It looks slightly damaged." else if(dam <= 0.6) - usr << "It looks moderately damaged." + user << "It looks moderately damaged." else - usr << "It looks heavily damaged." + user << "It looks heavily damaged." if(rotting) - usr << "There is fungus growing on [src]." + user << "There is fungus growing on [src]." /turf/simulated/wall/proc/update_icon() if(!damage_overlays[1]) //list hasn't been populated diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 9ada771bed2..485c8756375 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -140,15 +140,13 @@ return - examine() - set src in view() - ..() - if((in_range(src, usr) || loc == usr)) + examine(mob/user) + ..(user) + if((in_range(src, user) || loc == user)) if(secured) - usr << "\The [src] is ready!" + user << "\The [src] is ready!" else - usr << "\The [src] can be attached!" - return + user << "\The [src] can be attached!" attack_self(mob/user as mob) diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index ec2277c22dd..cdad32ee349 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() - ..() - bombtank.examine() +/obj/item/device/onetankbomb/examine(mob/user) + ..(user) + user.examinate(bombtank) /obj/item/device/onetankbomb/update_icon() if(bombtank) diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 59531610b27..d562098cc21 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -63,15 +63,13 @@ master.update_icon() - examine() - set src in view() - ..() - if ((in_range(src, usr) || src.loc == usr)) + examine(mob/user) + ..(user) + if ((in_range(src, user) || src.loc == user)) if (src.secured) - usr << "\The [src] is ready!" + user << "\The [src] is ready!" else - usr << "\The [src] can be attached!" - return + user << "\The [src] can be attached!" HasProximity(atom/movable/AM as mob|obj) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 476b118187e..75c40dcb8b0 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -8,10 +8,10 @@ bomb_name = "contact mine" - examine() - ..() + examine(mob/user) + ..(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 45bfdc86367..0863f76f9a1 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -188,11 +188,6 @@ BLIND // can't see anything /obj/item/clothing/gloves/proc/Touch() return -/obj/item/clothing/gloves/examine() - set src in usr - ..() - return - /obj/item/clothing/under/proc/set_sensors(mob/usr as mob) var/mob/M = usr if (istype(M, /mob/dead/)) return @@ -460,21 +455,20 @@ BLIND // can't see anything return return -/obj/item/clothing/under/examine() - set src in view() - ..() +/obj/item/clothing/under/examine(mob/user) + ..(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(accessories.len) for(var/obj/item/clothing/accessory/A in accessories) - usr << "\A [A] is attached to it." + user << "\A [A] is attached to it." /obj/item/clothing/under/verb/rollsuit() diff --git a/code/modules/clothing/gloves/rings.dm b/code/modules/clothing/gloves/rings.dm index 90b012d0580..3c7c10b792c 100644 --- a/code/modules/clothing/gloves/rings.dm +++ b/code/modules/clothing/gloves/rings.dm @@ -19,11 +19,11 @@ icon_state = "d_[initial(icon_state)]" else icon_state = initial(icon_state) - examine() - ..() - usr << "This one is made of [material]." + examine(mob/user) + ..(user) + user << "This one is made of [material]." if(stud) - usr << "It is adorned with a single gem." + user << "It is adorned with a single gem." /obj/item/clothing/gloves/ring/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/stack/sheet/mineral/diamond)) diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 1a761bd8417..fdd55c78e0b 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -25,7 +25,7 @@ return flags & NOSLIP /obj/item/clothing/shoes/magboots/examine(mob/user) - ..() + ..(user) user << "Its mag-pulse traction system appears to be [magpulse ? "enabled" : "disabled"]." diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index a9845cdc096..eb95b3a56f3 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -231,11 +231,10 @@ magpulse = 0 flags &= ~NODROP -/obj/item/clothing/shoes/magboots/vox/examine() - set src in view() - ..() +/obj/item/clothing/shoes/magboots/vox/examine(mob/user) + ..(user) if (magpulse) - usr << "It would be hard to take these off without relaxing your grip first." //theoretically this message should only be seen by the wearer when the claws are equipped. + user << "It would be hard to take these off without relaxing your grip first." //theoretically this message should only be seen by the wearer when the claws are equipped. /obj/item/clothing/suit/space/eva/vox name = "Vox EVA Suit" diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index f232676a0d7..780a763b3bd 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -214,8 +214,8 @@ var/global/list/breach_burn_descriptors = list( ..() -/obj/item/clothing/suit/space/examine() - ..() +/obj/item/clothing/suit/space/examine(mob/user) + ..(user) if(can_breach && breaches && breaches.len) for(var/datum/breach/B in breaches) - usr << "\red It has \a [B.descriptor]." \ No newline at end of file + user << "\red It has \a [B.descriptor]." \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index d85a16435a2..7209373ded1 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -18,10 +18,9 @@ camera.c_tag = user.name user << "\blue User scanned as [camera.c_tag]. Camera activated." -/obj/item/clothing/head/helmet/space/rig/ert/examine() - ..() - if(get_dist(usr,src) <= 1) - usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active." +/obj/item/clothing/head/helmet/space/rig/ert/examine(mob/user) + if(..(user, 1)) + user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active." /obj/item/clothing/suit/space/rig/ert name = "emergency response team suit" @@ -89,7 +88,7 @@ name = "emergency response team medical suit" desc = "A suit worn by medical members of a Nanotrasen Emergency Response Team. Has white highlights. Armoured and space ready." icon_state = "ert_medical" - + //Janitor /obj/item/clothing/head/helmet/space/rig/ert/janitor name = "emergency response team janitor helmet" diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index df4ef935720..32b99189599 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -21,7 +21,7 @@ var/extinguishes_left=10 // Yeah yeah, reagents, blah blah blah. This should be simple. /obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user) - ..() + ..(user) user << "There are [extinguishes_left] extinguisher canisters left in this suit." /obj/item/clothing/suit/space/eva/plasmaman/proc/Extinguish(var/mob/user) @@ -328,6 +328,5 @@ user << "User scanned as [camera.c_tag]. Camera activated." /obj/item/clothing/head/helmet/space/eva/plasmaman/nuclear/examine(mob/user) - ..() - if(get_dist(user,src) <= 1) + if(..(user, 1)) user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active." \ No newline at end of file diff --git a/code/modules/examine/descriptions/atmospherics.dm b/code/modules/examine/descriptions/atmospherics.dm new file mode 100644 index 00000000000..c83ec81e89a --- /dev/null +++ b/code/modules/examine/descriptions/atmospherics.dm @@ -0,0 +1,166 @@ + +/obj/machinery/atmospherics/pipe + description_info = "This pipe, and all other pipes, can be connected or disconnected by a wrench. The internal pressure of the pipe must \ + be below 300 kPa to do this. More pipes can be obtained from the pipe dispenser." + +/obj/machinery/atmospherics/pipe/New() //This is needed or else 20+ lines of copypasta to dance around inheritence. + ..() + description_info += "
Most pipes and atmospheric devices can be connected or disconnected with a wrench. The pipe's pressure must not be too high, \ + or if it is a device, it must be turned off first." + +//HE pipes +/obj/machinery/atmospherics/pipe/simple/heat_exchanging + description_info = "This radiates heat from the pipe's gas to space, cooling it down." + +//Supply/Scrubber pipes +/obj/machinery/atmospherics/pipe/simple/visible/scrubbers + description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/simple/visible/supply + description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/simple/hidden/supply + description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers + description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +//Universal adapters +/obj/machinery/atmospherics/pipe/simple/visible/universal + description_info = "This allows you to connect 'normal' pipes, red 'scrubber' pipes, and blue 'supply' pipes." + +/obj/machinery/atmospherics/pipe/simple/hidden/universal + description_info = "This allows you to connect 'normal' pipes, red 'scrubber' pipes, and blue 'supply' pipes." + +//Three way manifolds +/obj/machinery/atmospherics/pipe/manifold + description_info = "A normal pipe with three ends to connect to." + +/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers + description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/manifold/visible/supply + description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers + description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/manifold/hidden/supply + description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +//Insulated pipes +/obj/machinery/atmospherics/pipe/simple/insulated + description_info = "This is completely useless, use a normal pipe." //Sorry, but it's true. + +//Four way manifolds +/obj/machinery/atmospherics/pipe/manifold4w + description_info = "This is a four-way pipe." + +/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers + description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply + description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers + description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \ + a Universal Adapter pipe." + +//Endcaps +/obj/machinery/atmospherics/pipe/cap + description_info = "This is a cosmetic attachment, as pipes currently do not spill their contents into the air." + +//T-shaped valves +/obj/machinery/atmospherics/tvalve + description_info = "Click this to toggle the mode. The direction with the green light is where the gas will flow." + +//Normal valves +/obj/machinery/atmospherics/valve + description_info = "Click this to turn the valve. If red, the pipes on each end are seperated. Otherwise, they are connected." + +//TEG ports +/obj/machinery/atmospherics/binary/circulator + description_info = "This generates electricity, depending on the difference in temperature between each side of the machine. The meter in \ + the center of the machine gives an indicator of how much elecrtricity is being generated." + +//Passive gates +/obj/machinery/atmospherics/binary/passive_gate + description_info = "This is a one-way regulator, allowing gas to flow only at a specific pressure and flow rate. If the light is green, it is flowing." + +//Normal pumps (high power one inherits from this) +/obj/machinery/atmospherics/binary/pump + description_info = "This moves gas from one pipe to another. A higher target pressure demands more energy. The side with the red end is the output." + +//Vents +/obj/machinery/atmospherics/unary/vent_pump + description_info = "This pumps the contents of the attached pipe out into the atmosphere, if needed. It can be controlled from an Air Alarm." + +//Freezers +/obj/machinery/atmospherics/unary/freezer + description_info = "Cools down the gas of the pipe it is connected to. It uses massive amounts of electricity while on. \ + It can be upgraded by replacing the capacitors, manipulators, and matter bins. It can be deconstructed by screwing the maintenance panel open with a \ + screwdriver, and then using a crowbar." + +//Heaters +/obj/machinery/atmospherics/unary/heater + description_info = "Heats up the gas of the pipe it is connected to. It uses massive amounts of electricity while on. \ + It can be upgraded by replacing the capacitors, manipulators, and matter bins. It can be deconstructed by screwing the maintenance panel open with a \ + screwdriver, and then using a crowbar." + +//Gas injectors +/obj/machinery/atmospherics/unary/outlet_injector + description_info = "Outputs the pipe's gas into the atmosphere, similar to an airvent. It can be controlled by a nearby atmospherics computer. \ + A green light on it means it is on." + +//Scrubbers +/obj/machinery/atmospherics/unary/vent_scrubber + description_info = "This filters the atmosphere of harmful gas. Filtered gas goes to the pipes connected to it, typically a scrubber pipe. \ + It can be controlled from an Air Alarm. It can be configured to drain all air rapidly with a 'panic syphon' from an air alarm." + +//Omni filters +/obj/machinery/atmospherics/omni/filter + description_info = "Filters gas from a custom input direction, with up to two filtered outputs and a 'everything else' \ + output. The filtered output's arrows glow orange." + +//Omni mixers +/obj/machinery/atmospherics/omni/mixer + description_info = "Combines gas from custom input and output directions. The percentage of combined gas can be defined." + +//Canisters +/obj/machinery/portable_atmospherics/canister + description_info = "The canister can be connected to a connector port with a wrench. Tanks of gas (the kind you can hold in your hand) \ + can be filled by the canister, by using the tank on the canister, increasing the release pressure, then opening the valve until it is full, and then close it. \ + *DO NOT* remove the tank until the valve is closed. A gas analyzer can be used to check the contents of the canister." + + description_antag = "Canisters can be damaged, spilling their contents into the air, or you can just leave the release valve open." + +//Portable pumps +/obj/machinery/portable_atmospherics/powered/pump + description_info = "Invaluable for filling air in a room rapidly after a breach repair. The internal gas container can be filled by \ + connecting it to a connector port. The pump can pump the air in (sucking) or out (blowing), at a specific target pressure. The powercell inside can be \ + replaced by using a screwdriver, and then adding a new cell. A tank of gas can also be attached to the air pump." + +//Portable scrubbers +/obj/machinery/portable_atmospherics/powered/scrubber + description_info = "Filters the air, placing harmful gases into the internal gas container. The container can be emptied by \ + connecting it to a connector port. The pump can pump the air in (sucking) or out (blowing), at a specific target pressure. The powercell inside can be \ + replaced by using a screwdriver, and then adding a new cell. A tank of gas can also be attached to the scrubber. " + +//Meters +/obj/machinery/meter + description_info = "Measures the volume and temperature of the pipe under the meter." + +//Pipe dispensers +/obj/machinery/pipedispenser + description_info = "This can be moved by using a wrench. You will need to wrench it again when you want to use it. You can put \ + excess (atmospheric) pipes into the dispenser, as well. The dispenser requires electricity to function." \ No newline at end of file diff --git a/code/modules/examine/descriptions/engineering.dm b/code/modules/examine/descriptions/engineering.dm new file mode 100644 index 00000000000..c3f9b9b21fa --- /dev/null +++ b/code/modules/examine/descriptions/engineering.dm @@ -0,0 +1,35 @@ +/obj/machinery/power/supermatter + description_info = "When energized by a laser (or something hitting it), it emits radiation and heat. If the heat reaches above 7000 kelvin, it will send an alert and start taking damage. \ + After integrity falls to zero percent, it will delaminate, causing a massive explosion, station-wide radiation spikes, and hallucinations. \ + Supermatter reacts badly to oxygen in the atmosphere. It'll also heat up really quick if it is in vacuum.
\ +
\ + Supermatter cores are extremely dangerous to be close to, and requires protection to handle properly. The protection you will need is:
\ + Optical meson scanners on your eyes, to prevent hallucinations when looking at the supermatter.
\ + Radiation helmet and suit, as the supermatter is radioactive.
\ +
\ + Touching the supermatter will result in *instant death*, with no corpse left behind! You can drag the supermatter, but anything else will kill you. \ + It is advised to obtain a genetic backup before trying to drag it." + + description_antag = "Exposing the supermatter to oxygen or vaccum will cause it to start rapidly heating up. Sabotaging the supermatter and making it explode will \ + cause a period of lag as the explosion is processed by the server, as well as irradiating the entire station and causing hallucinations to happen. \ + Wearing radiation equipment will protect you from most of the delamination effects sans explosion." + +/obj/machinery/power/apc + description_info = "An APC (Area Power Controller) regulates and supplies backup power for the area they are in. Their power channels are divided \ + out into 'environmental' (Items that manipulate airflow and temperature), 'lighting' (the lights), and 'equipment' (Everything else that consumes power). \ + Power consumption and backup power cell charge can be seen from the interface, further controls (turning a specific channel on, off or automatic, \ + toggling the APC's ability to charge the backup cell, or toggling power for the entire area via master breaker) first requires the interface to be unlocked \ + with an ID with Engineering access or by one of the station's robots or the artificial intelligence." + + description_antag = "This can be emagged to unlock it. It will cause the APC to have a blue error screen. \ + Wires can be pulsed remotely with a signaler attached to it. A powersink will also drain any APCs connected to the same wire the powersink is on." + +/obj/item/inflatable + description_info = "Inflate by using it in your hand. The inflatable barrier will inflate on your tile. To deflate it, use the 'deflate' verb." + +/obj/structure/inflatable + description_info = "To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever." + +/obj/structure/inflatable/door + description_info = "Click the door to open or close it. It only stops air while closed.
\ + To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever." diff --git a/code/modules/examine/descriptions/medical.dm b/code/modules/examine/descriptions/medical.dm new file mode 100644 index 00000000000..b3b01e9afb8 --- /dev/null +++ b/code/modules/examine/descriptions/medical.dm @@ -0,0 +1,42 @@ +/obj/machinery/bodyscanner + description_info = "The advanced scanner detects and reports internal injuries such as bone fractures, internal bleeding, and organ damage. \ + This is useful if you are about to perform surgery.
\ +
\ + Click your target with Grab intent, then click on the scanner to place them in it. Click the red terminal to operate. \ + Right-click the scanner and click 'Eject Occupant' to remove them. You can enter the scanner yourself in a similar way, using the 'Enter Body Scanner' \ + verb." + +/obj/machinery/atmospherics/unary/cryo_cell + description_info = "The cryogenic chamber, or 'cryo', treats most damage types, most notably genetic damage. It also stabilizes patients \ + in critical condition by placing them in stasis, so they can be treated at a later time.
\ +
\ + In order for it to work, it must be loaded with chemicals, and the temperature of the solution must reach a certain point. Additionally, it \ + requires a supply of pure oxygen, provided by canisters that are attached. The most commonly used chemicals in the chambers are Cryoxadone and \ + Clonexadone. Clonexadone is more effective in treating all damage, including Genetic damage, but is otherwise functionally identical.
\ +
\ + Activating the freezer nearby, and setting it to a temperature setting below 150, is recommended before operation! Further, any clothing the patient \ + is wearing that act as an insulator will reduce its effectiveness, and should be removed.
\ +
\ + Clicking the tube with a beaker full of chemicals in hand will place it in its storage to distribute when it is activated.
\ +
\ + Click your target with Grab intent, then click on the tube, with an empty hand, to place them in it. Click the tube again to open the menu. \ + Press the button on the menu to activate it. Once they have reached 100 health, right-click the cell and click 'Eject Occupant' to remove them. \ + Remember to turn it off, once you've finished, to save power and chemicals!" + +/obj/machinery/optable + description_info = "Click your target with Grab intent, then click on the table with an empty hand, to place them on it." + +/obj/machinery/computer/operating + description_info = "This console gives information on the status of the patient on the adjacent operating table, notably their consciousness." + +/obj/machinery/sleeper + description_info = "The sleeper allows you to clean the blood by means of dialysis, and to administer medication in a controlled environment.
\ +
\ + Click your target with Grab intent, then click on the sleeper to place them in it. Click the green console, with an empty hand, to open the menu. \ + Click 'Start Dialysis' to begin filtering unwanted chemicals from the occupant's blood. The beaker contained will begin to fill with their \ + contaminated blood, and will need to be emptied when full.
\ +
\ + You can also inject common medicines directly into their bloodstream.\ +
\ + Right-click the cell and click 'Eject Occupant' to remove them. You can enter the cell yourself by right clicking and selecting 'Enter Sleeper'. \ + Note that you cannot control the sleeper while inside of it." \ No newline at end of file diff --git a/code/modules/examine/descriptions/mobs.dm b/code/modules/examine/descriptions/mobs.dm new file mode 100644 index 00000000000..8197e6f3d1d --- /dev/null +++ b/code/modules/examine/descriptions/mobs.dm @@ -0,0 +1,8 @@ +/mob/living/silicon/robot/drone + description_info = "Drones are player-controlled synthetics which are lawed to maintain the station and not \ + interact with anyone else, except for other drones. They hold a wide array of tools to build, repair, maintain, and clean. \ + They fuction similarly to other synthetics, in that they require recharging regularly, have laws, and are resilient to many hazards, \ + such as fire, radiation, vacuum, and more. Ghosts can join the round as a maintenance drone by using the appropriate verb in the 'ghost' tab. \ + An inactive drone can be rebooted by swiping an ID card on it with engineering or robotics access." + + description_antag = "An Electromagnetic Sequencer can be used to subvert the drone to your cause." \ No newline at end of file diff --git a/code/modules/examine/descriptions/stacks.dm b/code/modules/examine/descriptions/stacks.dm new file mode 100644 index 00000000000..431e5c37b9a --- /dev/null +++ b/code/modules/examine/descriptions/stacks.dm @@ -0,0 +1,24 @@ +/obj/item/stack/rods + description_info = "Made from metal sheets. You can build a grille by using it in your hand. \ + Clicking on a floor without any tiles will reinforce the floor. You can make reinforced glass by combining rods and normal glass sheets." + +/obj/item/stack/sheet/glass + description_info = "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets." + +/obj/item/stack/sheet/glass/cyborg + description_info = "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets.
\ + As a synthetic, you can acquire more sheets of glass by recharging." + +/obj/item/stack/sheet/glass/reinforced + description_info = "Use in your hand to build a window. Reinforced glass is much stronger against damage." + +/obj/item/stack/sheet/glass/reinforced/cyborg + description_info = "Use in your hand to build a window. Reinforced glass is much stronger against damage.
\ + As a synthetic, you can gain more reinforced glass by recharging." + +/obj/item/stack/sheet/metal/cyborg + description_info = "Use in your hand to bring up the recipe menu. If you have enough sheets, click on something on the list to build it.
\ + You can replenish your supply of metal as a synthetic by recharging." + +/obj/item/stack/sheet + description_info = "Use in your hand to bring up the recipe menu. If you have enough sheets, click on something on the list to build it." \ No newline at end of file diff --git a/code/modules/examine/descriptions/structures.dm b/code/modules/examine/descriptions/structures.dm new file mode 100644 index 00000000000..858653b0943 --- /dev/null +++ b/code/modules/examine/descriptions/structures.dm @@ -0,0 +1,21 @@ +/obj/structure/girder + description_info = "Use metal sheets on this to build a normal wall. Adding plasteel instead will make a reinforced wall.
\ + A false wall can be made by using a crowbar on this girder, and then adding metal or plasteel.
\ + You can dismantle the grider with a wrench." + +/obj/structure/girder/reinforced + description_info = "Add another sheet of plasteel to finish." + +/obj/structure/grille + description_info = "A powered and knotted wire underneath this will cause the grille to shock anyone not wearing insulated gloves.
\ + Wirecutters will turn the grille into metal rods instantly. Grilles are made with metal rods." + +/obj/structure/lattice + description_info = "Add a metal floor tile to build a floor on top of the lattice.
\ + Lattices can be made by applying metal rods to a space tile." + +/obj/structure/bed + description_info = "Click and drag yourself (or anyone) to this to buckle in. Click on this with an empty hand to undo the buckles.
\ +
\ + Anyone with restraints, such as handcuffs, will not be able to unbuckle themselves. They must use the Resist button, or verb, to break free of \ + the buckles, instead." \ No newline at end of file diff --git a/code/modules/examine/descriptions/turfs.dm b/code/modules/examine/descriptions/turfs.dm new file mode 100644 index 00000000000..cccc43e0731 --- /dev/null +++ b/code/modules/examine/descriptions/turfs.dm @@ -0,0 +1,3 @@ +/turf/simulated/wall + description_info = "You can deconstruct this by welding it, and then wrenching the girder.
\ + You can build a wall by using metal sheets and making a girder, then adding more metal or plasteel." \ No newline at end of file diff --git a/code/modules/examine/descriptions/weapons.dm b/code/modules/examine/descriptions/weapons.dm new file mode 100644 index 00000000000..8579169bba7 --- /dev/null +++ b/code/modules/examine/descriptions/weapons.dm @@ -0,0 +1,81 @@ +/* + Note: This file is meant for actual weapons (guns, swords, etc), and not the stupid 'every obj is a weapon, except when it's not' thing. +*/ + +//****** +//*Guns* +//****** + +//This contains a lot of copypasta but I'm told it's better then a lot of New()s appending the var. +/obj/item/weapon/gun + description_info = "This is a gun. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire." + +/obj/item/weapon/gun/energy + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger." + +/obj/item/weapon/gun/energy/crossbow + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire." + description_antag = "This is a stealthy weapon which fires poisoned bolts at your target. When it hits someone, they will suffer a stun effect, in \ + addition to toxins. The energy crossbow recharges itself slowly, and can be concealed in your pocket or bag." + +/obj/item/weapon/gun/energy/gun + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. To switch between stun and lethal, click the weapon \ + in your hand. To recharge this weapon, use a weapon recharger." + +/obj/item/weapon/gun/energy/gun/taser + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger." + +/obj/item/weapon/gun/energy/gun/stunrevolver + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger." + +/obj/item/weapon/gun/energy/gun/nuclear + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. To switch between stun and lethal, click the weapon \ + in your hand. Unlike most weapons, this weapon recharges itself." + +/obj/item/weapon/gun/energy/captain + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. Unlike most weapons, this weapon recharges itself." + +/obj/item/weapon/gun/energy/sniperrifle + description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger. \ + To use the scope, use the appropriate verb in the object tab." + +/obj/item/weapon/gun/projectile + description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. To reload, click the weapon in your hand to unload (if needed), then add the appropiate ammo. The description \ + will tell you what caliber you need." + +/obj/item/weapon/gun/projectile/shotgun/pump + description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. After firing, you will need to pump the gun, by clicking on the gun in your hand. To reload, load more shotgun \ + shells into the gun." + +/obj/item/weapon/gun/projectile/heavysniper + description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \ + then click where you want to fire. The gun's chamber can be opened or closed by using it in your hand. To reload, open the chamber, add a new bullet \ + then close it. To use the scope, use the appropriate verb in the object tab." + +//******* +//*Melee* +//******* + +/obj/item/weapon/melee/baton + description_info = "The baton needs to be turned on to apply the stunning effect. Use it in your hand to toggle it on or off. If your intent is \ + set to 'harm', you will inflict damage when using it, regardless if it is on or not. Each stun reduces the baton's charge, which can be replenished by \ + putting it inside a weapon recharger." + +/obj/item/weapon/melee/energy/sword + description_antag = "The energy sword is a very strong melee weapon, capable of severing limbs easily, if they are targeted. It can also has a chance \ + to block projectiles and melee attacks while it is on and being held. The sword can be toggled on or off by using it in your hand. While it is off, \ + it can be concealed in your pocket or bag." + +/obj/item/weapon/melee/cultblade + description_antag = "This sword is a powerful weapon, capable of severing limbs easily, if they are targeted. Nonbelivers are unable to use this weapon." diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm new file mode 100644 index 00000000000..c4d54a44ab6 --- /dev/null +++ b/code/modules/examine/examine.dm @@ -0,0 +1,71 @@ +/* This code is responsible for the examine tab. When someone examines something, it copies the examined object's description_info, + description_fluff, and description_antag, and shows it in a new tab. + + In this file, some atom and mob stuff is defined here. It is defined here instead of in the normal files, to keep the whole system self-contained. + This means that this file can be unchecked, along with the other examine files, and can be removed entirely with no effort. +*/ + + +/atom/ + var/description_info = null //Helpful blue text. + var/description_fluff = null //Green text about the atom's fluff, if any exists. + var/description_antag = null //Malicious red text, for the antags. + +//Override these if you need special behaviour for a specific type. +/atom/proc/get_description_info() + if(description_info) + return description_info + return + +/atom/proc/get_description_fluff() + if(description_fluff) + return description_fluff + return + +/atom/proc/get_description_antag() + if(description_antag) + return description_antag + return + +/mob/living/get_description_fluff() + if(flavor_text) //Get flavor text for the green text. + return flavor_text + else //No flavor text? Try for hardcoded fluff instead. + return ..() + +/mob/living/carbon/human/get_description_fluff() + return print_flavor_text(0) + +/* The examine panel itself */ + +/client/var/description_holders[0] + +/client/proc/update_description_holders(atom/A, update_antag_info=0) + description_holders["info"] = A.get_description_info() + description_holders["fluff"] = A.get_description_fluff() + description_holders["antag"] = (update_antag_info)? A.get_description_antag() : "" + + description_holders["name"] = "[A.name]" + description_holders["icon"] = "\icon[A]" + description_holders["desc"] = A.desc + +/client/Stat() + . = ..() + if(usr && statpanel("Examine")) + stat(null,"[description_holders["icon"]] [description_holders["name"]]") //The name, written in big letters. + stat(null,"[description_holders["desc"]]") //the default examine text. + if(description_holders["info"]) + stat(null,"[description_holders["info"]]") //Blue, informative text. + if(description_holders["fluff"]) + stat(null,"[description_holders["fluff"]]") //Yellow, fluff-related text. + if(description_holders["antag"]) + stat(null,"[description_holders["antag"]]") //Red, malicious antag-related text + +//override examinate verb to update description holders when things are examined +/mob/examinate(atom/A as mob|obj|turf in view()) + if(..()) + return 1 + + var/is_antag = (isAntag(src) || isobserver(src)) //ghosts don't have minds + if(client) + client.update_description_holders(A, is_antag) diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index 55a89f36789..72407ae289c 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -396,10 +396,13 @@ // EXAMINE PROC // This proc is massive, messy, and probably could be handled better. ////////////////////////////// Feel free to try cleaning it up if you think of a better way to do it. -/obj/machinery/fishtank/examine() - ..() +/obj/machinery/fishtank/examine(mob/user) + ..(user) var/examine_message = "" //Approximate water level + + examine_message += "Water level: " + if(water_level == 0) examine_message += "\The [src] is empty! " else if(water_level < water_capacity * 0.1) @@ -415,6 +418,8 @@ else if (water_level == water_capacity) examine_message += "\The [src] is full! " + examine_message += "
Cleanliness level: " + //Approximate filth level if(filth_level == 0) examine_message += "[src] is spotless! " @@ -429,6 +434,8 @@ else if(filth_level == 10) examine_message += "[src] is absolutely disgusting! Someone should clean it NOW! " + examine_message += "
Food level: " + //Approximate food level if(!fish_count) //Check if there are fish in the tank if(food_level > 0) //Don't report a tank that has neither fish nor food in it @@ -445,7 +452,9 @@ //Report the number of harvestable eggs if(egg_count) //Don't bother if there isn't any eggs - examine_message += "There are [egg_count] eggs able to be harvested! " + examine_message += "
There are [egg_count] eggs able to be harvested! " + + examine_message += "
" //Report the number and types of live fish if there is water in the tank if(fish_count == 0) @@ -465,6 +474,8 @@ //Display the number of fish and previously constructed message examine_message += "\The [src] contains [fish_count] live fish. [message] " + examine_message += "
" + //Report lid state for tanks and wall-tanks if(has_lid) //Only report if the tank actually has a lid //Report lid state @@ -473,6 +484,8 @@ else examine_message += "The lid is open. " + examine_message += "
" + //Report if the tank is leaking/cracked if(water_level > 0) //Tank has water, so it's actually leaking if(leaking == 1) examine_message += "\The [src] is leaking." @@ -483,7 +496,8 @@ //Finally, report the full examine_message constructed from the above reports - usr << "[examine_message]" + user << "[examine_message]" + return examine_message ////////////////////////////// // ATACK PROCS // diff --git a/code/modules/food/customizables.dm b/code/modules/food/customizables.dm index e0445f31395..ccab1b11afc 100644 --- a/code/modules/food/customizables.dm +++ b/code/modules/food/customizables.dm @@ -382,11 +382,11 @@ qdel(O) return ..() -/obj/item/weapon/reagent_containers/food/snacks/customizable/examine() - ..() +/obj/item/weapon/reagent_containers/food/snacks/customizable/examine(mob/user) + ..(user) var/whatsinside = pick(ingredients) - usr << " You think you can see [whatsinside] in there." + user << " You think you can see [whatsinside] in there." /* /obj/item/weapon/reagent_containers/food/snacks/customizable/attack(mob/M as mob, mob/user as mob, def_zone) //SNOOOOOOOWFLAAAAAAAAAAAAAAAAAKES diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index ddde6434184..aeda971c48a 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -181,12 +181,12 @@ update_icon() user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.") -/obj/item/weapon/hand/examine() - ..() +/obj/item/weapon/hand/examine(mob/user) + ..(user) if((!concealed || src.loc == usr) && cards.len) - usr << "It contains: " + user << "It contains: " for(var/datum/playingcard/P in cards) - usr << "The [P.name]." + user << "The [P.name]." /obj/item/weapon/hand/update_icon() diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 76ede0d9d2d..142b0772e2d 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -779,31 +779,30 @@ else if(dead) remove_dead(user) -/obj/machinery/portable_atmospherics/hydroponics/examine() - - ..() +/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user) + ..(user) if(!seed) - usr << "[src] is empty." + user << "[src] is empty." return - usr << "[seed.display_name] are growing here." + user << "[seed.display_name] are growing here." - if(!Adjacent(usr)) + if(!Adjacent(user)) return - usr << "Water: [round(waterlevel,0.1)]/100" - usr << "Nutrient: [round(nutrilevel,0.1)]/10" + user << "Water: [round(waterlevel,0.1)]/100" + user << "Nutrient: [round(nutrilevel,0.1)]/10" if(weedlevel >= 5) - usr << "\The [src] is infested with weeds!" + user << "\The [src] is infested with weeds!" if(pestlevel >= 5) - usr << "\The [src] is infested with tiny worms!" + user << "\The [src] is infested with tiny worms!" if(dead) - usr << "The plant is dead." + user << "The plant is dead." else if(health <= (seed.get_trait(TRAIT_ENDURANCE)/ 2)) - usr << "The plant looks unhealthy." + user << "The plant looks unhealthy." if(mechanical) var/turf/T = loc @@ -831,7 +830,7 @@ light_available = 5 light_string = "a light level of [light_available] lumens" - usr << "The tray's sensor suite is reporting [light_string] and a temperature of [environment.temperature]K." + user << "The tray's sensor suite is reporting [light_string] and a temperature of [environment.temperature]K." /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb() set name = "Toggle Tray Lid" diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 67eb53c2e0d..d0ad62b8448 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -436,9 +436,9 @@ user << "There's no points left on [src]." ..() -/obj/item/weapon/card/mining_point_card/examine() - ..() - usr << "There's [points] points on the card." +/obj/item/weapon/card/mining_point_card/examine(mob/user) + ..(user) + user << "There's [points] points on the card." /**********************Jaunter**********************/ @@ -778,7 +778,7 @@ malfunctioning = 1 /obj/item/weapon/lazarus_injector/examine(mob/user) - ..() + ..(user) if(!loaded) user << "[src] is empty." if(malfunctioning) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index f3e9de12dab..b16e94e2abb 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -96,7 +96,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi /mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) return 1 - + /* Transfer_mind is there to check if mob is being deleted/not going to have a body. @@ -192,7 +192,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return -/mob/dead/observer/Move(NewLoc, direct) +/mob/dead/observer/Move(NewLoc, direct) following = null dir = direct if(NewLoc) @@ -221,16 +221,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/area/A = get_area_master(src) if(A) A.Entered(src) - + ..() /mob/dead/observer/experience_pressure_difference() return 0 -/mob/dead/observer/examine() - if(usr) - usr << desc - /mob/dead/observer/can_use_hands() return 0 /mob/dead/observer/is_active() return 0 @@ -325,15 +321,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" set name = "Teleport" set desc= "Teleport to a location" - + if(!isobserver(usr)) usr << "Not when you're not dead!" return - + usr.verbs -= /mob/dead/observer/proc/dead_tele spawn(30) usr.verbs += /mob/dead/observer/proc/dead_tele - + var/area/thearea = ghostteleportlocs[A] if(!thearea) return @@ -414,7 +410,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/Life() // to catch teleports etc which directly set loc update_following() - return ..() + return ..() /mob/dead/observer/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak set category = "Ghost" @@ -509,7 +505,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp src << "\blue Temperature: [round(environment.temperature-T0C,0.1)]°C" src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]" - + /mob/dead/observer/verb/view_manifest() set name = "View Crew Manifest" set category = "Ghost" @@ -629,9 +625,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp client.images |= ghost_darkness_images if (ghostimage) client.images -= ghostimage //remove ourself - + /mob/proc/can_admin_interact() return 0 - + /mob/dead/observer/can_admin_interact() return check_rights(R_ADMIN, 0, src) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 4c36d82202a..913db148a95 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -44,7 +44,7 @@ var/const/MAX_ACTIVE_TIME = 400 Attach(M) /obj/item/clothing/mask/facehugger/examine(mob/user) - ..() + ..(user) if(!real)//So that giant red text about probisci doesn't show up. return switch(stat) @@ -171,7 +171,7 @@ var/const/MAX_ACTIVE_TIME = 400 var/mob/living/carbon/human/H = target if(!H.check_has_mouth()) return - + if(!sterile) //target.contract_disease(new /datum/disease/alien_embryo(0)) //so infection chance is same as virus infection chance target.visible_message("[src] falls limp after violating [target]'s face!", \ diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 8cee6355712..38be91162b0 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -130,12 +130,8 @@ ghost_volunteers.Add(O) -/obj/item/device/mmi/posibrain/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." +/obj/item/device/mmi/posibrain/examine(mob/user) + if(!..(user)) return var/msg = "*---------*\nThis is \icon[src] \a [src]!\n[desc]\n" @@ -150,8 +146,7 @@ else msg += "It appears to be completely inactive.\n" msg += "*---------*" - usr << msg - return + user << msg /obj/item/device/mmi/posibrain/emp_act(severity) if(!src.brainmob) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index c951a0a88ca..1dcea3e1b4d 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -1,11 +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 var/skipjumpsuit = 0 @@ -182,7 +175,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" @@ -208,22 +201,22 @@ if(DWARF in mutations) msg += "[t_He] [t_is] a halfling!\n" - var/distance = get_dist(usr,src) - if(istype(usr, /mob/dead/observer) || usr.stat == 2) // ghosts can see anything + var/distance = get_dist(user,src) + if(istype(user, /mob/dead/observer) || user.stat == 2) // ghosts can see anything distance = 1 if (src.stat) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n" if((stat == 2 || src.health <= config.health_threshold_crit) && distance <= 3) msg += "[t_He] does not appear to be breathing.\n" - if(istype(usr, /mob/living/carbon/human) && !usr.stat && distance <= 1) - for(var/mob/O in viewers(usr.loc, null)) - O.show_message("[usr] checks [src]'s pulse.", 1) + if(istype(user, /mob/living/carbon/human) && !user.stat && distance <= 1) + for(var/mob/O in viewers(user.loc, null)) + O.show_message("[user] checks [src]'s pulse.", 1) spawn(15) - if(distance <= 1 && usr.stat != 1) + if(distance <= 1 && user.stat != 1) if(pulse == PULSE_NONE) - usr << "[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]..." + user << "[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]..." else - usr << "[t_He] has a pulse!" + user << "[t_He] has a pulse!" msg += "" if(fire_stacks > 0) @@ -246,7 +239,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" @@ -419,7 +412,7 @@ msg += "[src] has \a [implant] sticking out of [t_his] flesh!\n" if(digitalcamo) msg += "[t_He] [t_is] repulsively uncanny!\n" - if(!wear_mask && is_thrall(src) && in_range(usr,src)) + if(!wear_mask && is_thrall(src) && in_range(user,src)) msg += "Their features seem unnaturally tight and drawn.\n" if(decaylevel == 1) msg += "[t_He] [t_is] starting to smell.\n" @@ -430,7 +423,7 @@ if(decaylevel == 4) msg += "[t_He] [t_is] mostly dessicated now, with only bones remaining of what used to be a person.\n" - if(hasHUD(usr,"security")) + if(hasHUD(user,"security")) var/perpname = "wot" var/criminal = "None" @@ -453,7 +446,7 @@ msg += "Criminal status: \[[criminal]\]\n" msg += "Security records: \[View\] \[Add comment\]\n" - if(hasHUD(usr,"medical")) + if(hasHUD(user,"medical")) var/perpname = "wot" var/medical = "None" @@ -484,7 +477,7 @@ pose = addtext(pose,".") //Makes sure all emotes end with a period. msg += "\n[t_He] is [pose]" - usr << msg + user << msg //Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records. /proc/hasHUD(mob/M as mob, hudtype) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 149273f6351..907043e878e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1059,11 +1059,11 @@ if (href_list["lookitem"]) var/obj/item/I = locate(href_list["lookitem"]) - I.examine() + src.examinate(I) if (href_list["lookmob"]) var/mob/M = locate(href_list["lookmob"]) - M.examine() + src.examinate(M) ..() return diff --git a/code/modules/mob/living/carbon/metroid/examine.dm b/code/modules/mob/living/carbon/metroid/examine.dm index 38087b35795..67ef5770103 100644 --- a/code/modules/mob/living/carbon/metroid/examine.dm +++ b/code/modules/mob/living/carbon/metroid/examine.dm @@ -1,12 +1,6 @@ -/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 - - var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" +/mob/living/carbon/slime/examine(mob/user) + ..(user) + var/msg = "" if (src.stat == DEAD) msg += "It is limp and unresponsive.\n" else @@ -47,5 +41,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/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index 5683621c52c..db67235ac5d 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -1,12 +1,8 @@ -/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." +/mob/living/silicon/ai/examine(mob/user) + if(!..(user)) return - var/msg = "*---------*\nThis is \icon[src] [src]!\n" + var/msg = "" if (src.stat == DEAD) msg += "It appears to be powered-down.\n" else @@ -27,10 +23,9 @@ msg += "" msg += "*---------*" - usr << msg - usr.showLaws(src) + user << msg + user.showLaws(src) - return /mob/proc/showLaws(var/mob/living/silicon/S) return @@ -38,4 +33,3 @@ /mob/dead/observer/showLaws(var/mob/living/silicon/S) if(antagHUD || check_rights(R_MOD, 0, src)) S.laws.show_laws(src) - \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index dfa605a1fa6..18c26f9cb4f 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -36,7 +36,7 @@ return 0 // Hide popout menu verbs -/mob/aiEye/examine(atom/A as mob|obj|turf in view()) +/mob/aiEye/examinate(atom/A as mob|obj|turf in view()) set popup_menu = 0 set src = usr.contents return 0 diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 14c3240c086..07c718a6ff0 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -1,8 +1,7 @@ -/mob/living/silicon/pai/examine() //removed as it was pointless...moved to the pai-card instead. - /* This is totally pointless because this mob is contained inside a card! - set src in oview() +/mob/living/silicon/pai/examine(mob/user) //removed as it was pointless...moved to the pai-card instead. + /*..(user) //This is totally pointless because this mob is contained inside a card! - var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" + var/msg = "" if (src.stat == DEAD) msg += "It appears to be offline.\n" else @@ -22,6 +21,5 @@ 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/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 79ead634085..2c13ae4ccf6 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -496,16 +496,10 @@ src << "You are far too small to pull anything!" return -/mob/living/silicon/pai/examine() +/mob/living/silicon/pai/examine(mob/user) + ..(user) - 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 - - var/msg = "*---------*\nThis is \icon[src][name], a personal AI!" + var/msg = "" switch(src.stat) if(CONSCIOUS) @@ -521,7 +515,7 @@ pose = addtext(pose,".") //Makes sure all emotes end with a period. msg += "\nIt is [pose]" - usr << msg + user << msg /mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj) ..(Proj) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 9bf42babd36..3a0bb1d4ad2 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -45,10 +45,10 @@ if(drone_progress >= 100) visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.") -/obj/machinery/drone_fabricator/examine() - ..() - if(produce_drones && drone_progress >= 100 && istype(usr,/mob/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones) - usr << "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone." +/obj/machinery/drone_fabricator/examine(mob/user) + ..(user) + if(produce_drones && drone_progress >= 100 && istype(user,/mob/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones) + user << "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone." /obj/machinery/drone_fabricator/proc/count_drones() var/drones = 0 @@ -101,7 +101,7 @@ if(!ticker || ticker.current_state < 3) src << "You can't join as a drone before the game starts!" return - + var/drone_age = 14 // 14 days to play as a drone var/player_age_check = check_client_age(usr.client, drone_age) if(player_age_check && config.use_age_restriction_for_antags) @@ -128,7 +128,7 @@ pluralcheck = " [deathtimeminutes] minutes and" var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10,1) - if (deathtime < 6000 && joinedasobserver == 0) + if (deathtime < 6000 && joinedasobserver == 0) usr << "You have been dead for[pluralcheck] [deathtimeseconds] seconds." usr << "You must wait 10 minutes to respawn as a drone!" return diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index b769d40d94a..0ac9da63052 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,12 +1,7 @@ -/mob/living/silicon/robot/examine() - set src in oview() +/mob/living/silicon/robot/examine(mob/user) + ..(user) - 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 - - var/msg = "*---------*\nThis is \icon[src] \a [src][custom_name ? ", [modtype] [braintype]" : ""]!\n" + var/msg = "" var/obj/act_module = get_active_hand() if(act_module) msg += "It is holding \icon[act_module] \a [act_module].\n" @@ -49,6 +44,5 @@ pose = addtext(pose,".") //Makes sure all emotes end with a period. msg += "\nIt is [pose]" - usr << msg - usr.showLaws(src) - return \ No newline at end of file + user << msg + user.showLaws(src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index cc5c5d930e9..16c0a9cfe68 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -46,10 +46,10 @@ qdel(src) return -/mob/living/simple_animal/construct/examine() - set src in oview() +/mob/living/simple_animal/construct/examine(mob/user) + ..(user) - var/msg = "*---------*\nThis is \icon[src] \a [src]!\n" + var/msg = "" if (src.health < src.maxHealth) msg += "" if (src.health >= src.maxHealth/2) @@ -59,8 +59,7 @@ msg += "" msg += "*---------*" - usr << msg - return + user << msg /mob/living/simple_animal/construct/attack_animal(mob/living/simple_animal/M as mob) if(istype(M, /mob/living/simple_animal/construct/builder)) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 80e715dc7d3..13c8a6f822c 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -281,7 +281,7 @@ src << "\red There is nothing of interest to take." return 0 -/mob/living/simple_animal/spiderbot/examine() - ..() +/mob/living/simple_animal/spiderbot/examine(mob/user) + ..(user) if(src.held_item) - usr << "It is carrying \a [src.held_item] \icon[src.held_item]." + user << "It is carrying \a [src.held_item] \icon[src.held_item]." diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index c3fa9d01800..f42e531d93d 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -33,12 +33,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) + ..(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/living/simple_animal/revenant/revenant.dm b/code/modules/mob/living/simple_animal/revenant/revenant.dm index fa8cce35004..f3789683f2c 100644 --- a/code/modules/mob/living/simple_animal/revenant/revenant.dm +++ b/code/modules/mob/living/simple_animal/revenant/revenant.dm @@ -354,7 +354,7 @@ qdel(src) /obj/item/weapon/ectoplasm/revenant/examine(mob/user) - ..() + ..(user) if(reforming) user << "It is shifting and distorted. It would be wise to destroy this." else if(!reforming) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 8f38853de78..4d3867f954b 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -482,6 +482,18 @@ var/list/slot_equipment_priority = list( \ onclose(user, "mob\ref[src]") return +//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()) + set name = "Examine" + set category = "IC" + + if((is_blind(src) || usr.stat) && !isobserver(src)) + src << "Something is there but you can't see it." + return 1 + + face_atom(A) + A.examine(src) + /mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag) if ((!( istype(l_hand, /obj/item/weapon/grab) ) && !( istype(r_hand, /obj/item/weapon/grab) ))) if (!( L )) @@ -620,7 +632,7 @@ var/list/slot_equipment_priority = list( \ if (!abandon_allowed) usr << "Respawning is disabled." return - + if (stat != DEAD || !ticker) usr << "You must be dead to use this!" return @@ -633,7 +645,7 @@ var/list/slot_equipment_priority = list( \ log_game("[key_name(usr)] respawn failed due to disconnect.") return client.screen.Cut() - + if(!client) log_game("[key_name(usr)] respawn failed due to disconnect.") return @@ -793,6 +805,7 @@ var/list/slot_equipment_priority = list( \ return if (AM.anchored) + usr << "It won't budge!" return var/mob/M = AM diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 52fc729c121..b383ca0edae 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -458,6 +458,13 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM) resting = !resting src << "\blue You are now [resting ? "resting" : "getting up"]" +/proc/is_blind(A) + if(iscarbon(A)) + var/mob/living/carbon/C = A + if(C.sdisabilities & BLIND || C.blinded) + return 1 + return 0 + /proc/get_multitool(mob/user as mob) // Get tool var/obj/item/device/multitool/P diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index c12ba709292..87d6680e033 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -52,12 +52,11 @@ return icon_state = "paper" -/obj/item/weapon/paper/examine() - if(in_range(usr, src) || istype(usr, /mob/dead/observer)) - show_content(usr) +/obj/item/weapon/paper/examine(mob/user) + if(in_range(user, src) || istype(user, /mob/dead/observer)) + show_content(user) else - usr << "You have to go closer if you want to read it." - return + user << "You have to go closer if you want to read it." /obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow = 0, var/forcestars = 0, var/infolinks = 0, var/view = 1) set src in oview(1) @@ -95,7 +94,7 @@ return /obj/item/weapon/paper/attack_self(mob/living/user as mob) - src.examine(user) + user.examinate(src) if(rigged && (holiday_master.holidays && holiday_master.holidays[APRIL_FOOLS])) if(spam_flag == 0) spam_flag = 1 @@ -120,7 +119,7 @@ if(user.zone_sel.selecting == "eyes") user.visible_message("You show the paper to [M]. ", \ " [user] holds up a paper and shows it to [M]. ") - src.examine(user) + M.examinate(src) else if(user.zone_sel.selecting == "mouth") if(!istype(M, /mob)) return @@ -444,7 +443,7 @@ add_fingerprint(user) return - + /obj/item/weapon/paper/proc/stamp(var/obj/item/weapon/stamp/S) stamps += (!stamps || stamps == "" ? "
" : "") + "" @@ -460,7 +459,7 @@ offset_y += y stampoverlay.pixel_x = x stampoverlay.pixel_y = y - + if(!ico) ico = new ico += "paper_[S.icon_state]" diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 770e7237db4..988f6191cba 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -97,11 +97,10 @@ user << "\red You must hold \the [P] steady to burn \the [src]." /obj/item/weapon/paper_bundle/examine(mob/user) - if(in_range(usr, src) || istype(usr, /mob/dead/observer)) - src.show_content(usr) + if(..(user, 1)) + src.show_content(user) else - usr << "It is too far away." - return + user << "It is too far away." /obj/item/weapon/paper_bundle/proc/show_content(mob/user as mob) var/dat diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index bc90e229f20..71e64b61823 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -94,14 +94,12 @@ amount++ -/obj/item/weapon/paper_bin/examine() - set src in oview(1) - - if(amount) - usr << "There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin." - else - usr << "There are no papers in the bin." - return +/obj/item/weapon/paper_bin/examine(mob/user) + if(..(user, 1)) + if(amount) + usr << "There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin." + else + usr << "There are no papers in the bin." /obj/item/weapon/paper_bin/update_icon() diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index d11d6558cce..50a64fccb71 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -33,7 +33,7 @@ var/photo_size = 3 /obj/item/weapon/photo/attack_self(mob/user as mob) - src.examine(user) + user.examinate(src) /obj/item/weapon/photo/attackby(obj/item/weapon/P as obj, mob/user as mob, params) if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon)) @@ -70,10 +70,10 @@ user << "\red You must hold \the [P] steady to burn \the [src]." /obj/item/weapon/photo/examine(mob/user) - if(in_range(usr, src) || istype(usr, /mob/dead/observer)) - show(usr) + if(..(user, 1)) + show(user) else - usr << "It is too far away." + user << "It is too far away." /obj/item/weapon/photo/proc/show(mob/user as mob) usr << browse_rsc(img, "tmp_photo.png") @@ -472,10 +472,9 @@ camera.c_tag = user.name user << "You switch the camera [on ? "on" : "off"]." -/obj/item/device/videocam/examine() - ..() - if(get_dist(usr,src) <= 1) - usr << "This video camera can send live feeds to the entertainment network. It's [camera ? "" : "in"]active." +/obj/item/device/videocam/examine(mob/user) + if(..(user, 1)) + user << "This video camera can send live feeds to the entertainment network. It's [camera ? "" : "in"]active." /obj/item/device/videocam/hear_talk(mob/M as mob, msg) diff --git a/code/modules/power/antimatter/fuel.dm b/code/modules/power/antimatter/fuel.dm index b81bc1ff13a..c264e7ca344 100644 --- a/code/modules/power/antimatter/fuel.dm +++ b/code/modules/power/antimatter/fuel.dm @@ -67,10 +67,9 @@ return -/obj/item/weapon/fuel/examine() - set src in view(1) - if(usr && !usr.stat) - usr << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]." +/obj/item/weapon/fuel/examine(mob/user) + if(..(user, 1)) + user << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]." /obj/item/weapon/fuel/proc/injest(mob/M as mob) switch(content) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 88478fec1e9..decd4ebb825 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -196,31 +196,28 @@ spawn(5) src.update() -/obj/machinery/power/apc/examine() - set src in oview(1) - - if(usr /*&& !usr.stat*/) - ..() +/obj/machinery/power/apc/examine(mob/user) + if(..(user, 1)) if(stat & BROKEN) - usr << "Looks broken." + user << "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"]." + user << "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." + user << "There are some wires but no any electronics." else if (has_electronics && !terminal) - usr << "Electronics installed but not wired." + user << "Electronics installed but not wired." else /* if (!has_electronics && !terminal) */ - usr << "There is no electronics nor connected wires." + user << "There is no electronics nor connected wires." else if (stat & MAINT) - usr << "The cover is closed. Something wrong with it: it doesn't work." + user << "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." + user << "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 // also add overlays for indicator lights diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 27974f6a922..247c5d5d752 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -541,15 +541,16 @@ obj/structure/cable/proc/cableColor(var/colorC) else w_class = 2.0 -/obj/item/stack/cable_coil/examine() - set src in view(1) +/obj/item/stack/cable_coil/examine(mob/user) + if(!..(user, 1)) + return if(get_amount() == 1) - usr << "A short piece of power cable." + user << "A short piece of power cable." else if(get_amount() == 2) - usr << "A piece of power cable." + user << "A piece of power cable." else - usr << "A coil of power cable. There are [get_amount()] lengths of cable in the coil." + user << "A coil of power cable. There are [get_amount()] lengths of cable in the coil." /obj/item/stack/cable_coil/verb/make_restraint() diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 5d61d7a93ca..1fd649ba19d 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -55,15 +55,14 @@ return power_used -/obj/item/weapon/stock_parts/cell/examine() - set src in view(1) - if(usr /*&& !usr.stat*/) +/obj/item/weapon/stock_parts/cell/examine(mob/user) + if(..(user, 1)) if(maxcharge <= 2500) - usr << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%." + user << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%." else - usr << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%." + user << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%." if(crit_fail) - usr << "\red This power cell seems to be faulty." + user << "\red This power cell seems to be faulty." /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 a209a127da9..24373f1b4f5 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -26,20 +26,15 @@ if (fixture_type == "bulb") icon_state = "bulb-construct-stage1" -/obj/machinery/light_construct/examine() - set src in view() - ..() - if (!(usr in view(2))) return - switch(src.stage) - if(1) - usr << "It's an empty frame." - return - if(2) - usr << "It's wired." - return - if(3) - usr << "The casing is closed." - return +/obj/machinery/light_construct/examine(mob/user) + if(..(user, 2)) + switch(src.stage) + if(1) + usr << "It's an empty frame." + if(2) + usr << "It's wired." + if(3) + usr << "The casing is closed." /obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params) src.add_fingerprint(user) @@ -268,18 +263,17 @@ update() // examine verb -/obj/machinery/light/examine() - set src in oview(1) - if(usr && !usr.stat) +/obj/machinery/light/examine(mob/user) + if(..(user, 1)) switch(status) if(LIGHT_OK) - usr << "[desc] It is turned [on? "on" : "off"]." + user << "[desc] It is turned [on? "on" : "off"]." if(LIGHT_EMPTY) - usr << "[desc] The [fitting] has been removed." + user << "[desc] The [fitting] has been removed." if(LIGHT_BURNED) - usr << "[desc] The [fitting] is burnt out." + user << "[desc] The [fitting] is burnt out." if(LIGHT_BROKEN) - usr << "[desc] The [fitting] has been smashed." + user << "[desc] The [fitting] has been smashed." diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 09390df300c..eb5fe86b5ed 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -114,7 +114,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") @@ -126,8 +126,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin src.desc = text("The [name] is assembled") if(powered) src.desc = src.desc_holder - ..() - return + ..(user) /obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params) if(istool(W)) @@ -311,21 +310,6 @@ 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() - switch(src.construction_state) - if(0) - src.desc = text("A [name], looks like it's not attached to the flooring") - if(1) - src.desc = text("A [name], it is missing some cables") - if(2) - src.desc = text("A [name], the panel is open") - if(3) - src.desc = text("The [name] is assembled") - if(powered) - src.desc = src.desc_holder - ..() - return - /obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user, params) if(istool(W)) if(src.process_tool_hit(W,user)) diff --git a/code/modules/power/switch.dm b/code/modules/power/switch.dm index da5d80d95d2..2bb312c12f0 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) + ..(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/projectiles/guns/alien.dm b/code/modules/projectiles/guns/alien.dm index 0c649df0ca9..110bf1b4cd6 100644 --- a/code/modules/projectiles/guns/alien.dm +++ b/code/modules/projectiles/guns/alien.dm @@ -31,9 +31,9 @@ last_regen = world.time update_icon() -/obj/item/weapon/gun/launcher/spikethrower/examine() - ..() - usr << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining." +/obj/item/weapon/gun/launcher/spikethrower/examine(mob/user) + ..(user) + user << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining." /obj/item/weapon/gun/launcher/spikethrower/update_icon() icon_state = "spikethrower[spikes]" diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index d5ad7e21ed8..58cf0b4e2e8 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -76,8 +76,7 @@ ..() return - examine() - set src in view(1) - ..() - if(!power_supply) - usr <<"The weapon does not have a power source installed." */ \ No newline at end of file + examine(mob/user) + if(..(user, 1)) + if(!power_supply) + usr <<"The weapon does not have a power source installed." */ \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index d3e132d6210..e4e3533fd7c 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -313,7 +313,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. can_charge = 0 /obj/item/weapon/gun/energy/plasmacutter/examine(mob/user) - ..() + ..(user) if(power_supply) user <<"[src] is [round(power_supply.percent())]% charged." diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index b2ab8f470ff..f5d5e6a6883 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -25,10 +25,9 @@ max_charges = Ceiling(max_charges / 2) ..() -/obj/item/weapon/gun/magic/wand/examine() - ..() - usr << "Has [charges] charge\s remaining." - return +/obj/item/weapon/gun/magic/wand/examine(mob/user) + ..(user) + user << "Has [charges] charge\s remaining." /obj/item/weapon/gun/magic/wand/attack_self(mob/living/user as mob) if(charges) diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 4853c5e474f..ffa0b3de900 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -126,10 +126,9 @@ update_icon() return -/obj/item/weapon/gun/projectile/examine() - ..() - usr << "Has [get_ammo()] round\s remaining." - return +/obj/item/weapon/gun/projectile/examine(mob/user) + ..(user) + 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/crossbow.dm b/code/modules/projectiles/guns/projectile/crossbow.dm index 4d11564f01b..bc87fcb999a 100644 --- a/code/modules/projectiles/guns/projectile/crossbow.dm +++ b/code/modules/projectiles/guns/projectile/crossbow.dm @@ -246,14 +246,14 @@ /obj/item/weapon/crossbowframe/update_icon() icon_state = "crossbowframe[buildstate]" -/obj/item/weapon/crossbowframe/examine() - ..() +/obj/item/weapon/crossbowframe/examine(mob/user) + ..(user) switch(buildstate) - if(1) usr << "It has a loose rod frame in place." - if(2) usr << "It has a steel backbone welded in place." - if(3) usr << "It has a steel backbone and a cell mount installed." - if(4) usr << "It has a steel backbone, plastic lath and a cell mount installed." - if(5) usr << "It has a steel cable loosely strung across the lath." + if(1) user << "It has a loose rod frame in place." + if(2) user << "It has a steel backbone welded in place." + if(3) user << "It has a steel backbone and a cell mount installed." + if(4) user << "It has a steel backbone, plastic lath and a cell mount installed." + if(5) user << "It has a steel cable loosely strung across the lath." /obj/item/weapon/crossbowframe/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W,/obj/item/stack/rods)) diff --git a/code/modules/projectiles/guns/projectile/pneumatic.dm b/code/modules/projectiles/guns/projectile/pneumatic.dm index 7f8d61a0d29..2822d375096 100644 --- a/code/modules/projectiles/guns/projectile/pneumatic.dm +++ b/code/modules/projectiles/guns/projectile/pneumatic.dm @@ -96,15 +96,13 @@ in_chamber = contents[1] return !isnull(in_chamber) -/obj/item/weapon/gun/launcher/pneumatic/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return - usr << "The valve is dialed to [pressure_setting]%." - if(tank) - usr << "The tank dial reads [tank.air_contents.return_pressure()] kPa." - else - usr << "Nothing is attached to the tank valve!" +/obj/item/weapon/gun/launcher/pneumatic/examine(mob/user) + if(..(user, 2)) + user << "The valve is dialed to [pressure_setting]%." + if(tank) + user << "The tank dial reads [tank.air_contents.return_pressure()] kPa." + else + user << "Nothing is attached to the tank valve!" /obj/item/weapon/gun/launcher/pneumatic/special_check(user) @@ -145,14 +143,14 @@ /obj/item/weapon/cannonframe/update_icon() icon_state = "pneumatic[buildstate]" -/obj/item/weapon/cannonframe/examine() - ..() +/obj/item/weapon/cannonframe/examine(mob/user) + ..(user) switch(buildstate) - if(1) usr << "It has a pipe segment installed." - if(2) usr << "It has a pipe segment welded in place." - if(3) usr << "It has an outer chassis installed." - if(4) usr << "It has an outer chassis welded in place." - if(5) usr << "It has a transfer valve installed." + if(1) user << "It has a pipe segment installed." + if(2) user << "It has a pipe segment welded in place." + if(3) user << "It has an outer chassis installed." + if(4) user << "It has an outer chassis welded in place." + if(5) user << "It has a transfer valve installed." /obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W,/obj/item/pipe)) diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 68007f5bd26..23ac5bb06f4 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -60,9 +60,9 @@ boolets += magazine.ammo_count(countempties) return boolets -/obj/item/weapon/gun/projectile/revolver/examine() - ..() - usr << "[get_ammo(0,0)] of those are live rounds." +/obj/item/weapon/gun/projectile/revolver/examine(mob/user) + ..(user) + 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 classic law enforcement firearm. Uses .38-special rounds." diff --git a/code/modules/projectiles/guns/projectile/rocket.dm b/code/modules/projectiles/guns/projectile/rocket.dm index bdabba15f51..ecb1c5a03cd 100644 --- a/code/modules/projectiles/guns/projectile/rocket.dm +++ b/code/modules/projectiles/guns/projectile/rocket.dm @@ -16,11 +16,9 @@ var/max_rockets = 1 var/list/rockets = new/list() -/obj/item/weapon/gun/rocketlauncher/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return - usr << "\blue [rockets.len] / [max_rockets] rockets." +/obj/item/weapon/gun/rocketlauncher/examine(mob/user) + if(..(user, 2)) + user << "\blue [rockets.len] / [max_rockets] rockets." /obj/item/weapon/gun/rocketlauncher/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/ammo_casing/rocket)) diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 744c7758029..b5cac89db89 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -69,10 +69,10 @@ var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing. chambered = AC -/obj/item/weapon/gun/projectile/shotgun/examine() - ..() +/obj/item/weapon/gun/projectile/shotgun/examine(mob/user) + ..(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." // COMBAT SHOTGUN // @@ -130,7 +130,7 @@ . = ..() /obj/item/weapon/gun/projectile/shotgun/boltaction/examine(mob/user) - ..() + ..(user) user << "The bolt is [bolt_open ? "open" : "closed"]." ///////////////////////////// diff --git a/code/modules/reagents/dartgun.dm b/code/modules/reagents/dartgun.dm index 585e468c70e..6affdf1f8b7 100644 --- a/code/modules/reagents/dartgun.dm +++ b/code/modules/reagents/dartgun.dm @@ -57,18 +57,14 @@ cartridge = new /obj/item/weapon/dart_cartridge(src) update_icon() -/obj/item/weapon/gun/dartgun/examine() - set src in view() - update_icon() - ..() - if (!(usr in view(2)) && usr!=src.loc) - return - if (beakers.len) - usr << "\blue [src] contains:" - for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers) - if(B.reagents && B.reagents.reagent_list.len) - for(var/datum/reagent/R in B.reagents.reagent_list) - usr << "\blue [R.volume] units of [R.name]" +/obj/item/weapon/gun/dartgun/examine(mob/user) + if(..(user, 2)) + if(beakers.len) + user << "\blue [src] contains:" + for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers) + if(B.reagents && B.reagents.reagent_list.len) + for(var/datum/reagent/R in B.reagents.reagent_list) + user << "\blue [R.volume] units of [R.name]" /obj/item/weapon/gun/dartgun/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I, /obj/item/weapon/dart_cartridge)) diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm index 48c467fed02..49fbb1aa6c4 100644 --- a/code/modules/reagents/grenade_launcher.dm +++ b/code/modules/reagents/grenade_launcher.dm @@ -17,12 +17,9 @@ materials = list(MAT_METAL=2000) -/obj/item/weapon/gun/grenadelauncher/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return - usr << "\icon [name]:" - usr << "\blue [grenades.len] / [max_grenades] [ammo_name]s." +/obj/item/weapon/gun/grenadelauncher/examine(mob/user) + if(..(user, 2)) + user << "\blue [grenades.len] / [max_grenades] [ammo_name]s." /obj/item/weapon/gun/grenadelauncher/attackby(obj/item/I as obj, mob/user as mob, params) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index f1aeead35a2..3a706325319 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -79,7 +79,7 @@ if(M.ckey) msg_admin_attack("[key_name_admin(user)] injected [key_name_admin(M)] with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)])") M.LAssailant = user - + var/trans = R.trans_to(M, amount_per_transfer_from_this) user << "[trans] units injected. [R.total_volume] units remaining." return @@ -95,18 +95,17 @@ user << "\blue Synthesizer is now producing '[R.name]'." return -/obj/item/weapon/reagent_containers/borghypo/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return +/obj/item/weapon/reagent_containers/borghypo/examine(mob/user) + if(!..(user, 2)) + return var/empty = 1 for(var/datum/reagents/RS in reagent_list) var/datum/reagent/R = locate() in RS.reagent_list if(R) - usr << "\blue It currently has [R.volume] units of [R.name] stored." + user << "\blue It currently has [R.volume] units of [R.name] stored." empty = 0 if(empty) - usr << "\blue It is currently empty. Allow some time for the internal syntheszier to produce more." + user << "\blue It is currently empty. Allow some time for the internal syntheszier to produce more." diff --git a/code/modules/reagents/reagent_containers/drugs.dm b/code/modules/reagents/reagent_containers/drugs.dm index 312cbf297a2..1829058b294 100644 --- a/code/modules/reagents/reagent_containers/drugs.dm +++ b/code/modules/reagents/reagent_containers/drugs.dm @@ -19,15 +19,13 @@ base_name = name - examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return - usr << "\blue It contains:" - if(reagents && reagents.reagent_list.len) - usr << "\blue [src.reagents.total_volume] units of powder." - else - usr << "\blue Nothing." + examine(mob/user) + if(..(user, 2)) + user << "\blue It contains:" + if(reagents && reagents.reagent_list.len) + user << "\blue [src.reagents.total_volume] units of powder." + else + user << "\blue Nothing." afterattack(obj/target, mob/user, proximity) if(!proximity) return diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index 04e0be6f9d4..f22392fe2aa 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -32,20 +32,19 @@ else return ..(target, user, proximity) -/* examine() - set src in view() - ..() - if (!(usr in range(0)) && usr!=src.loc) return +/* examine(mob/user) + if(!..(user, 1)) + return if(!reagents || reagents.total_volume==0) - usr << "\blue \The [src] is empty!" + user << "\blue \The [src] is empty!" else if (reagents.total_volume<=src.volume/4) - usr << "\blue \The [src] is almost empty!" + user << "\blue \The [src] is almost empty!" else if (reagents.total_volume<=src.volume*0.66) - usr << "\blue \The [src] is half full!" + user << "\blue \The [src] is half full!" else if (reagents.total_volume<=src.volume*0.90) - usr << "\blue \The [src] is almost full!" + user << "\blue \The [src] is almost full!" else - usr << "\blue \The [src] is full!"*/ + user << "\blue \The [src] is full!"*/ //DRINKS diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 375b30faeae..a25f3f2657e 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -146,20 +146,19 @@ user << "You heat [src] with [I]." src.reagents.handle_reactions() - examine() - set src in view() - ..() - if (!(usr in range(0)) && usr!=src.loc) return + examine(mob/user) + if(!..(user, 1)) + return if(!reagents || reagents.total_volume==0) - usr << "\blue \The [src] is empty!" + user << "\blue \The [src] is empty!" else if (reagents.total_volume<=src.volume/4) - usr << "\blue \The [src] is almost empty!" + user << "\blue \The [src] is almost empty!" else if (reagents.total_volume<=src.volume*0.66) - usr << "\blue \The [src] is half full!" + user << "\blue \The [src] is half full!" else if (reagents.total_volume<=src.volume*0.90) - usr << "\blue \The [src] is almost full!" + user << "\blue \The [src] is almost full!" else - usr << "\blue \The [src] is full!" + user << "\blue \The [src] is full!" //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/reagents/reagent_containers/food/sandwich.dm b/code/modules/reagents/reagent_containers/food/sandwich.dm index 77a39976980..7b9833e78fd 100644 --- a/code/modules/reagents/reagent_containers/food/sandwich.dm +++ b/code/modules/reagents/reagent_containers/food/sandwich.dm @@ -80,10 +80,10 @@ del(O) return ..() -/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine() - ..() +/obj/item/weapon/reagent_containers/food/snacks/csandwich/examine(mob/user) + ..(user) var/obj/item/O = pick(contents) - usr << "\blue You think you can see [O.name] in there." + user << "\blue You think you can see [O.name] in there." /obj/item/weapon/reagent_containers/food/snacks/csandwich/attack(mob/M as mob, mob/user as mob, def_zone) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 0556eee6d18..e2669a6b96a 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -120,18 +120,16 @@ /obj/item/weapon/reagent_containers/food/snacks/afterattack(obj/target, mob/user, proximity) return -/obj/item/weapon/reagent_containers/food/snacks/examine() - set src in view() - ..() - if (!(usr in range(0)) && usr!=src.loc) return - if (bitecount==0) - return - else if (bitecount==1) - usr << "\blue \The [src] was bitten by someone!" - else if (bitecount<=3) - usr << "\blue \The [src] was bitten [bitecount] times!" - else - usr << "\blue \The [src] was bitten multiple times!" +/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user) + if(..(user, 0)) + if (bitecount==0) + return + else if (bitecount==1) + user << "\blue \The [src] was bitten by someone!" + else if (bitecount<=3) + user << "\blue \The [src] was bitten [bitecount] times!" + else + user << "\blue \The [src] was bitten multiple times!" /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user, params) diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index 617255f133f..ac20303584d 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -46,17 +46,16 @@ ..() base_name = name - examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return - usr << "\blue It contains:" + examine(mob/user) + if(!..(user, 2)) + return + user << "\blue It contains:" if(reagents && reagents.reagent_list.len) - usr << "\blue [src.reagents.total_volume] units of liquid." + user << "\blue [src.reagents.total_volume] units of liquid." else - usr << "\blue Nothing." + user << "\blue Nothing." if (!is_open_container()) - usr << "\blue Airtight lid seals it completely." + user << "\blue Airtight lid seals it completely." attack_self() ..() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 2cc67490b39..53e8beafc78 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -100,12 +100,12 @@ else icon_state = "[initial(icon_state)]0" -/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine() - ..() +/obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user) + ..(user) if(reagents && reagents.reagent_list.len) - usr << "\blue It is currently loaded." + user << "\blue It is currently loaded." else - usr << "\blue It is spent." + user << "\blue It is spent." /obj/item/weapon/reagent_containers/hypospray/autoinjector/teporone //basilisks name = "teporone autoinjector" diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 252f7ed0208..d7bb1d6f5cb 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -83,7 +83,6 @@ /obj/item/weapon/reagent_containers/spray/examine(mob/user) if(..(user, 0) && user==src.loc) user << "[round(src.reagents.total_volume)] units left." - return /obj/item/weapon/reagent_containers/spray/verb/empty() diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 6c3b0db41e0..6818390cf98 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -23,16 +23,15 @@ 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:" +/obj/structure/reagent_dispensers/examine(mob/user) + if(!..(user, 2)) + return + user << "\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]" + user << "\blue [R.volume] units of [R.name]" else - usr << "\blue Nothing." + user << "\blue Nothing." /obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this set name = "Set transfer amount" @@ -111,10 +110,9 @@ /obj/structure/reagent_dispensers/fueltank/ex_act() explode() -/obj/structure/reagent_dispensers/fueltank/examine() - set src in view() - ..() - if (!(usr in view(2)) && usr!=src.loc) return +/obj/structure/reagent_dispensers/fueltank/examine(mob/user) + if(!..(user, 2)) + return if(rig) usr << "There is some kind of device rigged to the tank." diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm index 18630fdbfff..7a0d207aca1 100644 --- a/code/modules/reagents/syringe_gun.dm +++ b/code/modules/reagents/syringe_gun.dm @@ -28,10 +28,9 @@ qdel(S) return 1 -/obj/item/weapon/gun/syringe/examine() - ..() - usr << "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining." - return +/obj/item/weapon/gun/syringe/examine(mob/user) + ..(user) + 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/research/xenoarchaeology/tools/tools_coresampler.dm b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm index be3f958e3f5..47b0f7e9e2f 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm @@ -25,15 +25,9 @@ var/num_stored_bags = 10 var/obj/item/weapon/evidencebag/filled_bag -/obj/item/device/core_sampler/examine() - set src in orange(1) - if (!( usr )) - return - if(get_dist(src, usr) < 2) - usr << "That's \a [src]." - usr << "\blue Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining." - else - return ..() +/obj/item/device/core_sampler/examine(mob/user) + if(..(user, 2)) + user << "\blue Used to extract geological core samples - this one is [sampled_turf ? "full" : "empty"], and has [num_stored_bags] bag[num_stored_bags != 1 ? "s" : ""] remaining." /obj/item/device/core_sampler/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W,/obj/item/weapon/evidencebag)) diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 02964b375c8..e16cf68ebdf 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -20,7 +20,7 @@ component_parts += new /obj/item/weapon/stock_parts/console_screen(null) component_parts += new /obj/item/stack/cable_coil(null, 1) RefreshParts() - + /obj/machinery/telepad/upgraded/New() ..() component_parts = list() @@ -132,7 +132,7 @@ processing_objects.Add(src) /obj/item/weapon/rcs/examine(mob/user) - ..() + ..(user) user << "There are [rcharges] charge\s left." /obj/item/weapon/rcs/Destroy() diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 49721e2e2f2..291475f3dda 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -43,7 +43,7 @@ return ..() /obj/machinery/computer/telescience/examine(mob/user) - ..() + ..(user) user << "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots." /obj/machinery/computer/telescience/initialize() diff --git a/code/modules/vehicle/train/trains/ambulance.dm b/code/modules/vehicle/train/trains/ambulance.dm index 36baeecd86a..95589a3d369 100644 --- a/code/modules/vehicle/train/trains/ambulance.dm +++ b/code/modules/vehicle/train/trains/ambulance.dm @@ -185,14 +185,9 @@ return ..() -/obj/vehicle/train/ambulance/engine/examine() - ..() - - if(!istype(usr, /mob/living/carbon/human)) - return - - if(get_dist(usr,src) <= 1) - usr << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." +/obj/vehicle/train/ambulance/engine/examine(mob/user) + if(..(user, 1)) + user << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." /obj/vehicle/train/ambulance/engine/verb/check_power() set name = "Check power level" diff --git a/code/modules/vehicle/train/trains/cargo/cargo_train.dm b/code/modules/vehicle/train/trains/cargo/cargo_train.dm index a8f50cd5463..84ee2064045 100644 --- a/code/modules/vehicle/train/trains/cargo/cargo_train.dm +++ b/code/modules/vehicle/train/trains/cargo/cargo_train.dm @@ -175,15 +175,12 @@ else return ..() -/obj/vehicle/train/cargo/engine/examine() - ..() - - if(!istype(usr, /mob/living/carbon/human)) +/obj/vehicle/train/cargo/engine/examine(mob/user) + if(!..(user, 1)) return - if(get_dist(usr,src) <= 1) - usr << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." - usr << "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" + user << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." + user << "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" /obj/vehicle/train/cargo/engine/verb/start_engine() set name = "Start engine" diff --git a/code/modules/vehicle/train/trains/janicart.dm b/code/modules/vehicle/train/trains/janicart.dm index 0894d1b9e44..6f912971308 100644 --- a/code/modules/vehicle/train/trains/janicart.dm +++ b/code/modules/vehicle/train/trains/janicart.dm @@ -235,18 +235,15 @@ return ..() -/obj/vehicle/train/janitor/engine/examine() - ..() - - usr << "\icon[src] This [name] contains [reagents.total_volume] unit\s of [reagents]!" - if(mybag) - usr << "\A [mybag] is hanging on the [name]." - - if(!istype(usr, /mob/living/carbon/human)) +/obj/vehicle/train/janitor/engine/examine(mob/user) + if(!..(user, 1)) return - if(get_dist(usr,src) <= 1) - usr << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." + user << "\icon[src] This [name] contains [reagents.total_volume] unit\s of [reagents]!" + if(mybag) + user << "\A [mybag] is hanging on the [name]." + + user << "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." /obj/vehicle/train/janitor/engine/verb/check_power() set name = "Check power level" diff --git a/code/modules/virus2/items_devices.dm b/code/modules/virus2/items_devices.dm index 6008c5b8879..e56a99ea9a5 100644 --- a/code/modules/virus2/items_devices.dm +++ b/code/modules/virus2/items_devices.dm @@ -66,11 +66,11 @@ infect_virus2(target,src.virus2) qdel(src) -/obj/item/weapon/virusdish/examine() - usr << "This is a virus containment dish." +/obj/item/weapon/virusdish/examine(mob/user) + user << "This is a virus containment dish." if(src.info) - usr << "It has the following information about its contents:" - usr << src.info + user << "It has the following information about its contents:" + user << src.info /obj/item/weapon/ruinedvirusdish name = "ruined virus sample" diff --git a/interface/skin.dmf b/interface/skin.dmf index 888f4461135..e23a7b994ea 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -2217,7 +2217,7 @@ window "rpane" window "browserwindow" elem "browserwindow" type = MAIN - pos = 372,0 + pos = 281,0 size = 640x480 anchor1 = none anchor2 = none @@ -2347,7 +2347,7 @@ window "infowindow" tab-font-family = "" tab-font-size = 0 tab-font-style = "" - allow-html = false + allow-html = true multi-line = true on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\"" diff --git a/paradise.dme b/paradise.dme index 12deff3c44e..4493f3debb7 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1153,6 +1153,15 @@ #include "code\modules\events\tgevents\immovable_rod.dm" #include "code\modules\events\tgevents\mass_hallucination.dm" #include "code\modules\events\tgevents\vent_clog.dm" +#include "code\modules\examine\examine.dm" +#include "code\modules\examine\descriptions\atmospherics.dm" +#include "code\modules\examine\descriptions\engineering.dm" +#include "code\modules\examine\descriptions\medical.dm" +#include "code\modules\examine\descriptions\mobs.dm" +#include "code\modules\examine\descriptions\stacks.dm" +#include "code\modules\examine\descriptions\structures.dm" +#include "code\modules\examine\descriptions\turfs.dm" +#include "code\modules\examine\descriptions\weapons.dm" #include "code\modules\ext_scripts\irc.dm" #include "code\modules\ext_scripts\python.dm" #include "code\modules\fish\fish_eggs.dm"