Merge pull request #6939 from PsiOmegaDelta/VerbOptimization

Verb optimization
This commit is contained in:
Chinsky
2014-11-05 23:23:56 +03:00
141 changed files with 749 additions and 929 deletions
-1
View File
@@ -686,7 +686,6 @@
#include "code\game\turfs\unsimulated\beach.dm"
#include "code\game\turfs\unsimulated\floor.dm"
#include "code\game\turfs\unsimulated\walls.dm"
#include "code\game\verbs\atom_verbs.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\suicide.dm"
#include "code\game\verbs\who.dm"
@@ -200,12 +200,9 @@
if(frequency)
set_frequency(frequency)
/obj/machinery/atmospherics/binary/dp_vent_pump/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user)
if(..(user, 1))
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()
var/old_stat = stat
@@ -201,7 +201,7 @@
..()
/obj/machinery/atmospherics/unary/freezer/examine()
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
..(user)
if (opened)
usr << "The maintenance hatch is open."
user << "The maintenance hatch is open."
@@ -184,7 +184,7 @@
..()
/obj/machinery/atmospherics/unary/heater/examine()
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
..(user)
if (opened)
usr << "The maintenance hatch is open."
user << "The maintenance hatch is open."
@@ -375,15 +375,13 @@
else
..()
/obj/machinery/atmospherics/unary/vent_pump/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "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/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
usr << "You are too far away to read the gauge."
user << "You are too far away to read the gauge."
if(welded)
usr << "It seems welded shut."
user << "It seems welded shut."
/obj/machinery/atmospherics/unary/vent_pump/power_change()
var/old_stat = stat
@@ -260,13 +260,11 @@
new /obj/item/pipe(loc, make_from=src)
del(src)
/obj/machinery/atmospherics/unary/vent_scrubber/examine()
set src in oview(1)
..()
if (get_dist(usr, src) <= 1)
usr << "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_scrubber/examine(mob/user)
if(..(user, 1))
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
usr << "You are too far away to read the gauge."
user << "You are too far away to read the gauge."
/obj/machinery/atmospherics/unary/vent_scrubber/Del()
if(initial_loc)
+4 -4
View File
@@ -16,12 +16,12 @@
else
return temp_access
/obj/item/weapon/card/id/guest/examine()
..()
/obj/item/weapon/card/id/guest/examine(mob/user)
..(user)
if (world.time < expiration_time)
usr << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
user << "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>"
else
usr << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
user << "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>"
/obj/item/weapon/card/id/guest/read()
if (world.time > expiration_time)
+7 -10
View File
@@ -63,16 +63,13 @@
user.visible_message("\blue [user] gathers up[could_fill ? " " : " most of "]the pile of items and puts it into [src].")
update_icon()
examine()
set src in view()
..()
if(src in usr)
usr << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
if(seal_torn && !contents.len)
usr << "The seal on the bag is broken."
else
usr << "The seal on the bag is[seal_torn ? ", however, not intact" : " intact"]."
return
examine(mob/user)
..(user)
user << "It claims to contain [contents.len ? descriptor : descriptor + "... but it looks empty"]."
if(seal_torn && !contents.len)
user << "The seal on the bag is broken."
else
user << "The seal on the bag is[seal_torn ? ", however, not intact" : " intact"]."
update_icon()
if(contents.len)
@@ -46,8 +46,7 @@
user << "\blue The pack is already full!"
return
/obj/item/weapon/weldpack/examine()
set src in usr
usr << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
..()
/obj/item/weapon/weldpack/examine(mob/user)
..(user)
user << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
return
+3 -6
View File
@@ -227,8 +227,7 @@
return
/atom/proc/ShiftClick(var/mob/user)
if(user.client && user.client.eye == user)
examine()
user.face_atom(src)
user.examinate(src)
return
/*
@@ -304,7 +303,6 @@
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
// Snowflake for space vines.
var/is_buckled = 0
if(buckled)
@@ -313,8 +311,7 @@
is_buckled = 1
else
is_buckled = 0
if( stat || is_buckled || !A || !x || !y || !A.x || !A.y ) return
if( is_buckled || !A || !x || !y || !A.x || !A.y || (stat && !isobserver(src))) return
var/dx = A.x - x
var/dy = A.y - y
if(!dx && !dy) return
@@ -326,7 +323,7 @@
else
if(dx > 0) direction = EAST
else direction = WEST
usr.dir = direction
dir = direction
if(buckled && buckled.movable)
buckled.dir = direction
buckled.handle_rotation()
+1 -1
View File
@@ -41,7 +41,7 @@
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user as mob)
if(user.client && user.client.inquisitive_ghost)
examine()
user.examinate(src)
return
// ---------------------------------------
+15 -11
View File
@@ -187,18 +187,22 @@ its easier to just keep the beam vertical.
//All atoms
/atom/verb/examine()
set name = "Examine"
set category = "IC"
set src in view(usr.client) //If it can be seen, it can be examined.
/atom/proc/examine(mob/user, var/distance = -1)
//This reformat names to get a/an properly working on item descriptions when they are bloody
var/f_name = "\a [src]."
if(src.blood_DNA && !istype(src, /obj/effect/decal))
if(gender == PLURAL)
f_name = "some "
else
f_name = "a "
f_name += "<span class='danger'>blood-stained</span> [name]!"
if (!( usr ))
return
usr << "That's \a [src]." //changed to "That's" from "This is" because "This is some metal sheets" sounds dumb compared to "That's some metal sheets" ~Carn
usr << desc
// *****RM
//usr << "[name]: Dn:[density] dir:[dir] cont:[contents] icon:[icon] is:[icon_state] loc:[loc]"
return
user << "\icon[src] That's [f_name]"
if(desc)
user << desc
return distance == -1 || (get_dist(src, user) <= distance)
// 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.
+9 -26
View File
@@ -20,7 +20,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
runewords-=cultwords[word]
/obj/effect/rune
desc = ""
desc = "A strange collection of symbols drawn in blood."
anchored = 1
icon = 'icons/obj/rune.dmi'
icon_state = "1"
@@ -68,26 +68,10 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
for(var/mob/living/silicon/ai/AI in player_list)
AI.client.images += blood
examine()
set src in view(2)
if(!iscultist(usr))
usr << "A strange collection of symbols drawn in blood."
return
/* Explosions... really?
if(desc && !usr.stat)
usr << "It reads: <i>[desc]</i>."
sleep(30)
explosion(src.loc, 0, 2, 5, 5)
if(src)
del(src)
*/
if(!desc)
usr << "A spell circle drawn in blood. It reads: <i>[word1] [word2] [word3]</i>."
else
usr << "Explosive Runes inscription in blood. It reads: <i>[desc]</i>."
return
examine(mob/user)
..()
if(iscultist(user))
user << "This spell circle reads: <i>[word1] [word2] [word3]</i>."
attackby(I as obj, user as mob)
@@ -510,12 +494,11 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
user << "You copy the translation notes from your tome."
examine()
set src in usr
if(!iscultist(usr))
usr << "An old, dusty tome with frayed edges and a sinister looking cover."
examine(mob/user)
if(!iscultist(user))
user << "An old, dusty tome with frayed edges and a sinister looking cover."
else
usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
user << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
/obj/item/weapon/book/tome/imbued //admin tome, spawns working runes without waiting
w_class = 2.0
-7
View File
@@ -3,13 +3,6 @@
var/imbue = null
var/uses = 0
examine()
set src in view(2)
..()
return
attack_self(mob/living/user as mob)
if(iscultist(user))
var/delete = 1
+8 -11
View File
@@ -911,9 +911,8 @@ ________________________________________________________________________________
U.drop_item()
return 0
/obj/item/clothing/suit/space/space_ninja/examine()
set src in view()
..()
/obj/item/clothing/suit/space/space_ninja/examine(mob/user)
..(user)
if(s_initialized)
var/mob/living/carbon/human/U = affecting
if(s_control)
@@ -1168,9 +1167,8 @@ ________________________________________________________________________________
U << "You <b>[candrain?"disable":"enable"]</b> special interaction."
candrain=!candrain
/obj/item/clothing/gloves/space_ninja/examine()
set src in view()
..()
/obj/item/clothing/gloves/space_ninja/examine(mob/user)
..(user)
if(!canremove)
var/mob/living/carbon/human/U = loc
U << "The energy drain mechanism is: <B>[candrain?"active":"inactive"]</B>."
@@ -1306,12 +1304,11 @@ ________________________________________________________________________________
var/mob/U = loc
U << "Switching mode to <B>[ninja_vision.mode]</B>."
/obj/item/clothing/mask/gas/voice/space_ninja/examine()
set src in view()
..()
/obj/item/clothing/mask/gas/voice/space_ninja/examine(mob/user)
..(user)
usr << "<B>[ninja_vision.mode]</B> is active."//Leaving usr here since it may be on the floor or on a person.
usr << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
user << "<B>[ninja_vision.mode]</B> is active."
user << "Voice mimicking algorithm is set <B>[!vchange?"inactive":"active"]</B>."
/*
===================================================================================
@@ -99,7 +99,7 @@
return
..()
/obj/machinery/emergency_authentication_device/examine()
usr << {"
/obj/machinery/emergency_authentication_device/examine(mob/user)
user << {"
This is a specialized communications device that is able to instantly send a message to <b>NanoTrasen High Command</b> via quantum entanglement with a sister device at CentCom.
The EAD's status is [get_status()]."}
+4 -4
View File
@@ -25,14 +25,14 @@
icon_state = "pinoff"
usr << "\blue You switch \the [src] off."
/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine()
/obj/item/weapon/pinpointer/advpinpointer/auth_key/examine(mob/user)
switch(mode)
if (1)
usr << "Is is calibrated for the Captain's Authentication Key."
user << "Is is calibrated for the Captain's Authentication Key."
if (2)
usr << "It is calibrated for the Emergency Secondary Authentication Key."
user << "It is calibrated for the Emergency Secondary Authentication Key."
else
usr << "It is switched off."
user << "It is switched off."
/datum/supply_packs/key_pinpointer
name = "Authentication Key Pinpointer crate"
+3 -3
View File
@@ -42,11 +42,11 @@
icon_state = "pinonfar"
spawn(5) .()
examine()
..()
examine(mob/user)
..(user)
for(var/obj/machinery/nuclearbomb/bomb in world)
if(bomb.timing)
usr << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
user << "Extreme danger. Arming signal detected. Time remaining: [bomb.timeleft]"
/obj/item/weapon/pinpointer/advpinpointer
+4 -4
View File
@@ -1168,12 +1168,12 @@ table tr:first-child th:first-child { border: none;}
spawn(rand(0,15))
update_icon()
/obj/machinery/alarm/examine()
..()
/obj/machinery/alarm/examine(mob/user)
..(user)
if (buildstage < 2)
usr << "It is not wired."
user << "It is not wired."
if (buildstage < 1)
usr << "The circuit is missing."
user << "The circuit is missing."
/*
AIR ALARM CIRCUIT
Just a object used in constructing air alarms
+4 -4
View File
@@ -65,10 +65,10 @@
)
radio_connection.post_signal(src, signal)
/obj/machinery/meter/examine()
/obj/machinery/meter/examine(mob/user)
var/t = "A gas flow meter. "
if(get_dist(usr, src) > 3 && !(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead)))
if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead)))
t += "\blue <B>You are too far away to read it.</B>"
else if(stat & (NOPOWER|BROKEN))
@@ -83,12 +83,12 @@
else
t += "The connect error light is blinking."
usr << t
user << t
/obj/machinery/meter/Click()
if(istype(usr, /mob/living/silicon/ai)) // ghosts can call ..() for examine
examine()
usr.examinate(src)
return 1
return ..()
+4 -5
View File
@@ -43,14 +43,13 @@
emagged = 2
log_and_message_admins("emagged [src]'s inner circuits")
/obj/machinery/bot/examine()
set src in view()
..()
/obj/machinery/bot/examine(mob/user)
..(user)
if (src.health < maxhealth)
if (src.health > maxhealth/3)
usr << "<span class='warning'>[src]'s parts look loose.</span>"
user << "<span class='warning'>[src]'s parts look loose.</span>"
else
usr << "<span class='danger'>[src]'s parts look very loose!</span>"
user << "<span class='danger'>[src]'s parts look very loose!</span>"
return
/obj/machinery/bot/attack_animal(var/mob/living/simple_animal/M as mob)
-1
View File
@@ -93,7 +93,6 @@
suffix = "#[count]"
name = "Mulebot ([suffix])"
verbs -= /atom/movable/verb/pull
// set up the wire colours in random order
+6 -5
View File
@@ -28,12 +28,13 @@
else
overlays.Cut()
/obj/machinery/cell_charger/examine()
set src in oview(5)
..()
usr << "There's [charging ? "a" : "no"] cell in the charger."
/obj/machinery/cell_charger/examine(mob/user)
if(!..(user, 5))
return
user << "There's [charging ? "a" : "no"] cell in the charger."
if(charging)
usr << "Current charge: [charging.charge]"
user << "Current charge: [charging.charge]"
/obj/machinery/cell_charger/attackby(obj/item/weapon/W, mob/user)
if(stat & BROKEN)
+3 -4
View File
@@ -96,10 +96,9 @@
src.read_only = !src.read_only
user << "You flip the write-protect tab to [src.read_only ? "protected" : "unprotected"]."
/obj/item/weapon/disk/data/examine()
set src in oview(5)
..()
usr << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
/obj/item/weapon/disk/data/examine(mob/user)
..(user)
user << text("The write-protect tab is set to [src.read_only ? "protected" : "unprotected"].")
return
//Health Tracker Implant
+3 -3
View File
@@ -288,9 +288,9 @@ obj/item/weapon/circuitboard/rdserver
user.visible_message("\blue \The [user] adjusts the jumper on the [src]'s port configuration pins.", "\blue You adjust the jumper on the port configuration pins. Now set to [dir2text(machine_dir)].")
return
/obj/item/weapon/circuitboard/unary_atmos/examine()
..()
usr << "The jumper is connecting the [dir2text(machine_dir)] pins."
/obj/item/weapon/circuitboard/unary_atmos/examine(mob/user)
..(user)
user << "The jumper is connecting the [dir2text(machine_dir)] pins."
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
+8 -11
View File
@@ -2,7 +2,7 @@
/var/const/CLOSED = 2
#define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa
#define FIREDOOR_MAX_TEMP 50 // °C
#define FIREDOOR_MAX_TEMP 50 // °C
#define FIREDOOR_MIN_TEMP 0
// Bitflags
@@ -72,17 +72,14 @@
. = ..()
/obj/machinery/door/firedoor/examine()
set src in view()
. = ..()
if(get_dist(src, usr) > 1 && !isAI(usr))
/obj/machinery/door/firedoor/examine(mob/user)
if(!..(user, 1) && !isAI(user))
return
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
usr << "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
user << "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
usr << "<b>Sensor readings:</b>"
user << "<b>Sensor readings:</b>"
for(var/index = 1; index <= tile_info.len; index++)
var/o = "&nbsp;&nbsp;"
switch(index)
@@ -96,7 +93,7 @@
o += "WEST: "
if(tile_info[index] == null)
o += "<span class='warning'>DATA UNAVAILABLE</span>"
usr << o
user << o
continue
var/celsius = convert_k2c(tile_info[index][1])
var/pressure = tile_info[index][2]
@@ -107,14 +104,14 @@
o += "[celsius]&deg;C</span> "
o += "<span style='color:blue'>"
o += "[pressure]kPa</span></li>"
usr << o
user << 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]]"
usr << "These people have opened \the [src] during an alert: [users_to_open_string]."
user << "These people have opened \the [src] during an alert: [users_to_open_string]."
/obj/machinery/door/firedoor/Bumped(atom/AM)
if(p_open || operating)
+4 -5
View File
@@ -146,12 +146,11 @@
mode = !mode
usr << "The IV drip is now [mode ? "injecting" : "taking blood"]."
/obj/machinery/iv_drip/examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
/obj/machinery/iv_drip/examine(mob/user)
..(user)
if (!(user in view(2)) && user!=src.loc) return
usr << "The IV drip is [mode ? "injecting" : "taking blood"]."
user << "The IV drip is [mode ? "injecting" : "taking blood"]."
if(beaker)
if(beaker.reagents && beaker.reagents.reagent_list.len)
+3 -4
View File
@@ -37,10 +37,9 @@
else
icon_state = "light0"
/obj/machinery/light_switch/examine()
set src in oview(1)
if(usr && !usr.stat)
usr << "A light switch. It is [on? "on" : "off"]."
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
user << "A light switch. It is [on? "on" : "off"]."
/obj/machinery/light_switch/attack_paw(mob/user)
+3 -2
View File
@@ -70,8 +70,9 @@
allow_drop()
return 0
examine()
usr << "The charge meter reads: [round(chargepercentage())]%"
examine(mob/user)
..(user)
user << "The charge meter reads: [round(chargepercentage())]%"
proc/chargepercentage()
return ((current_internal_charge / max_internal_charge) * 100)
+5 -9
View File
@@ -25,18 +25,14 @@
if(open)
overlays += "sheater-open"
/obj/machinery/space_heater/examine()
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [src.name]."
usr << src.desc
/obj/machinery/space_heater/examine(mob/user)
..(user)
usr << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
user << "The heater is [on ? "on" : "off"] and the hatch is [open ? "open" : "closed"]."
if(open)
usr << "The power cell is [cell ? "installed" : "missing"]."
user << "The power cell is [cell ? "installed" : "missing"]."
else
usr << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
user << "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
/obj/machinery/space_heater/emp_act(severity)
+3 -4
View File
@@ -124,11 +124,10 @@
return 1
return 0
/obj/machinery/status_display/examine()
set src in view()
. = ..()
/obj/machinery/status_display/examine(mob/user)
. = ..(user)
if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT)
usr << "The display says:<br>\t[sanitize(message1)]<br>\t[sanitize(message2)]"
user << "The display says:<br>\t[sanitize(message1)]<br>\t[sanitize(message2)]"
/obj/machinery/status_display/proc/set_message(m1, m2)
if(m1)
+18 -20
View File
@@ -83,7 +83,6 @@
add_cell()
add_iterators()
removeVerb(/obj/mecha/verb/disconnect_from_port)
removeVerb(/atom/movable/verb/pull)
log_message("[src.name] created.")
loc.Entered(src)
mechas_list += src //global mech list
@@ -165,25 +164,24 @@
else
return 0
/obj/mecha/examine()
set src in view()
..()
/obj/mecha/examine(mob/user)
..(user)
var/integrity = health/initial(health)*100
switch(integrity)
if(85 to 100)
usr << "It's fully intact."
user << "It's fully intact."
if(65 to 85)
usr << "It's slightly damaged."
user << "It's slightly damaged."
if(45 to 65)
usr << "It's badly damaged."
user << "It's badly damaged."
if(25 to 45)
usr << "It's heavily damaged."
user << "It's heavily damaged."
else
usr << "It's falling apart."
user << "It's falling apart."
if(equipment && equipment.len)
usr << "It's equipped with:"
user << "It's equipped with:"
for(var/obj/item/mecha_parts/mecha_equipment/ME in equipment)
usr << "\icon[ME] [ME]"
user << "\icon[ME] [ME]"
return
@@ -1406,11 +1404,11 @@
/obj/mecha/proc/output_maintenance_dialog(obj/item/weapon/card/id/id_card,mob/user)
if(!id_card || !user) return
var/maint_options = "<a href='?src=\ref[src];set_internal_tank_valve=1;user=\ref[user]'>Set Cabin Air Pressure</a>"
if (locate(/obj/item/mecha_parts/mecha_equipment/tool/passenger) in contents)
maint_options += "<a href='?src=\ref[src];remove_passenger=1;user=\ref[user]'>Remove Passenger</a>"
maint_options += "<a href='?src=\ref[src];remove_passenger=1;user=\ref[user]'>Remove Passenger</a>"
var/output = {"<html>
<head>
<style>
@@ -1568,23 +1566,23 @@
for (var/obj/item/mecha_parts/mecha_equipment/tool/passenger/P in contents)
if (P.occupant)
passengers["[P.occupant]"] = P
if (!passengers)
user << "\red There are no passengers to remove."
return
var/pname = input(user, "Choose a passenger to forcibly remove.", "Forcibly Remove Passenger") as null|anything in passengers
if (!pname)
return
var/obj/item/mecha_parts/mecha_equipment/tool/passenger/P = passengers[pname]
var/mob/occupant = P.occupant
user.visible_message("\red [user] begins opening the hatch on \the [P]...", "\red You begin opening the hatch on \the [P]...")
if (!do_after(user, 40, needhand=0))
return
user.visible_message("\red [user] opens the hatch on \the [P] and removes [occupant]!", "\red You open the hatch on \the [P] and remove [occupant]!")
P.go_out()
P.log_message("[occupant] was removed.")
@@ -133,9 +133,9 @@ var/global/list/image/splatter_cache=list()
else
icon_state = "writing1"
/obj/effect/decal/cleanable/blood/writing/examine()
..()
usr << "It reads: <font color='[basecolor]'>\"[message]\"<font>"
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
..(user)
user << "It reads: <font color='[basecolor]'>\"[message]\"<font>"
/obj/effect/decal/cleanable/blood/gibs
name = "gibs"
@@ -5,12 +5,6 @@
layer = 2.1
anchored = 1
examine()
set src in view(2)
..()
return
New(location,main = "#FFFFFF",shade = "#000000",var/type = "rune")
..()
loc = location
+1 -5
View File
@@ -5,11 +5,7 @@
icon_state = "arrow"
layer = 16.0
anchored = 1
/obj/effect/decal/point/point()
set src in oview()
set hidden = 1
return
mouse_opacity = 0
// Used for spray that you spray at walls, tables, hydrovats etc
/obj/effect/decal/spraystill
+3 -5
View File
@@ -102,9 +102,7 @@
src.loc = T
/obj/item/examine()
set src in view()
/obj/item/examine(mob/user)
var/size
switch(src.w_class)
if(1.0)
@@ -119,9 +117,9 @@
size = "huge"
else
//if ((CLUMSY in usr.mutations) && prob(50)) t = "funny-looking"
usr << "This is a [src.blood_DNA ? "bloody " : ""]\icon[src][src.name]. It is a [size] item."
user << "This is a [src.blood_DNA ? "bloody " : ""]\icon[src][src.name]. It is a [size] item."
if(src.desc)
usr << src.desc
user << src.desc
return
/obj/item/attack_hand(mob/user as mob)
+3 -4
View File
@@ -62,10 +62,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/item/device/paicard/pai = null // A slot for a personal AI device
/obj/item/device/pda/examine()
..()
if(get_dist(usr, src) <= 1)
usr << "The time [worldtime2text()] is displayed in the corner of the screen."
/obj/item/device/pda/examine(mob/user)
if(..(user, 1))
user << "The time [worldtime2text()] is displayed in the corner of the screen."
/obj/item/device/pda/medical
default_cartridge = /obj/item/weapon/cartridge/medical
@@ -204,6 +204,6 @@
if("P (OP)")
mode = "white_halfp"
/obj/item/device/floor_painter/examine()
..()
usr << "It is in [mode_nice] mode."
/obj/item/device/floor_painter/examine(mob/user)
..(user)
user << "It is in [mode_nice] mode."
@@ -62,10 +62,9 @@
failmsg = "The [name]'s refill light blinks red."
..()
/obj/item/device/lightreplacer/examine()
set src in view(2)
..()
usr << "It has [uses] lights remaining."
/obj/item/device/lightreplacer/examine(mob/user)
if(..(user, 2))
user << "It has [uses] lights remaining."
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && emagged == 0)
+3 -3
View File
@@ -62,9 +62,9 @@
user.drop_from_inventory(src)
del(src)
/obj/item/device/modkit/examine()
..()
usr << "It looks as though it modifies hardsuits to fit [target_species] users."
/obj/item/device/modkit/examine(mob/user)
..(user)
user << "It looks as though it modifies hardsuits to fit [target_species] users."
/obj/item/device/modkit/tajaran
name = "tajaran hardsuit modification kit"
@@ -31,6 +31,6 @@
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
/obj/item/device/pipe_painter/examine()
..()
usr << "It is in [mode] mode."
/obj/item/device/pipe_painter/examine(mob/user)
..(user)
user << "It is in [mode] mode."
@@ -489,15 +489,13 @@
return get_mobs_in_view(canhear_range, src)
/obj/item/device/radio/examine()
set src in view()
..()
if ((in_range(src, usr) || loc == usr))
/obj/item/device/radio/examine(mob/user)
..(user)
if ((in_range(src, user) || loc == user))
if (b_stat)
usr.show_message("\blue \the [src] can be attached and modified!")
user.show_message("\blue \the [src] can be attached and modified!")
else
usr.show_message("\blue \the [src] can not be modified or attached!")
user.show_message("\blue \the [src] can not be modified or attached!")
return
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
+10 -11
View File
@@ -161,26 +161,25 @@
else
icon_state = "suitcooler0"
/obj/item/device/suit_cooling_unit/examine()
set src in view(1)
..()
/obj/item/device/suit_cooling_unit/examine(mob/user)
if(!..(user, 1))
return
if (on)
if (attached_to_suit(src.loc))
usr << "It's switched on and running."
user << "It's switched on and running."
else
usr << "It's switched on, but not attached to anything."
user << "It's switched on, but not attached to anything."
else
usr << "It is switched off."
user << "It is switched off."
if (cover_open)
if(cell)
usr << "The panel is open, exposing the [cell]."
user << "The panel is open, exposing the [cell]."
else
usr << "The panel is open."
user << "The panel is open."
if (cell)
usr << "The charge meter reads [round(cell.percent())]%."
user << "The charge meter reads [round(cell.percent())]%."
else
usr << "It doesn't have a power cell installed."
user << "It doesn't have a power cell installed."
+3 -5
View File
@@ -28,11 +28,9 @@
usr << browse(null, "window=stack")
..()
/obj/item/stack/examine()
set src in view(1)
..()
usr << "There are [src.amount] [src.singular_name]\s in the stack."
return
/obj/item/stack/examine(mob/user)
if(..(user, 1))
user << "There are [src.amount] [src.singular_name]\s in the stack."
/obj/item/stack/attack_self(mob/user as mob)
list_recipes(user)
+9 -15
View File
@@ -136,11 +136,9 @@
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
var/bullets = 7.0
examine()
set src in usr
src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets)
..()
examine(mob/user)
if(..(user, 0))
src.desc = text("There are [] caps\s left. Looks almost like the real thing! Ages 8 and up.", src.bullets)
return
attackby(obj/item/toy/ammo/gun/A as obj, mob/user as mob)
@@ -212,11 +210,9 @@
attack_verb = list("attacked", "struck", "hit")
var/bullets = 5
examine()
set src in view(2)
..()
if (bullets)
usr << "\blue It is loaded with [bullets] foam darts!"
examine(mob/user)
if(..(user, 2) && bullets)
user << "\blue 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))
@@ -484,11 +480,9 @@
return
/obj/item/toy/waterflower/examine()
set src in usr
usr << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
..()
return
/obj/item/toy/waterflower/examine(mob/user)
if(..(user, 0))
user << text("\icon[] [] units of water left!", src, src.reagents.total_volume)
/*
+3 -4
View File
@@ -17,10 +17,9 @@ RSF
flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/rsf/examine()
set src in view(1)
..()
usr << "It currently holds [stored_matter]/30 fabrication-units."
/obj/item/weapon/rsf/examine(mob/user)
if(..(user, 0))
user << "It currently holds [stored_matter]/30 fabrication-units."
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -42,11 +42,9 @@
R.my_atom = src
R.add_reagent("water", max_water)
/obj/item/weapon/extinguisher/examine()
set src in usr
usr << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
..()
/obj/item/weapon/extinguisher/examine(mob/user)
if(..(user, 0))
user << text("\icon[] [] contains [] units of water left!", src, src.name, src.reagents.total_volume)
return
/obj/item/weapon/extinguisher/attack_self(mob/user as mob)
@@ -161,12 +161,9 @@
return
/obj/item/weapon/wrapping_paper/examine()
set src in oview(1)
..()
usr << text("There is about [] square units of paper left!", src.amount)
return
/obj/item/weapon/wrapping_paper/examine(mob/user)
if(..(user, 1))
user << text("There is about [] square units of paper left!", src.amount)
/obj/item/weapon/wrapping_paper/attack(mob/target as mob, mob/user as mob)
if (!istype(target, /mob/living/carbon/human)) return
@@ -104,11 +104,10 @@
else
user << "\red \the [W] is empty."
examine()
set src in usr
usr << desc
examine(mob/user)
..(user)
if(detonator)
usr << "With attached [detonator.name]"
user << "With attached [detonator.name]"
activate(mob/user as mob)
if(active) return
@@ -42,13 +42,12 @@
return*/
/obj/item/weapon/grenade/examine()
set src in usr
usr << desc
if(det_time > 1)
usr << "The timer is set to [det_time/10] seconds."
return
usr << "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/examine(mob/user)
if(..(user, 0))
if(det_time > 1)
user << "The timer is set to [det_time/10] seconds."
return
user << "\The [src] is set for instant detonation."
/obj/item/weapon/grenade/attack_self(mob/user as mob)
@@ -24,16 +24,16 @@
src.icon_state = "[src.icon_type]box[total_contents]"
return
/obj/item/weapon/storage/fancy/examine()
set src in oview(1)
..()
/obj/item/weapon/storage/fancy/examine(mob/user)
if(!..(user, 1))
return
if(contents.len <= 0)
usr << "There are no [src.icon_type]s left in the box."
user << "There are no [src.icon_type]s left in the box."
else if(contents.len == 1)
usr << "There is one [src.icon_type] left in the box."
user << "There is one [src.icon_type] left in the box."
else
usr << "There are [src.contents.len] [src.icon_type]s in the box."
user << "There are [src.contents.len] [src.icon_type]s in the box."
return
@@ -27,10 +27,9 @@
max_w_class = 2
max_combined_w_class = 14
examine()
set src in oview(1)
..()
usr << text("The service panel is [src.open ? "open" : "closed"].")
examine(mob/user)
if(..(user, 1))
user << text("The service panel is [src.open ? "open" : "closed"].")
attack_paw(mob/user as mob)
return attack_hand(user)
+6 -5
View File
@@ -50,13 +50,14 @@
else
icon_state = "[initial(name)]"
/obj/item/weapon/melee/baton/examine()
set src in view(1)
..()
/obj/item/weapon/melee/baton/examine(mob/user)
if(!..(user, 1))
return
if(bcell)
usr <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
user <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
usr <<"<span class='warning'>The baton does not have a power source installed.</span>"
user <<"<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/cell))
@@ -18,12 +18,13 @@
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
src.ion_trail.set_up(src)
/obj/item/weapon/tank/jetpack/examine()
set src in usr
..()
/obj/item/weapon/tank/jetpack/examine(mob/user)
if(!..(user, 0))
return
if(air_contents.gas["oxygen"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
set name = "Toggle Jetpack Stabilization"
@@ -104,10 +105,11 @@
air_contents.adjust_gas("carbon_dioxide", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/jetpack/carbondioxide/examine()
set src in usr
..()
/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user)
if(!..(0))
return
if(air_contents.gas["carbon_dioxide"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of carbon dioxide!</B>")
playsound(user, 'sound/effects/alert.ogg', 50, 1)
return
@@ -23,11 +23,9 @@
return
examine()
set src in usr
..()
if(air_contents.gas["oxygen"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
examine(mob/user)
if(..(user, 0) && air_contents.gas["oxygen"] < 10)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of oxygen!</B>")
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
@@ -67,12 +65,10 @@
icon_state = "oxygen"
examine()
set src in usr
..()
if(air_contents.gas["oxygen"] < 1 && loc==usr)
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
usr << sound('sound/effects/alert.ogg')
examine(mob/user)
if(..(user, 0) && air_contents.gas["oxygen"] < 1 && loc==user)
user << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
..()
@@ -133,12 +129,10 @@
return
examine()
set src in usr
..()
if(air_contents.gas["oxygen"] < 0.2 && loc==usr)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
usr << sound('sound/effects/alert.ogg')
examine(mob/user)
if(..(user, 0) && air_contents.gas["oxygen"] < 0.2 && loc==user)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
@@ -166,9 +160,7 @@
src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
return
/obj/item/weapon/tank/nitrogen/examine()
set src in usr
..()
if(air_contents.gas["nitrogen"] < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/nitrogen/examine(mob/user)
if(..(user, 0) && air_contents.gas["nitrogen"] < 10)
user << text("\red <B>The meter on the [src.name] indicates you are almost out of nitrogen!</B>")
//playsound(user, 'sound/effects/alert.ogg', 50, 1)
@@ -39,12 +39,12 @@
..()
/obj/item/weapon/tank/examine()
/obj/item/weapon/tank/examine(mob/user)
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, usr))
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
if (!in_range(src, user))
if (icon == src) user << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
return
var/celsius_temperature = src.air_contents.temperature-T0C
@@ -63,7 +63,7 @@
else
descriptive = "furiously hot"
usr << "\blue \The \icon[icon][src] feels [descriptive]"
user << "\blue \The \icon[icon][src] feels [descriptive]"
return
+3 -4
View File
@@ -161,10 +161,9 @@
return
/obj/item/weapon/weldingtool/examine()
set src in usr
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
return
/obj/item/weapon/weldingtool/examine(mob/user)
if(..(user, 0))
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
+6 -5
View File
@@ -106,15 +106,16 @@ LINEN BINS
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine()
usr << desc
/obj/structure/bedsheetbin/examine(mob/user)
..(user)
if(amount < 1)
usr << "There are no bed sheets in the bin."
user << "There are no bed sheets in the bin."
return
if(amount == 1)
usr << "There is one bed sheet in the bin."
user << "There is one bed sheet in the bin."
return
usr << "There are [amount] bed sheets in the bin."
user << "There are [amount] bed sheets in the bin."
/obj/structure/bedsheetbin/update_icon()
+9 -8
View File
@@ -19,10 +19,9 @@
create_reagents(100)
/obj/structure/janitorialcart/examine()
set src in usr
usr << "[src] \icon[src] contains [reagents.total_volume] unit\s of liquid!"
..()
/obj/structure/janitorialcart/examine(mob/user)
if(..(user, 1))
user << "[src] \icon[src] contains [reagents.total_volume] unit\s of liquid!"
//everything else is visible, so doesn't need to be mentioned
@@ -175,11 +174,13 @@
create_reagents(100)
/obj/structure/stool/bed/chair/janicart/examine()
set src in usr
usr << "\icon[src] This [callme] contains [reagents.total_volume] unit\s of water!"
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
if(!..(user, 1))
return
user << "\icon[src] This [callme] contains [reagents.total_volume] unit\s of water!"
if(mybag)
usr << "\A [mybag] is hanging on the [callme]."
user << "\A [mybag] is hanging on the [callme]."
/obj/structure/stool/bed/chair/janicart/attackby(obj/item/I, mob/user)
+3 -4
View File
@@ -13,10 +13,9 @@
create_reagents(100)
/obj/structure/mopbucket/examine()
set src in usr
usr << "[src] \icon[src] contains [reagents.total_volume] unit\s of water!"
..()
/obj/structure/mopbucket/examine(mob/user)
if(..(user, 1))
user << "[src] \icon[src] contains [reagents.total_volume] unit\s of water!"
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/weapon/mop))
@@ -9,8 +9,6 @@
return
/obj/structure/stool/bed/chair/New()
if(anchored)
src.verbs -= /atom/movable/verb/pull
..()
spawn(3) //sorry. i don't think there's a better way to do this.
handle_rotation()
@@ -153,7 +151,7 @@
if(propelled)
var/mob/living/occupant = buckled_mob
unbuckle()
var/def_zone = ran_zone()
var/blocked = occupant.run_armor_check(def_zone, "melee")
occupant.throw_at(A, 3, propelled)
+7 -7
View File
@@ -32,22 +32,22 @@
//Appearance
/turf/simulated/wall/examine()
. = ..()
/turf/simulated/wall/examine(mob/user)
. = ..(user)
if(!damage)
usr << "<span class='notice'>It looks fully intact.</span>"
user << "<span class='notice'>It looks fully intact.</span>"
else
var/dam = damage / damage_cap
if(dam <= 0.3)
usr << "<span class='warning'>It looks slightly damaged.</span>"
user << "<span class='warning'>It looks slightly damaged.</span>"
else if(dam <= 0.6)
usr << "<span class='warning'>It looks moderately damaged.</span>"
user << "<span class='warning'>It looks moderately damaged.</span>"
else
usr << "<span class='danger'>It looks heavily damaged.</span>"
user << "<span class='danger'>It looks heavily damaged.</span>"
if(rotting)
usr << "<span class='warning'>There is fungus growing on [src].</span>"
user << "<span class='warning'>There is fungus growing on [src].</span>"
/turf/simulated/wall/proc/update_icon()
if(!damage_overlays[1]) //list hasn't been populated
-32
View File
@@ -1,32 +0,0 @@
/atom/movable/verb/pull()
set name = "Pull"
set category = "Object"
set src in oview(1)
if(Adjacent(usr))
usr.start_pulling(src)
return
/atom/verb/point()
set name = "Point To"
set category = "Object"
set src in oview()
var/atom/this = src//detach proc from src
src = null
if(!usr || !isturf(usr.loc))
return
if(usr.stat || usr.restrained())
return
if(usr.status_flags & FAKEDEATH)
return
var/tile = get_turf(this)
if (!tile)
return
var/P = new /obj/effect/decal/point(tile)
spawn (20)
if(P) del(P)
usr.visible_message("<b>[usr]</b> points to [this]")
+5 -6
View File
@@ -117,14 +117,13 @@
return
examine()
set src in view()
..()
if((in_range(src, usr) || loc == usr))
examine(mob/user)
..(user)
if((in_range(src, user) || loc == user))
if(secured)
usr << "\The [src] is ready!"
user << "\The [src] is ready!"
else
usr << "\The [src] can be attached!"
user << "\The [src] can be attached!"
return
+3 -3
View File
@@ -11,9 +11,9 @@
var/obj/item/device/assembly_holder/bombassembly = null //The first part of the bomb is an assembly holder, holding an igniter+some device
var/obj/item/weapon/tank/bombtank = null //the second part of the bomb is a phoron tank
/obj/item/device/onetankbomb/examine()
..()
bombtank.examine()
/obj/item/device/onetankbomb/examine(mob/user)
..(user)
user.examinate(bombtank)
/obj/item/device/onetankbomb/update_icon()
if(bombtank)
+5 -6
View File
@@ -84,14 +84,13 @@
src.overlays += O
*/
examine()
set src in view()
..()
if ((in_range(src, usr) || src.loc == usr))
examine(mob/user)
..(user)
if ((in_range(src, user) || src.loc == user))
if (src.secured)
usr << "\The [src] is ready!"
user << "\The [src] is ready!"
else
usr << "\The [src] can be attached!"
user << "\The [src] can be attached!"
return
+3 -3
View File
@@ -7,10 +7,10 @@
var/armed = 0
examine()
..()
examine(mob/user)
..(user)
if(armed)
usr << "It looks like it's armed."
user << "It looks like it's armed."
update_icon()
if(armed)
+7 -13
View File
@@ -197,11 +197,6 @@ BLIND // can't see anything
species_restricted = list("exclude","Unathi","Tajara")
sprite_sheets = list("Vox" = 'icons/mob/species/vox/gloves.dmi')
/obj/item/clothing/gloves/examine()
set src in usr
..()
return
/obj/item/clothing/gloves/update_clothing_icon()
if (ismob(src.loc))
var/mob/M = src.loc
@@ -388,20 +383,19 @@ BLIND // can't see anything
return
return
/obj/item/clothing/under/examine()
set src in view()
..()
/obj/item/clothing/under/examine(mob/user)
..(user)
switch(src.sensor_mode)
if(0)
usr << "Its sensors appear to be disabled."
user << "Its sensors appear to be disabled."
if(1)
usr << "Its binary life sensors appear to be enabled."
user << "Its binary life sensors appear to be enabled."
if(2)
usr << "Its vital tracker appears to be enabled."
user << "Its vital tracker appears to be enabled."
if(3)
usr << "Its vital tracker and tracking beacon appear to be enabled."
user << "Its vital tracker and tracking beacon appear to be enabled."
if(hastie)
usr << "\A [hastie] is clipped to it."
user << "\A [hastie] is clipped to it."
/obj/item/clothing/under/proc/set_sensors(mob/usr as mob)
var/mob/M = usr
+3 -4
View File
@@ -23,10 +23,9 @@
user << "You enable the mag-pulse traction system."
user.update_inv_shoes() //so our mob-overlays update
examine()
set src in view()
..()
examine(mob/user)
..(user)
var/state = "disabled"
if(src.flags&NOSLIP)
state = "enabled"
usr << "Its mag-pulse traction system appears to be [state]."
user << "Its mag-pulse traction system appears to be [state]."
+3 -4
View File
@@ -231,8 +231,7 @@
magpulse = 0
canremove = 1
/obj/item/clothing/shoes/magboots/vox/examine()
set src in view()
..()
/obj/item/clothing/shoes/magboots/vox/examine(mob/user)
..(user)
if (magpulse)
usr << "It would be hard to take these off without relaxing your grip first." //theoretically this message should only be seen by the wearer when the claws are equipped.
user << "It would be hard to take these off without relaxing your grip first." //theoretically this message should only be seen by the wearer when the claws are equipped.
+3 -3
View File
@@ -214,8 +214,8 @@ var/global/list/breach_burn_descriptors = list(
..()
/obj/item/clothing/suit/space/examine()
..()
/obj/item/clothing/suit/space/examine(mob/user)
..(user)
if(can_breach && breaches && breaches.len)
for(var/datum/breach/B in breaches)
usr << "\red <B>It has \a [B.descriptor].</B>"
user << "\red <B>It has \a [B.descriptor].</B>"
+3 -4
View File
@@ -17,10 +17,9 @@
camera.c_tag = user.name
user << "\blue User scanned as [camera.c_tag]. Camera activated."
/obj/item/clothing/head/helmet/space/rig/ert/examine()
..()
if(get_dist(usr,src) <= 1)
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
/obj/item/clothing/head/helmet/space/rig/ert/examine(mob/user)
if(..(user, 1))
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
/obj/item/clothing/suit/space/rig/ert
name = "emergency response team suit"
+3 -4
View File
@@ -378,10 +378,9 @@
camera.c_tag = user.name
user << "\blue User scanned as [camera.c_tag]. Camera activated."
/obj/item/clothing/head/helmet/space/rig/syndi/examine()
..()
if(get_dist(usr,src) <= 1)
usr << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
/obj/item/clothing/head/helmet/space/rig/syndi/examine(mob/user)
if(..(user, 1))
user << "This helmet has a built-in camera. It's [camera ? "" : "in"]active."
/obj/item/clothing/suit/space/rig/syndi
icon_state = "rig-syndie"
+4 -5
View File
@@ -257,13 +257,12 @@
holstered.emp_act(severity)
..()
/obj/item/clothing/tie/holster/examine()
set src in view()
..()
/obj/item/clothing/tie/holster/examine(mob/user)
..(user)
if (holstered)
usr << "A [holstered] is holstered here."
user << "A [holstered] is holstered here."
else
usr << "It is empty."
user << "It is empty."
/obj/item/clothing/tie/holster/on_attached(obj/item/clothing/under/S, mob/user as mob)
..()
+3 -3
View File
@@ -93,9 +93,9 @@
icon_state = "evidenceobj"
return
/obj/item/weapon/evidencebag/examine()
..()
if (stored_item) stored_item.examine()
/obj/item/weapon/evidencebag/examine(mob/user)
..(user)
if (stored_item) user.examinate(stored_item)
/obj/item/weapon/storage/box/evidence
name = "evidence bag box"
@@ -45,10 +45,3 @@
user.visible_message("[user] finishes wiping off the [A]!")
A.clean_blood()
return
/obj/item/weapon/reagent_containers/glass/rag/examine()
if (!usr)
return
usr << "That's \a [src]."
usr << desc
return
+4 -5
View File
@@ -167,8 +167,7 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
desc = "A card that holds an amount of money."
var/owner_name = "" //So the ATM can set it so the EFTPOS can put a valid name on transactions.
/obj/item/weapon/spacecash/ewallet/examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]."
/obj/item/weapon/spacecash/ewallet/examine(mob/user)
..(user)
if (!(user in view(2)) && user!=src.loc) return
user << "\blue Charge card's owner: [src.owner_name]. Thalers remaining: [src.worth]."
+5 -5
View File
@@ -202,12 +202,12 @@
update_icon()
user.visible_message("\The [user] [concealed ? "conceals" : "reveals"] their hand.")
/obj/item/weapon/hand/examine()
..()
if((!concealed || src.loc == usr) && cards.len)
usr << "It contains: "
/obj/item/weapon/hand/examine(mob/user)
..(user)
if((!concealed || src.loc == user) && cards.len)
user << "It contains: "
for(var/datum/playingcard/P in cards)
usr << "The [P.name]."
user << "The [P.name]."
/obj/item/weapon/hand/update_icon(var/direction = 0)
+3 -3
View File
@@ -27,10 +27,10 @@
src.name = "packet of [seed.seed_name] [seed.seed_noun]"
src.desc = "It has a picture of [seed.display_name] on the front."
/obj/item/seeds/examine()
..()
/obj/item/seeds/examine(mob/user)
..(user)
if(seed && !seed.roundstart)
usr << "It's tagged as variety #[seed.uid]."
user << "It's tagged as variety #[seed.uid]."
/obj/item/seeds/cutting
name = "cuttings"
+9 -15
View File
@@ -36,35 +36,29 @@
else
stored_ore[O.name] = 1
/obj/structure/ore_box/examine()
set name = "Examine"
set category = "IC"
set src in view(usr.client) //If it can be seen, it can be examined.
/obj/structure/ore_box/examine(mob/user)
user << "That's an [src]."
user << desc
if (!( usr ))
return
usr << "That's an [src]."
usr << desc
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
if(!istype(user, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
return
if(!Adjacent(usr)) //Can only check the contents of ore boxes if you can physically reach them.
if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them.
return
add_fingerprint(usr)
add_fingerprint(user)
if(!contents.len)
usr << "It is empty."
user << "It is empty."
return
if(world.time > last_update + 10)
update_ore_count()
last_update = world.time
usr << "It holds:"
user << "It holds:"
for(var/ore in stored_ore)
usr << "- [stored_ore[ore]] [ore]"
user << "- [stored_ore[ore]] [ore]"
return
+6 -4
View File
@@ -200,10 +200,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
for(var/obj/effect/step_trigger/S in locate(x, y, z)) //<-- this is dumb
S.Crossed(src)
/mob/dead/observer/examine()
if(usr)
usr << desc
/mob/dead/observer/can_use_hands() return 0
/mob/dead/observer/is_active() return 0
@@ -550,3 +546,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
W.message = message
W.add_hiddenprint(src)
W.visible_message("\red Invisible fingers crudely paint something in blood on [T]...")
/mob/dead/observer/pointed(atom/A as mob|obj|turf in view())
if(!..())
return 0
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
return 1
@@ -42,16 +42,12 @@
brainmob << "\blue You feel slightly disoriented. That's normal when you're just a brain."
callHook("debrain", list(brainmob))
/obj/item/organ/brain/examine() // -- TLE
set src in oview(12)
if (!( usr ))
return
usr << "This is \icon[src] \an [name]."
/obj/item/organ/brain/examine(mob/user) // -- TLE
..(user)
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
usr << "You can feel the small spark of life still left in this one."
user << "You can feel the small spark of life still left in this one."
else
usr << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user)
@@ -92,15 +92,10 @@
for (var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/mmi/posibrain/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
/obj/item/device/mmi/posibrain/examine(mob/user)
if(!..(user))
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
@@ -113,7 +108,7 @@
else
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "<span class='info'>*---------*</span>"
usr << msg
user << msg
return
/obj/item/device/mmi/posibrain/emp_act(severity)
@@ -47,15 +47,15 @@ var/const/MAX_ACTIVE_TIME = 400
else
del(src)
/obj/item/clothing/mask/facehugger/examine()
..()
/obj/item/clothing/mask/facehugger/examine(mob/user)
..(user)
switch(stat)
if(DEAD,UNCONSCIOUS)
usr << "\red \b [src] is not moving."
user << "\red \b [src] is not moving."
if(CONSCIOUS)
usr << "\red \b [src] seems to be active."
user << "\red \b [src] seems to be active."
if (sterile)
usr << "\red \b It looks like the proboscis has been removed."
user << "\red \b It looks like the proboscis has been removed."
return
/obj/item/clothing/mask/facehugger/attackby()
@@ -372,7 +372,7 @@
if (!M)
message = "<B>[src]</B> points."
else
M.point()
pointed(M)
if (M)
message = "<B>[src]</B> points to [M]."
@@ -1,11 +1,4 @@
/mob/living/carbon/human/examine()
set src in view()
if(!usr || !src) return
if( usr.sdisabilities & BLIND || usr.blinded || usr.stat==UNCONSCIOUS )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
/mob/living/carbon/human/examine(mob/user)
var/skipgloves = 0
var/skipsuitstorage = 0
var/skipjumpsuit = 0
@@ -447,7 +440,7 @@
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\n[t_He] is [pose]"
usr << msg
user << msg
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M as mob, hudtype)
@@ -715,11 +715,11 @@
if (href_list["lookitem"])
var/obj/item/I = locate(href_list["lookitem"])
I.examine()
src.examinate(I)
if (href_list["lookmob"])
var/mob/M = locate(href_list["lookmob"])
M.examine()
src.examinate(M)
if (href_list["flavor_change"])
switch(href_list["flavor_change"])
@@ -1,12 +1,6 @@
/mob/living/carbon/slime/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
/mob/living/carbon/slime/examine(mob/user)
..(user)
var/msg = ""
if (src.stat == DEAD)
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
else
@@ -33,5 +27,5 @@
msg += "<span class='warning'><B>It is radiating with massive levels of electrical activity!</B></span>\n"
msg += "*---------*</span>"
usr << msg
user << msg
return
@@ -1,13 +1,7 @@
/mob/living/carbon/monkey/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
/mob/living/carbon/monkey/examine(mob/user)
..(user)
var/msg = ""
if (src.handcuffed)
msg += "It is \icon[src.handcuffed] handcuffed!\n"
if (src.wear_mask)
@@ -41,5 +35,5 @@
msg += "*---------*</span>"
usr << msg
user << msg
return
+22
View File
@@ -1,3 +1,25 @@
//mob verbs are faster than object verbs. See mob/verb/examine.
/mob/living/verb/pulled(atom/movable/AM as mob|obj in oview(1))
set name = "Pull"
set category = "Object"
if(AM.Adjacent(src))
src.start_pulling(AM)
return
//mob verbs are faster than object verbs. See above.
/mob/living/pointed(atom/A as mob|obj|turf in view())
if(src.stat || !src.canmove || src.restrained())
return 0
if(src.status_flags & FAKEDEATH)
return 0
if(!..())
return 0
usr.visible_message("<b>[src]</b> points to [A]")
return 1
/mob/living/verb/succumb()
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
+5
View File
@@ -193,6 +193,11 @@ var/list/ai_verbs_default = list(
ai_list -= src
..()
/mob/living/silicon/ai/pointed(atom/A as mob|obj|turf in view())
set popup_menu = 0
set src = usr.contents
return 0
/mob/living/silicon/ai/proc/SetName(pickedName as text)
real_name = pickedName
name = pickedName
@@ -1,12 +1,8 @@
/mob/living/silicon/ai/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
/mob/living/silicon/ai/examine(mob/user)
if(!..(user))
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] <EM>[src]</EM>!\n"
var/msg = ""
if (src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"
else
@@ -17,21 +17,17 @@
/mob/aiEye/Move()
return 0
// Hide popout menu verbs
/mob/aiEye/examine()
/mob/aiEye/examinate(atom/A as mob|obj|turf in view())
set popup_menu = 0
set src = usr.contents
return 0
/mob/aiEye/pull()
/mob/aiEye/pointed(atom/A as mob|obj|turf in view())
set popup_menu = 0
set src = usr.contents
return 0
/mob/aiEye/point()
set popup_menu = 0
set src = usr.contents
return 0
/mob/aiEye/examine(mob/user)
// Use this when setting the aiEye's location.
// It will also stream the chunk that the new loc is in.
@@ -1,8 +1,7 @@
/mob/living/silicon/pai/examine() //removed as it was pointless...moved to the pai-card instead.
/* This is totally pointless because this mob is contained inside a card!
set src in oview()
/mob/living/silicon/pai/examine(mob/user) //removed as it was pointless...moved to the pai-card instead.
/*..(user)
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
var/msg = ""
if (src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be offline.</span>\n"
else
@@ -22,6 +21,6 @@
msg += "</span>"
msg += "*---------*</span>"
usr << msg
user << msg
*/
return
+4 -11
View File
@@ -413,17 +413,10 @@
else
src << "<span class='warning'>You are too small to pull that.</span>"
/mob/living/silicon/pai/examine()
set src in oview()
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src][name], a personal AI!"
/mob/living/silicon/pai/examine(mob/user)
..(user)
var/msg = ""
switch(src.stat)
if(CONSCIOUS)
if(!src.client) msg += "\nIt appears to be in stand-by mode." //afk
@@ -438,7 +431,7 @@
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
usr << msg
user << msg
// No binary for pAIs.
/mob/living/silicon/pai/binarycheck()
@@ -43,10 +43,10 @@
if(drone_progress >= 100)
visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.")
/obj/machinery/drone_fabricator/examine()
..()
if(produce_drones && drone_progress >= 100 && istype(usr,/mob/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
usr << "<BR><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
/obj/machinery/drone_fabricator/examine(mob/user)
..(user)
if(produce_drones && drone_progress >= 100 && istype(user,/mob/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
user << "<BR><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
/obj/machinery/drone_fabricator/proc/count_drones()
var/drones = 0
@@ -1,12 +1,7 @@
/mob/living/silicon/robot/examine()
set src in oview()
/mob/living/silicon/robot/examine(mob/user)
..(user)
if(!usr || !src) return
if( (usr.sdisabilities & BLIND || usr.blinded || usr.stat) && !istype(usr,/mob/dead/observer) )
usr << "<span class='notice'>Something is there but you can't see it.</span>"
return
var/msg = "<span class='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>[custom_name ? ", [modtype] [braintype]" : ""]!\n"
var/msg = ""
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 75)
@@ -42,5 +37,5 @@
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
usr << msg
user << msg
return
@@ -18,7 +18,6 @@
/mob/living/simple_animal/bee/New(loc, var/obj/machinery/apiary/new_parent)
..()
parent = new_parent
verbs -= /atom/movable/verb/pull
/mob/living/simple_animal/bee/Del()
if(parent)
@@ -44,10 +44,9 @@
del src
return
/mob/living/simple_animal/construct/examine()
set src in oview()
var/msg = "<span cass='info'>*---------*\nThis is \icon[src] \a <EM>[src]</EM>!\n"
/mob/living/simple_animal/construct/examine(mob/user)
..(user)
var/msg = ""
if (src.health < src.maxHealth)
msg += "<span class='warning'>"
if (src.health >= src.maxHealth/2)
@@ -57,7 +56,7 @@
msg += "</span>"
msg += "*---------*</span>"
usr << msg
user << msg
return
/mob/living/simple_animal/construct/Bump(atom/movable/AM as mob|obj, yes)
@@ -276,7 +276,7 @@
src << "\red There is nothing of interest to take."
return 0
/mob/living/simple_animal/spiderbot/examine()
..()
/mob/living/simple_animal/spiderbot/examine(mob/user)
..(user)
if(src.held_item)
usr << "It is carrying \a [src.held_item] \icon[src.held_item]."
user << "It is carrying \a [src.held_item] \icon[src.held_item]."

Some files were not shown because too many files have changed in this diff Show More