examine signature changed to include distance

- distance is INFINITE, 0, or a positive integer based on get_dist() between
the examiner and examinee's turfs when they are on the same Z. When the
examiner is dead or a ghost, distance is always 0.
- also updates /examine( implementations to use it!
- adds w_class_to_name proc for reusing "It is a X item." examine behavior.
This commit is contained in:
Spookerton
2023-12-29 23:44:21 +00:00
parent e3393dc87b
commit 978f4511a5
240 changed files with 524 additions and 551 deletions
@@ -196,9 +196,9 @@
return 1
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user)
/obj/machinery/atmospherics/binary/dp_vent_pump/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
+1 -1
View File
@@ -14,7 +14,7 @@ GLOBAL_LIST_EMPTY(shutoff_valves)
/obj/machinery/atmospherics/valve/shutoff/update_icon()
icon_state = "vclamp[open]"
/obj/machinery/atmospherics/valve/shutoff/examine(var/mob/user)
/obj/machinery/atmospherics/valve/shutoff/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The automatic shutoff circuit is [close_on_leaks ? "enabled" : "disabled"]."
@@ -87,7 +87,7 @@
/obj/machinery/atmospherics/unary/freezer/tgui_act(action, params)
if(..())
return TRUE
. = TRUE
switch(action)
if("toggleStatus")
@@ -169,7 +169,7 @@
..()
/obj/machinery/atmospherics/unary/freezer/examine(mob/user)
/obj/machinery/atmospherics/unary/freezer/examine(mob/user, distance, infix, suffix)
. = ..()
if(panel_open)
. += "The maintenance hatch is open."
@@ -156,7 +156,7 @@
..()
/obj/machinery/atmospherics/unary/heater/examine(mob/user)
/obj/machinery/atmospherics/unary/heater/examine(mob/user, distance, infix, suffix)
. = ..()
if(panel_open)
. += "The maintenance hatch is open."
@@ -165,7 +165,7 @@
soundloop.stop()
return 0
if(!use_power)
soundloop.stop()
soundloop.stop()
return 0
if(welded)
soundloop.stop()
@@ -400,9 +400,9 @@
else
..()
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user)
/obj/machinery/atmospherics/unary/vent_pump/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
. += "You are too far away to read the gauge."
@@ -286,9 +286,9 @@
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user)
/obj/machinery/atmospherics/unary/vent_scrubber/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else
. += "You are too far away to read the gauge."
+1 -1
View File
@@ -306,6 +306,6 @@
"You hear a ratchet.")
deconstruct()
/obj/machinery/atmospherics/valve/examine(mob/user)
/obj/machinery/atmospherics/valve/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It is [open ? "open" : "closed"]."
+1 -1
View File
@@ -61,7 +61,7 @@
#define COMSIG_ATOM_HULK_ATTACK "hulk_attack"
///from base of atom/animal_attack(): (/mob/user)
#define COMSIG_ATOM_ATTACK_ANIMAL "attack_animal"
///from base of atom/examine(): (/mob)
///from base of atom/examine(mob/user, distance, infix, suffix): (/mob)
#define COMSIG_PARENT_EXAMINE "atom_examine"
///from base of atom/get_examine_name(): (/mob, list/overrides)
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name"
+1 -1
View File
@@ -215,7 +215,7 @@ var/global/list/pre_init_created_atoms // atom creation ordering means some stuf
/atom/proc/get_examine_desc()
return desc
/atom/proc/examine(mob/user, infix = "", suffix = "")
/atom/proc/examine(mob/user, distance, infix = "", suffix = "")
var/f_name = "\a [src][infix]."
if (blood_DNA && !istype(src, /obj/effect/decal))
if (gender == PLURAL)
+2 -2
View File
@@ -83,7 +83,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
rune_list.Remove(src)
..()
/obj/effect/rune/examine(mob/user)
/obj/effect/rune/examine(mob/user, distance, infix, suffix)
. = ..()
if(iscultist(user))
. += "This spell circle reads: <i>[word1] [word2] [word3]</i>."
@@ -425,7 +425,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
to_chat(user, "The book seems full of illegible scribbles. Is this a joke?")
return
/obj/item/book/tome/examine(mob/user)
/obj/item/book/tome/examine(mob/user, distance, infix, suffix)
. = ..()
if(!iscultist(user))
. += "An old, dusty tome with frayed edges and a sinister looking cover."
+7 -7
View File
@@ -33,15 +33,15 @@
/obj/item/pinpointer/process()
if(!active)
return PROCESS_KILL
if(!the_disk)
the_disk = locate()
if(!the_disk)
icon_state = "pinonnull"
return
set_dir(get_dir(src,the_disk))
switch(get_dist(src,the_disk))
if(0)
icon_state = "pinondirect"
@@ -52,7 +52,7 @@
if(16 to INFINITY)
icon_state = "pinonfar"
/obj/item/pinpointer/examine(mob/user)
/obj/item/pinpointer/examine(mob/user, distance, infix, suffix)
. = ..()
for(var/obj/machinery/nuclearbomb/bomb in machines)
if(bomb.timing)
@@ -299,10 +299,10 @@
if(loc.z != our_shuttle.z) //If you are on a different z-level from the shuttle
icon_state = "pinonnull"
else
set_dir(get_dir(src, our_shuttle))
switch(get_dist(src, our_shuttle))
if(0)
icon_state = "pinondirect"
@@ -318,4 +318,4 @@
shuttle_comp_id = "Mercenary"
/obj/item/pinpointer/shuttle/heist
shuttle_comp_id = "Skipjack"
shuttle_comp_id = "Skipjack"
@@ -24,7 +24,7 @@
one has been provided to allow you to leave your hideout."
uses = 1
/obj/item/disposable_teleporter/examine(mob/user)
/obj/item/disposable_teleporter/examine(mob/user, distance, infix, suffix)
. = ..()
. += "[uses] uses remaining."
+1 -1
View File
@@ -48,7 +48,7 @@
else
to_chat(usr, "<span class='warning'>There's no more cable on the reel.</span>")
/obj/machinery/cablelayer/examine(mob/user)
/obj/machinery/cablelayer/examine(mob/user, distance, infix, suffix)
. = ..()
. += "[src]'s cable reel has [cable.amount] length\s left."
+2 -5
View File
@@ -76,15 +76,12 @@
)
radio_connection.post_signal(src, signal)
/obj/machinery/meter/examine(mob/user)
/obj/machinery/meter/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead)))
if(distance > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead)))
. += "<span class='warning'>You are too far away to read it.</span>"
else if(stat & (NOPOWER|BROKEN))
. += "<span class='warning'>The display is off.</span>"
else if(target)
var/datum/gas_mixture/environment = target.return_air()
if(environment)
+3 -3
View File
@@ -34,9 +34,9 @@
else
cut_overlays()
/obj/machinery/cell_charger/examine(mob/user)
/obj/machinery/cell_charger/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) <= 5)
if(distance <= 5)
. += "[charging ? "[charging]" : "Nothing"] is in [src]."
if(charging)
. += "Current charge: [charging.charge] / [charging.maxcharge]"
@@ -128,4 +128,4 @@
var/E = 0
for(var/obj/item/stock_parts/capacitor/C in component_parts)
E += C.rating
efficiency = active_power_usage * (1+ (E - 1)*0.5)
efficiency = active_power_usage * (1+ (E - 1)*0.5)
+1 -1
View File
@@ -535,7 +535,7 @@
read_only = !read_only
to_chat(user, "You flip the write-protect tab to [read_only ? "protected" : "unprotected"].")
/obj/item/disk/data/examine(mob/user)
/obj/item/disk/data/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The write-protect tab is set to [read_only ? "protected" : "unprotected"]."
+2 -2
View File
@@ -1033,9 +1033,9 @@
w_class = ITEMSIZE_SMALL
var/active = 0 //if the ship is on
/obj/item/orion_ship/examine(mob/user)
/obj/item/orion_ship/examine(mob/user, distance, infix, suffix)
. = ..()
if(in_range(user, src))
if(distance < 2)
if(!active)
. += span("notice", "There's a little switch on the bottom. It's flipped down.")
else
+2 -2
View File
@@ -18,7 +18,7 @@
else
return temp_access
/obj/item/card/id/guest/examine(mob/user)
/obj/item/card/id/guest/examine(mob/user, distance, infix, suffix)
. = ..()
if (world.time < expiration_time)
. += "<span class='notice'>This pass expires at [worldtime2stationtime(expiration_time)].</span>"
@@ -244,4 +244,4 @@
to_chat(usr, "<span class='warning'>Cannot issue pass without issuing ID.</span>")
src.add_fingerprint(usr)
SSnanoui.update_uis(src)
SSnanoui.update_uis(src)
+1 -1
View File
@@ -334,7 +334,7 @@
return
/obj/machinery/door/examine(mob/user)
/obj/machinery/door/examine(mob/user, distance, infix, suffix)
. = ..()
if(src.health <= 0)
. += "It is broken!"
+3 -6
View File
@@ -57,7 +57,7 @@
if(F != src)
log_debug("Duplicate firedoors at [x],[y],[z]")
return INITIALIZE_HINT_QDEL
var/area/A = get_area(src)
ASSERT(istype(A))
@@ -78,15 +78,12 @@
/obj/machinery/door/firedoor/get_material()
return get_material_by_name(DEFAULT_WALL_MATERIAL)
/obj/machinery/door/firedoor/examine(mob/user)
/obj/machinery/door/firedoor/examine(mob/user, distance, infix, suffix)
. = ..()
if(!Adjacent(user))
if(distance > 1)
return .
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
. += "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
. += "<b>Sensor readings:</b>"
for(var/index = 1; index <= tile_info.len; index++)
var/o = "&nbsp;&nbsp;"
+1 -1
View File
@@ -26,7 +26,7 @@ FIRE ALARM
/obj/machinery/firealarm/alarms_hidden
alarms_hidden = TRUE
/obj/machinery/firealarm/examine()
/obj/machinery/firealarm/examine(mob/user, distance, infix, suffix)
. = ..()
. += "Current security level: [seclevel]"
+2 -2
View File
@@ -63,7 +63,7 @@
return
..()
/obj/machinery/floorlayer/examine(mob/user)
/obj/machinery/floorlayer/examine(mob/user, distance, infix, suffix)
. = ..()
var/dismantle = mode["dismantle"]
var/laying = mode["laying"]
@@ -107,4 +107,4 @@
/obj/machinery/floorlayer/proc/CollectTiles(var/turf/w_turf)
for(var/obj/item/stack/tile/tile in w_turf)
TakeTile(tile)
TakeTile(tile)
+1 -1
View File
@@ -256,7 +256,7 @@
anchored = TRUE
density = TRUE
/obj/structure/frame/examine(mob/user)
/obj/structure/frame/examine(mob/user, distance, infix, suffix)
. = ..()
if(circuit)
. += "It has \a [circuit] installed."
+2 -4
View File
@@ -164,12 +164,10 @@
mode = !mode
to_chat(usr, "The IV drip is now [mode ? "injecting" : "taking blood"].")
/obj/machinery/iv_drip/examine(mob/user)
/obj/machinery/iv_drip/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) <= 2)
if(distance < 3)
. += "The IV drip is [mode ? "injecting" : "taking blood"]."
if(beaker)
if(beaker.reagents?.reagent_list?.len)
. += "<span class='notice'>Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.</span>"
+3 -3
View File
@@ -50,9 +50,9 @@
add_overlay(overlay)
set_light(2, 0.1, on ? "#82FF4C" : "#F86060")
/obj/machinery/light_switch/examine(mob/user)
/obj/machinery/light_switch/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "A light switch. It is [on? "on" : "off"]."
/obj/machinery/light_switch/attack_hand(mob/user)
@@ -84,4 +84,4 @@
..(severity)
return
power_change()
..(severity)
..(severity)
+1 -1
View File
@@ -150,7 +150,7 @@
if(istype(W, /obj/item/tank) && !stat)
to_chat(user, "<span class='warning'>Please open the maintenance hatch first.</span>")
/obj/machinery/oxygen_pump/examine(var/mob/user)
/obj/machinery/oxygen_pump/examine(mob/user, distance, infix, suffix)
. = ..()
if(tank)
. += "The meter shows [round(tank.air_contents.return_pressure())] kPa."
+1 -1
View File
@@ -114,7 +114,7 @@
..()
/obj/machinery/pipelayer/examine(mob/user)
/obj/machinery/pipelayer/examine(mob/user, distance, infix, suffix)
. = ..()
. += "[src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated."
+3 -4
View File
@@ -21,10 +21,9 @@
. = ..()
default_apply_parts()
/obj/machinery/recharger/examine(mob/user)
/obj/machinery/recharger/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) <= 5)
if(distance < 6)
. += "[charging ? "[charging]" : "Nothing"] is in [src]."
if(charging)
var/obj/item/cell/C = charging.get_cell()
@@ -171,4 +170,4 @@
icon_state_charging = "wrecharger1"
icon_state_idle = "wrecharger0"
portable = 0
circuit = /obj/item/circuitboard/recharger/wrecharger
circuit = /obj/item/circuitboard/recharger/wrecharger
+2 -2
View File
@@ -125,7 +125,7 @@
var/charge_used = cell.use(diff)
rigcell.give(charge_used)
/obj/machinery/recharge_station/examine(mob/user)
/obj/machinery/recharge_station/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The charge meter reads: [round(chargepercentage())]%"
@@ -322,4 +322,4 @@
icon_state = "borg_pod_opened"
if(icon_update_tick == 0)
build_overlays()
build_overlays()
+1 -3
View File
@@ -40,15 +40,13 @@
add_overlay("sheater-open")
/obj/machinery/space_heater/examine(mob/user)
/obj/machinery/space_heater/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The heater is [on ? "on" : "off"] and the hatch is [panel_open ? "open" : "closed"]."
if(panel_open)
. += "The power cell is [cell ? "installed" : "missing"]."
else
. += "The charge meter reads [cell ? round(cell.percent(),1) : 0]%"
return
/obj/machinery/space_heater/powered()
if(cell && cell.charge)
+2 -2
View File
@@ -146,7 +146,7 @@
return 1
return 0
/obj/machinery/status_display/examine(mob/user)
/obj/machinery/status_display/examine(mob/user, distance, infix, suffix)
. = ..()
if(mode != STATUS_DISPLAY_BLANK && mode != STATUS_DISPLAY_ALERT)
. += "The display says:<br>\t[sanitize(message1)]<br>\t[sanitize(message2)]"
@@ -264,4 +264,4 @@
#undef FONT_SIZE
#undef FONT_COLOR
#undef FONT_STYLE
#undef SCROLL_SPEED
#undef SCROLL_SPEED
+1 -1
View File
@@ -25,7 +25,7 @@
var/internal_damage_flag // If set, the component will toggle the flag on or off if it is destroyed / severely damaged.
/obj/item/mecha_parts/component/examine(mob/user)
/obj/item/mecha_parts/component/examine(mob/user, distance, infix, suffix)
. = ..()
var/show_integrity = round(integrity/max_integrity*100, 0.1)
switch(show_integrity)
+1 -1
View File
@@ -35,7 +35,7 @@
return 1
return 0
/obj/item/mecha_parts/mecha_equipment/examine(mob/user)
/obj/item/mecha_parts/mecha_equipment/examine(mob/user, distance, infix, suffix)
. = ..()
. += "<span class='notice'>[src] will fill [equip_type?"a [equip_type]":"any"] slot.</span>"
+1 -8
View File
@@ -501,28 +501,21 @@
else
return 0
/obj/mecha/examine(mob/user)
/obj/mecha/examine(mob/user, distance, infix, suffix)
. = ..()
var/obj/item/mecha_parts/component/armor/AC = internal_components[MECH_ARMOR]
var/obj/item/mecha_parts/component/hull/HC = internal_components[MECH_HULL]
if(AC)
. += "It has [AC] attached. [AC.get_efficiency()<0.5?"It is severely damaged.":""]"
else
. += "It has no armor plating."
if(HC)
if(!AC || AC.get_efficiency() < 0.7)
. += "It has [HC] attached. [HC.get_efficiency()<0.5?"It is severely damaged.":""]"
else
. += "You cannot tell what type of hull it has."
else
. += "It does not seem to have a completed hull."
var/integrity = health/initial(health)*100
switch(integrity)
if(85 to 100)
@@ -161,7 +161,7 @@ var/global/list/image/splatter_cache=list()
else
icon_state = "writing1"
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
/obj/effect/decal/cleanable/blood/writing/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It reads: <font color='[basecolor]'>\"[message]\"</font>"
+19 -14
View File
@@ -200,20 +200,8 @@
src.loc = T
// See inventory_sizes.dm for the defines.
/obj/item/examine(mob/user)
var/size
switch(src.w_class)
if(ITEMSIZE_TINY)
size = "tiny"
if(ITEMSIZE_SMALL)
size = "small"
if(ITEMSIZE_NORMAL)
size = "normal-sized"
if(ITEMSIZE_LARGE)
size = "bulky"
if(ITEMSIZE_HUGE)
size = "huge"
. = ..(user, "", "It is a [size] item.")
/obj/item/examine(mob/user, distance, infix, suffix)
. = ..(user, distance, infix, "It is a [w_class_to_name(w_class)] item.")
if(drying_wetness > 0 && drying_wetness != initial(drying_wetness))
. += "\The [src] is [get_dryness_text()]."
@@ -979,3 +967,20 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/handle_movement(var/turf/walking, var/running)
return FALSE
/// Returns the item's w_class as text.
/proc/w_class_to_name(w_class)
switch (w_class)
if (ITEMSIZE_TINY)
return "tiny"
if (ITEMSIZE_SMALL)
return "small"
if (ITEMSIZE_NORMAL)
return "normal"
if (ITEMSIZE_LARGE)
return "large"
if (ITEMSIZE_HUGE)
return "huge"
else
return "buggy"
+1 -1
View File
@@ -13,7 +13,7 @@
var/static/radial_use = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_use")
var/static/radial_pickup = image(icon = 'icons/mob/radial.dmi', icon_state = "radial_pickup")
/obj/item/deskbell/examine(mob/user)
/obj/item/deskbell/examine(mob/user, distance, infix, suffix)
. = ..()
if(broken)
. += "<b>It looks damaged, the ringer is stuck firmly inside.</b>"
+3 -3
View File
@@ -214,14 +214,14 @@
if(H.reagents)
syringe.reagents.trans_to_mob(H, 30, CHEM_BLOOD)
/obj/structure/closet/body_bag/cryobag/examine(mob/user)
/obj/structure/closet/body_bag/cryobag/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user)) //The bag's rather thick and opaque from a distance.
if(distance < 2) //The bag's rather thick and opaque from a distance.
. += "<span class='info'>You peer into \the [src].</span>"
if(syringe)
. += "<span class='info'>It has a syringe added to it.</span>"
for(var/mob/living/L in contents)
. += L.examine(user)
. += L.examine(user, distance, infix, suffix)
/obj/structure/closet/body_bag/cryobag/attackby(obj/item/W, mob/user)
if(opened)
+2 -2
View File
@@ -69,9 +69,9 @@
color = reagents.get_color()
/obj/item/reagent_containers/powder/examine(mob/user)
/obj/item/reagent_containers/powder/examine(mob/user, distance, infix, suffix)
. = ..()
if (isliving(user) && get_dist(user, src) > 2)
if (distance > 2 && isliving(user))
return
. += "It seems to be about [reagents.total_volume] units of [main_reagent_name]."
@@ -112,9 +112,9 @@ var/global/list/obj/item/communicator/all_communicators = list()
// Proc: examine()
// Parameters: user - the user doing the examining
// Description: Allows the user to click a link when examining to look at video if one is going.
/obj/item/communicator/examine(mob/user)
/obj/item/communicator/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user) && video_source)
if(distance < 2 && video_source)
. += "<span class='notice'>It looks like it's on a video call: <a href='?src=\ref[src];watchvideo=1'>\[view\]</a></span>"
// Proc: initialize_exonet()
@@ -135,12 +135,10 @@ var/global/list/obj/item/communicator/all_communicators = list()
// Proc: examine()
// Parameters: 1 (user - the person examining the device)
// Description: Shows all the voice mobs inside the device, and their status.
/obj/item/communicator/examine(mob/user)
/obj/item/communicator/examine(mob/user, distance, infix, suffix)
. = ..()
for(var/mob/living/voice/voice in contents)
. += "<span class='notice'>On the screen, you can see a image feed of [voice].</span>"
if(voice && voice.key)
switch(voice.stat)
if(CONSCIOUS)
@@ -82,7 +82,7 @@
icon_state = "[initial(icon_state)]"
set_light(0)
/obj/item/flashlight/examine(mob/user)
/obj/item/flashlight/examine(mob/user, distance, infix, suffix)
. = ..()
if(power_use && brightness_level)
. += "\The [src] is set to [brightness_level]."
@@ -113,7 +113,7 @@
else if(choice == "Colour")
choose_colour()
/obj/item/floor_painter/examine(mob/user)
/obj/item/floor_painter/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint."
+1 -1
View File
@@ -34,7 +34,7 @@
update_icon()
update_sound()
/obj/item/geiger/examine(mob/user)
/obj/item/geiger/examine(mob/user, distance, infix, suffix)
. = ..()
get_radiation()
. += "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>"
@@ -13,11 +13,11 @@
var/datum/data/record/warrant/active
//look at it
/obj/item/holowarrant/examine(mob/user)
/obj/item/holowarrant/examine(mob/user, distance, infix, suffix)
. = ..()
if(active)
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
if(in_range(user, src) || istype(user, /mob/observer/dead))
if(distance < 2 || istype(user, /mob/observer/dead))
show_content(user) //Opens a browse window, not chatbox related
else
. += "<span class='notice'>You have to go closer if you want to read it.</span>"
@@ -110,4 +110,4 @@
Vessel or habitat: _<u>[using_map.station_name]</u>____</br>
</BODY></HTML>
"}
show_browser(user, output, "window=Search warrant for [active.fields["namewarrant"]]")
show_browser(user, output, "window=Search warrant for [active.fields["namewarrant"]]")
@@ -63,9 +63,9 @@
failmsg = "The [name]'s refill light blinks red."
. = ..()
/obj/item/lightreplacer/examine(mob/user)
/obj/item/lightreplacer/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) <= 2)
if(distance < 3)
. += "It has [uses] lights remaining."
/obj/item/lightreplacer/attackby(obj/item/W, mob/user)
@@ -228,4 +228,4 @@
#undef LIGHT_OK
#undef LIGHT_EMPTY
#undef LIGHT_BROKEN
#undef LIGHT_BURNED
#undef LIGHT_BURNED
+1 -1
View File
@@ -65,7 +65,7 @@
user.drop_from_inventory(src)
qdel(src)
/obj/item/modkit/examine(mob/user)
/obj/item/modkit/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It looks as though it modifies hardsuits to fit [target_species] users."
@@ -26,6 +26,6 @@
/obj/item/pipe_painter/attack_self(mob/user as mob)
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
/obj/item/pipe_painter/examine(mob/user)
/obj/item/pipe_painter/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It is in [mode] mode."
@@ -39,9 +39,8 @@
/obj/item/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
/obj/item/radio/headset/examine(mob/user)
/obj/item/radio/headset/examine(mob/user, distance, infix, suffix)
. = ..()
if(radio_desc && Adjacent(user))
. += "The following channels are available:"
. += radio_desc
@@ -596,10 +596,9 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
return get_mobs_or_objects_in_view(range, src)
/obj/item/radio/examine(mob/user)
/obj/item/radio/examine(mob/user, distance, infix, suffix)
. = ..()
if((in_range(src, user) || loc == user))
if(distance < 2 || loc == user)
if(b_stat)
. += "<span class='notice'>\The [src] can be attached and modified!</span>"
else
+5 -5
View File
@@ -83,9 +83,9 @@
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
camtype = /obj/machinery/camera/bug/spy
/obj/item/camerabug/examine(mob/user)
/obj/item/camerabug/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) == 0)
if(!distance)
. += "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional."
/obj/item/camerabug/update_icon()
@@ -234,9 +234,9 @@
item_state = "electronic"
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
/obj/item/bug_monitor/spy/examine(mob/user)
/obj/item/bug_monitor/spy/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
/obj/machinery/camera/bug/check_eye(var/mob/user as mob)
@@ -275,4 +275,4 @@
canhear_range = 1
name = "spy device"
icon_state = "syn_cypherkey"
*/
*/
@@ -182,29 +182,25 @@
else
icon_state = "suitcooler0"
/obj/item/suit_cooling_unit/examine(mob/user)
/obj/item/suit_cooling_unit/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
if (on)
if (attached_to_suit(src.loc))
if (attached_to_suit(loc))
. += "It's switched on and running."
else
. += "It's switched on, but not attached to anything."
else
. += "It is switched off."
if (cover_open)
if(cell)
. += "The panel is open, exposing the [cell]."
else
. += "The panel is open."
if (cell)
. += "The charge meter reads [round(cell.percent())]%."
else
. += "It doesn't have a power cell installed."
/obj/item/suit_cooling_unit/empty //No duplicating cells with autolathes any more.
starts_with_cell = FALSE
starts_with_cell = FALSE
+1 -2
View File
@@ -20,7 +20,7 @@
radio = null
..()
/obj/item/tvcamera/examine()
/obj/item/tvcamera/examine(mob/user, distance, infix, suffix)
. = ..()
. += "Video feed is [camera.status ? "on" : "off"]"
. += "Audio feed is [radio.broadcasting ? "on" : "off"]"
@@ -92,4 +92,3 @@
H.update_inv_r_hand()
H.update_inv_l_hand()
H.update_inv_belt()
+2 -2
View File
@@ -81,10 +81,10 @@
headline = pick(tabloid_headlines)
name = pick(tabloid_publishers)
/obj/item/tabloid/examine(mob/user, distance)
/obj/item/tabloid/examine(mob/user, distance, infix, suffix)
. = ..()
if(headline)
to_chat(user, "The headline screams, \"[headline]\"")
. += "The headline screams, \"[headline]\""
/obj/item/tabloid/attack_self(mob/user)
user.visible_message(SPAN_NOTICE("\The [user] leafs idly through \the [src]."))
+2 -2
View File
@@ -12,7 +12,7 @@
var/uses = 1 // Uses before the kit deletes itself.
var/list/allowed_types = list()
/obj/item/kit/examine()
/obj/item/kit/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It has [uses] use\s left."
@@ -247,7 +247,7 @@
allowed_types = splittext(additional_data, ", ")
/obj/item/kit/paint/examine()
/obj/item/kit/paint/examine(mob/user, distance, infix, suffix)
. = ..()
. += "This kit will convert an exosuit into: [new_name]."
. += "This kit can be used on the following exosuit models:"
+1 -1
View File
@@ -26,7 +26,7 @@
stasis_level = 2 // Lower than the normal cryobag, because it's not made for meat that dies. It's made for robots and is freezing.
var/obj/item/clothing/accessory/medal/badge/corptag // The tag on the bag.
/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user)
/obj/structure/closet/body_bag/cryobag/robobag/examine(mob/user, distance, infix, suffix)
. = ..()
if(corptag && Adjacent(user))
. += "<span class='notice'>[src] has a [corptag] attached to it.</span>"
+1 -1
View File
@@ -14,7 +14,7 @@
var/created_name = ""
var/product = /mob/living/silicon/robot
/obj/item/robot_parts/frame/examine(mob/user)
/obj/item/robot_parts/frame/examine(mob/user, distance, infix, suffix)
. = ..()
if(check_completion())
. += SPAN_NOTICE("It is ready to receive a controlling intelligence.")
@@ -41,7 +41,7 @@ var/global/list/marker_beacon_colors = list(
. = ..()
update_icon()
/obj/item/stack/marker_beacon/examine(mob/user)
/obj/item/stack/marker_beacon/examine(mob/user, distance, infix, suffix)
. = ..()
. += "<span class='notice'>Use in-hand to place a [singular_name].</span>"
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
@@ -97,7 +97,7 @@ var/global/list/marker_beacon_colors = list(
picked_color = mapped_in_color
update_icon()
/obj/structure/marker_beacon/examine(mob/user)
/obj/structure/marker_beacon/examine(mob/user, distance, infix, suffix)
. = ..()
if(!perma)
. += "<span class='notice'>Alt-click to select a color. Current color is [picked_color].</span>"
+4 -5
View File
@@ -56,10 +56,9 @@
icon_state = "[initial(icon_state)]_3"
item_state = initial(icon_state)
/obj/item/stack/examine(mob/user)
/obj/item/stack/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
if(!uses_charge)
. += "There [src.amount == 1? "is" : "are"] [src.amount] [src.singular_name]\s in the stack."
else
@@ -76,7 +75,7 @@
/obj/item/stack/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
var/list/data = ..()
data["amount"] = get_amount()
return data
@@ -120,7 +119,7 @@
if(get_amount() < 1)
qdel(src)
return
var/datum/stack_recipe/R = locate(params["ref"])
if(!is_valid_recipe(R, recipes)) //href exploit protection
return FALSE
+2 -2
View File
@@ -197,7 +197,7 @@
wants_to_battle = FALSE
to_chat(user, "<span class='notice'>You get the feeling they don't want to battle.</span>")
/obj/item/toy/mecha/examine()
/obj/item/toy/mecha/examine(mob/user, distance, infix, suffix)
. = ..()
. += "<span class='notice'>This toy's special attack is [special_attack_cry], [special_attack_type_message] </span>"
if(in_combat)
@@ -643,4 +643,4 @@
#undef SPECIAL_ATTACK_DAMAGE
#undef SPECIAL_ATTACK_UTILITY
#undef SPECIAL_ATTACK_OTHER
#undef MAX_BATTLE_LENGTH
#undef MAX_BATTLE_LENGTH
+5 -5
View File
@@ -287,7 +287,7 @@
lcolor = sanitize_hexcolor(energy_color_input)
update_icon()
/obj/item/toy/sword/examine(mob/user)
/obj/item/toy/sword/examine(mob/user, distance, infix, suffix)
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
@@ -790,11 +790,11 @@
var/opened = FALSE // has this been slit open? this will allow you to store an object in a plushie.
var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself.
/obj/structure/plushie/examine(mob/user)
/obj/structure/plushie/examine(mob/user, distance, infix, suffix)
. = ..()
if(opened)
. += "<i>You notice an incision has been made on [src].</i>"
if(in_range(user, src) && stored_item)
if(distance < 2 && stored_item)
. += "<i>You can see something in there...</i>"
/obj/structure/plushie/attack_hand(mob/user)
@@ -888,11 +888,11 @@
var/obj/item/stored_item // Note: Stored items can't be bigger than the plushie itself.
/obj/item/toy/plushie/examine(mob/user)
/obj/item/toy/plushie/examine(mob/user, distance, infix, suffix)
. = ..()
if(opened)
. += "<i>You notice an incision has been made on [src].</i>"
if(in_range(user, src) && stored_item)
if(distance < 2 && stored_item)
. += "<i>You can see something in there...</i>"
/obj/item/toy/plushie/attack_self(mob/user as mob)
+1 -1
View File
@@ -41,7 +41,7 @@
spark_system = null
return ..()
/obj/item/rcd/examine(mob/user)
/obj/item/rcd/examine(mob/user, distance, infix, suffix)
. = ..()
. += display_resources()
+2 -2
View File
@@ -33,9 +33,9 @@ RSF
w_class = ITEMSIZE_NORMAL
/obj/item/rsf/examine(mob/user)
/obj/item/rsf/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) == 0)
if(!distance)
. += "<span class='notice'>It currently holds [stored_matter]/30 fabrication-units.</span>"
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob)
@@ -149,7 +149,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
M.update_inv_r_hand(1)
..()
/obj/item/clothing/mask/smokable/examine(mob/user)
/obj/item/clothing/mask/smokable/examine(mob/user, distance, infix, suffix)
. = ..()
if(!is_pipe)
+3 -4
View File
@@ -22,14 +22,13 @@
. = ..()
ec_cartridge = new cartridge_type(src)
/obj/item/clothing/mask/smokable/ecig/examine(mob/user)
/obj/item/clothing/mask/smokable/ecig/examine(mob/user, distance, infix, suffix)
. = ..()
if(active)
. += "<span class='notice'>It is turned on.</span>"
else
. += "<span class='notice'>It is turned off.</span>"
if(Adjacent(user))
if(distance < 2)
if(ec_cartridge)
if(!ec_cartridge.reagents?.total_volume)
. += "<span class='notice'>Its cartridge is empty!</span>"
@@ -159,7 +158,7 @@
. = ..()
create_reagents(volume)
/obj/item/reagent_containers/ecig_cartridge/examine(mob/user as mob)//to see how much left
/obj/item/reagent_containers/ecig_cartridge/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The cartridge has [reagents.total_volume] units of liquid remaining."
@@ -40,10 +40,10 @@
reagents.add_reagent("water", max_water)
. = ..()
/obj/item/extinguisher/examine(mob/user)
/obj/item/extinguisher/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) == 0)
. += "[src] has [src.reagents.total_volume] units of water left!"
if(!distance)
. += "[src] has [reagents.total_volume] units of water left!"
/obj/item/extinguisher/attack_self(mob/user as mob)
safety = !safety
@@ -166,9 +166,9 @@
return
/obj/item/wrapping_paper/examine(mob/user)
/obj/item/wrapping_paper/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "There is about [src.amount] square units of paper left!"
/obj/item/wrapping_paper/attack(mob/target as mob, mob/user as mob)
@@ -116,7 +116,7 @@
else
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
/obj/item/grenade/chem_grenade/examine(mob/user)
/obj/item/grenade/chem_grenade/examine(mob/user, distance, infix, suffix)
. = ..()
if(detonator)
. += "It has [detonator.name] attached to it."
@@ -46,9 +46,9 @@
return*/
/obj/item/grenade/examine(mob/user)
/obj/item/grenade/examine(mob/user, distance, infix, suffix)
. = ..()
if(get_dist(user, src) == 0)
if(!distance)
if(det_time > 1)
. += "The timer is set to [det_time/10] seconds."
else if(det_time == null)
@@ -116,4 +116,4 @@
return
/obj/item/grenade/vendor_action(var/obj/machinery/vending/V)
activate(V)
activate(V)
@@ -31,9 +31,9 @@
var/mining_points = 0 // For redeeming at mining equipment vendors
var/survey_points = 0 // For redeeming at explorer equipment vendors.
/obj/item/card/id/examine(mob/user)
/obj/item/card/id/examine(mob/user, distance, infix, suffix)
. = ..()
if(in_range(user, src))
if(distance < 2)
show_tgui(user)
else
. += "<span class='warning'>It is too far away to read.</span>"
@@ -35,8 +35,8 @@
/obj/item/implant/integrated_circuit/emp_act(severity)
IC.emp_act(severity)
/obj/item/implant/integrated_circuit/examine(mob/user)
return IC.examine(user)
/obj/item/implant/integrated_circuit/examine(mob/user, distance, infix, suffix)
return IC.examine(user, distance, infix, suffix)
/obj/item/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
if(O.is_crowbar() || istype(O, /obj/item/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.is_screwdriver() || istype(O, /obj/item/cell/device) )
@@ -113,9 +113,9 @@
/obj/item/chainsaw/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
/obj/item/chainsaw/examine(mob/user)
/obj/item/chainsaw/examine(mob/user, distance, infix, suffix)
. = ..()
if(max_fuel && get_dist(user, src) == 0)
if(max_fuel && !distance)
. += "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>"
/obj/item/chainsaw/update_icon()
@@ -36,11 +36,11 @@
qdel(src)
..()
/obj/item/material/gravemarker/examine(mob/user)
/obj/item/material/gravemarker/examine(mob/user, distance, infix, suffix)
. = ..()
if(grave_name && get_dist(src, user) < 4)
if(grave_name && distance < 4)
. += "Here Lies [grave_name]"
if(epitaph && get_dist(src, user) < 2)
if(epitaph && distance < 2)
. += epitaph
/obj/item/material/gravemarker/update_icon()
@@ -76,4 +76,4 @@
G.add_fingerprint(usr)
G.dir = user.dir
QDEL_NULL(src)
return
return
@@ -10,7 +10,7 @@
w_class = ITEMSIZE_SMALL
var/repair_amount = 5
var/repair_time = 40
/obj/item/whetstone/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/stack/material))
var/obj/item/stack/material/M = I
@@ -40,7 +40,7 @@
var/sharpen_time = 100
var/uses = 0
/obj/item/material/sharpeningkit/examine(mob/user, distance)
/obj/item/material/sharpeningkit/examine(mob/user, distance, infix, suffix)
. = ..()
. += "There [uses == 1 ? "is" : "are"] [uses] [material] [uses == 1 ? src.material.sheet_singular_name : src.material.sheet_plural_name] left for use."
@@ -75,4 +75,4 @@
to_chat(user, "Not enough material to sharpen [M]. You need [M.w_class*2] [M.material.sheet_plural_name].")
return
else
to_chat(user, "You can't sharpen [W] with [src]!")
to_chat(user, "You can't sharpen [W] with [src]!")
@@ -91,9 +91,9 @@
return 0
return null
/obj/item/melee/energy/examine(mob/user)
/obj/item/melee/energy/examine(mob/user, distance, infix, suffix)
. = ..()
if(use_cell && Adjacent(user))
if(use_cell && distance < 2)
if(bcell)
. += "<span class='notice'>The blade is [round(bcell.percent())]% charged.</span>"
else
@@ -196,7 +196,7 @@
lcolor = sanitize_hexcolor(energy_color_input)
update_icon()
/obj/item/melee/energy/examine(mob/user)
/obj/item/melee/energy/examine(mob/user, distance, infix, suffix)
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
+1 -1
View File
@@ -214,7 +214,7 @@
lcolor = sanitize_hexcolor(energy_color_input)
update_icon()
/obj/item/shield/energy/examine(mob/user)
/obj/item/shield/energy/examine(mob/user, distance, infix, suffix)
. = ..()
. += "<span class='notice'>Alt-click to recolor it.</span>"
@@ -514,9 +514,9 @@
item_state_slots = list(slot_r_hand_str = "backpack", slot_l_hand_str = "backpack")
max_storage_space = ITEMSIZE_COST_NORMAL * 5
/obj/item/storage/backpack/parachute/examine(mob/user)
/obj/item/storage/backpack/parachute/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
if(parachute)
. += "It seems to be packed."
else
@@ -585,4 +585,4 @@
icon_state = "teshbag"
species_restricted = list(SPECIES_TESHARI)
max_w_class = ITEMSIZE_NORMAL
max_storage_space = ITEMSIZE_COST_NORMAL * 5
max_storage_space = ITEMSIZE_COST_NORMAL * 5
@@ -16,9 +16,9 @@
var/stored_ore
/obj/item/storage/bag/ore/examine(mob/user)
/obj/item/storage/bag/ore/examine(mob/user, distance, infix, suffix)
. = ..()
if (!Adjacent(user) && !isobserver(user))
if (distance > 1 && !isobserver(user))
return
if (isliving(user))
add_fingerprint(user)
@@ -27,16 +27,16 @@
icon_state = "[icon_type]box[total_contents]"
return
/obj/item/storage/fancy/examine(mob/user)
/obj/item/storage/fancy/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(!contents.len)
if(distance < 2)
var/len = length(contents)
if(!len)
. += "There are no [icon_type]s left in the box."
else if(contents.len == 1)
else if(len == 1)
. += "There is one [icon_type] left in the box."
else
. += "There are [contents.len] [icon_type]s in the box."
. += "There are [len] [icon_type]\s in the box."
/*
* Egg Box
@@ -22,7 +22,7 @@ MRE Stuff
/obj/item/material/kitchen/utensil/spoon/plastic
)
/obj/item/storage/mre/examine(mob/user)
/obj/item/storage/mre/examine(mob/user, distance, infix, suffix)
. = ..()
. += meal_desc
@@ -28,9 +28,9 @@
max_storage_space = ITEMSIZE_SMALL * 7
use_sound = 'sound/items/storage/briefcase.ogg'
/obj/item/storage/secure/examine(mob/user)
/obj/item/storage/secure/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "The service panel is [src.open ? "open" : "closed"]."
/obj/item/storage/secure/attackby(obj/item/W, mob/user)
@@ -725,7 +725,7 @@
update_icon()
..()
/obj/item/storage/trinketbox/examine(mob/user)
/obj/item/storage/trinketbox/examine(mob/user, distance, infix, suffix)
. = ..()
if(open && contents.len)
var/display_item = contents[1]
+2 -3
View File
@@ -90,10 +90,9 @@
else
set_light(0)
/obj/item/melee/baton/examine(mob/user)
/obj/item/melee/baton/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user, src))
if(distance < 2)
if(bcell)
. += "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
@@ -27,7 +27,7 @@
QDEL_NULL(ion_trail)
return ..()
/obj/item/tank/jetpack/examine(mob/user)
/obj/item/tank/jetpack/examine(mob/user, distance, infix, suffix)
. = ..()
if(air_contents.total_moles < 5)
. += "<span class='danger'>The meter on \the [src] indicates you are almost out of gas!</span>"
@@ -118,7 +118,7 @@
name = "jetpack"
var/obj/item/rig/holder
/obj/item/tank/jetpack/rig/examine()
/obj/item/tank/jetpack/rig/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It's a jetpack. If you can see this, report it on the bug tracker."
@@ -20,10 +20,10 @@
. = ..()
air_contents.adjust_gas("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/oxygen/examine(mob/user)
/obj/item/tank/oxygen/examine(mob/user, distance, infix, suffix)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 10))
. += "<span class='warning'>The meter on \the [src] indicates you are almost out of oxygen!</span>"
if(distance < 2 && (air_contents.gas["oxygen"] < 10))
. += "<span class='warning'>The meter on \the [src] indicates it is almost out of oxygen!</span>"
/obj/item/tank/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
@@ -56,10 +56,10 @@
desc = "Mixed anyone?"
icon_state = "oxygen"
/obj/item/tank/air/examine(mob/user)
/obj/item/tank/air/examine(mob/user, distance, infix, suffix)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 1))
. += "<span class='warning'>The meter on \the [src] indicates you are almost out of air!</span>"
if(distance < 2 && (air_contents.gas["oxygen"] < 1))
. += "<span class='warning'>The meter on \the [src] indicates it is almost out of air!</span>"
user << sound('sound/effects/alert.ogg')
/obj/item/tank/air/Initialize()
@@ -139,10 +139,10 @@
. = ..()
src.air_contents.adjust_gas("oxygen", (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/emergency/oxygen/examine(mob/user)
/obj/item/tank/emergency/oxygen/examine(mob/user, distance, infix, suffix)
. = ..()
if(loc == user && (air_contents.gas["oxygen"] < 0.2))
. += "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"
if(distance < 2 && (air_contents.gas["oxygen"] < 0.2))
. += "<span class='danger'>The meter on the [src.name] indicates it is almost out of air!</span>"
user << sound('sound/effects/alert.ogg')
/obj/item/tank/emergency/oxygen/engi
@@ -212,10 +212,10 @@
. = ..()
src.air_contents.adjust_gas("nitrogen", (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C))
/obj/item/tank/nitrogen/examine(mob/user)
/obj/item/tank/nitrogen/examine(mob/user, distance, infix, suffix)
. = ..()
if(loc == user && (air_contents.gas["nitrogen"] < 10))
. += "<span class='danger'>The meter on \the [src] indicates you are almost out of nitrogen!</span>"
if(distance < 2 && (air_contents.gas["nitrogen"] < 10))
. += "<span class='danger'>The meter on \the [src] indicates it is almost out of nitrogen!</span>"
//playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/stasis/nitro_cryo // Synthbody bags need to have initial pressure within safe bounds for human atmospheric pressure, but low temperature to stop unwanted degredation.
@@ -90,9 +90,9 @@ var/global/list/tank_gauge_cache = list()
// This could be optimized more, but it's a start!
START_PROCESSING(SSobj, src) // This has a built in safety to avoid multi-processing
/obj/item/tank/examine(mob/user)
/obj/item/tank/examine(mob/user, distance, infix, suffix)
. = ..()
if(loc == user)
if(distance < 2)
var/celsius_temperature = air_contents.temperature - T0C
var/descriptive
switch(celsius_temperature)
+2 -2
View File
@@ -124,8 +124,8 @@
var/obj/item/stuck = null
/obj/item/ducttape/examine(mob/user)
return stuck.examine(user)
/obj/item/ducttape/examine(mob/user, distance, infix, suffix)
return stuck.examine(user, distance, infix, suffix)
/obj/item/ducttape/proc/attach(var/obj/item/W)
stuck = W
@@ -58,9 +58,9 @@
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weldingtool/examine(mob/user)
/obj/item/weldingtool/examine(mob/user, distance, infix, suffix)
. = ..()
if(max_fuel && loc == user)
if(max_fuel && distance < 2)
. += "It contains [get_fuel()]/[src.max_fuel] units of fuel!"
/obj/item/weldingtool/attack(atom/A, mob/living/user, def_zone)
@@ -557,9 +557,9 @@
/obj/item/weldingtool/electric/get_cell()
return power_supply
/obj/item/weldingtool/electric/examine(mob/user)
/obj/item/weldingtool/electric/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
if(power_supply)
. += "It [src.name] has [get_fuel()] charge left."
else
@@ -144,9 +144,9 @@
usr.put_in_l_hand(src)
src.add_fingerprint(usr)
/obj/item/weldpack/examine(mob/user)
/obj/item/weldpack/examine(mob/user, distance, infix, suffix)
. = ..()
. += "It has [src.reagents.total_volume] units of fuel left!"
. += "It has [reagents.total_volume] units of fuel left!"
/obj/item/weldpack/survival
name = "emergency welding kit"
+1 -1
View File
@@ -113,7 +113,7 @@
. = ..()
name = "den" // to remove mapping identifiers.
/obj/structure/animal_den/ghost_join/examine(mob/user, infix, suffix)
/obj/structure/animal_den/ghost_join/examine(mob/user, distance, infix, suffix)
var/list/output = ..()
if(isobserver(user))
if(critter)
+1 -1
View File
@@ -15,7 +15,7 @@
if(initial)
. -= "Off"
/obj/structure/sign/double/barsign/examine(mob/user)
/obj/structure/sign/double/barsign/examine(mob/user, distance, infix, suffix)
. = ..()
switch(icon_state)
if("Off")
+1 -1
View File
@@ -172,7 +172,7 @@ LINEN BINS
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine(mob/user)
/obj/structure/bedsheetbin/examine(mob/user, distance, infix, suffix)
. = ..()
if(amount < 1)
@@ -82,9 +82,9 @@
. = ..()
QDEL_NULL(door_obj)
/obj/structure/closet/examine(mob/user)
/obj/structure/closet/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user) || isobserver(user))
if(distance < 2 || isobserver(user))
var/content_size = 0
for(var/obj/item/I in contents)
if(!I.anchored)
@@ -539,4 +539,4 @@
M.Translate(-door_hinge, 0)
M.Multiply(matrix(cos(angle), 0, 0, -sin(angle) * door_anim_squish, 1, 0))
M.Translate(door_hinge, 0)
return M
return M
@@ -8,7 +8,7 @@
var/my_vehicle_type
var/paint_color = "#666666"
/obj/structure/vehiclecage/examine(mob/user)
/obj/structure/vehiclecage/examine(mob/user, distance, infix, suffix)
. = ..()
if(my_vehicle)
. += "<span class='notice'>It seems to contain \the [my_vehicle].</span>"
+2 -2
View File
@@ -27,7 +27,7 @@
update_cut_status()
return ..()
/obj/structure/fence/examine(mob/user)
/obj/structure/fence/examine(mob/user, distance, infix, suffix)
. = ..()
switch(hole_size)
@@ -176,4 +176,4 @@
#undef NO_HOLE
#undef MEDIUM_HOLE
#undef LARGE_HOLE
#undef MAX_HOLE_SIZE
#undef MAX_HOLE_SIZE
+3 -3
View File
@@ -36,7 +36,7 @@
if(randomize_harvest_count)
max_harvests = max(0, rand(min_harvests, max_harvests)) // Incase you want to weight it more toward 'not harvestable', set min_harvests to a negative value.
/obj/structure/flora/examine(mob/user)
/obj/structure/flora/examine(mob/user, distance, infix, suffix)
. = ..()
if(harvest_count < max_harvests)
. += get_harvestable_desc()
@@ -277,9 +277,9 @@
plane = OBJ_PLANE
var/obj/item/stored_item
/obj/structure/flora/pottedplant/examine(mob/user)
/obj/structure/flora/pottedplant/examine(mob/user, distance, infix, suffix)
. = ..()
if(in_range(user, src) && stored_item)
if(distance < 2 && stored_item)
. += "<span class='filter_notice'><i>You can see something in there...</i></span>"
/obj/structure/flora/pottedplant/attackby(obj/item/I, mob/user)
+4 -4
View File
@@ -29,11 +29,11 @@
return
color = material.icon_colour
/obj/structure/gravemarker/examine(mob/user)
/obj/structure/gravemarker/examine(mob/user, distance, infix, suffix)
. = ..()
if(grave_name && get_dist(src, user) < 4)
if(grave_name && distance < 4)
. += "Here Lies [grave_name]"
if(epitaph && get_dist(src, user) < 2)
if(epitaph && distance < 2)
. += epitaph
/obj/structure/gravemarker/CanPass(atom/movable/mover, turf/target)
@@ -126,4 +126,4 @@
return
src.set_dir(turn(src.dir, 270))
return
return
+3 -3
View File
@@ -31,7 +31,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
QDEL_NULL(mybucket)
return ..()
/obj/structure/janitorialcart/examine(mob/user)
/obj/structure/janitorialcart/examine(mob/user, distance, infix, suffix)
. = ..(user)
if(istype(mybucket))
var/contains = mybucket.reagents.total_volume
@@ -317,9 +317,9 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
update_layer()
/obj/structure/bed/chair/janicart/examine(mob/user)
/obj/structure/bed/chair/janicart/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "This [callme] contains [reagents.total_volume] unit\s of water!"
if(mybag)
. += "\A [mybag] is hanging on the [callme]."
+2 -2
View File
@@ -16,9 +16,9 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
create_reagents(300)
. = ..()
/obj/structure/mopbucket/examine(mob/user)
/obj/structure/mopbucket/examine(mob/user, distance, infix, suffix)
. = ..()
if(Adjacent(user))
if(distance < 2)
. += "It contains [reagents.total_volume] unit\s of water!"
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
+1 -1
View File
@@ -45,7 +45,7 @@
return !density
return TRUE
/obj/structure/railing/examine(mob/user)
/obj/structure/railing/examine(mob/user, distance, infix, suffix)
. = ..()
if(health < maxhealth)
switch(health / maxhealth)
+2 -2
View File
@@ -1119,7 +1119,7 @@
desc = "A basic wall clock, synced to the current system time."
icon_state = "clock"
/obj/structure/sign/clock/examine(mob/user)
/obj/structure/sign/clock/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The clock shows that the time is [stationtime2text()]."
@@ -1128,7 +1128,7 @@
desc = "It's an old-school, NanoTrasen branded wall calendar. Sure, it might be obsolete with modern technology, but it's still hard to imagine an office without one."
icon_state = "calendar"
/obj/structure/sign/calendar/examine(mob/user)
/obj/structure/sign/calendar/examine(mob/user, distance, infix, suffix)
. = ..()
. += "The calendar shows that the date is [stationdate2text()]."
if (Holiday.len)

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