diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm index 809cc987eb..86a87223eb 100644 --- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm @@ -200,8 +200,9 @@ set_frequency(frequency) /obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user) - if(..(user, 1)) - to_chat(user, "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W") + . = ..() + if(Adjacent(user)) + . += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" /obj/machinery/atmospherics/unary/vent_pump/power_change() diff --git a/code/ATMOSPHERICS/components/shutoff.dm b/code/ATMOSPHERICS/components/shutoff.dm index 87d2698841..d7d8076214 100644 --- a/code/ATMOSPHERICS/components/shutoff.dm +++ b/code/ATMOSPHERICS/components/shutoff.dm @@ -15,8 +15,8 @@ GLOBAL_LIST_EMPTY(shutoff_valves) icon_state = "vclamp[open]" /obj/machinery/atmospherics/valve/shutoff/examine(var/mob/user) - ..() - to_chat(user, "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"].") + . = ..() + . += "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"]." /obj/machinery/atmospherics/valve/shutoff/Initialize() . = ..() diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index f665ba987a..b4c1e30fba 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -178,6 +178,6 @@ ..() /obj/machinery/atmospherics/unary/freezer/examine(mob/user) - ..(user) + . = ..() if(panel_open) - to_chat(user, "The maintenance hatch is open.") + . += "The maintenance hatch is open." diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 7fbe881891..3537082ada 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -165,6 +165,6 @@ ..() /obj/machinery/atmospherics/unary/heater/examine(mob/user) - ..(user) + ..() if(panel_open) - to_chat(user, "The maintenance hatch is open.") + . += "The maintenance hatch is open." diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 68dcf22834..e687eac639 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -414,12 +414,13 @@ ..() /obj/machinery/atmospherics/unary/vent_pump/examine(mob/user) - if(..(user, 1)) - to_chat(user, "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W") + . = ..() + if(Adjacent(user)) + . += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" else - to_chat(user, "You are too far away to read the gauge.") + . += "You are too far away to read the gauge." if(welded) - to_chat(user, "It seems welded shut.") + . += "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 1c1c696b98..2c51eecfc6 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -287,7 +287,8 @@ deconstruct() /obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user) - if(..(user, 1)) - to_chat(user, "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W") + . = ..() + if(Adjacent(user)) + . += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" else - to_chat(user, "You are too far away to read the gauge.") + . += "You are too far away to read the gauge." diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm index dd68782bc5..3ded7b7388 100644 --- a/code/ATMOSPHERICS/components/valve.dm +++ b/code/ATMOSPHERICS/components/valve.dm @@ -307,5 +307,5 @@ deconstruct() /obj/machinery/atmospherics/valve/examine(mob/user) - ..() - to_chat(user, "It is [open ? "open" : "closed"].") + . = ..() + . += "It is [open ? "open" : "closed"]." diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3c479b8df0..5f8ccb3391 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -169,7 +169,7 @@ return found //All atoms -/atom/proc/examine(mob/user, var/distance = -1, var/infix = "", var/suffix = "") +/atom/proc/examine(mob/user, 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)) @@ -182,16 +182,15 @@ else f_name += "oil-stained [name][infix]." - to_chat(user, "[bicon(src)] That's [f_name] [suffix]") - to_chat(user,desc) + var/list/output = list("[bicon(src)] That's [f_name] [suffix]", desc) if(user.client?.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE) - to_chat(user, description_info) + output += description_info if(user.client?.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL) user.client.statpanel = "Examine" // Switch to stat panel - return distance == -1 || (get_dist(src, user) <= distance) + return output // called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set. // see code/modules/mob/mob_movement.dm for more. diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 1cf204b015..c324a6f092 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -84,9 +84,9 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," ..() examine(mob/user) - ..() + . = ..() if(iscultist(user)) - to_chat(user, "This spell circle reads: [word1] [word2] [word3].") + . += "This spell circle reads: [word1] [word2] [word3]." attackby(I as obj, user as mob) @@ -422,10 +422,11 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," return examine(mob/user) + . = ..() if(!iscultist(user)) - to_chat(user, "An old, dusty tome with frayed edges and a sinister looking cover.") + . += "An old, dusty tome with frayed edges and a sinister looking cover." else - to_chat(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.") + . += "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/book/tome/cultify() return diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index b2bd6b80e4..5447431279 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -51,10 +51,10 @@ icon_state = "pinonfar" /obj/item/weapon/pinpointer/examine(mob/user) - ..(user) + . = ..() for(var/obj/machinery/nuclearbomb/bomb in machines) if(bomb.timing) - to_chat(user, "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]") + . += "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]" diff --git a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm index 3e3e055ad9..82138988b5 100644 --- a/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm +++ b/code/game/gamemodes/technomancer/devices/disposable_teleporter.dm @@ -23,8 +23,8 @@ uses = 1 /obj/item/weapon/disposable_teleporter/examine(mob/user) - ..() - to_chat(user, "[uses] uses remaining.") + . = ..() + . += "[uses] uses remaining." /obj/item/weapon/disposable_teleporter/attack_self(mob/user as mob) if(!uses) diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm index c8991f79e8..d954a80b29 100644 --- a/code/game/machinery/CableLayer.dm +++ b/code/game/machinery/CableLayer.dm @@ -49,8 +49,8 @@ to_chat(usr, "There's no more cable on the reel.") /obj/machinery/cablelayer/examine(mob/user) - ..() - to_chat(user, "\The [src]'s cable reel has [cable.amount] length\s left.") + . = ..() + . += "[src]'s cable reel has [cable.amount] length\s left." /obj/machinery/cablelayer/proc/load_cable(var/obj/item/stack/cable_coil/CC) if(istype(CC) && CC.amount) diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm index 3e2cf0deb4..2d5d0a8747 100644 --- a/code/game/machinery/atmoalter/meter.dm +++ b/code/game/machinery/atmoalter/meter.dm @@ -77,24 +77,22 @@ radio_connection.post_signal(src, signal) /obj/machinery/meter/examine(mob/user) - var/t = "A gas flow meter. " + . = ..() if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead))) - t += "You are too far away to read it." + . += "You are too far away to read it." else if(stat & (NOPOWER|BROKEN)) - t += "The display is off." + . += "The display is off." - else if(src.target) + else if(target) var/datum/gas_mixture/environment = target.return_air() if(environment) - t += "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)]K ([round(environment.temperature-T0C,0.01)]°C)" + . += "The pressure gauge reads [round(environment.return_pressure(), 0.01)] kPa; [round(environment.temperature,0.01)]K ([round(environment.temperature-T0C,0.01)]°C)" else - t += "The sensor error light is blinking." + . += "The sensor error light is blinking." else - t += "The connect error light is blinking." - - to_chat(user,t) + . += "The connect error light is blinking." /obj/machinery/meter/Click() diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index 453e528bef..d40a89c202 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -89,9 +89,9 @@ . = ..() var/biomass = get_biomass_volume() if(biomass) - to_chat(user, "It is loaded with [biomass] units of biomass.") + . += "It is loaded with [biomass] units of biomass." else - to_chat(user, "It is not loaded with any biomass.") + . += "It is not loaded with any biomass." /obj/machinery/organ_printer/RefreshParts() // Print Delay updating diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index 636bcca6c0..917fed33eb 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -39,12 +39,11 @@ overlays.Cut() /obj/machinery/cell_charger/examine(mob/user) - if(!..(user, 5)) - return - - to_chat(user, "[charging ? "[charging]" : "Nothing"] is in [src].") - if(charging) - to_chat(user, "Current charge: [charging.charge] / [charging.maxcharge]") + . = ..() + if(get_dist(user, src) <= 5) + . += "[charging ? "[charging]" : "Nothing"] is in [src]." + if(charging) + . += "Current charge: [charging.charge] / [charging.maxcharge]" /obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user) if(stat & BROKEN) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index f7c5f5bd43..ebd740e5e5 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -534,9 +534,8 @@ to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].") /obj/item/weapon/disk/data/examine(mob/user) - ..(user) - to_chat(user, text("The write-protect tab is set to [read_only ? "protected" : "unprotected"].")) - return + . = ..() + . += "The write-protect tab is set to [read_only ? "protected" : "unprotected"]." /* * Diskette Box diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index daaf23d369..c5542777a2 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1020,13 +1020,12 @@ var/active = 0 //if the ship is on /obj/item/weapon/orion_ship/examine(mob/user) - ..() - if(!(in_range(user, src))) - return - if(!active) - to_chat(user, span("notice", "There's a little switch on the bottom. It's flipped down.")) - else - to_chat(user, span("notice", "There's a little switch on the bottom. It's flipped up.")) + . = ..() + if(in_range(user, src)) + if(!active) + . += span("notice", "There's a little switch on the bottom. It's flipped down.") + else + . += span("notice", "There's a little switch on the bottom. It's flipped up.") /obj/item/weapon/orion_ship/attack_self(mob/user) if(active) diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index b0f20b7a54..eb634c249f 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -19,11 +19,11 @@ return temp_access /obj/item/weapon/card/id/guest/examine(mob/user) - ..(user) + . = ..() if (world.time < expiration_time) - to_chat(user, "This pass expires at [worldtime2stationtime(expiration_time)].") + . += "This pass expires at [worldtime2stationtime(expiration_time)]." else - to_chat(user, "It expired at [worldtime2stationtime(expiration_time)].") + . += "It expired at [worldtime2stationtime(expiration_time)]." /obj/item/weapon/card/id/guest/read() if(!Adjacent(usr)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 49a1b6fc26..aad5a97470 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -332,13 +332,13 @@ /obj/machinery/door/examine(mob/user) . = ..() if(src.health <= 0) - to_chat(user, "\The [src] is broken!") + . += "It is broken!" else if(src.health < src.maxhealth / 4) - to_chat(user, "\The [src] looks like it's about to break!") + . += "It looks like it's about to break!" else if(src.health < src.maxhealth / 2) - to_chat(user, "\The [src] looks seriously damaged!") + . += "It looks seriously damaged!" else if(src.health < src.maxhealth * 3/4) - to_chat(user, "\The [src] shows signs of damage!") + . += "It shows signs of damage!" /obj/machinery/door/proc/set_broken() diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index 361cbfdffe..29125c8500 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -79,14 +79,15 @@ return get_material_by_name(DEFAULT_WALL_MATERIAL) /obj/machinery/door/firedoor/examine(mob/user) - . = ..(user, 1) - if(!. || !density) - return + . = ..() + + if(!Adjacent(user)) + return . if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF) - to_chat(user, "WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!") + . += "WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!" - to_chat(user, "Sensor readings:") + . += "Sensor readings:" for(var/index = 1; index <= tile_info.len; index++) var/o = "  " switch(index) @@ -100,7 +101,7 @@ o += "WEST: " if(tile_info[index] == null) o += "DATA UNAVAILABLE" - to_chat(user, o) + . += o continue var/celsius = convert_k2c(tile_info[index][1]) var/pressure = tile_info[index][2] @@ -108,14 +109,14 @@ o += "[celsius]°C " o += "" o += "[pressure]kPa" - to_chat(user, o) + . += o if(islist(users_to_open) && users_to_open.len) var/users_to_open_string = users_to_open[1] if(users_to_open.len >= 2) for(var/i = 2 to users_to_open.len) users_to_open_string += ", [users_to_open[i]]" - to_chat(user, "These people have opened \the [src] during an alert: [users_to_open_string].") + . += "These people have opened \the [src] during an alert: [users_to_open_string]." /obj/machinery/door/firedoor/Bumped(atom/AM) if(p_open || operating) diff --git a/code/game/machinery/floorlayer.dm b/code/game/machinery/floorlayer.dm index 2b25b445c9..d8a2b463e2 100644 --- a/code/game/machinery/floorlayer.dm +++ b/code/game/machinery/floorlayer.dm @@ -64,12 +64,11 @@ ..() /obj/machinery/floorlayer/examine(mob/user) - ..() + . = ..() var/dismantle = mode["dismantle"] var/laying = mode["laying"] var/collect = mode["collect"] - var/message = "\The [src] [!T ? "don't " : ""]has [!T ? "" : "[T.get_amount()] [T] "]tile\s, dismantle is [dismantle ? "on" : "off"], laying is [laying ? "on" : "off"], collect is [collect ? "on" : "off"]." - to_chat(user,message) + . += "[src] [!T ? "don't " : ""]has [!T ? "" : "[T.get_amount()] [T] "]tile\s, dismantle is [dismantle ? "on" : "off"], laying is [laying ? "on" : "off"], collect is [collect ? "on" : "off"]." /obj/machinery/floorlayer/proc/reset() on=0 diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm index 3fd6f961cb..85bb2dfa9d 100644 --- a/code/game/machinery/frame.dm +++ b/code/game/machinery/frame.dm @@ -213,9 +213,9 @@ density = TRUE /obj/structure/frame/examine(mob/user) - ..() + . = ..() if(circuit) - to_chat(user, "It has \a [circuit] installed.") + . += "It has \a [circuit] installed." /obj/structure/frame/proc/update_desc() var/D diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index cc5b330ba3..a4654a31a4 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -165,21 +165,20 @@ to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].") /obj/machinery/iv_drip/examine(mob/user) - ..(user) - if(!(user in view(2)) && user != src.loc) - return + . = ..() - to_chat(user, "The IV drip is [mode ? "injecting" : "taking blood"].") + if(get_dist(user, src) <= 2) + . += "The IV drip is [mode ? "injecting" : "taking blood"]." - if(beaker) - if(beaker.reagents && beaker.reagents.reagent_list.len) - to_chat(user, "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.") + if(beaker) + if(beaker.reagents?.reagent_list?.len) + . += "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid." + else + . += "Attached is an empty [beaker]." else - to_chat(user, "Attached is an empty [beaker].") - else - to_chat(user, "No chemicals are attached.") + . += "No chemicals are attached." - to_chat(user, "[attached ? attached : "No one"] is attached.") + . += "[attached ? attached : "No one"] is attached." /obj/machinery/iv_drip/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSTABLE)) //allow bullets, beams, thrown objects, mice, drones, and the like through. diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index afa853c41a..81efc0f42b 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -50,8 +50,9 @@ set_light(2, 0.1, on ? "#82FF4C" : "#F86060") /obj/machinery/light_switch/examine(mob/user) - if(..(user, 1)) - to_chat(user, "A light switch. It is [on? "on" : "off"].") + . = ..() + if(Adjacent(user)) + . += "A light switch. It is [on? "on" : "off"]." /obj/machinery/light_switch/attack_hand(mob/user) diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index 10c96a6b6a..b40314d2c2 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -148,9 +148,9 @@ /obj/machinery/oxygen_pump/examine(var/mob/user) . = ..() if(tank) - to_chat(user, "The meter shows [round(tank.air_contents.return_pressure())] kPa.") + . += "The meter shows [round(tank.air_contents.return_pressure())] kPa." else - to_chat(user, "It is missing a tank!") + . += "It is missing a tank!" /obj/machinery/oxygen_pump/process() diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index fa58f6a3fc..8b49989e61 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -115,8 +115,8 @@ ..() /obj/machinery/pipelayer/examine(mob/user) - ..() - to_chat(user, "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated.") + . = ..() + . += "[src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated." /obj/machinery/pipelayer/proc/reset() on = 0 diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 1312c0cc3b..06acd97d0b 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -26,13 +26,13 @@ return /obj/machinery/recharger/examine(mob/user) - if(!..(user, 5)) - return + . = ..() - to_chat(user, "[charging ? "[charging]" : "Nothing"] is in [src].") - if(charging) - var/obj/item/weapon/cell/C = charging.get_cell() - to_chat(user, "Current charge: [C.charge] / [C.maxcharge]") + if(get_dist(user, src) <= 5) + . += "[charging ? "[charging]" : "Nothing"] is in [src]." + if(charging) + var/obj/item/weapon/cell/C = charging.get_cell() + . += "Current charge: [C.charge] / [C.maxcharge]" /obj/machinery/recharger/attackby(obj/item/weapon/G as obj, mob/user as mob) var/allowed = 0 diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 0761c0c7ae..c11c82eda3 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -115,8 +115,8 @@ /obj/machinery/recharge_station/examine(mob/user) - ..(user) - to_chat(user, "The charge meter reads: [round(chargepercentage())]%") + . = ..() + . += "The charge meter reads: [round(chargepercentage())]%" /obj/machinery/recharge_station/proc/chargepercentage() if(!cell) diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index f45872c2d8..77a35d2829 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -29,13 +29,13 @@ set_light(0) /obj/machinery/space_heater/examine(mob/user) - ..(user) + . = ..() - to_chat(user, "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"].") + . += "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]." if(panel_open) - to_chat(user, "The power cell is [cell ? "installed" : "missing"].") + . += "The power cell is [cell ? "installed" : "missing"]." else - to_chat(user, "The charge meter reads [cell ? round(cell.percent(),1) : 0]%") + . += "The charge meter reads [cell ? round(cell.percent(),1) : 0]%" return /obj/machinery/space_heater/powered() diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index 0780b5905a..14b85a7861 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -148,9 +148,9 @@ return 0 /obj/machinery/status_display/examine(mob/user) - . = ..(user) + . = ..() if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT) - to_chat(user, "The display says:
\t[sanitize(message1)]
\t[sanitize(message2)]") + . += "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/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index c031e0941a..56a2169b06 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -38,8 +38,8 @@ return 0 /obj/item/mecha_parts/mecha_equipment/examine(mob/user) - ..() - to_chat(user, "\The [src] will fill [equip_type?"a [equip_type]":"any"] slot.") + . = ..() + . += "[src] will fill [equip_type?"a [equip_type]":"any"] slot." /obj/item/mecha_parts/mecha_equipment/New() ..() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 78b22a13e0..b259c8f763 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -267,25 +267,23 @@ return 0 /obj/mecha/examine(mob/user) - ..(user) + . = ..() var/integrity = health/initial(health)*100 switch(integrity) if(85 to 100) - to_chat(user, "It's fully intact.") + . += "It's fully intact." if(65 to 85) - to_chat(user, "It's slightly damaged.") + . += "It's slightly damaged." if(45 to 65) - to_chat(user, "It's badly damaged.") + . += "It's badly damaged." if(25 to 45) - to_chat(user, "It's heavily damaged.") + . += "It's heavily damaged." else - to_chat(user, "It's falling apart.") - if(equipment && equipment.len) - to_chat(user, "It's equipped with:") + . += "It's falling apart." + if(equipment?.len) + . += "It's equipped with:" for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment) - to_chat(user, "[bicon(ME)] [ME]") - return - + . += "[bicon(ME)] [ME]" /obj/mecha/proc/drop_item()//Derpfix, but may be useful in future for engineering exosuits. return diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index fba219e924..ce0f117e5a 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -159,8 +159,8 @@ var/global/list/image/splatter_cache=list() icon_state = "writing1" /obj/effect/decal/cleanable/blood/writing/examine(mob/user) - ..(user) - to_chat(user, "It reads: \"[message]\"") + . = ..() + . += "It reads: \"[message]\"" /obj/effect/decal/cleanable/blood/gibs name = "gibs" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index f6fb3c94cf..24290fbd54 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -197,7 +197,7 @@ src.loc = T // See inventory_sizes.dm for the defines. -/obj/item/examine(mob/user, var/distance = -1) +/obj/item/examine(mob/user) var/size switch(src.w_class) if(ITEMSIZE_TINY) @@ -210,7 +210,7 @@ size = "bulky" if(ITEMSIZE_HUGE) size = "huge" - return ..(user, distance, "", "It is a [size] item.") + return ..(user, "", "It is a [size] item.") /obj/item/attack_hand(mob/living/user as mob) if (!user) return diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm index c7aa08a440..af9d7ce0f8 100644 --- a/code/game/objects/items/bells.dm +++ b/code/game/objects/items/bells.dm @@ -13,9 +13,9 @@ var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup") /obj/item/weapon/deskbell/examine(mob/user) - ..() + . = ..() if(broken) - to_chat(user,"It looks damaged, the ringer is stuck firmly inside.") + . += "It looks damaged, the ringer is stuck firmly inside." /obj/item/weapon/deskbell/attack(mob/target as mob, mob/living/user as mob) if(!broken) @@ -49,7 +49,7 @@ // Once the player has decided their option, choose the behaviour that will happen under said option. switch(choice) if("examine") - examine(user) + user.examinate(src) if("use") if(check_ability(user)) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 8241cfd85d..e714263ebe 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -219,13 +219,13 @@ syringe.reagents.trans_to_mob(H, 30, CHEM_BLOOD) /obj/structure/closet/body_bag/cryobag/examine(mob/user) - ..() + . = ..() if(Adjacent(user)) //The bag's rather thick and opaque from a distance. - to_chat(user, "You peer into \the [src].") + . += "You peer into \the [src]." if(syringe) - to_chat(user, "It has a syringe added to it.") + . += "It has a syringe added to it." for(var/mob/living/L in contents) - L.examine(user) + . += L.examine(user) /obj/structure/closet/body_bag/cryobag/attackby(obj/item/W, mob/user) if(opened) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 6deb837006..6277d24e20 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -68,8 +68,9 @@ var/global/list/obj/item/device/pda/PDAs = list() var/spam_proof = FALSE // If true, it can't be spammed by random events. /obj/item/device/pda/examine(mob/user) - if(..(user, 1)) - to_chat(user, "The time [stationtime2text()] is displayed in the corner of the screen.") + . = ..() + if(Adjacent(user)) + . += "The time [stationtime2text()] is displayed in the corner of the screen." /obj/item/device/pda/CtrlClick() if(issilicon(usr)) diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index fae2d4586f..392af1b870 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -108,9 +108,9 @@ var/global/list/obj/item/device/communicator/all_communicators = list() // Parameters: user - the user doing the examining // Description: Allows the user to click a link when examining to look at video if one is going. /obj/item/device/communicator/examine(mob/user) - . = ..(user, 1) - if(. && video_source) - to_chat(user, "It looks like it's on a video call: \[view\]") + . = ..() + if(Adjacent(user) && video_source) + . += "It looks like it's on a video call: \[view\]" // Proc: initialize_exonet() // Parameters: 1 (user - the person the communicator belongs to) @@ -131,28 +131,22 @@ var/global/list/obj/item/device/communicator/all_communicators = list() // Parameters: 1 (user - the person examining the device) // Description: Shows all the voice mobs inside the device, and their status. /obj/item/device/communicator/examine(mob/user) - if(!..(user)) - return - - var/msg = "" + . = ..() + for(var/mob/living/voice/voice in contents) - msg += "On the screen, you can see a image feed of [voice].\n" - msg += "" - + . += "On the screen, you can see a image feed of [voice]." + if(voice && voice.key) switch(voice.stat) if(CONSCIOUS) if(!voice.client) - msg += "[voice] appears to be asleep.\n" //afk + . += "[voice] appears to be asleep." //afk if(UNCONSCIOUS) - msg += "[voice] doesn't appear to be conscious.\n" + . += "[voice] doesn't appear to be conscious." if(DEAD) - msg += "[voice] appears to have died...\n" //Hopefully this never has to be used. + . += "[voice] appears to have died..." //Hopefully this never has to be used. else - msg += "The device doesn't appear to be transmitting any data.\n" - msg += "" - to_chat(user, msg) - return + . += "The device doesn't appear to be transmitting any data." // Proc: emp_act() // Parameters: None diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 6930e5f26d..b0be23eb3f 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -86,23 +86,20 @@ set_light(0) /obj/item/device/flashlight/examine(mob/user) - ..() + . = ..() if(power_use && brightness_level) - var/tempdesc - tempdesc += "\The [src] is set to [brightness_level]. " + . += "\The [src] is set to [brightness_level]." if(cell) - tempdesc += "\The [src] has a \the [cell] attached. " + . += "\The [src] has a \the [cell] attached." if(cell.charge <= cell.maxcharge*0.25) - tempdesc += "It appears to have a low amount of power remaining." + . += "It appears to have a low amount of power remaining." else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5) - tempdesc += "It appears to have an average amount of power remaining." + . += "It appears to have an average amount of power remaining." else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75) - tempdesc += "It appears to have an above average amount of power remaining." + . += "It appears to have an above average amount of power remaining." else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge) - tempdesc += "It appears to have a high amount of power remaining." - - to_chat(user, "[tempdesc]") + . += "It appears to have a high amount of power remaining." /obj/item/device/flashlight/attack_self(mob/user) if(power_use) diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index 72e6d2ced7..d84f4bc3ca 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -110,8 +110,8 @@ choose_colour() /obj/item/device/floor_painter/examine(mob/user) - ..(user) - to_chat(user, "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint.") + . = ..() + . += "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint." /obj/item/device/floor_painter/verb/choose_colour() set name = "Choose Colour" diff --git a/code/game/objects/items/devices/geiger.dm b/code/game/objects/items/devices/geiger.dm index c6f7c3f9f1..b9b177e683 100644 --- a/code/game/objects/items/devices/geiger.dm +++ b/code/game/objects/items/devices/geiger.dm @@ -33,9 +33,9 @@ update_sound() /obj/item/device/geiger/examine(mob/user) - ..(user) + . = ..() get_radiation() - to_chat(user, "[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.") + . += "[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq." /obj/item/device/geiger/rad_act(amount) if(!amount || !scanning) diff --git a/code/game/objects/items/devices/holowarrant.dm b/code/game/objects/items/devices/holowarrant.dm index bcf456126e..854282f55a 100644 --- a/code/game/objects/items/devices/holowarrant.dm +++ b/code/game/objects/items/devices/holowarrant.dm @@ -13,11 +13,11 @@ /obj/item/device/holowarrant/examine(mob/user) . = ..() if(active) - to_chat(user, "It's a holographic warrant for '[active.fields["namewarrant"]]'.") + . += "It's a holographic warrant for '[active.fields["namewarrant"]]'." if(in_range(user, src) || istype(user, /mob/observer/dead)) - show_content(user) + show_content(user) //Opens a browse window, not chatbox related else - to_chat(user, "You have to go closer if you want to read it.") + . += "You have to go closer if you want to read it." //hit yourself with it /obj/item/device/holowarrant/attack_self(mob/living/user as mob) diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index f85e424604..3ce7a0b236 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -64,8 +64,9 @@ ..() /obj/item/device/lightreplacer/examine(mob/user) - if(..(user, 2)) - to_chat(user, "It has [uses] lights remaining.") + . = ..() + if(get_dist(user, src) <= 2) + . += "It has [uses] lights remaining." /obj/item/device/lightreplacer/attackby(obj/item/W, mob/user) if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass") diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm index 816c9790ff..3d41d9fcab 100644 --- a/code/game/objects/items/devices/locker_painter.dm +++ b/code/game/objects/items/devices/locker_painter.dm @@ -125,8 +125,8 @@ choose_colour_secure() /obj/item/device/closet_painter/examine(mob/user) - ..(user) - to_chat(user, "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme.") + . = ..() + . += "It is configured to produce the '[colour]' paint scheme or the '[colour_secure]' secure closet paint scheme." /obj/item/device/closet_painter/verb/choose_colour() set name = "Choose Colour" diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm index 1ceaa3e9d1..6847bb6fb0 100644 --- a/code/game/objects/items/devices/modkit.dm +++ b/code/game/objects/items/devices/modkit.dm @@ -63,8 +63,8 @@ qdel(src) /obj/item/device/modkit/examine(mob/user) - ..(user) - to_chat(user, "It looks as though it modifies hardsuits to fit [target_species] users.") + . = ..() + . += "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 8a32988fb6..59e386b608 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -27,5 +27,5 @@ mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes /obj/item/device/pipe_painter/examine(mob/user) - ..(user) - to_chat(user, "It is in [mode] mode.") + . = ..() + . += "It is in [mode] mode." diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 580a59616d..47de7ff7dd 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -37,11 +37,11 @@ return list_secure_channels() /obj/item/device/radio/headset/examine(mob/user) - if(!(..(user, 1) && radio_desc)) - return + . = ..() - to_chat(user, "The following channels are available:") - to_chat(user, radio_desc) + if(radio_desc && Adjacent(user)) + . += "The following channels are available:" + . += radio_desc /obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, list/message_pieces, channel) if(channel == "special") diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index b3840d313f..572a4f896b 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -581,12 +581,18 @@ var/global/list/default_medbay_channels = list( /obj/item/device/radio/examine(mob/user) . = ..() +<<<<<<< HEAD if ((in_range(src, user) || loc == user)) if (b_stat) user.show_message("\The [src] can be attached and modified!") +======= + + if((in_range(src, user) || loc == user)) + if(b_stat) + . += "\The [src] can be attached and modified!" +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) else - user.show_message("\The [src] can not be modified or attached!") - return + . += "\The [src] can not be modified or attached!" /obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 5d8587272d..03d0bdd60c 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -84,9 +84,9 @@ camtype = /obj/machinery/camera/bug/spy /obj/item/device/camerabug/examine(mob/user) - . = ..(user, 0) - if(.) - to_chat(user, "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional.") + . = ..() + if(get_dist(user, src) == 0) + . += "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional." /obj/item/device/camerabug/attackby(obj/item/W as obj, mob/living/user as mob) if(istype(W, /obj/item/device/bug_monitor)) @@ -215,9 +215,9 @@ origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) /obj/item/device/bug_monitor/spy/examine(mob/user) - . = ..(user, 1) - if(.) - to_chat(user, "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made.") + . = ..() + if(Adjacent(user)) + . += "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made." /obj/machinery/camera/bug/check_eye(var/mob/user as mob) return 0 diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index e11cce4762..8c8a208db8 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -173,24 +173,25 @@ icon_state = "suitcooler0" /obj/item/device/suit_cooling_unit/examine(mob/user) - if(!..(user, 1)) - return + . = ..() - if (on) - if (attached_to_suit(src.loc)) - to_chat(user, "It's switched on and running.") + if(Adjacent(user)) + + if (on) + if (attached_to_suit(src.loc)) + . += "It's switched on and running." + else + . += "It's switched on, but not attached to anything." else - to_chat(user, "It's switched on, but not attached to anything.") - else - to_chat(user, "It is switched off.") + . += "It is switched off." - if (cover_open) - if(cell) - to_chat(user, "The panel is open, exposing the [cell].") + if (cover_open) + if(cell) + . += "The panel is open, exposing the [cell]." + else + . += "The panel is open." + + if (cell) + . += "The charge meter reads [round(cell.percent())]%." else - to_chat(user, "The panel is open.") - - if (cell) - to_chat(user, "The charge meter reads [round(cell.percent())]%.") - else - to_chat(user, "It doesn't have a power cell installed.") + . += "It doesn't have a power cell installed." diff --git a/code/game/objects/items/devices/tvcamera.dm b/code/game/objects/items/devices/tvcamera.dm index 67bafbc1bd..e8b6df0b98 100644 --- a/code/game/objects/items/devices/tvcamera.dm +++ b/code/game/objects/items/devices/tvcamera.dm @@ -22,9 +22,9 @@ ..() /obj/item/device/tvcamera/examine() - ..() - to_chat(usr, "Video feed is [camera.status ? "on" : "off"]") - to_chat(usr, "Audio feed is [radio.broadcasting ? "on" : "off"]") + . = ..() + . += "Video feed is [camera.status ? "on" : "off"]" + . += "Audio feed is [radio.broadcasting ? "on" : "off"]" /obj/item/device/tvcamera/Initialize() . = ..() diff --git a/code/game/objects/items/paintkit.dm b/code/game/objects/items/paintkit.dm index 4b3bd408d2..a0bebc699f 100644 --- a/code/game/objects/items/paintkit.dm +++ b/code/game/objects/items/paintkit.dm @@ -11,8 +11,8 @@ var/list/allowed_types = list() /obj/item/device/kit/examine() - ..() - to_chat(usr, "It has [uses] use\s left.") + . = ..() + . += "It has [uses] use\s left." /obj/item/device/kit/proc/use(var/amt, var/mob/user) uses -= amt @@ -216,11 +216,11 @@ /obj/item/device/kit/paint/examine() - ..() - to_chat(usr, "This kit will convert an exosuit into: [new_name].") - to_chat(usr, "This kit can be used on the following exosuit models:") + . = ..() + . += "This kit will convert an exosuit into: [new_name]." + . += "This kit can be used on the following exosuit models:" for(var/exotype in allowed_types) - to_chat(usr, "- [capitalize(exotype)]") + . += "- [capitalize(exotype)]" /obj/item/device/kit/paint/customize(var/obj/mecha/M, var/mob/user) if(!can_customize(M)) diff --git a/code/game/objects/items/robobag.dm b/code/game/objects/items/robobag.dm index f367f6a145..33c3ba89ed 100644 --- a/code/game/objects/items/robobag.dm +++ b/code/game/objects/items/robobag.dm @@ -27,9 +27,9 @@ var/obj/item/clothing/accessory/badge/corptag // The tag on the bag. /obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user) - ..() - if(Adjacent(user) && corptag) - to_chat(user, "\The [src] has a [corptag] attached to it.") + . = ..() + if(corptag && Adjacent(user)) + . += "[src] has a [corptag] attached to it." /obj/structure/closet/body_bag/cryobag/robobag/update_icon() overlays.Cut() diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm index 93462c640e..88eb8e6271 100644 --- a/code/game/objects/items/stacks/marker_beacons.dm +++ b/code/game/objects/items/stacks/marker_beacons.dm @@ -42,9 +42,9 @@ var/list/marker_beacon_colors = list( update_icon() /obj/item/stack/marker_beacon/examine(mob/user) - ..() - to_chat(user, "Use in-hand to place a [singular_name].") - to_chat(user, "Alt-click to select a color. Current color is [picked_color].") + . = ..() + . += "Use in-hand to place a [singular_name]." + . += "Alt-click to select a color. Current color is [picked_color]." /obj/item/stack/marker_beacon/update_icon() icon_state = "[initial(icon_state)][lowertext(picked_color)]" @@ -93,8 +93,8 @@ var/list/marker_beacon_colors = list( update_icon() /obj/structure/marker_beacon/examine(mob/user) - ..() - to_chat(user, "Alt-click to select a color. Current color is [picked_color].") + . = ..() + . += "Alt-click to select a color. Current color is [picked_color]." /obj/structure/marker_beacon/update_icon() while(!picked_color || !marker_beacon_colors[picked_color]) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 324ade23ce..2a25635315 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -58,11 +58,13 @@ item_state = initial(icon_state) /obj/item/stack/examine(mob/user) - if(..(user, 1)) + . = ..() + + if(Adjacent(user)) if(!uses_charge) - to_chat(user, "There are [src.amount] [src.singular_name]\s in the stack.") + . += "There are [src.amount] [src.singular_name]\s in the stack." else - to_chat(user, "There is enough charge for [get_amount()].") + . += "There is enough charge for [get_amount()]." /obj/item/stack/attack_self(mob/user as mob) list_recipes(user) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 6561466340..7e89f96807 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -154,8 +154,9 @@ drop_sound = 'sound/items/drop/gun.ogg' examine(mob/user) - if(..(user, 2) && bullets) - to_chat(user, "It is loaded with [bullets] foam darts!") + . = ..() + if(bullets && get_dist(user, src) <= 2) + . += "It is loaded with [bullets] foam darts!" attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/toy/ammo/crossbow)) @@ -315,8 +316,8 @@ update_icon() /obj/item/toy/sword/examine(mob/user) - ..() - to_chat(user, "Alt-click to recolor it.") + . = ..() + . += "Alt-click to recolor it." /obj/item/toy/sword/attackby(obj/item/weapon/W, mob/user) if(istype(W, /obj/item/device/multitool) && !active) @@ -824,11 +825,11 @@ var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself. /obj/structure/plushie/examine(mob/user) - ..() + . = ..() if(opened) - to_chat(user, "You notice an incision has been made on [src].") + . += "You notice an incision has been made on [src]." if(in_range(user, src) && stored_item) - to_chat(user, "You can see something in there...") + . += "You can see something in there..." /obj/structure/plushie/attack_hand(mob/user) user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) @@ -923,11 +924,11 @@ /obj/item/toy/plushie/examine(mob/user) - ..() + . = ..() if(opened) - to_chat(user, "You notice an incision has been made on [src].") + . += "You notice an incision has been made on [src]." if(in_range(user, src) && stored_item) - to_chat(user, "You can see something in there...") + . += "You can see something in there..." /obj/item/toy/plushie/attack_self(mob/user as mob) if(stored_item && opened && !searching) diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 4f45423f6e..5a0deea83a 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -41,8 +41,8 @@ return ..() /obj/item/weapon/rcd/examine(mob/user) - ..() - to_chat(user, display_resources()) + . = ..() + . += display_resources() // Used to show how much stuff (matter units, cell charge, etc) is left inside. /obj/item/weapon/rcd/proc/display_resources() diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 7af320d69f..09ac6e4690 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -33,8 +33,9 @@ RSF w_class = ITEMSIZE_NORMAL /obj/item/weapon/rsf/examine(mob/user) - if(..(user, 0)) - to_chat(user,"It currently holds [stored_matter]/30 fabrication-units.") + . = ..() + if(get_dist(user, src) == 0) + . += "It currently holds [stored_matter]/30 fabrication-units." /obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index f3df3c914b..ffa3753233 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -149,22 +149,21 @@ CIGARETTE PACKETS ARE IN FANCY.DM ..() /obj/item/clothing/mask/smokable/examine(mob/user) - ..() - if(is_pipe) - return - var/smoke_percent = round((smoketime / max_smoketime) * 100) - switch(smoke_percent) - if(90 to INFINITY) - to_chat(user, "[src] is still fresh.") - if(60 to 90) - to_chat(user, "[src] has a good amount of burn time remaining.") - if(30 to 60) - to_chat(user, "[src] is about half finished.") - if(10 to 30) - to_chat(user, "[src] is starting to burn low.") - else - to_chat(user, "[src] is nearly burnt out!") - + . = ..() + + if(!is_pipe) + var/smoke_percent = round((smoketime / max_smoketime) * 100) + switch(smoke_percent) + if(90 to INFINITY) + . += "[src] is still fresh." + if(60 to 90) + . += "[src] has a good amount of burn time remaining." + if(30 to 60) + . += "[src] is about half finished." + if(10 to 30) + . += "[src] is starting to burn low." + else + . += "[src] is nearly burnt out!" /obj/item/clothing/mask/smokable/proc/light(var/flavor_text = "[usr] lights the [name].") if(!src.lit) diff --git a/code/game/objects/items/weapons/ecigs.dm b/code/game/objects/items/weapons/ecigs.dm new file mode 100644 index 0000000000..29ae810f9f --- /dev/null +++ b/code/game/objects/items/weapons/ecigs.dm @@ -0,0 +1,227 @@ +/obj/item/clothing/mask/smokable/ecig + name = "electronic cigarette" + desc = "Device with modern approach to smoking." + icon = 'icons/obj/ecig.dmi' + var/active = 0 + //var/obj/item/weapon/cell/ec_cell = /obj/item/weapon/cell/device + var/cartridge_type = /obj/item/weapon/reagent_containers/ecig_cartridge/med_nicotine + var/obj/item/weapon/reagent_containers/ecig_cartridge/ec_cartridge + w_class = ITEMSIZE_TINY + slot_flags = SLOT_EARS | SLOT_MASK + attack_verb = list("attacked", "poked", "battered") + body_parts_covered = 0 + var/brightness_on = 1 + chem_volume = 0 //ecig has no storage on its own but has reagent container created by parent obj + item_state = "ecigoff" + var/icon_off + var/icon_empty + var/ecig_colors = list(null, COLOR_DARK_GRAY, COLOR_RED_GRAY, COLOR_BLUE_GRAY, COLOR_GREEN_GRAY, COLOR_PURPLE_GRAY) + +/obj/item/clothing/mask/smokable/ecig/New() + ..() + ec_cartridge = new cartridge_type(src) + +/obj/item/clothing/mask/smokable/ecig/simple + name = "simple electronic cigarette" + desc = "A cheap Lucky 1337 electronic cigarette, styled like a traditional cigarette." + icon_state = "ccigoff" + icon_off = "ccigoff" + icon_empty = "ccigoff" + icon_on = "ccigon" + +/obj/item/clothing/mask/smokable/ecig/util + name = "electronic cigarette" + desc = "A popular utilitarian model electronic cigarette, the ONI-55. Comes in a variety of colors." + icon_state = "ecigoff1" + icon_off = "ecigoff1" + icon_empty = "ecigoff1" + icon_on = "ecigon" +/obj/item/clothing/mask/smokable/ecig/util/New() + ..() + color = pick(ecig_colors) + +/obj/item/clothing/mask/smokable/ecig/deluxe + name = "deluxe electronic cigarette" + desc = "A premium model eGavana MK3 electronic cigarette, shaped like a cigar." + icon_state = "pcigoff1" + icon_off = "pcigoff1" + icon_empty = "pcigoff2" + icon_on = "pcigon" + +/obj/item/clothing/mask/smokable/ecig/process() + if(ishuman(loc)) + var/mob/living/carbon/human/C = loc + if (src == C.wear_mask && C.check_has_mouth()) // if it's in the human/monkey mouth, transfer reagents to the mob + if (!active || !ec_cartridge || !ec_cartridge.reagents.total_volume)//no cartridge + active=0//autodisable the cigarette + STOP_PROCESSING(SSobj, src) + update_icon() + return + ec_cartridge.reagents.trans_to_mob(C, REM, CHEM_INGEST, 0.4) // Most of it is not inhaled... balance reasons. + +/obj/item/clothing/mask/smokable/ecig/update_icon() + if (active) + item_state = icon_on + icon_state = icon_on + set_light(brightness_on) + else if (ec_cartridge) + set_light(0) + item_state = icon_off + icon_state = icon_off + else + icon_state = icon_empty + item_state = icon_empty + set_light(0) + if(ismob(loc)) + var/mob/living/M = loc + M.update_inv_wear_mask(0) + M.update_inv_l_hand(0) + M.update_inv_r_hand(1) + + +/obj/item/clothing/mask/smokable/ecig/attackby(var/obj/item/I, var/mob/user as mob) + if(istype(I, /obj/item/weapon/reagent_containers/ecig_cartridge)) + if (ec_cartridge)//can't add second one + to_chat(user, "A cartridge has already been installed. ") + else//fits in new one + user.remove_from_mob(I) + I.forceMove(src)//I.loc=src + ec_cartridge = I + update_icon() + to_chat(user, "You insert [I] into [src]. ") + +/obj/item/clothing/mask/smokable/ecig/attack_self(mob/user as mob) + if (active) + active=0 + STOP_PROCESSING(SSobj, src) + to_chat(user, "You turn off \the [src]. ") + update_icon() + else + if (!ec_cartridge) + to_chat(user, "You can't use it with no cartridge installed!. ") + return + active=1 + START_PROCESSING(SSobj, src) + to_chat(user, "You turn on \the [src]. ") + update_icon() + +/obj/item/clothing/mask/smokable/ecig/attack_hand(mob/user as mob)//eject cartridge + if(user.get_inactive_hand() == src)//if being hold + if (ec_cartridge) + active=0 + user.put_in_hands(ec_cartridge) + to_chat(user, "You eject [ec_cartridge] from \the [src]. ") + ec_cartridge = null + update_icon() + else + ..() + +/obj/item/weapon/reagent_containers/ecig_cartridge + name = "tobacco flavour cartridge" + desc = "A small metal cartridge, used with electronic cigarettes, which contains an atomizing coil and a solution to be atomized." + w_class = ITEMSIZE_TINY + icon = 'icons/obj/ecig.dmi' + icon_state = "ecartridge" + matter = list("metal" = 50, "glass" = 10) + volume = 20 + flags = OPENCONTAINER + +/obj/item/weapon/reagent_containers/ecig_cartridge/New() + create_reagents(volume) + +/obj/item/weapon/reagent_containers/ecig_cartridge/examine(mob/user as mob)//to see how much left + . = ..() + . += "The cartridge has [reagents.total_volume] units of liquid remaining." + +//flavours +/obj/item/weapon/reagent_containers/ecig_cartridge/blank + name = "ecigarette cartridge" + desc = "A small metal cartridge which contains an atomizing coil." + +/obj/item/weapon/reagent_containers/ecig_cartridge/blanknico + name = "flavorless nicotine cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says you can add whatever flavoring agents you want." +/obj/item/weapon/reagent_containers/ecig_cartridge/blanknico/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + +/obj/item/weapon/reagent_containers/ecig_cartridge/med_nicotine + name = "tobacco flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/med_nicotine/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 15) + +/obj/item/weapon/reagent_containers/ecig_cartridge/high_nicotine + name = "high nicotine tobacco flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its tobacco flavored, with extra nicotine." +/obj/item/weapon/reagent_containers/ecig_cartridge/high_nicotine/New() + ..() + reagents.add_reagent("nicotine", 10) + reagents.add_reagent("water", 10) + +/obj/item/weapon/reagent_containers/ecig_cartridge/orange + name = "orange flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its orange flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/orange/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("orangejuice", 5) + +/obj/item/weapon/reagent_containers/ecig_cartridge/mint + name = "mint flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its mint flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/mint/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("menthol", 5) + +/obj/item/weapon/reagent_containers/ecig_cartridge/watermelon + name = "watermelon flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its watermelon flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/watermelon/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("watermelonjuice", 5) + +/obj/item/weapon/reagent_containers/ecig_cartridge/grape + name = "grape flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its grape flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/grape/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("grapejuice", 5) + +/obj/item/weapon/reagent_containers/ecig_cartridge/lemonlime + name = "lemon-lime flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its lemon-lime flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/lemonlime/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("lemon_lime", 5) + +/obj/item/weapon/reagent_containers/ecig_cartridge/coffee + name = "coffee flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label says its coffee flavored." +/obj/item/weapon/reagent_containers/ecig_cartridge/coffee/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("coffee", 5) +/* +/obj/item/weapon/reagent_containers/ecig_cartridge/cannabis + name = "herb flavour cartridge" + desc = "A small metal cartridge which contains an atomizing coil and a solution to be atomized. The label seems to be suspiciously scuffed off..." +/obj/item/weapon/reagent_containers/ecig_cartridge/cannabis/New() + ..() + reagents.add_reagent("nicotine", 5) + reagents.add_reagent("water", 10) + reagents.add_reagent("cannabis", 5) +*/ diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 6711269591..eaa3bb571c 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -40,8 +40,14 @@ . = ..() /obj/item/weapon/extinguisher/examine(mob/user) +<<<<<<< HEAD if(..(user, 0)) to_chat(user, "[bicon(src)] [src.name] contains [src.reagents.total_volume] units of foam left!") //VOREStation Edit +======= + . = ..() + if(get_dist(user, src) == 0) + . += "[src] has [src.reagents.total_volume] units of water left!" +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) /obj/item/weapon/extinguisher/attack_self(mob/user as mob) safety = !safety diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 27c917df28..94ca8b7cd2 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -164,8 +164,9 @@ /obj/item/weapon/wrapping_paper/examine(mob/user) - if(..(user, 1)) - to_chat(user, "There is about [src.amount] square units of paper left!") + . = ..() + if(Adjacent(user)) + . += "There is about [src.amount] square units of paper left!" /obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob) if (!istype(target, /mob/living/carbon/human)) return diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 41fa67f1d5..157c64f09f 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -118,9 +118,9 @@ to_chat(user, "\The [W] is empty.") /obj/item/weapon/grenade/chem_grenade/examine(mob/user) - ..(user) + . = ..() if(detonator) - to_chat(user, "With attached [detonator.name]") + . += "It has [detonator.name] attached to it." /obj/item/weapon/grenade/chem_grenade/activate(mob/user as mob) if(active) return diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index ac24d42255..fdab7aaf39 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -45,13 +45,12 @@ /obj/item/weapon/grenade/examine(mob/user) - if(..(user, 0)) + . = ..() + if(get_dist(user, src) == 0) if(det_time > 1) - to_chat(user, "The timer is set to [det_time/10] seconds.") - return - if(det_time == null) - return - to_chat(user, "\The [src] is set for instant detonation.") + . += "The timer is set to [det_time/10] seconds." + else if(det_time == null) + . += "\The [src] is set for instant detonation." /obj/item/weapon/grenade/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/id cards/station_ids.dm b/code/game/objects/items/weapons/id cards/station_ids.dm index c43217919a..5b1f6752ae 100644 --- a/code/game/objects/items/weapons/id cards/station_ids.dm +++ b/code/game/objects/items/weapons/id cards/station_ids.dm @@ -32,12 +32,11 @@ var/survey_points = 0 // For redeeming at explorer equipment vendors. /obj/item/weapon/card/id/examine(mob/user) - set src in oview(1) - if(in_range(usr, src)) - show(usr) - to_chat(usr,desc) + . = ..() + if(in_range(user, src)) + show(user) //Not chat related else - to_chat(usr, "It is too far away.") + . += "It is too far away to read." /obj/item/weapon/card/id/proc/prevent_tracking() return 0 diff --git a/code/game/objects/items/weapons/implants/implantcircuits.dm b/code/game/objects/items/weapons/implants/implantcircuits.dm index 7c9391c631..ffe6547fcb 100644 --- a/code/game/objects/items/weapons/implants/implantcircuits.dm +++ b/code/game/objects/items/weapons/implants/implantcircuits.dm @@ -36,7 +36,7 @@ IC.emp_act(severity) /obj/item/weapon/implant/integrated_circuit/examine(mob/user) - IC.examine(user) + return IC.examine(user) /obj/item/weapon/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user) if(O.is_crowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/weapon/cell/device) ) diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm index 4a8662c053..fe99fad674 100644 --- a/code/game/objects/items/weapons/material/chainsaw.dm +++ b/code/game/objects/items/weapons/material/chainsaw.dm @@ -113,9 +113,9 @@ obj/item/weapon/chainsaw/proc/get_fuel() return reagents.get_reagent_amount("fuel") obj/item/weapon/chainsaw/examine(mob/user) - if(..(user,0)) - if(max_fuel) - to_chat(usr, "The [src] feels like it contains roughtly [get_fuel()] units of fuel left.") + . = ..() + if(max_fuel && get_dist(user, src) == 0) + . += "The [src] feels like it contains roughtly [get_fuel()] units of fuel left." obj/item/weapon/chainsaw/suicide_act(mob/user) var/datum/gender/TU = gender_datums[user.get_visible_gender()] diff --git a/code/game/objects/items/weapons/material/gravemarker.dm b/code/game/objects/items/weapons/material/gravemarker.dm index cad9df3c8f..d3c615e8fd 100644 --- a/code/game/objects/items/weapons/material/gravemarker.dm +++ b/code/game/objects/items/weapons/material/gravemarker.dm @@ -36,13 +36,11 @@ ..() /obj/item/weapon/material/gravemarker/examine(mob/user) - ..() - if(get_dist(src, user) < 4) - if(grave_name) - to_chat(user, "Here Lies [grave_name]") - if(get_dist(src, user) < 2) - if(epitaph) - to_chat(user, epitaph) + . = ..() + if(grave_name && get_dist(src, user) < 4) + . += "Here Lies [grave_name]" + if(epitaph && get_dist(src, user) < 2) + . += epitaph /obj/item/weapon/material/gravemarker/update_icon() if(icon_changes) diff --git a/code/game/objects/items/weapons/material/whetstone.dm b/code/game/objects/items/weapons/material/whetstone.dm index 628f450e3d..65faf1fa7c 100644 --- a/code/game/objects/items/weapons/material/whetstone.dm +++ b/code/game/objects/items/weapons/material/whetstone.dm @@ -41,7 +41,8 @@ /obj/item/weapon/material/sharpeningkit/examine(mob/user, distance) . = ..() - to_chat(user, "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use.") + . += "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use." + /obj/item/weapon/material/sharpeningkit/Initialize() . = ..() setrepair() diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 9145786d69..21d4d53a5c 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -86,14 +86,12 @@ return null /obj/item/weapon/melee/energy/examine(mob/user) - if(!..(user, 1)) - return - - if(use_cell) + . = ..() + if(use_cell && Adjacent(user)) if(bcell) - to_chat(user, "The blade is [round(bcell.percent())]% charged.") - if(!bcell) - to_chat(user, "The blade does not have a power source installed.") + . += "The blade is [round(bcell.percent())]% charged." + else + . += "The blade does not have a power source installed." /obj/item/weapon/melee/energy/attack_self(mob/living/user as mob) if(use_cell) @@ -200,8 +198,8 @@ update_icon() /obj/item/weapon/melee/energy/examine(mob/user) - ..() - to_chat(user, "Alt-click to recolor it.") + . = ..() + . += "Alt-click to recolor it." /* * Energy Axe diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 744a92e370..4d78a09bc5 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -215,8 +215,8 @@ update_icon() /obj/item/weapon/shield/energy/examine(mob/user) - ..() - to_chat(user, "Alt-click to recolor it.") + . = ..() + . += "Alt-click to recolor it." /obj/item/weapon/shield/riot/tele name = "telescopic shield" diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 6b347e0cb6..88f6caeb74 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -363,13 +363,12 @@ max_storage_space = ITEMSIZE_COST_NORMAL * 5 /obj/item/weapon/storage/backpack/parachute/examine(mob/user) - var/msg = desc - if(get_dist(src, user) <= 1) + . = ..() + if(Adjacent(user)) if(parachute) - msg += " It seems to be packed." + . += "It seems to be packed." else - msg += " It seems to be unpacked." - to_chat(user, msg) + . += "It seems to be unpacked." /obj/item/weapon/storage/backpack/parachute/handleParachute() parachute = FALSE //If you parachute in, the parachute has probably been used. diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 0466de03c9..317920e5dc 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -144,32 +144,30 @@ /obj/item/weapon/storage/bag/ore/examine(mob/user) - ..() + . = ..() if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them. - return + return . if(istype(user, /mob/living)) add_fingerprint(user) if(!contents.len) - to_chat(user, "It is empty.") - return + . += "It is empty." - if(world.time > last_update + 10) + else if(world.time > last_update + 10) update_ore_count() last_update = world.time - to_chat(user, "It holds:") - for(var/ore in stored_ore) - to_chat(user, "- [stored_ore[ore]] [ore]") - return + . += "It holds:" + for(var/ore in stored_ore) + . += "- [stored_ore[ore]] [ore]" /obj/item/weapon/storage/bag/ore/open(mob/user as mob) //No opening it for the weird UI of having shit-tons of ore inside it. if(world.time > last_update + 10) update_ore_count() last_update = world.time - examine(user) + user.examinate(src) /obj/item/weapon/storage/bag/ore/proc/update_ore_count() //Stolen from ore boxes. diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 830f5a2631..926255c620 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -26,17 +26,15 @@ return /obj/item/weapon/storage/fancy/examine(mob/user) - if(!..(user, 1)) - return + . = ..() - if(contents.len <= 0) - to_chat(user, "There are no [icon_type]s left in the box.") - else if(contents.len == 1) - to_chat(user, "There is one [icon_type] left in the box.") - else - to_chat(user, "There are [contents.len] [icon_type]s in the box.") - - return + if(Adjacent(user)) + if(!contents.len) + . += "There are no [icon_type]s left in the box." + else if(contents.len == 1) + . += "There is one [icon_type] left in the box." + else + . += "There are [contents.len] [icon_type]s in the box." /* * Egg Box diff --git a/code/game/objects/items/weapons/storage/mre.dm b/code/game/objects/items/weapons/storage/mre.dm index 582af52f43..50536564d3 100644 --- a/code/game/objects/items/weapons/storage/mre.dm +++ b/code/game/objects/items/weapons/storage/mre.dm @@ -24,7 +24,7 @@ MRE Stuff /obj/item/weapon/storage/mre/examine(mob/user) . = ..() - to_chat(user, meal_desc) + . += meal_desc /obj/item/weapon/storage/mre/update_icon() if(opened) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index df775b3cc0..c8bc129e3d 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -29,8 +29,9 @@ use_sound = 'sound/items/storage/briefcase.ogg' examine(mob/user) - if(..(user, 1)) - to_chat(user, "The service panel is [src.open ? "open" : "closed"].") + . = ..() + if(Adjacent(user)) + . += "The service panel is [src.open ? "open" : "closed"]." attackby(obj/item/weapon/W as obj, mob/user as mob) if(locked) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 1b25d5e19a..d14a4ab29b 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -722,10 +722,10 @@ ..() /obj/item/weapon/storage/trinketbox/examine(mob/user) - ..() + . = ..() if(open && contents.len) var/display_item = contents[1] - to_chat(user, "\The [src] contains \the [display_item]!") + . += "\The [src] contains \the [display_item]!" /obj/item/weapon/storage/AllowDrop() return TRUE diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index f2f7f99afd..183366a4c7 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -101,13 +101,13 @@ set_light(0) /obj/item/weapon/melee/baton/examine(mob/user) - if(!..(user, 1)) - return + . = ..() - if(bcell) - to_chat(user, "The baton is [round(bcell.percent())]% charged.") - if(!bcell) - to_chat(user, "The baton does not have a power source installed.") + if(Adjacent(user, src)) + if(bcell) + . += "The baton is [round(bcell.percent())]% charged." + if(!bcell) + . += "The baton does not have a power source installed." /obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user) if(use_external_power) diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 528b8eb447..eec15d1e94 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -30,7 +30,7 @@ /obj/item/weapon/tank/jetpack/examine(mob/user) . = ..() if(air_contents.total_moles < 5) - to_chat(user, "The meter on \the [src] indicates you are almost out of gas!") + . += "The meter on \the [src] indicates you are almost out of gas!" playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/jetpack/verb/toggle_rockets() @@ -116,8 +116,8 @@ var/obj/item/weapon/rig/holder /obj/item/weapon/tank/jetpack/rig/examine() - to_chat(usr, "It's a jetpack. If you can see this, report it on the bug tracker.") - return 0 + . = ..() + . += "It's a jetpack. If you can see this, report it on the bug tracker." /obj/item/weapon/tank/jetpack/rig/allow_thrust(num, mob/living/user as mob) diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 6d6839a4a5..c2a342b618 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -22,9 +22,9 @@ return /obj/item/weapon/tank/oxygen/examine(mob/user) - if(..(user, 0) && air_contents.gas["oxygen"] < 10) - to_chat(user, text("The meter on \the [src] indicates you are almost out of oxygen!")) - //playsound(usr, 'sound/effects/alert.ogg', 50, 1) + . = ..() + if(loc == user && (air_contents.gas["oxygen"] < 10)) + . += "The meter on \the [src] indicates you are almost out of oxygen!" /obj/item/weapon/tank/oxygen/yellow desc = "A tank of oxygen, this one is yellow." @@ -60,8 +60,9 @@ icon_state = "oxygen" /obj/item/weapon/tank/air/examine(mob/user) - if(..(user, 0) && air_contents.gas["oxygen"] < 1 && loc==user) - to_chat(user, "The meter on the [src.name] indicates you are almost out of air!") + . = ..() + if(loc == user && (air_contents.gas["oxygen"] < 1)) + . += "The meter on \the [src] indicates you are almost out of air!" user << sound('sound/effects/alert.ogg') /obj/item/weapon/tank/air/Initialize() @@ -153,8 +154,9 @@ return /obj/item/weapon/tank/emergency/oxygen/examine(mob/user) - if(..(user, 0) && air_contents.gas["oxygen"] < 0.2 && loc==user) - to_chat(user, text("The meter on the [src.name] indicates you are almost out of air!")) + . = ..() + if(loc == user && (air_contents.gas["oxygen"] < 0.2)) + . += "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 @@ -228,8 +230,9 @@ return /obj/item/weapon/tank/nitrogen/examine(mob/user) - if(..(user, 0) && air_contents.gas["nitrogen"] < 10) - to_chat(user, text("The meter on \the [src] indicates you are almost out of nitrogen!")) + . = ..() + if(loc == user && (air_contents.gas["nitrogen"] < 10)) + . += "The meter on \the [src] indicates you are almost out of nitrogen!" //playsound(user, 'sound/effects/alert.ogg', 50, 1) /obj/item/weapon/tank/stasis/nitro_cryo // Synthmorph bags need to have initial pressure within safe bounds for human atmospheric pressure, but low temperature to stop unwanted degredation. diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index bfb484b307..f176046ef7 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -82,8 +82,8 @@ var/list/global/tank_gauge_cache = list() . = ..() /obj/item/weapon/tank/examine(mob/user) - . = ..(user, 0) - if(.) + . = ..() + if(loc == user) var/celsius_temperature = air_contents.temperature - T0C var/descriptive switch(celsius_temperature) @@ -101,12 +101,12 @@ var/list/global/tank_gauge_cache = list() descriptive = "cold" else descriptive = "bitterly cold" - to_chat(user, "\The [src] feels [descriptive].") + . += "\The [src] feels [descriptive]." if(src.proxyassembly.assembly || wired) - to_chat(user, "It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it.") + . += "It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it." if(src.valve_welded) - to_chat(user, "\The [src] emergency relief valve has been welded shut!") + . += "\The [src] emergency relief valve has been welded shut!" /obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob) diff --git a/code/game/objects/items/weapons/tools/combitool.dm b/code/game/objects/items/weapons/tools/combitool.dm index b154f059af..43bb2794fe 100644 --- a/code/game/objects/items/weapons/tools/combitool.dm +++ b/code/game/objects/items/weapons/tools/combitool.dm @@ -22,12 +22,12 @@ var/list/tools = list() var/current_tool = 1 -/obj/item/weapon/combitool/examine() - ..() - if(loc == usr && tools.len) - to_chat(usr, "It has the following fittings:") +/obj/item/weapon/combitool/examine(mob/user) + . = ..() + if(loc == user && tools.len) + . += "It has the following fittings:" for(var/obj/item/tool in tools) - to_chat(usr, "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]") + . += "[bicon(tool)] - [tool.name][tools[current_tool]==tool?" (selected)":""]") /obj/item/weapon/combitool/New() ..() diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index bdd81f12a0..418c5f7513 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -56,9 +56,9 @@ return ..() /obj/item/weapon/weldingtool/examine(mob/user) - if(..(user, 0)) - if(max_fuel) - to_chat(user, "[bicon(src)] The [src.name] contains [get_fuel()]/[src.max_fuel] units of fuel!") + . = ..() + if(max_fuel && loc == user) + . += "It contains [get_fuel()]/[src.max_fuel] units of fuel!" /obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone) if(ishuman(A) && user.a_intent == I_HELP) @@ -562,13 +562,12 @@ return power_supply /obj/item/weapon/weldingtool/electric/examine(mob/user) - if(get_dist(src, user) > 1) - to_chat(user, desc) - else + . = ..() + if(Adjacent(user)) if(power_supply) - to_chat(user, "[bicon(src)] The [src.name] has [get_fuel()] charge left.") + . += "It [src.name] has [get_fuel()] charge left." else - to_chat(user, "[bicon(src)] The [src.name] has no power cell!") + . += "It [src.name] has no power cell!" /obj/item/weapon/weldingtool/electric/get_fuel() if(use_external_power) diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index 2f946a5942..f603aa6498 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -144,9 +144,8 @@ src.add_fingerprint(usr) /obj/item/weapon/weldpack/examine(mob/user) - ..(user) - to_chat(user, "[bicon(src)] [src.reagents.total_volume] units of fuel left!") - return + . = ..() + . += "It has [src.reagents.total_volume] units of fuel left!" /obj/item/weapon/weldpack/survival name = "emergency welding kit" diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index 13babf8a3d..cd1c448b2f 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -14,16 +14,16 @@ . -= "Off" /obj/structure/sign/double/barsign/examine(mob/user) - ..() + . = ..() switch(icon_state) if("Off") - to_chat(user, "It appears to be switched off.") + . += "It appears to be switched off." if("narsiebistro") - to_chat(user, "It shows a picture of a large black and red being. Spooky!") + . += "It shows a picture of a large black and red being. Spooky!" if("on", "empty") - to_chat(user, "The lights are on, but there's no picture.") + . += "The lights are on, but there's no picture." else - to_chat(user, "It says '[icon_state]'") + . += "It says '[icon_state]'" /obj/structure/sign/double/barsign/New() ..() diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 9f1af1cf1b..4180b78ec3 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -170,16 +170,14 @@ LINEN BINS /obj/structure/bedsheetbin/examine(mob/user) - ..(user) + . = ..() if(amount < 1) - to_chat(user, "There are no bed sheets in the bin.") - return - if(amount == 1) - to_chat(user, "There is one bed sheet in the bin.") - return - to_chat(user, "There are [amount] bed sheets in the bin.") - + . += "There are no bed sheets in the bin." + else if(amount == 1) + . += "There is one bed sheet in the bin." + else + . += "There are [amount] bed sheets in the bin." /obj/structure/bedsheetbin/update_icon() switch(amount) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index b75e3de6ed..55cb97c3cb 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -58,24 +58,25 @@ update_icon() /obj/structure/closet/examine(mob/user) - if(!src.opened && (..(user, 1) || isobserver(user))) + . = ..() + if(Adjacent(user) || isobserver(user)) var/content_size = 0 for(var/obj/item/I in src.contents) if(!I.anchored) content_size += CEILING(I.w_class/2, 1) if(!content_size) - to_chat(user, "It is empty.") + . += "It is empty." else if(storage_capacity > content_size*4) - to_chat(user, "It is barely filled.") + . += "It is barely filled." else if(storage_capacity > content_size*2) - to_chat(user, "It is less than half full.") + . += "It is less than half full." else if(storage_capacity > content_size) - to_chat(user, "There is still some free space.") + . += "There is still some free space." else - to_chat(user, "It is full.") + . += "It is full." if(!src.opened && isobserver(user)) - to_chat(user, "It contains: [counting_english_list(contents)]") + . += "It contains: [counting_english_list(contents)]" /obj/structure/closet/CanPass(atom/movable/mover, turf/target) if(wall_mounted) diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm index bd525832c1..b565124e78 100644 --- a/code/game/objects/structures/crates_lockers/vehiclecage.dm +++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm @@ -9,9 +9,9 @@ var/paint_color = "#666666" /obj/structure/vehiclecage/examine(mob/user) - ..() + . = ..() if(my_vehicle) - to_chat(user, "It seems to contain \the [my_vehicle].") + . += "It seems to contain \the [my_vehicle]." /obj/structure/vehiclecage/Initialize() . = ..() diff --git a/code/game/objects/structures/fence.dm b/code/game/objects/structures/fence.dm index bb99d37d3a..187fb1bce3 100644 --- a/code/game/objects/structures/fence.dm +++ b/code/game/objects/structures/fence.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD //Chain link fences //Sprites ported from /VG/ @@ -176,4 +177,184 @@ #undef NO_HOLE #undef MEDIUM_HOLE #undef LARGE_HOLE +======= +//Chain link fences +//Sprites ported from /VG/ + +#define CUT_TIME 10 SECONDS +#define CLIMB_TIME 5 SECONDS + +#define NO_HOLE 0 //section is intact +#define MEDIUM_HOLE 1 //medium hole in the section - can climb through +#define LARGE_HOLE 2 //large hole in the section - can walk through +#define MAX_HOLE_SIZE LARGE_HOLE + +/obj/structure/fence + name = "fence" + desc = "A chain link fence. Not as effective as a wall, but generally it keeps people out." + description_info = "Projectiles can freely pass fences." + density = TRUE + anchored = TRUE + + icon = 'icons/obj/fence.dmi' + icon_state = "straight" + + var/cuttable = TRUE + var/hole_size= NO_HOLE + var/invulnerable = FALSE + +/obj/structure/fence/Initialize() + update_cut_status() + return ..() + +/obj/structure/fence/examine(mob/user) + . = ..() + + switch(hole_size) + if(MEDIUM_HOLE) + . += "There is a large hole in it." + if(LARGE_HOLE) + . += "It has been completely cut through." + +/obj/structure/fence/get_description_interaction() + var/list/results = list() + if(cuttable && !invulnerable && hole_size < MAX_HOLE_SIZE) + results += "[desc_panel_image("wirecutters")]to [hole_size > NO_HOLE ? "expand the":"cut a"] hole into the fence, allowing passage." + return results + +/obj/structure/fence/end + icon_state = "end" + cuttable = FALSE + +/obj/structure/fence/corner + icon_state = "corner" + cuttable = FALSE + +/obj/structure/fence/post + icon_state = "post" + cuttable = FALSE + +/obj/structure/fence/cut/medium + icon_state = "straight_cut2" + hole_size = MEDIUM_HOLE + +/obj/structure/fence/cut/large + icon_state = "straight_cut3" + hole_size = LARGE_HOLE + +// Projectiles can pass through fences. +/obj/structure/fence/CanPass(atom/movable/mover, turf/target) + if(istype(mover, /obj/item/projectile)) + return TRUE + return ..() + +/obj/structure/fence/attackby(obj/item/W, mob/user) + if(W.is_wirecutter()) + if(!cuttable) + to_chat(user, span("warning", "This section of the fence can't be cut.")) + return + if(invulnerable) + to_chat(user, span("warning", "This fence is too strong to cut through.")) + return + var/current_stage = hole_size + if(current_stage >= MAX_HOLE_SIZE) + to_chat(user, span("notice", "This fence has too much cut out of it already.")) + return + + user.visible_message(span("danger", "\The [user] starts cutting through \the [src] with \the [W]."),\ + span("danger", "You start cutting through \the [src] with \the [W].")) + playsound(src, W.usesound, 50, 1) + + if(do_after(user, CUT_TIME * W.toolspeed, target = src)) + if(current_stage == hole_size) + switch(++hole_size) + if(MEDIUM_HOLE) + visible_message(span("notice", "\The [user] cuts into \the [src] some more.")) + to_chat(user, span("notice", "You could probably fit yourself through that hole now. Although climbing through would be much faster if you made it even bigger.")) + climbable = TRUE + if(LARGE_HOLE) + visible_message(span("notice", "\The [user] completely cuts through \the [src].")) + to_chat(user, span("notice", "The hole in \the [src] is now big enough to walk through.")) + climbable = FALSE + update_cut_status() + return TRUE + +/obj/structure/fence/proc/update_cut_status() + if(!cuttable) + return + density = TRUE + + switch(hole_size) + if(NO_HOLE) + icon_state = initial(icon_state) + if(MEDIUM_HOLE) + icon_state = "straight_cut2" + if(LARGE_HOLE) + icon_state = "straight_cut3" + density = FALSE + +//FENCE DOORS + +/obj/structure/fence/door + name = "fence door" + desc = "Not very useful without a real lock." + icon_state = "door_closed" + cuttable = FALSE + var/open = FALSE + var/locked = FALSE + +/obj/structure/fence/door/Initialize() + update_door_status() + return ..() + +/obj/structure/fence/door/opened + icon_state = "door_opened" + open = TRUE + density = TRUE + +/obj/structure/fence/door/locked + desc = "It looks like it has a strong padlock attached." + locked = TRUE + +/obj/structure/fence/door/attack_hand(mob/user) + if(can_open(user)) + toggle(user) + else + to_chat(user, span("warning", "\The [src] is [!open ? "locked" : "stuck open"].")) + + return TRUE + +/obj/structure/fence/door/proc/toggle(mob/user) + switch(open) + if(FALSE) + visible_message(span("notice", "\The [user] opens \the [src].")) + open = TRUE + if(TRUE) + visible_message(span("notice", "\The [user] closes \the [src].")) + open = FALSE + + update_door_status() + playsound(src, 'sound/machines/click.ogg', 100, 1) + +/obj/structure/fence/door/proc/update_door_status() + switch(open) + if(FALSE) + density = TRUE + icon_state = "door_closed" + if(TRUE) + density = FALSE + icon_state = "door_opened" + +/obj/structure/fence/door/proc/can_open(mob/user) + if(locked) + return FALSE + return TRUE + +#undef CUT_TIME +#undef CLIMB_TIME + +#undef NO_HOLE +#undef MEDIUM_HOLE +#undef LARGE_HOLE +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) #undef MAX_HOLE_SIZE \ No newline at end of file diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index a5a8704dc1..1b5548cdb4 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -36,9 +36,9 @@ max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value. /obj/structure/flora/examine(mob/user) - . = ..(user) + . = ..() if(harvest_count < max_harvests) - to_chat(user, "\The [src] seems to have something hanging from it.") + . += "It seems to have something hanging from it." /obj/structure/flora/attackby(var/obj/item/weapon/W, var/mob/living/user) if(can_harvest(W)) @@ -225,9 +225,9 @@ var/obj/item/stored_item /obj/structure/flora/pottedplant/examine(mob/user) - ..() + . = ..() if(in_range(user, src) && stored_item) - to_chat(user, "You can see something in there...") + . += "You can see something in there..." /obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user) if(stored_item) diff --git a/code/game/objects/structures/gravemarker.dm b/code/game/objects/structures/gravemarker.dm index 1df13a6eb4..d5b7773910 100644 --- a/code/game/objects/structures/gravemarker.dm +++ b/code/game/objects/structures/gravemarker.dm @@ -30,13 +30,11 @@ color = material.icon_colour /obj/structure/gravemarker/examine(mob/user) - ..() - if(get_dist(src, user) < 4) - if(grave_name) - to_chat(user, "Here Lies [grave_name]") - if(get_dist(src, user) < 2) - if(epitaph) - to_chat(user, epitaph) + . = ..() + if(grave_name && get_dist(src, user) < 4) + . += "Here Lies [grave_name]" + if(epitaph && get_dist(src, user) < 2) + . += epitaph /obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target) if(istype(mover) && mover.checkpass(PASSTABLE)) diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index cb8fcfe02b..b7807711e3 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -24,10 +24,9 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) /obj/structure/janitorialcart/examine(mob/user) - if(..(user, 1)) - to_chat(user, "[src] [bicon(src)] contains [reagents.total_volume] unit\s of liquid!") - //everything else is visible, so doesn't need to be mentioned - + . = ..() + if(Adjacent(user)) + . += "It contains [reagents.total_volume] unit\s of liquid!" /obj/structure/janitorialcart/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/storage/bag/trash) && !mybag) @@ -186,12 +185,11 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) /obj/structure/bed/chair/janicart/examine(mob/user) - if(!..(user, 1)) - return - - to_chat(user, "[bicon(src)] This [callme] contains [reagents.total_volume] unit\s of water!") - if(mybag) - to_chat(user, "\A [mybag] is hanging on the [callme].") + . = ..() + if(Adjacent(user)) + . += "This [callme] contains [reagents.total_volume] unit\s of water!" + if(mybag) + . += "\A [mybag] is hanging on the [callme]." /obj/structure/bed/chair/janicart/attackby(obj/item/I, mob/user) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index 17e594c4c3..1c6476d1d1 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -17,8 +17,9 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket) ..() /obj/structure/mopbucket/examine(mob/user) - if(..(user, 1)) - to_chat(user, "[src] [bicon(src)] contains [reagents.total_volume] unit\s of water!") + . = ..() + if(Adjacent(user)) + . += "It contains [reagents.total_volume] unit\s of water!" /obj/structure/mopbucket/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap) || istype(I, /obj/item/weapon/reagent_containers/glass/rag)) //VOREStation Edit - "Allows soap and rags to be used on mopbuckets" diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index f3bfc92d8e..c701ae9015 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -51,21 +51,18 @@ return /obj/structure/noticeboard/attack_hand(var/mob/user) - examine(user) + user.examinate(src) // Since Topic() never seems to interact with usr on more than a superficial // level, it should be fine to let anyone mess with the board other than ghosts. /obj/structure/noticeboard/examine(var/mob/user) - if(!user) - user = usr - if(user.Adjacent(src)) + . = ..() + if(Adjacent(user)) var/dat = "Noticeboard
" for(var/obj/item/weapon/paper/P in src) dat += "[P.name] Write Remove
" user << browse("Notices[dat]","window=noticeboard") onclose(user, "noticeboard") - else - ..() /obj/structure/noticeboard/Topic(href, href_list) ..() diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm index 8027b5db5e..17b457b49e 100644 --- a/code/game/objects/structures/railing.dm +++ b/code/game/objects/structures/railing.dm @@ -46,11 +46,11 @@ if(health < maxhealth) switch(health / maxhealth) if(0.0 to 0.5) - to_chat(user, "It looks severely damaged!") + . += "It looks severely damaged!" if(0.25 to 0.5) - to_chat(user, "It looks damaged!") + . += "It looks damaged!" if(0.5 to 1.0) - to_chat(user, "It has a few scrapes and dents.") + . += "It has a few scrapes and dents." /obj/structure/railing/take_damage(amount) health -= amount diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index f3b6d1e08e..eb64e2414d 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -25,27 +25,27 @@ var/fulltile = FALSE // Set to true on full-tile variants. /obj/structure/window/examine(mob/user) - . = ..(user) + . = ..() if(health == maxhealth) - to_chat(user, "It looks fully intact.") + . += "It looks fully intact." else var/perc = health / maxhealth if(perc > 0.75) - to_chat(user, "It has a few cracks.") + . += "It has a few cracks." else if(perc > 0.5) - to_chat(user, "It looks slightly damaged.") + . += "It looks slightly damaged." else if(perc > 0.25) - to_chat(user, "It looks moderately damaged.") + . += "It looks moderately damaged." else - to_chat(user, "It looks heavily damaged.") + . += "It looks heavily damaged." if(silicate) if (silicate < 30) - to_chat(user, "It has a thin layer of silicate.") + . += "It has a thin layer of silicate." else if (silicate < 70) - to_chat(user, "It is covered in silicate.") + . += "It is covered in silicate." else - to_chat(user, "There is a thick layer of silicate covering it.") + . += "There is a thick layer of silicate covering it." /obj/structure/window/take_damage(var/damage = 0, var/sound_effect = 1) var/initialhealth = health diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index cbb9c6dbb7..add0b3b11d 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -120,21 +120,21 @@ //Appearance /turf/simulated/wall/examine(mob/user) - . = ..(user) + . = ..() if(!damage) - to_chat(user, "It looks fully intact.") + . += "It looks fully intact." else var/dam = damage / material.integrity if(dam <= 0.3) - to_chat(user, "It looks slightly damaged.") + . += "It looks slightly damaged." else if(dam <= 0.6) - to_chat(user, "It looks moderately damaged.") + . += "It looks moderately damaged." else - to_chat(user, "It looks heavily damaged.") + . += "It looks heavily damaged." if(locate(/obj/effect/overlay/wallrot) in src) - to_chat(user, "There is fungus growing on [src].") + . += "There is fungus growing on [src]." //Damage diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index b5851ab4c6..8d28288afb 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -80,14 +80,12 @@ return PROCESS_KILL /obj/item/device/assembly/examine(mob/user) - ..(user) + . = ..() if((in_range(src, user) || loc == user)) if(secured) - to_chat(user, "\The [src] is ready!") + . += "\The [src] is ready!" else - to_chat(user, "\The [src] can be attached!") - return - + . += "\The [src] can be attached!" /obj/item/device/assembly/attack_self(mob/user as mob) if(!user) return 0 diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 75b335154e..2f6d7ab02f 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -57,12 +57,12 @@ master.update_icon() /obj/item/device/assembly_holder/examine(mob/user) - ..(user) + . = ..() if ((in_range(src, user) || src.loc == user)) if (src.secured) - to_chat(user, "\The [src] is ready!") + . += "\The [src] is ready!" else - to_chat(user, "\The [src] can be attached!") + . += "\The [src] can be attached!" /obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj) if(a_left) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index c2fb202984..b294fc90c8 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -8,9 +8,9 @@ /obj/item/device/assembly/mousetrap/examine(var/mob/user) - ..(user) + . = ..(user) if(armed) - to_chat(user, "It looks like it's armed.") + . += "It looks like it's armed." /obj/item/device/assembly/mousetrap/update_icon() if(armed) diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm index 2e04c36b95..1bcf7c35bd 100644 --- a/code/modules/blob2/blobs/base_blob.dm +++ b/code/modules/blob2/blobs/base_blob.dm @@ -64,11 +64,11 @@ GLOBAL_LIST_EMPTY(all_blobs) return FALSE /obj/structure/blob/examine(mob/user) - ..() + . = ..() if(!overmind) - to_chat(user, "It seems inert.") // Dead blob. + . += "It seems inert." // Dead blob. else - to_chat(user, overmind.blob_type.desc) + . += overmind.blob_type.desc /obj/structure/blob/get_description_info() if(overmind) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c865fd0b65..736ee2bc9a 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -851,16 +851,16 @@ /obj/item/clothing/under/examine(mob/user) - ..(user) + . = ..() switch(src.sensor_mode) if(0) - to_chat(user, "Its sensors appear to be disabled.") + . += "Its sensors appear to be disabled." if(1) - to_chat(user, "Its binary life sensors appear to be enabled.") + . += "Its binary life sensors appear to be enabled." if(2) - to_chat(user, "Its vital tracker appears to be enabled.") + . += "Its vital tracker appears to be enabled." if(3) - to_chat(user, "Its vital tracker and tracking beacon appear to be enabled.") + . += "Its vital tracker and tracking beacon appear to be enabled." /obj/item/clothing/under/proc/set_sensors(mob/usr as mob) var/mob/M = usr diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index 4dda07aecc..3cc1b9408f 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -67,10 +67,9 @@ src.add_fingerprint(usr) /obj/item/clothing/examine(var/mob/user) - ..(user) + . = ..(user) if(LAZYLEN(accessories)) - for(var/obj/item/clothing/accessory/A in accessories) - to_chat(user, "\A [A] is attached to it.") + . += "It has the following attached: [counting_english_list(accessories)]" /** * Attach accessory A to src diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index 4f10a56f9d..57b8a0911a 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -78,11 +78,8 @@ wearer = null /obj/item/clothing/shoes/magboots/examine(mob/user) - ..(user) - var/state = "disabled" - if(item_flags & NOSLIP) - state = "enabled" - to_chat(user, "Its mag-pulse traction system appears to be [state].") + . = ..() + . += "Its mag-pulse traction system appears to be [item_flags & NOSLIP ? "enabled" : "disabled"]." /obj/item/clothing/shoes/magboots/vox @@ -126,6 +123,6 @@ canremove = 1 /obj/item/clothing/shoes/magboots/vox/examine(mob/user) - ..(user) - if (magpulse) - to_chat(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. \ No newline at end of file + . = ..() + if(magpulse) + . += "It would be hard to take these off without relaxing your grip first." // Theoretically this message should only be seen by the wearer when the claws are equipped. \ No newline at end of file diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm index 8af972ec73..12bd3e7f0b 100644 --- a/code/modules/clothing/spacesuits/breaches.dm +++ b/code/modules/clothing/spacesuits/breaches.dm @@ -224,7 +224,7 @@ var/global/list/breach_burn_descriptors = list( ..() /obj/item/clothing/suit/space/examine(mob/user) - ..(user) - if(can_breach && breaches && breaches.len) + . = ..() + if(can_breach && breaches?.len) for(var/datum/breach/B in breaches) - to_chat(user, "It has \a [B.descriptor].") + . += "It has \a [B.descriptor]." diff --git a/code/modules/clothing/spacesuits/rig/modules/modules.dm b/code/modules/clothing/spacesuits/rig/modules/modules.dm index eece796510..dfd9abb9c2 100644 --- a/code/modules/clothing/spacesuits/rig/modules/modules.dm +++ b/code/modules/clothing/spacesuits/rig/modules/modules.dm @@ -55,14 +55,14 @@ var/list/stat_rig_module/stat_modules = new() /obj/item/rig_module/examine() - ..() + . = ..() switch(damage) if(0) - to_chat(usr, "It is undamaged.") + . += "It is undamaged." if(1) - to_chat(usr, "It is badly damaged.") + . += "It is badly damaged." if(2) - to_chat(usr, "It is almost completely destroyed.") + . += "It is almost completely destroyed." /obj/item/rig_module/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 7000801506..f830643e00 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -95,22 +95,21 @@ var/datum/effect/effect/system/spark_spread/spark_system /obj/item/weapon/rig/examine() - to_chat(usr, "This is [bicon(src)][src.name].") - to_chat(usr, "[src.desc]") + . = ..() if(wearer) for(var/obj/item/piece in list(helmet,gloves,chest,boots)) if(!piece || piece.loc != wearer) continue - to_chat(usr, "[bicon(piece)] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed.") + . += "[bicon(piece)] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed." if(src.loc == usr) - to_chat(usr, "The access panel is [locked? "locked" : "unlocked"].") - to_chat(usr, "The maintenance panel is [open ? "open" : "closed"].") - to_chat(usr, "Hardsuit systems are [offline ? "offline" : "online"].") - to_chat(usr, "The cooling stystem is [cooling_on ? "active" : "inactive"].") + . += "The access panel is [locked? "locked" : "unlocked"]." + . += "The maintenance panel is [open ? "open" : "closed"]." + . += "Hardsuit systems are [offline ? "offline" : "online"]." + . += "The cooling stystem is [cooling_on ? "active" : "inactive"]." if(open) - to_chat(usr, "It's equipped with [english_list(installed_modules)].") + . += "It's equipped with [english_list(installed_modules)]." /obj/item/weapon/rig/New() ..() diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index c811cdaee9..280e0a9c98 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -58,10 +58,10 @@ camera.c_tag = usr.name to_chat(usr, "User scanned as [camera.c_tag]. Camera activated.") -/obj/item/clothing/head/helmet/space/examine() - ..() - if(camera_networks && get_dist(usr,src) <= 1) - to_chat(usr, "This helmet has a built-in camera. It's [camera ? "" : "in"]active.") +/obj/item/clothing/head/helmet/space/examine(mob/user) + . = ..() + if(camera_networks && Adjacent(user)) + . += "This helmet has a built-in camera. It's [camera ? "" : "in"]active." /obj/item/clothing/suit/space name = "Space suit" diff --git a/code/modules/clothing/spacesuits/void/void.dm b/code/modules/clothing/spacesuits/void/void.dm index 83dbdfd345..1fddf1116b 100644 --- a/code/modules/clothing/spacesuits/void/void.dm +++ b/code/modules/clothing/spacesuits/void/void.dm @@ -68,13 +68,11 @@ var/obj/item/device/suit_cooling_unit/cooler = null// Cooling unit, for FBPs. Cannot be installed alongside a tank. /obj/item/clothing/suit/space/void/examine(user) - ..(user) - var/list/part_list = new + . = ..() for(var/obj/item/I in list(helmet,boots,tank,cooler)) - part_list += "\a [I]" - to_chat(user, "\The [src] has [english_list(part_list)] installed.") + . += "It has \a [I] installed." if(tank && in_range(src,user)) - to_chat(user, "The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank].") + . += "The wrist-mounted pressure gauge reads [max(round(tank.air_contents.return_pressure()),0)] kPa remaining in \the [tank]." /obj/item/clothing/suit/space/void/refit_for_species(var/target_species) ..() diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index b09673af4c..8843efb41c 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -86,11 +86,11 @@ ..() /obj/item/clothing/accessory/holster/examine(mob/user) - ..(user) - if (holstered) - to_chat(user, "A [holstered] is holstered here.") + . = ..(user) + if(holstered) + . += "A [holstered] is holstered here." else - to_chat(user, "It is empty.") + . += "It is empty." /obj/item/clothing/accessory/holster/on_attached(obj/item/clothing/under/S, mob/user as mob) ..() diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index cf1deea0c7..3a651d8669 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -91,5 +91,6 @@ return /obj/item/weapon/evidencebag/examine(mob/user) - ..(user) - if (stored_item) user.examinate(stored_item) + . = ..() + if(stored_item) + user.examinate(stored_item) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index b5e4abd488..88858f7a70 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -158,6 +158,6 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob) update_icon() return //space cash /obj/item/weapon/spacecash/ewallet/examine(mob/user) - ..(user) - if (!(user in view(2)) && user!=src.loc) return - to_chat(user, "Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth].") + . = ..() + if(Adjacent(user)) + . += "Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]." diff --git a/code/modules/economy/cash_register.dm b/code/modules/economy/cash_register.dm index 467846e3c1..1e065eb079 100644 --- a/code/modules/economy/cash_register.dm +++ b/code/modules/economy/cash_register.dm @@ -32,14 +32,14 @@ /obj/machinery/cash_register/examine(mob/user as mob) - ..(user) + . = ..(user) if(transaction_amount) - to_chat(user, "It has a purchase of [transaction_amount] pending[transaction_purpose ? " for [transaction_purpose]" : ""].") + . += "It has a purchase of [transaction_amount] pending[transaction_purpose ? " for [transaction_purpose]" : ""]." if(cash_open) if(cash_stored) - to_chat(user, "It holds [cash_stored] Thaler\s of money.") + . += "It holds [cash_stored] Thaler\s." else - to_chat(user, "It's completely empty.") + . += "It's completely empty." /obj/machinery/cash_register/attack_hand(mob/user as mob) diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index 9c2cff9dca..8d1057ae43 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -57,10 +57,9 @@ interact(user) /obj/item/device/retail_scanner/examine(mob/user as mob) - ..(user) + . = ..() if(transaction_amount) - to_chat(user, "It has a purchase of [transaction_amount] pending[transaction_purpose ? " for [transaction_purpose]" : ""].") - + . += "It has a purchase of [transaction_amount] pending[transaction_purpose ? " for [transaction_purpose]" : ""]." /obj/item/device/retail_scanner/interact(mob/user as mob) var/dat = "

Retail Scanner

" diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm index be7a6f6e79..52578a31c7 100644 --- a/code/modules/fishing/fishing_rod.dm +++ b/code/modules/fishing/fishing_rod.dm @@ -32,11 +32,11 @@ /obj/item/weapon/material/fishing_rod/built strung = FALSE -/obj/item/weapon/material/fishing_rod/examine(mob/M as mob) - ..() +/obj/item/weapon/material/fishing_rod/examine(mob/user) + . = ..() if(Bait) - to_chat(M, "\The [src] has \the [Bait] hanging on its hook.") - Bait.examine(M) + . += "It has [Bait] hanging on its hook: " + . += Bait.examine(user) /obj/item/weapon/material/fishing_rod/CtrlClick(mob/user) if((src.loc == user || Adjacent(user)) && Bait) diff --git a/code/modules/food/drinkingglass/drinkingglass.dm b/code/modules/food/drinkingglass/drinkingglass.dm index 6b49fcdb22..928c24954b 100644 --- a/code/modules/food/drinkingglass/drinkingglass.dm +++ b/code/modules/food/drinkingglass/drinkingglass.dm @@ -28,21 +28,21 @@ matter = list("glass" = 60) /obj/item/weapon/reagent_containers/food/drinks/glass2/examine(mob/M as mob) - ..() + . = ..() for(var/I in extras) if(istype(I, /obj/item/weapon/glass_extra)) - to_chat(M, "There is \a [I] in \the [src].") + . += "There is \a [I] in \the [src]." else if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/fruit_slice)) - to_chat(M, "There is \a [I] on the rim.") + . += "There is \a [I] on the rim." else - to_chat(M, "There is \a [I] somewhere on the glass. Somehow.") + . += "There is \a [I] somewhere on the glass. Somehow." if(has_ice()) - to_chat(M, "There is some ice floating in the drink.") + . += "There is some ice floating in the drink." if(has_fizz()) - to_chat(M, "It is fizzing slightly.") + . += "It is fizzing slightly." /obj/item/weapon/reagent_containers/food/drinks/glass2/proc/has_ice() if(reagents.reagent_list.len > 0) diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm index d8023dbedc..546c47a7e2 100644 --- a/code/modules/food/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -72,18 +72,18 @@ playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) /obj/item/weapon/reagent_containers/food/drinks/examine(mob/user) - if(!..(user, 1)) - return - if(!reagents || reagents.total_volume == 0) - to_chat(user, "\The [src] is empty!") - else if (reagents.total_volume <= volume * 0.25) - to_chat(user, "\The [src] is almost empty!") - else if (reagents.total_volume <= volume * 0.66) - to_chat(user, "\The [src] is half full!") - else if (reagents.total_volume <= volume * 0.90) - to_chat(user, "\The [src] is almost full!") - else - to_chat(user, "\The [src] is full!") + . = ..() + if(Adjacent(user)) + if(!reagents?.total_volume) + . += "It is empty!" + else if (reagents.total_volume <= volume * 0.25) + . += "It is almost empty!" + else if (reagents.total_volume <= volume * 0.66) + . += "It is half full!" + else if (reagents.total_volume <= volume * 0.90) + . += "It is almost full!" + else + . += "It is full!" //////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/food/food/sandwich.dm b/code/modules/food/food/sandwich.dm index 13663af81a..6929586c05 100644 --- a/code/modules/food/food/sandwich.dm +++ b/code/modules/food/food/sandwich.dm @@ -79,9 +79,10 @@ ..() /obj/item/weapon/reagent_containers/food/snacks/csandwich/examine(mob/user) - ..(user) - var/obj/item/O = pick(contents) - to_chat(user, "You think you can see [O.name] in there.") + . = ..() + if(contents.len) + var/obj/item/O = pick(contents) + . += "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/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 395e4fe372..3bcf7d3440 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -156,16 +156,16 @@ return 0 /obj/item/weapon/reagent_containers/food/snacks/examine(mob/user) - if(!..(user, 1)) - return - if (bitecount==0) - return - else if (bitecount==1) - to_chat(user, "\The [src] was bitten by someone!") - else if (bitecount<=3) - to_chat(user, "\The [src] was bitten [bitecount] times!") - else - to_chat(user, "\The [src] was bitten multiple times!") + . = ..() + if(Adjacent(user)) + if(bitecount==0) + return . + else if (bitecount==1) + . += "It was bitten by someone!" + else if (bitecount<=3) + . += "It was bitten [bitecount] times!" + else + . += "It was bitten multiple times!" /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/weapon/storage)) diff --git a/code/modules/food/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm index 008910c253..70d7a9ad9c 100644 --- a/code/modules/food/kitchen/cooking_machines/_cooker.dm +++ b/code/modules/food/kitchen/cooking_machines/_cooker.dm @@ -39,10 +39,10 @@ cooking = new_setting icon_state = new_setting ? on_icon : off_icon -/obj/machinery/cooker/examine() - ..() - if(cooking_obj && Adjacent(usr)) - to_chat(usr, "You can see \a [cooking_obj] inside.") +/obj/machinery/cooker/examine(mob/user) + . = ..() + if(cooking_obj && Adjacent(user)) + . += "You can see \a [cooking_obj] inside." /obj/machinery/cooker/attackby(var/obj/item/I, var/mob/user) diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm index e44c484c54..ab70028bd6 100644 --- a/code/modules/food/kitchen/gibber.dm +++ b/code/modules/food/kitchen/gibber.dm @@ -87,8 +87,8 @@ src.startgibbing(user) /obj/machinery/gibber/examine() - ..() - to_chat(usr, "The safety guard is [emagged ? "disabled" : "enabled"].") + . = ..() + . += "The safety guard is [emagged ? "disabled" : "enabled"]." /obj/machinery/gibber/emag_act(var/remaining_charges, var/mob/user) emagged = !emagged diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index fbe703868f..d4eb606aa2 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -348,11 +348,11 @@ user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.") /obj/item/weapon/hand/examine(mob/user) - ..(user) + . = ..() if((!concealed) && cards.len) - to_chat(user,"It contains: ") + . += "It contains: " for(var/datum/playingcard/P in cards) - to_chat(user,"\The [P.name].") + . += "\The [P.name]." /obj/item/weapon/hand/verb/Removecard() diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 61b50dca5f..a170bc9c0d 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -31,9 +31,9 @@ overlays += "bees3" /obj/machinery/beehive/examine(var/mob/user) - ..() + . = ..() if(!closed) - to_chat(user, "The lid is open.") + . += "The lid is open." /obj/machinery/beehive/attackby(var/obj/item/I, var/mob/user) if(I.is_crowbar()) diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 74440c518c..6ca62df220 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -60,9 +60,9 @@ GLOBAL_LIST_BOILERPLATE(all_seed_packs, /obj/item/seeds) src.desc = "It's labelled as coming from [seed.display_name]." /obj/item/seeds/examine(mob/user) - ..(user) + . = ..() if(seed && !seed.roundstart) - to_chat(user, "It's tagged as variety #[seed.uid].") + . += "It's tagged as variety #[seed.uid]." /obj/item/seeds/cutting name = "cuttings" diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index 9db72c75d8..131265bc82 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -1,6 +1,11 @@ /obj/machinery/portable_atmospherics/hydroponics name = "hydroponics tray" +<<<<<<< HEAD icon = 'icons/obj/hydroponics_machines_vr.dmi' //VOREStation Edit +======= + desc = "A tray usually full of fluid for growing plants." + icon = 'icons/obj/hydroponics_machines.dmi' +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) icon_state = "hydrotray3" density = 1 anchored = 1 @@ -607,32 +612,31 @@ else if(dead) remove_dead(user) -/obj/machinery/portable_atmospherics/hydroponics/examine() - - ..() +/obj/machinery/portable_atmospherics/hydroponics/examine(mob/user) + . = ..() if(seed) - to_chat(usr, "[seed.display_name] are growing here.") + . += "[seed.display_name] are growing here." else - to_chat(usr, "[src] is empty.") + . += "It is empty." - if(!Adjacent(usr)) - return + if(!Adjacent(user)) + return . - to_chat(usr, "Water: [round(waterlevel,0.1)]/100") - to_chat(usr, "Nutrient: [round(nutrilevel,0.1)]/10") + . += "Water: [round(waterlevel,0.1)]/100" + . += "Nutrient: [round(nutrilevel,0.1)]/10" if(seed) if(weedlevel >= 5) - to_chat(usr, "\The [src] is infested with weeds!") + . += "It is infested with weeds!" if(pestlevel >= 5) - to_chat(usr, "\The [src] is infested with tiny worms!") + . += "It is infested with tiny worms!" if(dead) - to_chat(usr, "The plant is dead.") + . += "It has a dead plant!" else if(health <= (seed.get_trait(TRAIT_ENDURANCE)/ 2)) - to_chat(usr, "The plant looks unhealthy.") + . += "It has an unhealthy plant!" if(frozen == 1) - to_chat(usr, "It is cryogenically frozen.") + . += "It is cryogenically frozen." if(mechanical) var/turf/T = loc var/datum/gas_mixture/environment @@ -655,7 +659,7 @@ var/light_available = T.get_lumcount() * 5 light_string = "a light level of [light_available] lumens" - to_chat(usr, "The tray's sensor suite is reporting [light_string] and a temperature of [environment.temperature]K at [environment.return_pressure()] kPa in the [environment_type] environment") + . += "The tray's sensor suite is reporting [light_string] and a temperature of [environment.temperature]K at [environment.return_pressure()] kPa in the [environment_type] environment." /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb() set name = "Toggle Tray Lid" diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 896deca111..6218783b6e 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -172,13 +172,10 @@ return id_card /obj/item/device/electronic_assembly/examine(mob/user) - . = ..(user, 1) - if(.) + . = ..() + if(Adjacent(user)) for(var/obj/item/integrated_circuit/IC in contents) - IC.external_examine(user) - // for(var/obj/item/integrated_circuit/output/screen/S in contents) - // if(S.stuff_to_display) - // to_chat(user, "There's a little screen labeled '[S.name]', which displays '[S.stuff_to_display]'.") + . += IC.external_examine(user) if(opened) interact(user) diff --git a/code/modules/integrated_electronics/core/assemblies/clothing.dm b/code/modules/integrated_electronics/core/assemblies/clothing.dm index 2b0b75f69f..d00057e411 100644 --- a/code/modules/integrated_electronics/core/assemblies/clothing.dm +++ b/code/modules/integrated_electronics/core/assemblies/clothing.dm @@ -47,9 +47,9 @@ ..() /obj/item/clothing/examine(mob/user) + . = ..() if(IC) - IC.examine(user) - ..() + . += IC.examine(user) /obj/item/clothing/CtrlShiftClick(mob/user) var/turf/T = get_turf(src) diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm index bcdd0e9bea..de92fe6638 100644 --- a/code/modules/integrated_electronics/core/assemblies/device.dm +++ b/code/modules/integrated_electronics/core/assemblies/device.dm @@ -46,10 +46,10 @@ return /obj/item/device/assembly/electronic_assembly/examine(mob/user) - .=..(user, 1) + . = ..() if(EA) for(var/obj/item/integrated_circuit/IC in EA.contents) - IC.external_examine(user) + . += IC.external_examine(user) /obj/item/device/assembly/electronic_assembly/verb/toggle() set src in usr diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index 5c83c1c399..297ab72654 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -4,28 +4,29 @@ a creative player the means to solve many problems. Circuits are held inside an */ /obj/item/integrated_circuit/examine(mob/user) - interact(user) - external_examine(user) . = ..() + . += external_examine(user) + interact(user) // This should be used when someone is examining while the case is opened. /obj/item/integrated_circuit/proc/internal_examine(mob/user) - to_chat(user, "This board has [inputs.len] input pin\s, [outputs.len] output pin\s and [activators.len] activation pin\s.") + . = list() + . += "This board has [inputs.len] input pin\s, [outputs.len] output pin\s and [activators.len] activation pin\s." for(var/datum/integrated_io/I in inputs) if(I.linked.len) - to_chat(user, "The '[I]' is connected to [I.get_linked_to_desc()].") + . += "The '[I]' is connected to [I.get_linked_to_desc()]." for(var/datum/integrated_io/O in outputs) if(O.linked.len) - to_chat(user, "The '[O]' is connected to [O.get_linked_to_desc()].") + . += "The '[O]' is connected to [O.get_linked_to_desc()]." for(var/datum/integrated_io/activate/A in activators) if(A.linked.len) - to_chat(user, "The '[A]' is connected to [A.get_linked_to_desc()].") - any_examine(user) + . += "The '[A]' is connected to [A.get_linked_to_desc()]." + . += any_examine(user) interact(user) // This should be used when someone is examining from an 'outside' perspective, e.g. reading a screen or LED. /obj/item/integrated_circuit/proc/external_examine(mob/user) - any_examine(user) + return any_examine(user) /obj/item/integrated_circuit/proc/any_examine(mob/user) return diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/code/modules/integrated_electronics/subtypes/memory.dm index 24dd18c80b..630136e7d0 100644 --- a/code/modules/integrated_electronics/subtypes/memory.dm +++ b/code/modules/integrated_electronics/subtypes/memory.dm @@ -19,7 +19,7 @@ ..() /obj/item/integrated_circuit/memory/examine(mob/user) - ..() + . = ..() var/i for(i = 1, i <= outputs.len, i++) var/datum/integrated_io/O = outputs[i] @@ -30,7 +30,7 @@ data = "[d]" else if(!isnull(O.data)) data = O.data - to_chat(user, "\The [src] has [data] saved to address [i].") + . += "\The [src] has [data] saved to address [i]." /obj/item/integrated_circuit/memory/do_work() for(var/i = 1 to inputs.len) diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm index 0f991aac23..8745591d7f 100644 --- a/code/modules/integrated_electronics/subtypes/output.dm +++ b/code/modules/integrated_electronics/subtypes/output.dm @@ -20,7 +20,7 @@ stuff_to_display = null /obj/item/integrated_circuit/output/screen/any_examine(mob/user) - to_chat(user, "There is a little screen labeled '[name]', which displays [!isnull(stuff_to_display) ? "'[stuff_to_display]'" : "nothing"].") + return "There is a little screen labeled '[name]', which displays [!isnull(stuff_to_display) ? "'[stuff_to_display]'" : "nothing"]." /obj/item/integrated_circuit/output/screen/do_work() var/datum/integrated_io/I = inputs[1] @@ -333,7 +333,7 @@ else text_output += "\an ["\improper[initial_name]"] labeled '[name]'" text_output += " which is currently [get_pin_data(IC_INPUT, 1) ? "lit ¤" : "unlit."]" - to_chat(user,jointext(text_output,null)) + return jointext(text_output,null) /obj/item/integrated_circuit/output/led/red name = "red LED" diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 508c044673..ff549fc29d 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -471,6 +471,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f */ /obj/machinery/libraryscanner name = "scanner" + desc = "A scanner for scanning in books and papers." icon = 'icons/obj/library.dmi' icon_state = "bigscanner" anchored = 1 diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index fa5fcc7397..c6f7cc4a9f 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -14,7 +14,7 @@ var/global/list/total_extraction_beacons = list() /obj/item/extraction_pack/examine() . = ..() - usr.show_message("It has [uses_left] use\s remaining.", 1) + . += "It has [uses_left] use\s remaining." /obj/item/extraction_pack/attack_self(mob/user) var/list/possible_beacons = list() diff --git a/code/modules/mining/ore_box.dm b/code/modules/mining/ore_box.dm index 8a16568e8a..e68193e815 100644 --- a/code/modules/mining/ore_box.dm +++ b/code/modules/mining/ore_box.dm @@ -39,26 +39,24 @@ stored_ore[O.name] = 1 /obj/structure/ore_box/examine(mob/user) - to_chat(user, "That's an [src].") - to_chat(user, desc) + . = ..() if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them. - return + return . add_fingerprint(user) if(!contents.len) - to_chat(user, "It is empty.") - return + . += "It is empty." + return . if(world.time > last_update + 10) update_ore_count() last_update = world.time - to_chat(user, "It holds:") + . += "It holds:" for(var/ore in stored_ore) - to_chat(user, "- [stored_ore[ore]] [ore]") - return + . += "- [stored_ore[ore]] [ore]" /obj/structure/ore_box/verb/empty_box() set name = "Empty Ore Box" diff --git a/code/modules/mining/ore_redemption_machine/mine_point_items.dm b/code/modules/mining/ore_redemption_machine/mine_point_items.dm index a6a90a3bd6..0e47e89b2e 100644 --- a/code/modules/mining/ore_redemption_machine/mine_point_items.dm +++ b/code/modules/mining/ore_redemption_machine/mine_point_items.dm @@ -38,9 +38,9 @@ ..() /obj/item/weapon/card/mining_point_card/examine(mob/user) - ..(user) - to_chat(user, "There's [mine_points] excavation points on the card.") - to_chat(user, "There's [survey_points] survey points on the card.") + . = ..() + . += "There's [mine_points] excavation points on the card." + . += "There's [survey_points] survey points on the card." /obj/item/weapon/card/mining_point_card/survey mine_points = 0 diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 1d373679ee..b6c9a5e938 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -196,24 +196,20 @@ return //Doesn't do anything right now because none of the things that can be done to a regular MMI make any sense for these /obj/item/device/mmi/digital/examine(mob/user) - if(!..(user)) - return - - var/msg = "*---------*\nThis is [bicon(src)] \a [src]!\n[desc]\n" - msg += "" + . = ..() if(src.brainmob && src.brainmob.key) switch(src.brainmob.stat) if(CONSCIOUS) - if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk - if(UNCONSCIOUS) msg += "It doesn't seem to be responsive.\n" - if(DEAD) msg += "It appears to be completely inactive.\n" + if(!src.brainmob.client) + . += "It appears to be in stand-by mode." //afk + if(UNCONSCIOUS) + . += "It doesn't seem to be responsive." + if(DEAD) + . += "It appears to be completely inactive." else - msg += "It appears to be completely inactive.\n" - msg += "*---------*" - to_chat(user,msg) - return - + . += "It appears to be completely inactive." + /obj/item/device/mmi/digital/emp_act(severity) if(!src.brainmob) return diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 815ffdd374..1eb57add13 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -85,25 +85,6 @@ M.show_message("The positronic brain buzzes and beeps, and the golden lights fade away. Perhaps you could try again?") playsound(src, 'sound/misc/buzzbeep.ogg', 50, 1) -/obj/item/device/mmi/digital/posibrain/examine(mob/user) - if(!..(user)) - return - - var/msg = "*---------*\nThis is [bicon(src)] \a [src]!\n[desc]\n" - msg += "" - - if(src.brainmob && src.brainmob.key) - switch(src.brainmob.stat) - if(CONSCIOUS) - if(!src.brainmob.client) msg += "It appears to be in stand-by mode.\n" //afk - if(UNCONSCIOUS) msg += "It doesn't seem to be responsive.\n" - if(DEAD) msg += "It appears to be completely inactive.\n" - else - msg += "It appears to be completely inactive.\n" - msg += "*---------*" - to_chat(user,msg) - return - /obj/item/device/mmi/digital/posibrain/emp_act(severity) if(!src.brainmob) return diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 720ec6aac3..45713eae4a 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -1,10 +1,11 @@ /mob/living/carbon/human/examine(mob/user) + // . = ..() //Note that we don't call parent. We build the list by ourselves. + var/skip_gear = 0 var/skip_body = 0 if(alpha <= EFFECTIVE_INVIS) - src.loc.examine(user) - return + return src.loc.examine(user) // Returns messages as if they examined wherever the human was var/looks_synth = looksSynthetic() @@ -75,12 +76,6 @@ BP_L_LEG = skip_body & EXAMINE_SKIPLEGS, BP_R_LEG = skip_body & EXAMINE_SKIPLEGS) - var/list/msg = list("*---------*
This is ") - - msg += "[bicon(src)] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated - - msg += "[src.name]" - var/datum/gender/T = gender_datums[get_visible_gender()] if((skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE)) //big suits/masks/helmets make it hard to tell their gender @@ -98,6 +93,7 @@ // Just in case someone VVs the gender to something strange. It'll runtime anyway when it hits usages, better to CRASH() now with a helpful message. CRASH("Gender datum was null; key was '[((skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE)) ? PLURAL : gender]'") + var/name_ender = "" if(!((skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE))) //VOREStation Add Start if(custom_species) @@ -110,16 +106,12 @@ else if(gender == FEMALE) use_gender = "a gynoid" - msg += ", [use_gender]!" + name_ender = ", [use_gender]![species.get_additional_examine_text(src)]" else if(species.name != "Human") - msg += ", \a [species.get_examine_name()]!" + name_ender = ", \a [species.get_examine_name()]![species.get_additional_examine_text(src)]" - var/extra_species_text = species.get_additional_examine_text(src) - if(extra_species_text) - msg += "[extra_species_text]" - - msg += "
" + var/list/msg = list("*---------*","This is [bicon(src)] [src.name][name_ender]") //uniform if(w_uniform && !(skip_gear & EXAMINE_SKIPJUMPSUIT) && w_uniform.show_examine) @@ -142,16 +134,16 @@ tie_msg += " Attached to it is [english_list(accessories_visible)]." if(w_uniform.blood_DNA) - msg += "[T.He] [T.is] wearing [bicon(w_uniform)] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [w_uniform.name]![tie_msg]
" + msg += "[T.He] [T.is] wearing [bicon(w_uniform)] [w_uniform.gender==PLURAL?"some":"a"] [(w_uniform.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [w_uniform.name]![tie_msg]" else - msg += "[T.He] [T.is] wearing [bicon(w_uniform)] \a [w_uniform].[tie_msg]
" + msg += "[T.He] [T.is] wearing [bicon(w_uniform)] \a [w_uniform].[tie_msg]" //head if(head && !(skip_gear & EXAMINE_SKIPHELMET) && head.show_examine) if(head.blood_DNA) - msg += "[T.He] [T.is] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] [(head.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [head.name] on [T.his] head!
" + msg += "[T.He] [T.is] wearing [bicon(head)] [head.gender==PLURAL?"some":"a"] [(head.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [head.name] on [T.his] head!" else - msg += "[T.He] [T.is] wearing [bicon(head)] \a [head] on [T.his] head.
" + msg += "[T.He] [T.is] wearing [bicon(head)] \a [head] on [T.his] head." //suit/armour if(wear_suit) @@ -162,73 +154,73 @@ tie_msg += " Attached to it is [english_list(U.accessories)]." if(wear_suit.blood_DNA) - msg += "[T.He] [T.is] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] [(wear_suit.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_suit.name][tie_msg]!
" + msg += "[T.He] [T.is] wearing [bicon(wear_suit)] [wear_suit.gender==PLURAL?"some":"a"] [(wear_suit.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_suit.name][tie_msg]!" else - msg += "[T.He] [T.is] wearing [bicon(wear_suit)] \a [wear_suit].[tie_msg]
" + msg += "[T.He] [T.is] wearing [bicon(wear_suit)] \a [wear_suit].[tie_msg]" //suit/armour storage if(s_store && !(skip_gear & EXAMINE_SKIPSUITSTORAGE) && s_store.show_examine) if(s_store.blood_DNA) - msg += "[T.He] [T.is] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] [(s_store.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [s_store.name] on [T.his] [wear_suit.name]!
" + msg += "[T.He] [T.is] carrying [bicon(s_store)] [s_store.gender==PLURAL?"some":"a"] [(s_store.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [s_store.name] on [T.his] [wear_suit.name]!" else - msg += "[T.He] [T.is] carrying [bicon(s_store)] \a [s_store] on [T.his] [wear_suit.name].
" + msg += "[T.He] [T.is] carrying [bicon(s_store)] \a [s_store] on [T.his] [wear_suit.name]." //back if(back && !(skip_gear & EXAMINE_SKIPBACKPACK) && back.show_examine) if(back.blood_DNA) - msg += "[T.He] [T.has] [bicon(back)] [back.gender==PLURAL?"some":"a"] [(back.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [back] on [T.his] back.
" + msg += "[T.He] [T.has] [bicon(back)] [back.gender==PLURAL?"some":"a"] [(back.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [back] on [T.his] back." else - msg += "[T.He] [T.has] [bicon(back)] \a [back] on [T.his] back.
" + msg += "[T.He] [T.has] [bicon(back)] \a [back] on [T.his] back." //left hand if(l_hand && l_hand.show_examine) if(l_hand.blood_DNA) - msg += "[T.He] [T.is] holding [bicon(l_hand)] [l_hand.gender==PLURAL?"some":"a"] [(l_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [l_hand.name] in [T.his] left hand!
" + msg += "[T.He] [T.is] holding [bicon(l_hand)] [l_hand.gender==PLURAL?"some":"a"] [(l_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [l_hand.name] in [T.his] left hand!" else - msg += "[T.He] [T.is] holding [bicon(l_hand)] \a [l_hand] in [T.his] left hand.
" + msg += "[T.He] [T.is] holding [bicon(l_hand)] \a [l_hand] in [T.his] left hand." //right hand if(r_hand && r_hand.show_examine) if(r_hand.blood_DNA) - msg += "[T.He] [T.is] holding [bicon(r_hand)] [r_hand.gender==PLURAL?"some":"a"] [(r_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [r_hand.name] in [T.his] right hand!
" + msg += "[T.He] [T.is] holding [bicon(r_hand)] [r_hand.gender==PLURAL?"some":"a"] [(r_hand.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [r_hand.name] in [T.his] right hand!" else - msg += "[T.He] [T.is] holding [bicon(r_hand)] \a [r_hand] in [T.his] right hand.
" + msg += "[T.He] [T.is] holding [bicon(r_hand)] \a [r_hand] in [T.his] right hand." //gloves if(gloves && !(skip_gear & EXAMINE_SKIPGLOVES) && gloves.show_examine) if(gloves.blood_DNA) - msg += "[T.He] [T.has] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [gloves.name] on [T.his] hands!
" + msg += "[T.He] [T.has] [bicon(gloves)] [gloves.gender==PLURAL?"some":"a"] [(gloves.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [gloves.name] on [T.his] hands!" else - msg += "[T.He] [T.has] [bicon(gloves)] \a [gloves] on [T.his] hands.
" + msg += "[T.He] [T.has] [bicon(gloves)] \a [gloves] on [T.his] hands." else if(blood_DNA && !(skip_body & EXAMINE_SKIPHANDS)) - msg += "[T.He] [T.has] [(hand_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained hands!
" + msg += "[T.He] [T.has] [(hand_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained hands!" //handcuffed? if(handcuffed && handcuffed.show_examine) if(istype(handcuffed, /obj/item/weapon/handcuffs/cable)) - msg += "[T.He] [T.is] [bicon(handcuffed)] restrained with cable!
" + msg += "[T.He] [T.is] [bicon(handcuffed)] restrained with cable!" else - msg += "[T.He] [T.is] [bicon(handcuffed)] handcuffed!
" + msg += "[T.He] [T.is] [bicon(handcuffed)] handcuffed!" //buckled if(buckled) - msg += "[T.He] [T.is] [bicon(buckled)] buckled to [buckled]!
" + msg += "[T.He] [T.is] [bicon(buckled)] buckled to [buckled]!" //belt if(belt && !(skip_gear & EXAMINE_SKIPBELT) && belt.show_examine) if(belt.blood_DNA) - msg += "[T.He] [T.has] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] [(belt.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [belt.name] about [T.his] waist!
" + msg += "[T.He] [T.has] [bicon(belt)] [belt.gender==PLURAL?"some":"a"] [(belt.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [belt.name] about [T.his] waist!" else - msg += "[T.He] [T.has] [bicon(belt)] \a [belt] about [T.his] waist.
" + msg += "[T.He] [T.has] [bicon(belt)] \a [belt] about [T.his] waist." //shoes if(shoes && !(skip_gear & EXAMINE_SKIPSHOES) && shoes.show_examine) if(shoes.blood_DNA) - msg += "[T.He] [T.is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [(shoes.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [shoes.name] on [T.his] feet!
" + msg += "[T.He] [T.is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [(shoes.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [shoes.name] on [T.his] feet!" else - msg += "[T.He] [T.is] wearing [bicon(shoes)] \a [shoes] on [T.his] feet.
" + msg += "[T.He] [T.is] wearing [bicon(shoes)] \a [shoes] on [T.his] feet." else if(feet_blood_DNA && !(skip_body & EXAMINE_SKIPHANDS)) - msg += "[T.He] [T.has] [(feet_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained feet!
" + msg += "[T.He] [T.has] [(feet_blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained feet!" //mask if(wear_mask && !(skip_gear & EXAMINE_SKIPMASK) && wear_mask.show_examine) @@ -237,24 +229,24 @@ descriptor = "in [T.his] mouth" if(wear_mask.blood_DNA) - msg += "[T.He] [T.has] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_mask.name] [descriptor]!
" + msg += "[T.He] [T.has] [bicon(wear_mask)] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_mask.name] [descriptor]!" else - msg += "[T.He] [T.has] [bicon(wear_mask)] \a [wear_mask] [descriptor].
" + msg += "[T.He] [T.has] [bicon(wear_mask)] \a [wear_mask] [descriptor]." //eyes if(glasses && !(skip_gear & EXAMINE_SKIPEYEWEAR) && glasses.show_examine) if(glasses.blood_DNA) - msg += "[T.He] [T.has] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] [(glasses.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [glasses] covering [T.his] eyes!
" + msg += "[T.He] [T.has] [bicon(glasses)] [glasses.gender==PLURAL?"some":"a"] [(glasses.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [glasses] covering [T.his] eyes!" else - msg += "[T.He] [T.has] [bicon(glasses)] \a [glasses] covering [T.his] eyes.
" + msg += "[T.He] [T.has] [bicon(glasses)] \a [glasses] covering [T.his] eyes." //left ear if(l_ear && !(skip_gear & EXAMINE_SKIPEARS) && l_ear.show_examine) - msg += "[T.He] [T.has] [bicon(l_ear)] \a [l_ear] on [T.his] left ear.
" + msg += "[T.He] [T.has] [bicon(l_ear)] \a [l_ear] on [T.his] left ear." //right ear if(r_ear && !(skip_gear & EXAMINE_SKIPEARS) && r_ear.show_examine) - msg += "[T.He] [T.has] [bicon(r_ear)] \a [r_ear] on [T.his] right ear.
" + msg += "[T.He] [T.has] [bicon(r_ear)] \a [r_ear] on [T.his] right ear." //ID if(wear_id && wear_id.show_examine) @@ -266,27 +258,27 @@ 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)) - msg += "[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id] yet something doesn't seem right...
" + msg += "[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id] yet something doesn't seem right..." else*/ - msg += "[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id].
" + msg += "[T.He] [T.is] wearing [bicon(wear_id)] \a [wear_id]." //Jitters if(is_jittery) if(jitteriness >= 300) - msg += "[T.He] [T.is] convulsing violently!
" + msg += "[T.He] [T.is] convulsing violently!" else if(jitteriness >= 200) - msg += "[T.He] [T.is] extremely jittery.
" + msg += "[T.He] [T.is] extremely jittery." else if(jitteriness >= 100) - msg += "[T.He] [T.is] twitching ever so slightly.
" + msg += "[T.He] [T.is] twitching ever so slightly." //splints for(var/organ in BP_ALL) var/obj/item/organ/external/o = get_organ(organ) if(o && o.splinted && o.splinted.loc == o) - msg += "[T.He] [T.has] \a [o.splinted] on [T.his] [o.name]!
" + msg += "[T.He] [T.has] \a [o.splinted] on [T.his] [o.name]!" if(suiciding) - msg += "[T.He] appears to have commited suicide... there is no hope of recovery.
" + msg += "[T.He] appears to have commited suicide... there is no hope of recovery." msg += attempt_vr(src,"examine_weight",args) //VOREStation Code msg += attempt_vr(src,"examine_nutrition",args) //VOREStation Code @@ -297,12 +289,12 @@ msg += attempt_vr(src,"examine_chimera",args) //VOREStation Code if(mSmallsize in mutations) - msg += "[T.He] [T.is] very short!
" + msg += "[T.He] [T.is] very short!" if (src.stat) - msg += "[T.He] [T.is]n't responding to anything around [T.him] and seems to be asleep.
" + msg += "[T.He] [T.is]n't responding to anything around [T.him] and seems to be asleep." if((stat == 2 || src.losebreath) && get_dist(user, src) <= 3) - msg += "[T.He] [T.does] not appear to be breathing.
" + msg += "[T.He] [T.does] not appear to be breathing." if(istype(user, /mob/living/carbon/human) && !user.stat && Adjacent(user)) user.visible_message("[usr] checks [src]'s pulse.", "You check [src]'s pulse.") spawn(15) @@ -313,15 +305,16 @@ to_chat(user, "[T.He] [T.has] a pulse!") if(fire_stacks) - msg += "[T.He] [T.is] covered in some liquid.
" + msg += "[T.He] [T.is] covered in some liquid." if(on_fire) - msg += "[T.He] [T.is] on fire!.
" + msg += "[T.He] [T.is] on fire!." var/ssd_msg = species.get_ssd(src) if(ssd_msg && (!should_have_organ("brain") || has_brain()) && stat != DEAD) if(!key) - msg += "[T.He] [T.is] [ssd_msg]. It doesn't look like [T.he] [T.is] waking up anytime soon.
" + msg += "[T.He] [T.is] [ssd_msg]. It doesn't look like [T.he] [T.is] waking up anytime soon." else if(!client) +<<<<<<< HEAD msg += "[T.He] [T.is] [ssd_msg].
" //VOREStation Add Start if(client && ((client.inactivity / 10) / 60 > 10)) //10 Minutes @@ -329,6 +322,9 @@ else if(disconnect_time) msg += "\[Disconnected/ghosted [round(((world.realtime - disconnect_time)/10)/60)] minutes ago\]\n" //VOREStation Add End +======= + msg += "[T.He] [T.is] [ssd_msg]." +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) var/list/wound_flavor_text = list() var/list/is_bleeding = list() @@ -341,9 +337,9 @@ var/obj/item/organ/external/E = organs_by_name[organ_tag] if(!E) - wound_flavor_text["[organ_descriptor]"] = "[T.He] [T.is] missing [T.his] [organ_descriptor].
" + wound_flavor_text["[organ_descriptor]"] = "[T.He] [T.is] missing [T.his] [organ_descriptor]." else if(E.is_stump()) - wound_flavor_text["[organ_descriptor]"] = "[T.He] [T.has] a stump where [T.his] [organ_descriptor] should be.
" + wound_flavor_text["[organ_descriptor]"] = "[T.He] [T.has] a stump where [T.his] [organ_descriptor] should be." else continue @@ -352,47 +348,51 @@ if((temp.organ_tag in hidden) && hidden[temp.organ_tag]) continue //Organ is hidden, don't talk about it if(temp.status & ORGAN_DESTROYED) - wound_flavor_text["[temp.name]"] = "[T.He] [T.is] missing [T.his] [temp.name].
" + wound_flavor_text["[temp.name]"] = "[T.He] [T.is] missing [T.his] [temp.name]." continue if(!looks_synth && temp.robotic == ORGAN_ROBOT) if(!(temp.brute_dam + temp.burn_dam)) - wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name].
" + wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name]." else - wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name] with [temp.get_wounds_desc()]!
" + wound_flavor_text["[temp.name]"] = "[T.He] [T.has] a [temp.name] with [temp.get_wounds_desc()]!" continue else if(temp.wounds.len > 0 || temp.open) if(temp.is_stump() && temp.parent_organ && organs_by_name[temp.parent_organ]) var/obj/item/organ/external/parent = organs_by_name[temp.parent_organ] - wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.his] [parent.name].
" + wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.his] [parent.name]." else - wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.his] [temp.name].
" + wound_flavor_text["[temp.name]"] = "[T.He] has [temp.get_wounds_desc()] on [T.his] [temp.name]." else wound_flavor_text["[temp.name]"] = "" if(temp.dislocated == 2) - wound_flavor_text["[temp.name]"] += "[T.His] [temp.joint] is dislocated!
" + wound_flavor_text["[temp.name]"] += "[T.His] [temp.joint] is dislocated!" if(temp.brute_dam > temp.min_broken_damage || (temp.status & (ORGAN_BROKEN | ORGAN_MUTATED))) - wound_flavor_text["[temp.name]"] += "[T.His] [temp.name] is dented and swollen!
" + wound_flavor_text["[temp.name]"] += "[T.His] [temp.name] is dented and swollen!" if(temp.germ_level > INFECTION_LEVEL_TWO && !(temp.status & ORGAN_DEAD)) - wound_flavor_text["[temp.name]"] += "[T.His] [temp.name] looks very infected!
" + wound_flavor_text["[temp.name]"] += "[T.His] [temp.name] looks very infected!" else if(temp.status & ORGAN_DEAD) - wound_flavor_text["[temp.name]"] += "[T.His] [temp.name] looks rotten!
" + wound_flavor_text["[temp.name]"] += "[T.His] [temp.name] looks rotten!" if(temp.status & ORGAN_BLEEDING) - is_bleeding["[temp.name]"] += "[T.His] [temp.name] is bleeding!
" + is_bleeding["[temp.name]"] += "[T.His] [temp.name] is bleeding!" if(temp.applied_pressure == src) - applying_pressure = "[T.He] is applying pressure to [T.his] [temp.name].
" + applying_pressure = "[T.He] is applying pressure to [T.his] [temp.name]." for(var/limb in wound_flavor_text) - msg += wound_flavor_text[limb] + var/flavor = wound_flavor_text[limb] + if(flavor) + msg += flavor for(var/limb in is_bleeding) - msg += is_bleeding[limb] + var/blood = is_bleeding[limb] + if(blood) + msg += blood for(var/implant in get_visible_implants(0)) - msg += "[src] [T.has] \a [implant] sticking out of [T.his] flesh!
" + msg += "[src] [T.has] \a [implant] sticking out of [T.his] flesh!" if(digitalcamo) - msg += "[T.He] [T.is] repulsively uncanny!
" + msg += "[T.He] [T.is] repulsively uncanny!" if(hasHUD(user,"security")) var/perpname = name @@ -410,8 +410,8 @@ if(R.fields["name"] == perpname) criminal = R.fields["criminal"] - msg += "Criminal status: \[[criminal]\]
" - msg += "Security records: \[View\] \[Add comment\]
" + msg += "Criminal status: \[[criminal]\]" + msg += "Security records: \[View\] \[Add comment\]" if(hasHUD(user,"medical")) var/perpname = name @@ -429,13 +429,15 @@ if (R.fields["name"] == perpname) medical = R.fields["p_stat"] - msg += "Physical status: \[[medical]\]
" - msg += "Medical records: \[View\] \[Add comment\]
" + msg += "Physical status: \[[medical]\]" + msg += "Medical records: \[View\] \[Add comment\]" - if(print_flavor_text()) - msg += "[print_flavor_text()]
" + var/flavor_text = print_flavor_text() + if(flavor_text) + msg += "[flavor_text]" +<<<<<<< HEAD // VOREStation Start if(ooc_notes) msg += "OOC Notes: \[View\]\n" @@ -445,6 +447,11 @@ // VOREStation End msg += "*---------*

" msg += applying_pressure +======= + msg += "*---------*
" + if(applying_pressure) + msg += applying_pressure +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) var/show_descs = show_descriptors_to(user) if(show_descs) @@ -453,9 +460,9 @@ if(pose) if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!] pose = addtext(pose,".") //Makes sure all emotes end with a period. - msg += "
[T.He] [pose]" + msg += "
[T.He] [pose]" //
intentional, extra gap. - to_chat(user, jointext(msg, null)) + return 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/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index d569730688..7f25b87e21 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -1,42 +1,39 @@ /mob/living/silicon/ai/examine(mob/user) - if(!..(user)) - return + . = ..() - var/msg = "" if (src.stat == DEAD) - msg += "It appears to be powered-down.\n" + . += "It appears to be powered-down." else - msg += "" if (src.getBruteLoss()) if (src.getBruteLoss() < 30) - msg += "It looks slightly dented.\n" + . += "It looks slightly dented." else - msg += "It looks severely dented!\n" + . += "It looks severely dented!" if (src.getFireLoss()) if (src.getFireLoss() < 30) - msg += "It looks slightly charred.\n" + . += "It looks slightly charred." else - msg += "Its casing is melted and heat-warped!\n" + . += "Its casing is melted and heat-warped!" if (src.getOxyLoss() && (aiRestorePowerRoutine != 0 && !APU_power)) if (src.getOxyLoss() > 175) - msg += "It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning.\n" + . += "It seems to be running on backup power. Its display is blinking a \"BACKUP POWER CRITICAL\" warning." else if(src.getOxyLoss() > 100) - msg += "It seems to be running on backup power. Its display is blinking a \"BACKUP POWER LOW\" warning.\n" + . += "It seems to be running on backup power. Its display is blinking a \"BACKUP POWER LOW\" warning." else - msg += "It seems to be running on backup power.\n" + . += "It seems to be running on backup power." if (src.stat == UNCONSCIOUS) - msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n" - msg += "" + . += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\"." + if(deployed_shell) - msg += "The wireless networking light is blinking.\n" - msg += "*---------*" + . += "The wireless networking light is blinking." + + . += "*---------*" + if(hardware && (hardware.owner == src)) - msg += "
" - msg += hardware.get_examine_desc() - to_chat(user,msg) + . += hardware.get_examine_desc() + user.showLaws(src) - return /mob/proc/showLaws(var/mob/living/silicon/S) return diff --git a/code/modules/mob/living/silicon/pai/examine.dm b/code/modules/mob/living/silicon/pai/examine.dm index 2f78cf262e..18f81c2f23 100644 --- a/code/modules/mob/living/silicon/pai/examine.dm +++ b/code/modules/mob/living/silicon/pai/examine.dm @@ -1,9 +1,9 @@ /mob/living/silicon/pai/examine(mob/user) - ..(user, infix = ", personal AI") + . = ..(user, infix = ", personal AI") - var/msg = "" switch(src.stat) if(CONSCIOUS) +<<<<<<< HEAD if(!src.client) msg += "\nIt appears to be in stand-by mode.\n" //afk if(UNCONSCIOUS) msg += "\nIt doesn't seem to be responding.\n" if(DEAD) msg += "\nIt looks completely unsalvageable.\n" @@ -15,12 +15,17 @@ // VOREStation Edit: End msg += "\n*---------*" +======= + if(!src.client) . += "It appears to be in stand-by mode." //afk + if(UNCONSCIOUS) . += "It doesn't seem to be responding." + if(DEAD) . += "It looks completely unsalvageable." + . += "*---------*" +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) - if(print_flavor_text()) msg += "\n[print_flavor_text()]\n" + if(print_flavor_text()) . += "\n[print_flavor_text()]\n" if (pose) - if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 ) + if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!] pose = addtext(pose,".") //Makes sure all emotes end with a period. - msg += "\nIt is [pose]" - - to_chat(user,msg) \ No newline at end of file + . += "
It is [pose]" //Extra
intentional + \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index f3f6122ea8..b52028d542 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -29,10 +29,10 @@ var/force_holder = null // /obj/item/weapon/gripper/examine(mob/user) - ..() + . = ..() if(wrapped) - to_chat(user, "\The [src] is holding \the [wrapped].") - wrapped.examine(user) + . += "\The [src] is holding \the [wrapped]." + . += wrapped.examine(user) /obj/item/weapon/gripper/CtrlClick(mob/user) drop_item() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 6287859ae6..fc8b033681 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -63,9 +63,9 @@ visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.") /obj/machinery/drone_fabricator/examine(mob/user) - ..(user) + . = ..() if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones) - to_chat(user, "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.") + . += "
A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone." /obj/machinery/drone_fabricator/proc/create_drone(var/client/player) diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index a6f4135c7a..a533f0900e 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,34 +1,32 @@ /mob/living/silicon/robot/examine(mob/user) var/custom_infix = custom_name ? ", [modtype] [braintype]" : "" - ..(user, infix = custom_infix) + . = ..(user, infix = custom_infix) - var/msg = "" - msg += "" if (src.getBruteLoss()) if (src.getBruteLoss() < 75) - msg += "It looks slightly dented.\n" + . += "It looks slightly dented." else - msg += "It looks severely dented!\n" + . += "It looks severely dented!" if (src.getFireLoss()) if (src.getFireLoss() < 75) - msg += "It looks slightly charred.\n" + . += "It looks slightly charred." else - msg += "It looks severely burnt and heat-warped!\n" - msg += "" + . += "It looks severely burnt and heat-warped!" if(opened) - msg += "Its cover is open and the power cell is [cell ? "installed" : "missing"].\n" + . += "Its cover is open and the power cell is [cell ? "installed" : "missing"]." else - msg += "Its cover is closed.\n" + . += "Its cover is closed." if(!has_power) - msg += "It appears to be running on backup power.\n" + . += "It appears to be running on backup power." switch(src.stat) if(CONSCIOUS) if(shell) - msg += "It appears to be an [deployed ? "active" : "empty"] AI shell.\n" + . += "It appears to be an [deployed ? "active" : "empty"] AI shell." else if(!src.client) +<<<<<<< HEAD msg += "It appears to be in stand-by mode.\n" //afk if(UNCONSCIOUS) msg += "It doesn't seem to be responding.\n" if(DEAD) msg += "It looks completely unsalvageable.\n" @@ -40,14 +38,18 @@ // VOREStation Edit: End msg += "*---------*" +======= + . += "It appears to be in stand-by mode." //afk + if(UNCONSCIOUS) . += "It doesn't seem to be responding." + if(DEAD) . += "It looks completely unsalvageable." + . += "*---------*" +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) - if(print_flavor_text()) msg += "\n[print_flavor_text()]\n" + if(print_flavor_text()) . += "
[print_flavor_text()]" if (pose) - if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 ) + if(!findtext(pose, regex("\[.?!]$"))) // Will be zero if the last character is not a member of [.?!] pose = addtext(pose,".") //Makes sure all emotes end with a period. - msg += "\nIt is [pose]" + . += "
It is [pose]" //Extra
intentional - to_chat(user,msg) user.showLaws(src) - return diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 1b13cb7096..a4a3c8c14b 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -430,10 +430,9 @@ max_doors = 5 /obj/item/weapon/inflatable_dispenser/examine(var/mob/user) - if(!..(user)) - return - to_chat(user, "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored.") - to_chat(user, "It is set to deploy [mode ? "doors" : "walls"]") + . = ..() + . += "It has [stored_walls] wall segment\s and [stored_doors] door segment\s stored." + . += "It is set to deploy [mode ? "doors" : "walls"]" /obj/item/weapon/inflatable_dispenser/attack_self() mode = !mode diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm index 3c222b9fdf..c231724e36 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/parrot.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD // Parrots can talk, and may repeat things it hears. /mob/living/simple_mob/animal/passive/bird/parrot name = "parrot" @@ -249,4 +250,257 @@ if(holder.stat || !holder.say_list || !message || speaker == holder) return var/datum/say_list/S = holder.say_list +======= +// Parrots can talk, and may repeat things it hears. +/mob/living/simple_mob/animal/passive/bird/parrot + name = "parrot" + description_info = "You can give it a headset by clicking on it with a headset. \ + To remove it, click the bird while on grab intent." + has_langs = list("Galactic Common", "Bird") + + ai_holder_type = /datum/ai_holder/simple_mob/passive/parrot + + // A headset, so that talking parrots can yell at the crew over comms. + // If set to a type, on initialize it will be instantiated into that type. + var/obj/item/device/radio/headset/my_headset = null + +// Say list +/datum/say_list/bird/poly + speak = list( + "Poly wanna cracker!", + "Check the singulo, you chucklefucks!", + "Wire the solars, you lazy bums!", + "WHO TOOK THE DAMN HARDSUITS?", + "OH GOD ITS FREE CALL THE SHUTTLE", + "Danger! Crystal hyperstructure instability!", + "CRYSTAL DELAMINATION IMMINENT.", + "Tweet tweet, I'm a Teshari.", + "Chitters.", + "Meteors have been detected on a collision course with the station!" + ) + +// Lets the AI use headsets. +// Player-controlled parrots will need to do it manually. +/mob/living/simple_mob/animal/passive/bird/parrot/ISay(message) + if(my_headset && prob(50)) + var/list/keys = list() + for(var/channel in my_headset.channels) + var/key = get_radio_key_from_channel(channel) + if(key) + keys += key + if(keys.len) + var/key_used = pick(keys) + return say("[key_used] [message]") + return say(message) + +// Ugly saycode so parrots can use their headsets. +/mob/living/simple_mob/animal/passive/bird/parrot/handle_message_mode(message_mode, message, verb, speaking, used_radios) + ..() + if(message_mode) + if(my_headset && istype(my_headset, /obj/item/device/radio)) + my_headset.talk_into(src, message, message_mode, verb, speaking) + used_radios += my_headset + +// Clicked on while holding an object. +/mob/living/simple_mob/animal/passive/bird/parrot/attackby(obj/item/I, mob/user) + if(istype(I, /obj/item/device/radio/headset)) + give_headset(I, user) + return + return ..() + +// Clicked on by empty hand. +/mob/living/simple_mob/animal/passive/bird/parrot/attack_hand(mob/living/L) + if(L.a_intent == I_GRAB && my_headset) + remove_headset(L) + else + ..() + + +/mob/living/simple_mob/animal/passive/bird/parrot/proc/give_headset(obj/item/device/radio/headset/new_headset, mob/living/user) + if(!istype(new_headset)) + to_chat(user, span("warning", "\The [new_headset] isn't a headset.")) + return + if(my_headset) + to_chat(user, span("warning", "\The [src] is already wearing \a [my_headset].")) + return + else + user.drop_item(new_headset) + my_headset = new_headset + new_headset.forceMove(src) + to_chat(user, span("warning", "You place \a [new_headset] on \the [src]. You monster.")) + to_chat(src, span("notice", "\The [user] gives you \a [new_headset]. You should put it to good use immediately.")) + return + +/mob/living/simple_mob/animal/passive/bird/parrot/proc/remove_headset(mob/living/user) + if(!my_headset) + to_chat(user, "\The [src] doesn't have a headset to remove, thankfully.") + else + ISay("BAWWWWWK LEAVE THE HEADSET BAWKKKKK!") + my_headset.forceMove(get_turf(src)) + user.put_in_hands(my_headset) + to_chat(user, span("notice", "You take away \the [src]'s [my_headset.name]. Finally.")) + to_chat(src, span("warning", "\The [user] takes your [my_headset.name] away! How cruel!")) + my_headset = null + +/mob/living/simple_mob/animal/passive/bird/parrot/examine(mob/user) + . = ..() + if(my_headset) + . += "It is wearing \a [my_headset]." + +/mob/living/simple_mob/animal/passive/bird/parrot/Initialize() + if(my_headset) + my_headset = new my_headset(src) + return ..() + +// Subtypes. + +// Best Bird +/mob/living/simple_mob/animal/passive/bird/parrot/poly + name = "Poly" + desc = "It's a parrot. An expert on quantum cracker theory." + icon_state = "poly" + icon_rest = "poly-held" + icon_dead = "poly-dead" + tt_desc = "E Ara macao" + my_headset = /obj/item/device/radio/headset/headset_eng + say_list_type = /datum/say_list/bird/poly + +// Best Bird with best headset. +/mob/living/simple_mob/animal/passive/bird/parrot/poly/ultimate + my_headset = /obj/item/device/radio/headset/omni + +/mob/living/simple_mob/animal/passive/bird/parrot/kea + name = "kea" + desc = "A species of parrot. On Earth, they are unique among other parrots for residing in alpine climates. \ + They are known to be intelligent and curious, which has made some consider them a pest." + icon_state = "kea" + icon_rest = "kea-held" + icon_dead = "kea-dead" + tt_desc = "E Nestor notabilis" + +/mob/living/simple_mob/animal/passive/bird/parrot/eclectus + name = "eclectus" + desc = "A species of parrot, this species features extreme sexual dimorphism in their plumage's colors. \ + A male eclectus has emerald green plumage, where as a female eclectus has red and purple plumage." + icon_state = "eclectus" + icon_rest = "eclectus-held" + icon_dead = "eclectus-dead" + tt_desc = "E Eclectus roratus" + +/mob/living/simple_mob/animal/passive/bird/parrot/eclectus/Initialize() + gender = pick(MALE, FEMALE) + if(gender == FEMALE) + icon_state = "eclectusf" + icon_rest = "eclectusf-held" + icon_dead = "eclectusf-dead" + return ..() + +/mob/living/simple_mob/animal/passive/bird/parrot/grey_parrot + name = "grey parrot" + desc = "A species of parrot. This one is predominantly grey, but has red tail feathers." + icon_state = "agrey" + icon_rest = "agrey-held" + icon_dead = "agrey-dead" + tt_desc = "E Psittacus erithacus" + +/mob/living/simple_mob/animal/passive/bird/parrot/black_headed_caique + name = "black-headed caique" + desc = "A species of parrot, these birds have a distinct black color on their heads, distinguishing them from their relative Caiques." + icon_state = "bcaique" + icon_rest = "bcaique-held" + icon_dead = "bcaique-dead" + tt_desc = "E Pionites melanocephalus" + +/mob/living/simple_mob/animal/passive/bird/parrot/white_caique + name = "white-bellied caique" + desc = "A species of parrot, they are also known as the Green-Thighed Parrot." + icon_state = "wcaique" + icon_rest = "wcaique-held" + icon_dead = "wcaique-dead" + tt_desc = "E Pionites leucogaster" + +/mob/living/simple_mob/animal/passive/bird/parrot/budgerigar + name = "budgerigar" + desc = "A species of parrot, they are also known as the common parakeet, or in some circles, the budgie. \ + This one is has its natural colors of green and yellow." + icon_state = "gbudge" + icon_rest = "gbudge-held" + icon_dead = "gbudge-dead" + tt_desc = "E Melopsittacus undulatus" + +/mob/living/simple_mob/animal/passive/bird/parrot/budgerigar/blue + icon_state = "bbudge" + icon_rest = "bbudge-held" + icon_dead = "bbudge-dead" + desc = "A species of parrot, they are also known as the common parakeet, or in some circles, the budgie. \ + This one has a mutation which altered its color to be blue instead of green and yellow." + +/mob/living/simple_mob/animal/passive/bird/parrot/budgerigar/bluegreen + icon_state = "bgbudge" + icon_rest = "bgbudge-held" + icon_dead = "bgbudge-dead" + desc = "A species of parrot, they are also known as the common parakeet, or in some circles, the budgie. \ + This one has a mutation which altered its color to be a mix of blue and green." + +/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel + name = "cockatiel" + desc = "A species of parrot. This one has a highly visible crest." + icon_state = "tiel" + icon_rest = "tiel-held" + icon_dead = "tiel-dead" + tt_desc = "E Nymphicus hollandicus" + +/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/white + icon_state = "wtiel" + icon_rest = "wtiel-held" + icon_dead = "wtiel-dead" + +/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/yellowish + icon_state = "luttiel" + icon_rest = "luttiel-held" + icon_dead = "luttiel-dead" + +/mob/living/simple_mob/animal/passive/bird/parrot/cockatiel/grey + icon_state = "blutiel" // idk why this is blu. + icon_rest = "blutiel-held" + icon_dead = "blutiel-dead" + +// This actually might be the yellow-crested cockatoo but idk. +/mob/living/simple_mob/animal/passive/bird/parrot/sulphur_cockatoo + name = "sulphur-crested cockatoo" + desc = "A species of parrot. This one has an expressive yellow crest. Their underwing and tail feathers are also yellow." + icon_state = "too" + icon_rest = "too-held" + icon_dead = "too-dead" + tt_desc = "E Cacatua galerita" + +// This was originally called 'hooded_too', which might not mean the unbrella cockatoo but idk. +/mob/living/simple_mob/animal/passive/bird/parrot/white_cockatoo + name = "white cockatoo" + desc = "A species of parrot. This one is also known as the Umbrella Cockatoo, due to the semicircular shape of its crest." + icon_state = "utoo" + icon_rest = "utoo-held" + icon_dead = "utoo-dead" + tt_desc = "E Cacatua alba" + +/mob/living/simple_mob/animal/passive/bird/parrot/pink_cockatoo + name = "pink cockatoo" + desc = "A species of parrot. This one is also known as Major Mitchell's cockatoo, \ + in honor of a human surveyor and explorer who existed before humans fully explored their home planet." + icon_state = "mtoo" + icon_rest = "mtoo-held" + icon_dead = "mtoo-dead" + tt_desc = "E Lophochroa leadbeateri" + + +// AI +/datum/ai_holder/simple_mob/passive/parrot + speak_chance = 2 + base_wander_delay = 8 + +/datum/ai_holder/simple_mob/passive/parrot/on_hear_say(mob/living/speaker, message) + if(holder.stat || !holder.say_list || !message || speaker == holder) + return + var/datum/say_list/S = holder.say_list +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) S.speak |= message \ No newline at end of file diff --git a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm index 19ee1e3a9d..0b1dea13ff 100644 --- a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm +++ b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm @@ -41,9 +41,9 @@ // this is to prevent easy checks from the opposing force. /mob/living/simple_mob/illusion/examine(mob/user) if(copying) - copying.examine(user) - return - ..() + return copying.examine(user) + else + return list("???") /mob/living/simple_mob/illusion/bullet_act(obj/item/projectile/P) if(!P) diff --git a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm index fde974026f..ac9e3d20ff 100644 --- a/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm +++ b/code/modules/mob/living/simple_mob/subtypes/occult/constructs/_construct.dm @@ -133,18 +133,13 @@ return ..() /mob/living/simple_mob/construct/examine(mob/user) - ..(user) - var/msg = "*---------*\nThis is [bicon(src)] \a [src]!\n" - if (src.health < src.getMaxHealth()) - msg += "" - if (src.health >= src.getMaxHealth()/2) - msg += "It looks slightly dented.\n" + . = ..(user) + var/max = getMaxHealth() + if (health < max) + if (health >= max/2) + . += "It looks slightly dented." else - msg += "It looks severely dented!\n" - msg += "" - msg += "*---------*" - - to_chat(user,msg) + . += "It looks severely dented!" //Constructs levitate, can fall from a shuttle with no harm, and are piloted by either damned spirits or some otherworldly entity. Let 'em float in space. /mob/living/simple_mob/construct/Process_Spacemove() diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm index 8103abf0d8..79d5bd8fd7 100644 --- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm +++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/xenobio.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD // These slimes have the mechanics xenobiologists care about, such as reproduction, mutating into new colors, and being able to submit through fear. /mob/living/simple_mob/slime/xenobio @@ -276,3 +277,283 @@ lines.Add(description_info) return lines.Join("\n") +======= +// These slimes have the mechanics xenobiologists care about, such as reproduction, mutating into new colors, and being able to submit through fear. + +/mob/living/simple_mob/slime/xenobio + desc = "The most basic of slimes. The grey slime has no remarkable qualities, however it remains one of the most useful colors for scientists." + layer = MOB_LAYER + 1 // Need them on top of other mobs or it looks weird when consuming something. + ai_holder_type = /datum/ai_holder/simple_mob/xenobio_slime // This should never be changed for xenobio slimes. + var/is_adult = FALSE // Slimes turn into adults when fed enough. Adult slimes are somewhat stronger, and can reproduce if fed enough. + var/maxHealth_adult = 200 + var/power_charge = 0 // Disarm attacks can shock someone if high/lucky enough. + var/mob/living/victim = null // the person the slime is currently feeding on + var/rainbow_core_candidate = TRUE // If false, rainbow cores cannot make this type randomly. + var/mutation_chance = 25 // Odds of spawning as a new color when reproducing. Can be modified by certain xenobio products. Carried across generations of slimes. + var/list/slime_mutation = list( + /mob/living/simple_mob/slime/xenobio/orange, + /mob/living/simple_mob/slime/xenobio/metal, + /mob/living/simple_mob/slime/xenobio/blue, + /mob/living/simple_mob/slime/xenobio/purple + ) + var/amount_grown = 0 // controls how long the slime has been overfed, if 10, grows or reproduces + var/number = 0 // This is used to make the slime semi-unique for indentification. + var/harmless = FALSE // Set to true when pacified. Makes the slime harmless, not get hungry, and not be able to grow/reproduce. + +/mob/living/simple_mob/slime/xenobio/Initialize(mapload, var/mob/living/simple_mob/slime/xenobio/my_predecessor) + ASSERT(ispath(ai_holder_type, /datum/ai_holder/simple_mob/xenobio_slime)) + number = rand(1, 1000) + update_name() + + . = ..() // This will make the AI and do the other mob constructor things. It will also return the default hint at the end. + + if(my_predecessor) + inherit_information(my_predecessor) + + +/mob/living/simple_mob/slime/xenobio/Destroy() + if(victim) + stop_consumption() // Unbuckle us from our victim. + return ..() + +// Called when a slime makes another slime by splitting. The predecessor slime will be deleted shortly afterwards. +/mob/living/simple_mob/slime/xenobio/proc/inherit_information(var/mob/living/simple_mob/slime/xenobio/predecessor) + if(!predecessor) + return + + var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder + var/datum/ai_holder/simple_mob/xenobio_slime/previous_AI = predecessor.ai_holder + ASSERT(istype(AI)) + ASSERT(istype(previous_AI)) + + // Now to transfer the information. + // Newly made slimes are bit more rebellious than their predecessors, but they also somewhat forget the atrocities the xenobiologist may have done. + AI.discipline = max(previous_AI.discipline - 1, 0) + AI.obedience = max(previous_AI.obedience - 1, 0) + AI.resentment = max(previous_AI.resentment - 1, 0) + AI.rabid = previous_AI.rabid + + +/mob/living/simple_mob/slime/xenobio/update_icon() + icon_living = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"][victim ? " eating" : ""]" + icon_dead = "[icon_state_override ? "[icon_state_override] slime" : "slime"] [is_adult ? "adult" : "baby"] dead" + icon_rest = icon_dead + ..() // This will apply the correct icon_state and do the other overlay-related things. + + +/mob/living/simple_mob/slime/xenobio/handle_special() + if(stat != DEAD) + handle_nutrition() + + if(victim) + handle_consumption() + + handle_stuttering() // ?? + + ..() + +/mob/living/simple_mob/slime/xenobio/examine(mob/user) + . = ..() + if(hat) + . += "It is wearing \a [hat]." + + if(stat == DEAD) + . += "It appears to be dead." + else if(incapacitated(INCAPACITATION_DISABLED)) + . += "It appears to be incapacitated." + else if(harmless) + . += "It appears to have been pacified." + else + if(has_AI()) + var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder + if(AI.rabid) + . += "It seems very, very angry and upset." + else if(AI.obedience >= 5) + . += "It looks rather obedient." + else if(AI.discipline) + . += "It has been subjugated by force, at least for now." + +/mob/living/simple_mob/slime/xenobio/proc/make_adult() + if(is_adult) + return + + is_adult = TRUE + melee_damage_lower = round(melee_damage_lower * 2) // 20 + melee_damage_upper = round(melee_damage_upper * 2) // 30 + maxHealth = maxHealth_adult + amount_grown = 0 + update_icon() + update_name() + +/mob/living/simple_mob/slime/xenobio/proc/update_name() + if(harmless) // Docile slimes are generally named, so we shouldn't mess with it. + return + name = "[slime_color] [is_adult ? "adult" : "baby"] [initial(name)] ([number])" + real_name = name + +/mob/living/simple_mob/slime/xenobio/update_mood() + var/old_mood = mood + if(incapacitated(INCAPACITATION_DISABLED)) + mood = "sad" + else if(harmless) + mood = ":33" + else if(has_AI()) + var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder + if(AI.rabid) + mood = "angry" + else if(AI.target) + mood = "mischevous" + else if(AI.discipline) + mood = "pout" + else + mood = ":3" + else + mood = ":3" + + if(old_mood != mood) + update_icon() + +/mob/living/simple_mob/slime/xenobio/proc/enrage() + if(harmless) + return + if(has_AI()) + var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder + AI.enrage() + +/mob/living/simple_mob/slime/xenobio/proc/pacify() + harmless = TRUE + if(has_AI()) + var/datum/ai_holder/simple_mob/xenobio_slime/AI = ai_holder + AI.pacify() + + faction = "neutral" + + // If for whatever reason the mob AI (or player) decides to try to attack something anyways. + melee_damage_upper = 0 + melee_damage_lower = 0 + + update_mood() + + +// These are verbs so that player slimes can evolve/split. +/mob/living/simple_mob/slime/xenobio/verb/evolve() + set category = "Slime" + set desc = "This will let you evolve from baby to adult slime." + + if(stat) + to_chat(src, span("warning", "I must be conscious to do this...")) + return + + if(harmless) + to_chat(src, span("warning", "I have been pacified. I cannot evolve...")) + return + + if(!is_adult) + if(amount_grown >= 10) + make_adult() + else + to_chat(src, span("warning", "I am not ready to evolve yet...")) + else + to_chat(src, span("warning", "I have already evolved...")) + + +/mob/living/simple_mob/slime/xenobio/verb/reproduce() + set category = "Slime" + set desc = "This will make you split into four new slimes." + + if(stat) + to_chat(src, span("warning", "I must be conscious to do this...")) + return + + if(harmless) + to_chat(src, span("warning", "I have been pacified. I cannot reproduce...")) + return + + if(is_adult) + if(amount_grown >= 10) + // Check if there's enough 'room' to split. + var/list/nearby_things = orange(1, src) + var/free_tiles = 0 + for(var/turf/T in nearby_things) + var/free = TRUE + if(T.density) // No walls. + continue + for(var/atom/movable/AM in T) + if(AM.density) + free = FALSE + break + + if(free) + free_tiles++ + + if(free_tiles < 3) // Three free tiles are needed, as four slimes are made and the 4th tile is from the center tile that the current slime occupies. + to_chat(src, span("warning", "It is too cramped here to reproduce...")) + return + + var/list/babies = list() + for(var/i = 1 to 4) + babies.Add(make_new_slime()) + + var/mob/living/simple_mob/slime/new_slime = pick(babies) + new_slime.universal_speak = universal_speak + if(src.mind) + src.mind.transfer_to(new_slime) + else + new_slime.key = src.key + qdel(src) + else + to_chat(src, span("warning", "I am not ready to reproduce yet...")) + else + to_chat(src, span("warning", "I have not evolved enough to reproduce yet...")) + +// Used when reproducing or dying. +/mob/living/simple_mob/slime/xenobio/proc/make_new_slime(var/desired_type) + var/t = src.type + if(desired_type) + t = desired_type + if(prob(mutation_chance / 10)) + t = /mob/living/simple_mob/slime/xenobio/rainbow + else if(prob(mutation_chance) && slime_mutation.len) + t = slime_mutation[rand(1, slime_mutation.len)] + var/mob/living/simple_mob/slime/xenobio/baby = new t(loc, src) + + // Handle 'inheriting' from parent slime. + baby.mutation_chance = mutation_chance + baby.power_charge = round(power_charge / 4) + + if(!istype(baby, /mob/living/simple_mob/slime/xenobio/rainbow)) + baby.unity = unity + baby.faction = faction + baby.friends = friends.Copy() + + step_away(baby, src) + return baby + +/mob/living/simple_mob/slime/xenobio/get_description_interaction() + var/list/results = list() + + if(!stat) + results += "[desc_panel_image("slimebaton")]to stun the slime, if it's being bad." + + results += ..() + + return results + +/mob/living/simple_mob/slime/xenobio/get_description_info() + var/list/lines = list() + var/intro_line = "Slimes are generally the test subjects of Xenobiology, with different colors having different properties. \ + They can be extremely dangerous if not handled properly." + lines.Add(intro_line) + lines.Add(null) // To pad the line breaks. + + var/list/rewards = list() + for(var/potential_color in slime_mutation) + var/mob/living/simple_mob/slime/S = potential_color + rewards.Add(initial(S.slime_color)) + var/reward_line = "This color of slime can mutate into [english_list(rewards)] colors, when it reproduces. It will do so when it has eatten enough." + lines.Add(reward_line) + lines.Add(null) + + lines.Add(description_info) + return lines.Join("\n") +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d1d65ff21d..91292a4a4a 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -237,7 +237,10 @@ return 1 face_atom(A) - A.examine(src) + var/list/results = A.examine(src) + if(!results || !results.len) + results = list("You were unable to examine that. Tell a developer!") + to_chat(src, jointext(results, "
")) /mob/verb/pointed(atom/A as mob|obj|turf in view()) set name = "Point To" diff --git a/code/modules/modular_computers/computers/modular_computer/damage.dm b/code/modules/modular_computers/computers/modular_computer/damage.dm index 9084bad735..2c7e357cda 100644 --- a/code/modules/modular_computers/computers/modular_computer/damage.dm +++ b/code/modules/modular_computers/computers/modular_computer/damage.dm @@ -1,9 +1,9 @@ /obj/item/modular_computer/examine(var/mob/user) . = ..() if(damage > broken_damage) - to_chat(user, "It is heavily damaged!") + . += "It is heavily damaged!" else if(damage) - to_chat(user, "It is damaged.") + . += "It is damaged." /obj/item/modular_computer/proc/break_apart() visible_message("\The [src] breaks apart!") diff --git a/code/modules/modular_computers/hardware/_hardware.dm b/code/modules/modular_computers/hardware/_hardware.dm index 95b020ca01..e82ab5b634 100644 --- a/code/modules/modular_computers/hardware/_hardware.dm +++ b/code/modules/modular_computers/hardware/_hardware.dm @@ -75,11 +75,11 @@ /obj/item/weapon/computer_hardware/examine(var/mob/user) . = ..() if(damage > damage_failure) - to_chat(user, "It seems to be severely damaged!") + . += "It seems to be severely damaged!" else if(damage > damage_malfunction) - to_chat(user, "It seems to be damaged!") + . += "It seems to be damaged!" else if(damage) - to_chat(user, "It seems to be slightly damaged.") + . += "It seems to be slightly damaged." // Damages the component. Contains necessary checks. Negative damage "heals" the component. /obj/item/weapon/computer_hardware/take_damage(var/amount) diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index f8e685b6d4..1a1d4081a7 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -70,11 +70,12 @@ O.hide(0) /turf/simulated/open/examine(mob/user, distance, infix, suffix) - if(..(user, 2)) + . = ..() + if(Adjacent(user)) var/depth = 1 for(var/T = GetBelow(src); isopenspace(T); T = GetBelow(T)) depth += 1 - to_chat(user, "It is about [depth] levels deep.") + . += "It is about [depth] levels deep." /** * Update icon and overlays of open space to be that of the turf below, plus any visible objects on that turf. diff --git a/code/modules/multiz/zshadow.dm b/code/modules/multiz/zshadow.dm index 949f9a7a94..49953e07a2 100644 --- a/code/modules/multiz/zshadow.dm +++ b/code/modules/multiz/zshadow.dm @@ -37,7 +37,7 @@ if(!owner) // The only time we should have a null owner is if we are in nullspace. Help figure out why we were examined. crash_with("[src] ([type]) @ [log_info_line()] was examined by [user] @ [global.log_info_line(user)]") - return + return list() return owner.examine(user, distance, infix, suffix) // Relay some stuff they hear diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index c697f9bea5..094d3eb32a 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -113,11 +113,11 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) callHook("debrain", list(brainmob)) /obj/item/organ/internal/brain/examine(mob/user) // -- TLE - ..(user) + . = ..() if(brainmob && brainmob.client)//if thar be a brain inside... the brain. - to_chat(user, "You can feel the small spark of life still left in this one.") + . += "You can feel the small spark of life still left in this one." else - to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later..") + . += "This one seems particularly lifeless. Perhaps it will regain some of its luster later..." /obj/item/organ/internal/brain/removed(var/mob/living/user) diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index 41b7a0ba39..c12d548235 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -158,9 +158,9 @@ var/list/organ_cache = list() handle_germ_effects() /obj/item/organ/examine(mob/user) - ..(user) + . = ..() if(status & ORGAN_DEAD) - to_chat(user, "The decay has set in.") + . += "Decay appears to have set in." //A little wonky: internal organs stop calling this (they return early in process) when dead, but external ones cause further damage when dead /obj/item/organ/proc/handle_germ_effects() diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 6ca1c97486..22249811c8 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -146,13 +146,12 @@ return ..() /obj/item/organ/external/examine() - ..() + . = ..() if(in_range(usr, src) || istype(usr, /mob/observer/dead)) for(var/obj/item/I in contents) if(istype(I, /obj/item/organ)) continue - to_chat(usr, "There is \a [I] sticking out of it.") - return + . += "There is \a [I] sticking out of it." /obj/item/organ/external/attackby(obj/item/weapon/W as obj, mob/living/user as mob) switch(stage) diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm index c1571c12ef..b359f552d5 100644 --- a/code/modules/overmap/ships/computers/sensors.dm +++ b/code/modules/overmap/ships/computers/sensors.dm @@ -165,13 +165,13 @@ /obj/machinery/shipsensors/examine(mob/user) . = ..() if(health <= 0) - to_chat(user, "\The [src] is wrecked.") + . += "It is wrecked." else if(health < max_health * 0.25) - to_chat(user, "\The [src] looks like it's about to break!") + . += "It looks like it's about to break!" else if(health < max_health * 0.5) - to_chat(user, "\The [src] looks seriously damaged!") + . += "It looks seriously damaged!" else if(health < max_health * 0.75) - to_chat(user, "\The [src] shows signs of damage!") + . += "It shows signs of damage!" /obj/machinery/shipsensors/bullet_act(var/obj/item/projectile/Proj) take_damage(Proj.get_structure_damage()) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index b94a330a63..224d8c7d74 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -142,12 +142,11 @@ free_space -= length(strip_html_properly(new_text)) /obj/item/weapon/paper/examine(mob/user) - ..() + . = ..() if(in_range(user, src) || istype(user, /mob/observer/dead)) show_content(usr) else - to_chat(user, "You have to go closer if you want to read it.") - return + . += "You have to go closer if you want to read it." /obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow=0) if(!(istype(user, /mob/living/carbon/human) || istype(user, /mob/observer/dead) || istype(user, /mob/living/silicon)) && !forceshow) diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 43b1a8c36d..28979b4154 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -96,11 +96,11 @@ to_chat(user, "You must hold \the [P] steady to burn \the [src].") /obj/item/weapon/paper_bundle/examine(mob/user) - if(..(user, 1)) - src.show_content(user) + . = ..() + if(Adjacent(user)) + show_content(user) else - to_chat(user, "It is too far away.") - return + . += "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 65003ee71e..f7a726d60d 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -94,13 +94,12 @@ /obj/item/weapon/paper_bin/examine(mob/user) - if(get_dist(src, user) <= 1) + . = ..() + if(Adjacent(user)) if(amount) - to_chat(user, "There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.") + . += "There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin." else - to_chat(user, "There are no papers in the bin.") - return - + . += "There are no papers in the bin." /obj/item/weapon/paper_bin/update_icon() if(amount < 1) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index eab9984d0f..6dcadea0a6 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -26,8 +26,9 @@ RefreshParts() /obj/machinery/photocopier/examine(mob/user as mob) - if(..(user, 1)) - to_chat(user, "The screen shows there's [toner ? "[toner]" : "no"] toner left in the printer.") + . = ..() + if(Adjacent(user)) + . += "The screen shows there's [toner ? "[toner]" : "no"] toner left in the printer." /obj/machinery/photocopier/attack_ai(mob/user as mob) return attack_hand(user) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index e56063e0ba..3641f5c6f6 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -51,11 +51,12 @@ var/global/photo_count = 0 ..() /obj/item/weapon/photo/examine(mob/user) + //This is one time we're not going to call parent, because photos are 'secret' unless you're close enough. if(in_range(user, src)) show(user) - to_chat(user,desc) + return list(desc) else - to_chat(user, "It is too far away.") + return list("It is too far away to examine.") /obj/item/weapon/photo/proc/show(mob/user as mob) user << browse_rsc(img, "tmp_photo_[id].png") diff --git a/code/modules/power/antimatter/fuel.dm b/code/modules/power/antimatter/fuel.dm index 4b0310f85f..e54f0eb0d7 100644 --- a/code/modules/power/antimatter/fuel.dm +++ b/code/modules/power/antimatter/fuel.dm @@ -68,8 +68,9 @@ /obj/item/weapon/fuel/examine(mob/user) - if(get_dist(src, user) <= 1) - to_chat(user, "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"].") + . = ..() + if(Adjacent(user)) + . += "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 0a5e2132c3..0541d2f1f0 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -251,29 +251,30 @@ src.update() /obj/machinery/power/apc/examine(mob/user) - if(..(user, 1)) + . = ..() + if(Adjacent(user)) if(stat & BROKEN) - to_chat(user, "This APC is broken.") - return - if(opened) + . += "This APC is broken." + + else if(opened) if(has_electronics && terminal) - to_chat(user, "The cover is [opened==2?"removed":"open"] and [ cell ? "a power cell is installed" : "the power cell is missing"].") + . += "The cover is [opened == 2 ? "removed" : "open"] and [ cell ? "a power cell is installed" : "the power cell is missing"]." else if (!has_electronics && terminal) - to_chat(user, "The frame is wired, but the electronics are missing.") + . += "The frame is wired, but the electronics are missing." else if (has_electronics && !terminal) - to_chat(user, "The electronics are installed, but not wired.") + . += "The electronics are installed, but not wired." else /* if (!has_electronics && !terminal) */ - to_chat(user, "It's just an empty metal frame.") + . += "It's just an empty metal frame." else if (wiresexposed) - to_chat(user, "The cover is closed and the wires are exposed.") + . += "The cover is closed and the wires are exposed." else if ((locked && emagged) || hacker) //Some things can cause locked && emagged. Malf AI causes hacker. - to_chat(user, "The cover is closed, but the panel is unresponsive.") + . += "The cover is closed, but the panel is unresponsive." else if(!locked && emagged) //Normal emag does this. - to_chat(user, "The cover is closed, but the panel is flashing an error.") + . += "The cover is closed, but the panel is flashing an error." else - to_chat(user, "The cover is closed.") + . += "The cover is closed." // update the APC icon to show the three base states diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index cf38607a56..dc7cd0c519 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -6,6 +6,7 @@ /obj/machinery/power/breakerbox name = "Breaker Box" + desc = "Large machine with heavy duty switching circuits used for advanced grid control." icon = 'icons/obj/power.dmi' icon_state = "bbox_off" //directwired = 0 @@ -40,11 +41,11 @@ set_state(1) /obj/machinery/power/breakerbox/examine(mob/user) - to_chat(user, "Large machine with heavy duty switching circuits used for advanced grid control") + . = ..() if(on) - to_chat(user, "It seems to be online.") + . += "It seems to be online." else - to_chat(user, "It seems to be offline.") + . += "It seems to be offline." /obj/machinery/power/breakerbox/attack_ai(mob/user) if(update_locked) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index fbb632e040..acf90fcadf 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -609,20 +609,13 @@ obj/structure/cable/proc/cableColor(var/colorC) w_class = ITEMSIZE_SMALL /obj/item/stack/cable_coil/examine(mob/user) - var/msg = "" - + . = ..() if(get_amount() == 1) - msg += "A short piece of power cable." + . += "Just a short piece remains." else if(get_amount() == 2) - msg += "A piece of power cable." - else - msg += "A coil of power cable." - - if(get_dist(src, user) <= 1) - msg += " There are [get_amount()] lengths of cable in the coil." - - to_chat(user, msg) - + . += "Just a couple of short pieces remain." + else if(Adjacent(user)) + . += "There are [get_amount()] lengths of cable in the coil." /obj/item/stack/cable_coil/verb/make_restraint() set name = "Make Cable Restraints" @@ -992,12 +985,10 @@ obj/structure/cable/proc/cableColor(var/colorC) return 0 /obj/item/stack/cable_coil/alien/examine(mob/user) - var/msg = "A spool of cable." + . = ..() - if(get_dist(src, user) <= 1) - msg += " It doesn't seem to have a beginning, or an end." - - to_chat(user, msg) + if(Adjacent(user)) + . += "It doesn't seem to have a beginning, or an end." /obj/item/stack/cable_coil/alien/attack_hand(mob/user as mob) if (user.get_inactive_hand() == src) diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 79f232f508..ec5800deb6 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -145,10 +145,10 @@ /obj/item/weapon/cell/examine(mob/user) - ..() - if(get_dist(src, user) <= 1) - to_chat(user, " It has a power rating of [maxcharge].\nThe charge meter reads [round(src.percent() )]%.") - return + . = ..() + if(Adjacent(user)) + . += "It has a power rating of [maxcharge]." + . += "The charge meter reads [round(src.percent() )]%." /obj/item/weapon/cell/attackby(obj/item/W, mob/user) ..() diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 7e9edb67da..8230cab45a 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -56,23 +56,22 @@ var/global/list/light_type_cache = list() icon_state = "tube-empty" /obj/machinery/light_construct/examine(mob/user) - if(!..(user, 2)) - return - - switch(src.stage) - if(1) - to_chat(user, "It's an empty frame.") - if(2) - to_chat(user, "It's wired.") - if(3) - to_chat(user, "The casing is closed.") - if(cell_connectors) - if(cell) - to_chat(user, "You see [cell] inside the casing.") + . = ..() + if(get_dist(user, src) <= 2) + switch(stage) + if(1) + . += "It's an empty frame." + if(2) + . += "It's wired." + if(3) + . += "The casing is closed." + if(cell_connectors) + if(cell) + . += "You see [cell] inside the casing." + else + . += "The casing has no power cell for backup power." else - to_chat(user, "The casing has no power cell for backup power.") - else - to_chat(user, "This casing doesn't support power cells for backup power.") + . += "This casing doesn't support power cells for backup power." /obj/machinery/light_construct/attack_hand(mob/user) . = ..() @@ -485,18 +484,19 @@ var/global/list/light_type_cache = list() // examine verb /obj/machinery/light/examine(mob/user) + . = ..() var/fitting = get_fitting_name() switch(status) if(LIGHT_OK) - to_chat(user, "[desc] It is turned [on? "on" : "off"].") + . += "It is turned [on? "on" : "off"]." if(LIGHT_EMPTY) - to_chat(user, "[desc] The [fitting] has been removed.") + . += "The [fitting] has been removed." if(LIGHT_BURNED) - to_chat(user, "[desc] The [fitting] is burnt out.") + . += "The [fitting] is burnt out." if(LIGHT_BROKEN) - to_chat(user, "[desc] The [fitting] has been smashed.") + . += "The [fitting] has been smashed." if(cell) - to_chat(user, "Its backup power charge meter reads [round((cell.charge / cell.maxcharge) * 100, 0.1)]%.") + . += "Its backup power charge meter reads [round((cell.charge / cell.maxcharge) * 100, 0.1)]%." /obj/machinery/light/proc/get_fitting_name() var/obj/item/weapon/light/L = light_type diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm index 8e32cccc30..33fb1fb97a 100644 --- a/code/modules/power/pacman2.dm +++ b/code/modules/power/pacman2.dm @@ -51,8 +51,8 @@ power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2)) examine(mob/user) - ..(user) - to_chat(user, "The generator has [P.air_contents.phoron] units of fuel left, producing [power_gen] per cycle.") + . = ..() + . += "The generator has [P.air_contents.phoron] units of fuel left, producing [power_gen] per cycle." handleInactive() heat -= 2 diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 2272abef83..852d4d5d0f 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -48,12 +48,12 @@ return /obj/machinery/power/port_gen/examine(mob/user) - if(!..(user,1 )) - return - if(active) - to_chat(user, "The generator is on.") - else - to_chat(user, "The generator is off.") + . = ..() + if(Adjacent(user)) //It literally has a light on the sprite, are you sure this is necessary? + if(active) + . += "The generator is on." + else + . += "The generator is off." /obj/machinery/power/port_gen/emp_act(severity) var/duration = 6000 //ten minutes @@ -144,13 +144,13 @@ power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2)) /obj/machinery/power/port_gen/pacman/examine(mob/user) - ..(user) - to_chat(user, "\The [src] appears to be producing [power_gen*power_output] W.") - to_chat(user, "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper.") + . = ..() + . += "It appears to be producing [power_gen*power_output] W." + . += "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper." if(IsBroken()) - to_chat(user, "\The [src] seems to have broken down.") + . += "It seems to have broken down." if(overheating) - to_chat(user, "\The [src] is overheating!") + . += "It is overheating!" /obj/machinery/power/port_gen/pacman/HasFuel() var/needed_sheets = power_output / time_per_sheet diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 1dc29c7fd7..b296b8916c 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -103,9 +103,9 @@ var/global/list/rad_collectors = list() return ..() /obj/machinery/power/rad_collector/examine(mob/user) - if (..(user, 3)) - to_chat(user, "The meter indicates that \the [src] is collecting [last_power] W.") - return 1 + . = ..() + if(get_dist(user, src) <= 3) + . += "The meter indicates that it is collecting [last_power] W." /obj/machinery/power/rad_collector/ex_act(severity) switch(severity) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 2e6cda0049..3b381ff2f0 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -267,15 +267,15 @@ qdel(src) /obj/machinery/power/emitter/examine(mob/user) - ..() + . = ..() var/integrity_percentage = round((integrity / initial(integrity)) * 100) switch(integrity_percentage) if(0 to 30) - to_chat(user, "\The [src] is close to falling apart!") + . += "It is close to falling apart!" if(31 to 70) - to_chat(user, "\The [src] is damaged.") + . += "It is damaged." if(77 to 99) - to_chat(user, "\The [src] is slightly damaged.") + . += "" //R-UST port /obj/machinery/power/emitter/proc/get_initial_fire_delay() diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 7b36dd7347..08af0c23a5 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -112,20 +112,17 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return 1 /obj/structure/particle_accelerator/examine(mob/user) - switch(src.construction_state) + . = ..() + + switch(construction_state) if(0) - src.desc = text("A [name], looks like it's not attached to the flooring") + . += "Looks like it's not attached to the flooring." if(1) - src.desc = text("A [name], it is missing some cables") + . += "It is missing some cables." if(2) - src.desc = text("A [name], the panel is open") + . += "The panel is open." if(3) - src.desc = text("The [name] is assembled") - if(powered) - src.desc = src.desc_holder - ..() - return - + . += "It is assembled." /obj/structure/particle_accelerator/attackby(obj/item/W, mob/user) if(istool(W)) @@ -295,19 +292,17 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin return /obj/machinery/particle_accelerator/examine(mob/user) - switch(src.construction_state) + . = ..() + + switch(construction_state) if(0) - src.desc = text("A [name], looks like it's not attached to the flooring") + . += "Looks like it's not attached to the flooring." if(1) - src.desc = text("A [name], it is missing some cables") + . += "It is missing some cables." if(2) - src.desc = text("A [name], the panel is open") + . += "The panel is open." if(3) - src.desc = text("The [name] is assembled") - if(powered) - src.desc = src.desc_holder - ..() - return + . += "It is assembled." /obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user) diff --git a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm index 5a4176ee89..386437db0b 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm @@ -37,11 +37,11 @@ ..() /obj/machinery/particle_smasher/examine(mob/user) - ..() - if(user in view(1)) - to_chat(user, "\The [src] contains:") + . = ..() + if(Adjacent(user)) + . += "\The [src] contains:" for(var/obj/item/I in contents) - to_chat(user, "\the [I]") + . += "\the [I]" /obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob) if(W.type == /obj/item/device/analyzer) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 20463bf05b..5a8c807642 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -71,10 +71,9 @@ energy = 0 // ensure we dont have miniballs of miniballs /obj/singularity/energy_ball/examine(mob/user) - ..() + . = ..() if(orbiting_balls.len) - to_chat(user, "The amount of orbiting mini-balls is [orbiting_balls.len].") - + . += "The amount of orbiting mini-balls is [orbiting_balls.len]." /obj/singularity/energy_ball/proc/move_the_basket_ball(var/move_amount) //we face the last thing we zapped, so this lets us favor that direction a bit diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 4ac7144069..b07cacd92b 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -51,9 +51,9 @@ icon_state = "[initial(icon_state)]-spent" /obj/item/ammo_casing/examine(mob/user) - ..() + . = ..() if (!BB) - to_chat(user, "This one is spent.") + . += "This one is spent." //Gun loading types #define SINGLE_CASING 1 //The gun only accepts ammo_casings. ammo_magazines should never have this as their mag_type. @@ -183,8 +183,8 @@ icon_state = (new_state)? new_state : initial(icon_state) /obj/item/ammo_magazine/examine(mob/user) - ..() - to_chat(user, "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!") + . = ..() + . += "There [(stored_ammo.len == 1)? "is" : "are"] [stored_ammo.len] round\s left!" //magazine icon state caching /var/global/list/magazine_icondata_keys = list() diff --git a/code/modules/projectiles/ammunition/magnetic.dm b/code/modules/projectiles/ammunition/magnetic.dm index b3e9c3a7c8..787ca15302 100644 --- a/code/modules/projectiles/ammunition/magnetic.dm +++ b/code/modules/projectiles/ammunition/magnetic.dm @@ -11,4 +11,4 @@ /obj/item/weapon/magnetic_ammo/examine(mob/user) . = ..() - to_chat(user, "There [(remaining == 1)? "is" : "are"] [remaining] flechette\s left!") \ No newline at end of file + . += "There [(remaining == 1)? "is" : "are"] [remaining] flechette\s left!" \ No newline at end of file diff --git a/code/modules/projectiles/ammunition/smartmag.dm b/code/modules/projectiles/ammunition/smartmag.dm index 3668145b41..81a299d5ee 100644 --- a/code/modules/projectiles/ammunition/smartmag.dm +++ b/code/modules/projectiles/ammunition/smartmag.dm @@ -50,12 +50,12 @@ produce() /obj/item/ammo_magazine/smart/examine(mob/user) - ..() + . = ..() if(attached_cell) - to_chat(user, "\The [src] is loaded with a [attached_cell.name]. It is [round(attached_cell.percent())]% charged.") + . += "\The [src] is loaded with a [attached_cell.name]. It is [round(attached_cell.percent())]% charged." else - to_chat(user, "\The [src] does not appear to have a power source installed.") + . += "\The [src] does not appear to have a power source installed." /obj/item/ammo_magazine/smart/update_icon() if(attached_cell) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 561ebeb641..f7372bbdf6 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -745,7 +745,7 @@ . = ..() if(firemodes.len > 1) var/datum/firemode/current_mode = firemodes[sel_mode] - to_chat(user, "The fire selector is set to [current_mode.name].") + . += "The fire selector is set to [current_mode.name]." /obj/item/weapon/gun/proc/switch_firemodes(mob/user) if(firemodes.len <= 1) diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 43263bf54a..e58826dd0c 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -178,12 +178,11 @@ if(power_supply) if(charge_cost) var/shots_remaining = round(power_supply.charge / max(1, charge_cost)) // Paranoia - to_chat(user, "Has [shots_remaining] shot\s remaining.") + . += "Has [shots_remaining] shot\s remaining." else - to_chat(user, "Has infinite shots remaining.") + . += "Has infinite shots remaining." else - to_chat(user, "Does not have a power cell.") - return + . += "Does not have a power cell." /obj/item/weapon/gun/energy/update_icon(var/ignore_inhands) if(power_supply == null) diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index b94c2ab232..6669c5082f 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -208,18 +208,18 @@ icon_state = "crossbowframe[buildstate]" /obj/item/weapon/crossbowframe/examine(mob/user) - ..(user) + . = ..() switch(buildstate) if(1) - to_chat(user, "It has a loose rod frame in place.") + . += "It has a loose rod frame in place." if(2) - to_chat(user, "It has a steel backbone welded in place.") + . += "It has a steel backbone welded in place." if(3) - to_chat(user, "It has a steel backbone and a cell mount installed.") + . += "It has a steel backbone and a cell mount installed." if(4) - to_chat(user, "It has a steel backbone, plastic lath and a cell mount installed.") + . += "It has a steel backbone, plastic lath and a cell mount installed." if(5) - to_chat(user, "It has a steel cable loosely strung across the lath.") + . += "It has a steel cable loosely strung across the lath." /obj/item/weapon/crossbowframe/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/stack/rods)) diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index c016fe0797..259d5e2e82 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -36,11 +36,12 @@ update_icon() /obj/item/weapon/gun/launcher/grenade/examine(mob/user) - if(..(user, 2)) + . = ..() + if(get_dist(user, src) <= 2) var/grenade_count = grenades.len + (chambered? 1 : 0) - to_chat(user, "Has [grenade_count] grenade\s remaining.") + . += "Has [grenade_count] grenade\s remaining." if(chambered) - to_chat(user, "\A [chambered] is chambered.") + . += "\A [chambered] is chambered." /obj/item/weapon/gun/launcher/grenade/proc/load(obj/item/weapon/grenade/G, mob/user) if(G.loadable) diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm index c9bfa465f6..b8fe6c4e35 100644 --- a/code/modules/projectiles/guns/launcher/pneumatic.dm +++ b/code/modules/projectiles/guns/launcher/pneumatic.dm @@ -99,13 +99,13 @@ return launched /obj/item/weapon/gun/launcher/pneumatic/examine(mob/user) - if(!..(user, 2)) - return - to_chat(user, "The valve is dialed to [pressure_setting]%.") - if(tank) - to_chat(user, "The tank dial reads [tank.air_contents.return_pressure()] kPa.") - else - to_chat(user, "Nothing is attached to the tank valve!") + . = ..() + if(get_dist(user, src) <= 2) + . += "The valve is dialed to [pressure_setting]%." + if(tank) + . += "The tank dial reads [tank.air_contents.return_pressure()] kPa." + else + . += "Nothing is attached to the tank valve!" /obj/item/weapon/gun/launcher/pneumatic/update_release_force(obj/item/projectile) if(tank) @@ -150,18 +150,18 @@ icon_state = "pneumatic[buildstate]" /obj/item/weapon/cannonframe/examine(mob/user) - ..(user) + . = ..() switch(buildstate) if(1) - to_chat(user, "It has a pipe segment installed.") + . += "It has a pipe segment installed." if(2) - to_chat(user, "It has a pipe segment welded in place.") + . += "It has a pipe segment welded in place." if(3) - to_chat(user, "It has an outer chassis installed.") + . += "It has an outer chassis installed." if(4) - to_chat(user, "It has an outer chassis welded in place.") + . += "It has an outer chassis welded in place." if(5) - to_chat(user, "It has a transfer valve installed.") + . += "It has a transfer valve installed." /obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob) if(istype(W,/obj/item/pipe)) diff --git a/code/modules/projectiles/guns/launcher/rocket.dm b/code/modules/projectiles/guns/launcher/rocket.dm index 13bb0025d6..3e108b2982 100644 --- a/code/modules/projectiles/guns/launcher/rocket.dm +++ b/code/modules/projectiles/guns/launcher/rocket.dm @@ -17,9 +17,9 @@ var/list/rockets = new/list() /obj/item/weapon/gun/launcher/rocket/examine(mob/user) - if(!..(user, 2)) - return - to_chat(user, "[rockets.len] / [max_rockets] rockets.") + . = ..() + if(get_dist(user, src) <= 2) + . += "[rockets.len] / [max_rockets] rockets." /obj/item/weapon/gun/launcher/rocket/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/ammo_casing/rocket)) diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm index 4cb86a6d31..9d59dbbe1d 100644 --- a/code/modules/projectiles/guns/magnetic/bore.dm +++ b/code/modules/projectiles/guns/magnetic/bore.dm @@ -24,7 +24,9 @@ /obj/item/weapon/gun/magnetic/matfed/examine(mob/user) . = ..() - show_ammo(user) + var/ammotext = show_ammo() + if(ammotext) + . += ammotext /obj/item/weapon/gun/magnetic/matfed/update_icon() var/list/overlays_to_add = list() @@ -69,9 +71,9 @@ /obj/item/weapon/gun/magnetic/matfed/use_ammo() mat_storage -= mat_cost -/obj/item/weapon/gun/magnetic/matfed/show_ammo(var/mob/user) +/obj/item/weapon/gun/magnetic/matfed/show_ammo() if(mat_storage) - to_chat(user, "It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.") + return list("It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.") /obj/item/weapon/gun/magnetic/matfed/attackby(var/obj/item/thing, var/mob/user) if(removable_components) diff --git a/code/modules/projectiles/guns/magnetic/gasthrower.dm b/code/modules/projectiles/guns/magnetic/gasthrower.dm index 742b5bd6c5..8132644bf9 100644 --- a/code/modules/projectiles/guns/magnetic/gasthrower.dm +++ b/code/modules/projectiles/guns/magnetic/gasthrower.dm @@ -65,14 +65,14 @@ Tank.air_contents.remove(moles_to_pull) /obj/item/weapon/gun/magnetic/gasthrower/show_ammo(var/mob/user) - ..() + . = ..() if(loaded) var/obj/item/weapon/tank/T = loaded - to_chat(user, "\The [T]'s pressure meter shows: [T.air_contents.return_pressure()] kpa.") + . += "\The [T]'s pressure meter shows: [T.air_contents.return_pressure()] kpa." switch(check_ammo()) if(TRUE) - to_chat(user, "\The [src]'s display registers a proper fuel mixture.") + . += "\The [src]'s display registers a proper fuel mixture." if(FALSE) - to_chat(user, "\The [src]'s display registers an improper fuel mixture.") + . += "\The [src]'s display registers an improper fuel mixture." diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm index c327a2b51e..8c6d007fc0 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic.dm @@ -66,28 +66,30 @@ overlays = overlays_to_add ..() -/obj/item/weapon/gun/magnetic/proc/show_ammo(var/mob/user) +/obj/item/weapon/gun/magnetic/proc/show_ammo() + var/list/ammotext = list() if(loaded) - to_chat(user, "It has \a [loaded] loaded.") + ammotext += "It has \a [loaded] loaded." + + return ammotext /obj/item/weapon/gun/magnetic/examine(var/mob/user) - . = ..(user, 2) - if(.) - show_ammo(user) + . = ..() + if(get_dist(user, src) <= 2) + . += show_ammo() if(cell) - to_chat(user, "The installed [cell.name] has a charge level of [round((cell.charge/cell.maxcharge)*100)]%.") + . += "The installed [cell.name] has a charge level of [round((cell.charge/cell.maxcharge)*100)]%." if(capacitor) - to_chat(user, "The installed [capacitor.name] has a charge level of [round((capacitor.charge/capacitor.max_charge)*100)]%.") + . += "The installed [capacitor.name] has a charge level of [round((capacitor.charge/capacitor.max_charge)*100)]%." if(!cell || !capacitor) - to_chat(user, "The capacitor charge indicator is blinking red. Maybe you should check the cell or capacitor.") + . += "The capacitor charge indicator is blinking red. Maybe you should check the cell or capacitor." else if(capacitor.charge < power_cost) - to_chat(user, "The capacitor charge indicator is amber.") + . += "The capacitor charge indicator is amber." else - to_chat(user, "The capacitor charge indicator is green.") - return TRUE + . += "The capacitor charge indicator is green." /obj/item/weapon/gun/magnetic/attackby(var/obj/item/thing, var/mob/user) diff --git a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm index f37c44849c..637f2460a6 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm @@ -88,22 +88,22 @@ icon_state = "coilgun_construction_[construction_stage]" /obj/item/weapon/coilgun_assembly/examine(var/mob/user) - . = ..(user,2) - if(.) + . = ..() + if(get_dist(user, src) <= 2) switch(construction_stage) if(2) - to_chat(user, "It has a metal frame loosely shaped around the stock.") + . += "It has a metal frame loosely shaped around the stock." if(3) - to_chat(user, "It has a metal frame duct-taped to the stock.") + . += "It has a metal frame duct-taped to the stock." if(4) - to_chat(user, "It has a length of pipe attached to the body.") + . += "It has a length of pipe attached to the body." if(4) - to_chat(user, "It has a length of pipe welded to the body.") + . += "It has a length of pipe welded to the body." if(6) - to_chat(user, "It has a cable mount and capacitor jack wired to the frame.") + . += "It has a cable mount and capacitor jack wired to the frame." if(7) - to_chat(user, "It has a single superconducting coil threaded onto the barrel.") + . += "It has a single superconducting coil threaded onto the barrel." if(8) - to_chat(user, "It has a pair of superconducting coils threaded onto the barrel.") + . += "It has a pair of superconducting coils threaded onto the barrel." if(9) - to_chat(user, "It has three superconducting coils attached to the body, waiting to be secured.") + . += "It has three superconducting coils attached to the body, waiting to be secured." diff --git a/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm b/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm index 158ed31f67..dbcc1a1b41 100644 --- a/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm +++ b/code/modules/projectiles/guns/magnetic/magnetic_railgun.dm @@ -31,12 +31,12 @@ // Not going to check type repeatedly, if you code or varedit // load_type and get runtime errors, don't come crying to me. -/obj/item/weapon/gun/magnetic/railgun/show_ammo(var/mob/user) +/obj/item/weapon/gun/magnetic/railgun/show_ammo() var/obj/item/weapon/rcd_ammo/ammo = loaded if (ammo) - to_chat(user, "There are [ammo.remaining] shot\s remaining in \the [loaded].") + return list("There are [ammo.remaining] shot\s remaining in \the [loaded].") else - to_chat(user, "There is nothing loaded.") + return list("There is nothing loaded.") /obj/item/weapon/gun/magnetic/railgun/check_ammo() var/obj/item/weapon/rcd_ammo/ammo = loaded @@ -77,9 +77,9 @@ ) /obj/item/weapon/gun/magnetic/railgun/automatic/examine(var/mob/user) - . = ..(user,1) - if(.) - to_chat(user, "Someone has scratched Ultima Ratio Regum onto the side of the barrel.") + . = ..() + if(Adjacent(user)) + . += "Someone has scratched Ultima Ratio Regum onto the side of the barrel." /obj/item/weapon/gun/magnetic/railgun/flechette name = "flechette gun" diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index b7b797a1a3..d0d321b299 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -230,11 +230,10 @@ update_icon() //make sure to do this after unsetting ammo_magazine /obj/item/weapon/gun/projectile/examine(mob/user) - ..(user) + . = ..() if(ammo_magazine) - to_chat(user, "It has \a [ammo_magazine] loaded.") - to_chat(user, "Has [getAmmo()] round\s remaining.") - return + . += "It has \a [ammo_magazine] loaded." + . += "It has [getAmmo()] round\s remaining." /obj/item/weapon/gun/projectile/proc/getAmmo() var/bullets = 0 diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index c48bc499aa..ab107fb0b5 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -186,11 +186,11 @@ return /obj/item/weapon/gun/projectile/automatic/z8/examine(mob/user) - ..() + . = ..() if(launcher.chambered) - to_chat(user, "\The [launcher] has \a [launcher.chambered] loaded.") + . += "\The [launcher] has \a [launcher.chambered] loaded." else - to_chat(user, "\The [launcher] is empty.") + . += "\The [launcher] is empty." /obj/item/weapon/gun/projectile/automatic/l6_saw name = "light machine gun" diff --git a/code/modules/projectiles/guns/projectile/dartgun.dm b/code/modules/projectiles/guns/projectile/dartgun.dm index 861773521b..c0a6180352 100644 --- a/code/modules/projectiles/guns/projectile/dartgun.dm +++ b/code/modules/projectiles/guns/projectile/dartgun.dm @@ -100,16 +100,13 @@ fill_dart(dart) /obj/item/weapon/gun/projectile/dartgun/examine(mob/user) - //update_icon() - //if (!..(user, 2)) - // return - ..() - if (beakers.len) - to_chat(user, "[src] contains:") + . = ..() + if(beakers.len) + . += "[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) - to_chat(user, "[R.volume] units of [R.name]") + . += "[R.volume] units of [R.name]" /obj/item/weapon/gun/projectile/dartgun/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/weapon/reagent_containers/glass)) diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index c9f6f917c8..e407703498 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -249,14 +249,14 @@ obj/item/weapon/gun/projectile/revolver/detective45/verb/rename_gun() chamber_offset = rand(0,max_shells - loaded.len) /obj/item/weapon/gun/projectile/revolver/lemat/examine(mob/user) - ..() + . = ..() if(secondary_loaded) var/to_print for(var/round in secondary_loaded) to_print += round - to_chat(user, "\The [src] has a secondary barrel loaded with \a [to_print]") + . += "It has a secondary barrel loaded with \a [to_print]" else - to_chat(user, "\The [src] has a secondary barrel that is empty.") + . += "It has a secondary barrel that is empty." //Ported from Bay diff --git a/code/modules/projectiles/guns/vox.dm b/code/modules/projectiles/guns/vox.dm index 0a98a1cc61..17f0b6e240 100644 --- a/code/modules/projectiles/guns/vox.dm +++ b/code/modules/projectiles/guns/vox.dm @@ -34,8 +34,8 @@ update_icon() /obj/item/weapon/gun/launcher/spikethrower/examine(mob/user) - ..(user) - to_chat(user, "It has [spikes] spike\s remaining.") + . = ..() + . += "It has [spikes] spike\s remaining." /obj/item/weapon/gun/launcher/spikethrower/update_icon() icon_state = "spikethrower[spikes]" diff --git a/code/modules/reagents/dispenser/cartridge.dm b/code/modules/reagents/dispenser/cartridge.dm index 6a8d01a240..444577aaa5 100644 --- a/code/modules/reagents/dispenser/cartridge.dm +++ b/code/modules/reagents/dispenser/cartridge.dm @@ -22,14 +22,14 @@ setLabel(R.name) /obj/item/weapon/reagent_containers/chem_disp_cartridge/examine(mob/user) - ..() - to_chat(user, "It has a capacity of [volume] units.") + . = ..() + . += "It has a capacity of [volume] units." if(reagents.total_volume <= 0) - to_chat(user, "It is empty.") + . += "It is empty." else - to_chat(user, "It contains [reagents.total_volume] units of liquid.") + . += "It contains [reagents.total_volume] units of liquid." if(!is_open_container()) - to_chat(user, "The cap is sealed.") + . += "The cap is sealed." /obj/item/weapon/reagent_containers/chem_disp_cartridge/verb/verb_set_label(L as text) set name = "Set Cartridge Label" diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm index 391659762f..69577da357 100644 --- a/code/modules/reagents/dispenser/dispenser2.dm +++ b/code/modules/reagents/dispenser/dispenser2.dm @@ -26,8 +26,8 @@ add_cartridge(new type(src)) /obj/machinery/chemical_dispenser/examine(mob/user) - ..() - to_chat(user, "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more.") + . = ..() + . += "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more." /obj/machinery/chemical_dispenser/proc/add_cartridge(obj/item/weapon/reagent_containers/chem_disp_cartridge/C, mob/user) if(!istype(C)) diff --git a/code/modules/reagents/distilling/distilling.dm b/code/modules/reagents/distilling/distilling.dm index 40a1e7e6b2..645f13c76b 100644 --- a/code/modules/reagents/distilling/distilling.dm +++ b/code/modules/reagents/distilling/distilling.dm @@ -109,31 +109,31 @@ ..() /obj/machinery/portable_atmospherics/powered/reagent_distillery/examine(mob/user) - ..() - if(get_dist(user, src) < 3) - to_chat(user, "\The [src] is powered [on ? "on" : "off"].") + . = ..() + if(get_dist(user, src) <= 2) + . += "\The [src] is powered [on ? "on" : "off"]." - to_chat(user, "\The [src]'s gauges read:") + . += "\The [src]'s gauges read:" if(!use_atmos) - to_chat(user, "- Target Temperature: [target_temp]") - to_chat(user, "- Temperature: [current_temp]") + . += "- Target Temperature: [target_temp]" + . += "- Temperature: [current_temp]" if(InputBeaker) if(InputBeaker.reagents.reagent_list.len) - to_chat(user, "\The [src]'s input beaker holds [InputBeaker.reagents.total_volume] units of liquid.") + . += "\The [src]'s input beaker holds [InputBeaker.reagents.total_volume] units of liquid." else - to_chat(user, "\The [src]'s input beaker is empty!") + . += "\The [src]'s input beaker is empty!" if(Reservoir.reagents.reagent_list.len) - to_chat(user, "\The [src]'s internal buffer holds [Reservoir.reagents.total_volume] units of liquid.") + . += "\The [src]'s internal buffer holds [Reservoir.reagents.total_volume] units of liquid." else - to_chat(user, "\The [src]'s internal buffer is empty!") + . += "\The [src]'s internal buffer is empty!" if(OutputBeaker) if(OutputBeaker.reagents.reagent_list.len) - to_chat(user, "\The [src]'s output beaker holds [OutputBeaker.reagents.total_volume] units of liquid.") + . += "\The [src]'s output beaker holds [OutputBeaker.reagents.total_volume] units of liquid." else - to_chat(user, "\The [src]'s output beaker is empty!") + . += "\The [src]'s output beaker is empty!" /obj/machinery/portable_atmospherics/powered/reagent_distillery/verb/toggle_power(mob/user = usr) set name = "Toggle Distillery Heating" @@ -186,7 +186,7 @@ switch(choice) if("examine") - examine(user) + user.examinate(src) if("use") toggle_power(user) diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 95afc0aa43..d1a63ac41b 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -116,12 +116,10 @@ to_chat(usr, "Synthesizer is now producing '[R.name]'.") /obj/item/weapon/reagent_containers/borghypo/examine(mob/user) - if(!..(user, 2)) - return - - var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]] - - to_chat(user, "It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.") + . = ..() + if(get_dist(user, src) <= 2) + var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]] + . += "It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left." /obj/item/weapon/reagent_containers/borghypo/service name = "cyborg drink synthesizer" diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index da0205f9ea..7ffcf28881 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -14,12 +14,12 @@ drop_sound = 'sound/items/drop/glass.ogg' /obj/item/weapon/reagent_containers/dropper/examine(var/mob/user) - if(!..(user, 2)) - return - if(reagents && reagents.reagent_list.len) - to_chat(user, "It contains [reagents.total_volume] units of liquid.") - else - to_chat(user, "It is empty.") + . = ..() + if(get_dist(user, src) <= 2) + if(reagents && reagents.reagent_list.len) + . += "It contains [reagents.total_volume] units of liquid." + else + . += "It is empty." /obj/item/weapon/reagent_containers/dropper/afterattack(var/obj/target, var/mob/user, var/proximity) if(!target.reagents || !proximity) return diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 4d320cc86c..44b2af6a5d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -60,14 +60,14 @@ base_desc = desc /obj/item/weapon/reagent_containers/glass/examine(var/mob/user) - if(!..(user, 2)) - return - if(reagents && reagents.reagent_list.len) - to_chat(user, "It contains [reagents.total_volume] units of liquid.") - else - to_chat(user, "It is empty.") - if(!is_open_container()) - to_chat(user, "Airtight lid seals it completely.") + . = ..() + if(get_dist(user, src) <= 2) + if(reagents && reagents.reagent_list.len) + . += "It contains [reagents.total_volume] units of liquid." + else + . += "It is empty." + if(!is_open_container()) + . += "Airtight lid seals it completely." /obj/item/weapon/reagent_containers/glass/attack_self() ..() diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index aaa8cec486..0963f45ba9 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -171,11 +171,11 @@ icon_state = "[initial(icon_state)]0" /obj/item/weapon/reagent_containers/hypospray/autoinjector/examine(mob/user) - . = ..(user) + . = ..() if(reagents && reagents.reagent_list.len) - to_chat(user, "It is currently loaded.") + . += "It is currently loaded." else - to_chat(user, "It is spent.") + . += "It is spent." /obj/item/weapon/reagent_containers/hypospray/autoinjector/detox name = "autoinjector (antitox)" diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index 3e94bedd59..1aece5b845 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -79,9 +79,9 @@ to_chat(user, "You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray.") /obj/item/weapon/reagent_containers/spray/examine(mob/user) - if(..(user, 0) && loc == user) - to_chat(user, "[round(reagents.total_volume)] units left.") - return + . = ..() + if(loc == user) + . += "[round(reagents.total_volume)] units left." /obj/item/weapon/reagent_containers/spray/verb/empty() @@ -133,8 +133,9 @@ reagents.add_reagent("condensedcapsaicin", 40) /obj/item/weapon/reagent_containers/spray/pepper/examine(mob/user) - if(..(user, 1)) - to_chat(user, "The safety is [safety ? "on" : "off"].") + . = ..() + if(Adjacent(user)) + . += "The safety is [safety ? "on" : "off"]." /obj/item/weapon/reagent_containers/spray/pepper/attack_self(var/mob/user) safety = !safety diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index 107402fc6b..8b92a05f42 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -25,14 +25,14 @@ . = ..() /obj/structure/reagent_dispensers/examine(mob/user) - if(!..(user, 2)) - return - to_chat(user, "It contains:") - if(reagents && reagents.reagent_list.len) - for(var/datum/reagent/R in reagents.reagent_list) - to_chat(user, "[R.volume] units of [R.name]") - else - to_chat(user, "Nothing.") + . = ..() + if(get_dist(user, src) <= 2) + . += "It contains:" + if(reagents && reagents.reagent_list.len) + for(var/datum/reagent/R in reagents.reagent_list) + . += "[R.volume] units of [R.name]" + else + . += "Nothing." /obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this set name = "Set transfer amount" @@ -123,12 +123,12 @@ /obj/structure/reagent_dispensers/fueltank/examine(mob/user) - if(!..(user, 2)) - return - if (modded) - to_chat(user, "Fuel faucet is wrenched open, leaking the fuel!") - if(rig) - to_chat(user, "There is some kind of device rigged to the tank.") + . = ..() + if(get_dist(user, src) <= 2) + if(modded) + . += "Fuel faucet is wrenched open, leaking the fuel!" + if(rig) + . += "There is some kind of device rigged to the tank." /obj/structure/reagent_dispensers/fueltank/attack_hand() if (rig) @@ -257,9 +257,9 @@ update_icon() /obj/structure/reagent_dispensers/water_cooler/examine(mob/user) - ..() + . = ..() if(cupholder) - to_chat(user, "There are [cups] cups in the cup dispenser.") + . += "There are [cups] cups in the cup dispenser." /obj/structure/reagent_dispensers/water_cooler/attackby(obj/item/I as obj, mob/user as mob) if(I.is_wrench()) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index ee4285330f..343650f67d 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -102,12 +102,12 @@ overlays += I examine(mob/user) - if(..(user, 4)) + . = ..() + if(get_dist(user, src) <= 4) if(sortTag) - to_chat(user, "It is labeled \"[sortTag]\"") + . += "It is labeled \"[sortTag]\"" if(examtext) - to_chat(user, "It has a note attached which reads, \"[examtext]\"") - return + . += "It has a note attached which reads, \"[examtext]\"" /obj/item/smallDelivery desc = "A small wrapped package." @@ -209,12 +209,11 @@ overlays += I examine(mob/user) - if(..(user, 4)) + if(get_dist(user, src) <= 4) if(sortTag) - to_chat(user, "It is labeled \"[sortTag]\"") + . += "It is labeled \"[sortTag]\"" if(examtext) - to_chat(user, "It has a note attached which reads, \"[examtext]\"") - return + . += "It has a note attached which reads, \"[examtext]\"" /obj/item/weapon/packageWrap name = "package wrapper" @@ -312,10 +311,9 @@ return examine(mob/user) - if(..(user, 0)) - to_chat(user, "There are [amount] units of package wrap left!") - - return + . = ..() + if(get_dist(user, src) <= 0) + . += "There are [amount] units of package wrap left!" /obj/structure/bigDelivery/Destroy() if(wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 86004b6130..ebe09e3a98 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -82,9 +82,8 @@ var/global/list/obj/machinery/message_server/message_servers = list() return /obj/machinery/message_server/examine(mob/user, distance, infix, suffix) - if(..()) - to_chat(user, "It appears to be [active ? "online" : "offline"].") - + . = ..() + . += "It appears to be [active ? "online" : "offline"]." /obj/machinery/message_server/proc/GenerateKey() //Feel free to move to Helpers. diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index 00c416895e..818b78a21e 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -203,9 +203,9 @@ playsound(get_turf(src), 'sound/machines/defib_safetyOff.ogg', 75, 0) /obj/item/shield_projector/examine(var/mob/user) - ..() - if(get_dist(src, user) <= 1) - to_chat(user, "\The [src]'s shield matrix is at [round( (shield_health / max_shield_health) * 100, 0.01)]% strength.") + . = ..() + if(Adjacent(user)) + . += "Its shield matrix is at [round( (shield_health / max_shield_health) * 100, 0.01)]% strength." /obj/item/shield_projector/emp_act(var/severity) adjust_health(-max_shield_health / severity) // A strong EMP will kill the shield instantly, but weaker ones won't on the first hit. diff --git a/code/modules/shieldgen/handheld_defuser.dm b/code/modules/shieldgen/handheld_defuser.dm index 21eca0587f..327dfc0f3d 100644 --- a/code/modules/shieldgen/handheld_defuser.dm +++ b/code/modules/shieldgen/handheld_defuser.dm @@ -54,5 +54,10 @@ /obj/item/weapon/shield_diffuser/examine(mob/user) . = ..() +<<<<<<< HEAD to_chat(user, "The charge meter reads [cell ? cell.percent() : 0]%") - to_chat(user, "It is [enabled ? "enabled" : "disabled"].") \ No newline at end of file + to_chat(user, "It is [enabled ? "enabled" : "disabled"].") +======= + . += "The charge meter reads [cell ? cell.percent() : 0]%" + . += "It is [enabled ? "enabled" : "disabled"]." +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) diff --git a/code/modules/shieldgen/shield_diffuser.dm b/code/modules/shieldgen/shield_diffuser.dm index 52c57db020..282b09f55e 100644 --- a/code/modules/shieldgen/shield_diffuser.dm +++ b/code/modules/shieldgen/shield_diffuser.dm @@ -89,6 +89,10 @@ /obj/machinery/shield_diffuser/examine(var/mob/user) . = ..() - to_chat(user, "It is [enabled ? "enabled" : "disabled"].") + . += "It is [enabled ? "enabled" : "disabled"]." if(alarm) +<<<<<<< HEAD to_chat(user, "A red LED labeled \"Proximity Alarm\" is blinking on the control panel.") +======= + . += "A red LED labeled \"Proximity Alarm\" is blinking on the control panel." +>>>>>>> 6c6644f... Rewrite examine() to pass a list around (#7038) diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm index c5b7bde70e..31b112e9bd 100644 --- a/code/modules/tables/tables.dm +++ b/code/modules/tables/tables.dm @@ -92,11 +92,11 @@ var/list/table_icon_cache = list() if(health < maxhealth) switch(health / maxhealth) if(0.0 to 0.5) - to_chat(user, "It looks severely damaged!") + . += "It looks severely damaged!" if(0.25 to 0.5) - to_chat(user, "It looks damaged!") + . += "It looks damaged!" if(0.5 to 1.0) - to_chat(user, "It has a few scrapes and dents.") + . += "It has a few scrapes and dents." /obj/structure/table/attackby(obj/item/weapon/W, mob/user) diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index c02e19fdb4..eb4f1141b8 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -192,14 +192,10 @@ return ..() /obj/vehicle/train/engine/examine(mob/user) - if(!..(user, 1)) - return - - if(!istype(usr, /mob/living/carbon/human)) - return - - to_chat(user, "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition.") - to_chat(user, "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%") + . = ..() + if(ishuman(user) && Adjacent(user)) + . += "The power light is [on ? "on" : "off"].\nThere are[key ? "" : " no"] keys in the ignition." + . += "The charge meter reads [cell? round(cell.percent(), 0.01) : 0]%" /obj/vehicle/train/engine/verb/start_engine() set name = "Start engine" diff --git a/code/modules/virus2/items_devices.dm b/code/modules/virus2/items_devices.dm index 3e477972b0..a69cd8179e 100644 --- a/code/modules/virus2/items_devices.dm +++ b/code/modules/virus2/items_devices.dm @@ -66,9 +66,9 @@ qdel(src) /obj/item/weapon/virusdish/examine(mob/user) - ..() + . = ..() if(basic_info) - to_chat(user, "[basic_info] : More Information") + . += "[basic_info] : More Information" /obj/item/weapon/virusdish/Topic(href, href_list) . = ..() diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm index 01c00ed000..8c2a99a570 100644 --- a/code/modules/xenoarcheaology/sampling.dm +++ b/code/modules/xenoarcheaology/sampling.dm @@ -93,8 +93,9 @@ var/obj/item/weapon/evidencebag/filled_bag /obj/item/device/core_sampler/examine(var/mob/user) - if(..(user, 2)) - to_chat(user, "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.") + . = ..() + if(get_dist(user, src) <= 2) + . += "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(var/obj/item/I, var/mob/living/user) if(istype(I, /obj/item/weapon/evidencebag)) diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index 778a204387..d9e00f64e9 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -195,6 +195,5 @@ icon_state = "excavationdrill5" //The other 2 sprites are comically long. Let's just cut it at 5. /obj/item/weapon/pickaxe/excavationdrill/examine(mob/user) - ..() - var/depth = excavation_amount - to_chat(user, "It is currently set at [depth]cms.") \ No newline at end of file + . = ..() + . += "It is currently set at [excavation_amount]cms." diff --git a/code/modules/xenobio/items/extracts.dm b/code/modules/xenobio/items/extracts.dm index b9e100d983..fddbb13a5e 100644 --- a/code/modules/xenobio/items/extracts.dm +++ b/code/modules/xenobio/items/extracts.dm @@ -33,11 +33,11 @@ ..() /obj/item/slime_extract/examine(mob/user) - ..() + . = ..() if(uses) - to_chat(user, "This extract has [uses] more use\s.") + . += "This extract has [uses] more use\s." else - to_chat(user, "This extract is inert.") + . += "This extract is inert." /datum/chemical_reaction/slime var/required = null