mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Split examine verb and function, and improve it (#17251)
* Split examine verb and function, and include adjacency and distance checking in examine function * Fix various issues * Update code/modules/mob/examinations.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> * Add required define vars * Update code/game/objects/items/stacks/wrap.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> --------- Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
This commit is contained in:
co-authored by
SleepyGemmy
parent
39228d3a2c
commit
ce5ac79e3c
@@ -181,7 +181,7 @@
|
||||
icon_state = "writing1"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
to_chat(user, "It reads: <font color='[basecolor]'>\"[message]\"</font>")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
if(ruined)
|
||||
return
|
||||
if(user.a_intent == I_HELP)
|
||||
user.examinate(src)
|
||||
examinate(user, src)
|
||||
return
|
||||
if(alert("Do I want to rip the poster from the wall?","You think...","Yes","No") == "Yes")
|
||||
if(ruined || !user.Adjacent(src))
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
pixel_x = pixel_shifts[1]
|
||||
pixel_y = pixel_shifts[2]
|
||||
|
||||
/obj/effect/plastic_explosive/examine(mob/user)
|
||||
/obj/effect/plastic_explosive/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(is_adjacent)
|
||||
to_chat(user, SPAN_WARNING("It is set to blow in [round((parent.detonate_time - world.time) / 10)] seconds."))
|
||||
|
||||
/obj/effect/plastic_explosive/attack_hand(mob/living/user)
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
|
||||
I.forceMove(T)
|
||||
|
||||
/obj/item/examine(mob/user, var/distance = -1)
|
||||
/obj/item/examine(mob/user, distance)
|
||||
var/size
|
||||
switch(src.w_class)
|
||||
if (5.0 to INFINITY)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
// Examine to see tank pressure
|
||||
/obj/structure/closet/airbubble/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(!isnull(internal_tank))
|
||||
to_chat(user, "<span class='notice'>\The [src] has [internal_tank] attached, that displays [round(internal_tank.air_contents.return_pressure() ? internal_tank.air_contents.return_pressure() : 0)] KPa.</span>")
|
||||
else
|
||||
|
||||
@@ -234,10 +234,10 @@
|
||||
return airtank
|
||||
..()
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/examine(mob/user)
|
||||
/obj/structure/closet/body_bag/cryobag/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
to_chat(user,"The stasis meter shows '[stasis_power]x'.")
|
||||
if(Adjacent(user) && length(contents)) //The bag's rather thick and opaque from a distance.
|
||||
if(is_adjacent && length(contents)) //The bag's rather thick and opaque from a distance.
|
||||
to_chat(user, "<span class='info'>You peer into \the [src].</span>")
|
||||
for(var/mob/living/L in contents)
|
||||
L.examine(arglist(args))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/mob/living/silicon/ai/carded_ai
|
||||
|
||||
/obj/item/aicard/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
var/message = "Status of [carded_ai] is: "
|
||||
if(!carded_ai)
|
||||
message = "There is no AI loaded to the card."
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
augment_type = new new_augment(src)
|
||||
|
||||
/obj/item/device/augment_implanter/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(augment_type)
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [augment_type] can be seen floating inside \the [src]'s biogel.")))
|
||||
else
|
||||
@@ -67,4 +67,4 @@
|
||||
new_augment = /obj/item/organ/internal/augment/tool/combitool
|
||||
|
||||
/obj/item/device/augment_implanter/health_scanner
|
||||
new_augment = /obj/item/organ/internal/augment/health_scanner
|
||||
new_augment = /obj/item/organ/internal/augment/health_scanner
|
||||
|
||||
@@ -474,9 +474,9 @@
|
||||
playsound(usr, 'sound/machines/click.ogg', 50)
|
||||
update_icon()
|
||||
|
||||
/obj/item/auto_cpr/examine(mob/user)
|
||||
..(user)
|
||||
if(!user.Adjacent(src))
|
||||
/obj/item/auto_cpr/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(!is_adjacent)
|
||||
return
|
||||
to_chat(user, SPAN_NOTICE("\The [src]'s [EPP] is currently [epp_mode ? "on" : "off"], while the Auto CPR is [cpr_mode ? "on" : "off"]."))
|
||||
if(battery)
|
||||
@@ -487,4 +487,4 @@
|
||||
if(breath_mask)
|
||||
to_chat(user, SPAN_NOTICE("It has [icon2html(breath_mask, user)] \the [breath_mask] installed."))
|
||||
|
||||
#undef EPP
|
||||
#undef EPP
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/mode = "completely"
|
||||
|
||||
/obj/item/device/dociler/examine(var/mob/user)
|
||||
. = ..(user)
|
||||
. = ..()
|
||||
to_chat(user, "<span class='notice'>It is currently set to [mode] docile mode.</span>")
|
||||
|
||||
/obj/item/device/dociler/attack_self(var/mob/user)
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
var/activetype = null //Is this a search or arrest warrant?
|
||||
|
||||
//look at it
|
||||
/obj/item/device/holowarrant/examine(mob/user)
|
||||
..()
|
||||
/obj/item/device/holowarrant/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(activename)
|
||||
to_chat(user, "It's a holographic warrant for '[activename]'.")
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
if(is_adjacent)
|
||||
show_content(user)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You have to go closer if you want to read it."))
|
||||
@@ -51,10 +51,10 @@
|
||||
if(activename)
|
||||
user.visible_message(SPAN_NOTICE("[user] holds up a warrant projector and shows the contents to [M]."), \
|
||||
SPAN_NOTICE("You show the warrant to [M]."))
|
||||
M.examinate(src)
|
||||
examinate(M, src)
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("There are no warrants loaded!"))
|
||||
|
||||
|
||||
/obj/item/device/holowarrant/update_icon()
|
||||
if(activename)
|
||||
icon_state = "holowarrant_filled"
|
||||
|
||||
@@ -124,12 +124,14 @@
|
||||
M.update_inv_r_ear()
|
||||
M.update_inv_head()
|
||||
|
||||
/obj/item/device/flashlight/examine(mob/user)
|
||||
/obj/item/device/flashlight/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(power_use && brightness_level)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] is set to [brightness_level]."))
|
||||
if(cell)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] has \a [cell] attached. It has [round(cell.percent())]% charge remaining."))
|
||||
if(light_wedge && isturf(loc))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is facing [dir2text(dir)].")))
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
if(always_on)
|
||||
@@ -199,11 +201,6 @@
|
||||
/obj/item/device/flashlight/vendor_action(var/obj/machinery/vending/V)
|
||||
toggle()
|
||||
|
||||
/obj/item/device/flashlight/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(light_wedge && isturf(loc))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is facing [dir2text(dir)].")))
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
. = ..()
|
||||
if(light_wedge)
|
||||
|
||||
@@ -72,8 +72,9 @@
|
||||
failmsg = "The [name]'s refill light blinks red."
|
||||
..()
|
||||
|
||||
/obj/item/device/lightreplacer/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
/obj/item/device/lightreplacer/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 2)
|
||||
to_chat(user, "It has [uses] lights remaining.")
|
||||
if (store_broken)
|
||||
to_chat(user, "It is storing [stored()]/[max_stored] broken lights.")
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
attach(newtarget)
|
||||
|
||||
/obj/item/device/magnetic_lock/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
|
||||
if (status == STATUS_BROKEN)
|
||||
to_chat(user, "<span class='danger'>It looks broken!</span>")
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/modkit/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
to_chat(user, "It looks as though it modifies voidsuits to fit [target_species] users.")
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
return .
|
||||
|
||||
/obj/item/device/paint_sprayer/examine(mob/user)
|
||||
. = ..(user)
|
||||
. = ..()
|
||||
to_chat(user, "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint.")
|
||||
|
||||
/obj/item/device/paint_sprayer/verb/choose_colour()
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
var/upkeep_cost = 2
|
||||
var/obj/aura/personal_shield/device/shield
|
||||
|
||||
/obj/item/device/personal_shield/examine(mob/user, distance)
|
||||
..()
|
||||
if(Adjacent(user))
|
||||
/obj/item/device/personal_shield/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] has [cell.charge] charge remaining. Shield upkeep costs [upkeep_cost] charge, and blocking a shot costs [charge_per_shot] charge."))
|
||||
|
||||
/obj/item/device/personal_shield/Initialize()
|
||||
@@ -76,4 +76,4 @@
|
||||
if(shield?.user)
|
||||
to_chat(shield.user, FONT_LARGE(SPAN_WARNING("\The [src] fades around you, dissipating.")))
|
||||
QDEL_NULL(shield)
|
||||
update_icon()
|
||||
update_icon()
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
|
||||
|
||||
/obj/item/device/pipe_painter/examine(var/mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
to_chat(user, "It is in [mode] mode.")
|
||||
|
||||
@@ -56,8 +56,10 @@
|
||||
/obj/item/device/radio/headset/list_channels(var/mob/user)
|
||||
return list_secure_channels()
|
||||
|
||||
/obj/item/device/radio/headset/examine(mob/user)
|
||||
if(!(..(user, 1) && radio_desc))
|
||||
/obj/item/device/radio/headset/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
|
||||
if(!(is_adjacent && radio_desc))
|
||||
return
|
||||
|
||||
to_chat(user, "The following channels are available:")
|
||||
|
||||
@@ -505,9 +505,9 @@ var/global/list/default_medbay_channels = list(
|
||||
return get_hearers_in_view(canhear_range, src)
|
||||
|
||||
|
||||
/obj/item/device/radio/examine(mob/user)
|
||||
/obj/item/device/radio/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(show_modify_on_examine && (in_range(src, user) || loc == user))
|
||||
if(show_modify_on_examine && (distance <= 1))
|
||||
if (b_stat)
|
||||
user.show_message("<span class='notice'>\The [src] can be attached and modified!</span>")
|
||||
else
|
||||
|
||||
@@ -171,13 +171,13 @@
|
||||
desc = "It's currently showing \the [I]."
|
||||
update_icon()
|
||||
|
||||
/obj/effect/projection/examine(mob/user, distance)
|
||||
/obj/effect/projection/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
var/obj/item/slide = source.resolve()
|
||||
if(!istype(slide))
|
||||
qdel(src)
|
||||
return
|
||||
return slide.examine(user, 1)
|
||||
return slide.examine(user, max(distance, 1), FALSE)
|
||||
|
||||
/obj/effect/projection/photo
|
||||
alpha = 170
|
||||
@@ -204,4 +204,4 @@
|
||||
return
|
||||
cut_overlays()
|
||||
if(P.info)
|
||||
icon_state = "text[rand(1,3)]"
|
||||
icon_state = "text[rand(1,3)]"
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
camera = new(src)
|
||||
become_hearing_sensitive(ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/device/spy_bug/examine(mob/user)
|
||||
. = ..(user, 0)
|
||||
if(.)
|
||||
/obj/item/device/spy_bug/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(distance <= 0)
|
||||
to_chat(user, "It's a tiny camera, microphone, and transmission device in a happy union.")
|
||||
to_chat(user, "Needs to be both configured and brought in contact with monitor device to be fully functional.")
|
||||
|
||||
@@ -68,9 +68,9 @@
|
||||
radio = new(src)
|
||||
become_hearing_sensitive(ROUNDSTART_TRAIT)
|
||||
|
||||
/obj/item/device/spy_monitor/examine(mob/user)
|
||||
. = ..(user, 1)
|
||||
if(.)
|
||||
/obj/item/device/spy_monitor/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
to_chat(user, "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made.")
|
||||
|
||||
/obj/item/device/spy_monitor/attack_self(mob/user)
|
||||
|
||||
@@ -210,8 +210,10 @@
|
||||
M.update_inv_back()
|
||||
M.update_inv_s_store()
|
||||
|
||||
/obj/item/device/suit_cooling_unit/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
/obj/item/device/suit_cooling_unit/examine(mob/user, distance)
|
||||
. = ..()
|
||||
|
||||
if(!distance <= 1)
|
||||
return
|
||||
|
||||
if(on)
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-[initial(uses)-uses]"
|
||||
|
||||
/obj/item/ipc_overloader/examine(mob/user)
|
||||
/obj/item/ipc_overloader/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
if(is_adjacent)
|
||||
if(uses)
|
||||
to_chat(user, SPAN_NOTICE("It has <b>[uses]</b> uses left."))
|
||||
else
|
||||
|
||||
@@ -39,8 +39,9 @@
|
||||
QDEL_NULL(ball)
|
||||
return ..()
|
||||
|
||||
/obj/item/knittingneedles/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/item/knittingneedles/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
if(ball)
|
||||
to_chat(user, "There is \the [ball] between the needles.")
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/uses = 1 // Uses before the kit deletes itself.
|
||||
|
||||
/obj/item/device/kit/examine()
|
||||
..()
|
||||
. = ..()
|
||||
to_chat(usr, "It has [uses] use\s left.")
|
||||
|
||||
/obj/item/device/kit/use(var/amt, var/mob/user)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
pick_constellation()
|
||||
|
||||
/obj/item/stellascope/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
to_chat(user, "\The [src] displays the \"[selected_constellation]\".")
|
||||
|
||||
/obj/item/stellascope/throw_impact(atom/hit_atom)
|
||||
@@ -93,7 +93,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/skrell_projector/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(selected_world && working)
|
||||
to_chat(user, "\The [src] displays a hologram of [selected_world].")
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/lastuser = null
|
||||
|
||||
/obj/item/spirit_board/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
to_chat(user, "The planchette is sitting at \"[planchette]\".")
|
||||
|
||||
/obj/item/spirit_board/attack_hand(mob/user)
|
||||
@@ -79,4 +79,4 @@
|
||||
/obj/item/spirit_board/tajara
|
||||
name = "ghostly board"
|
||||
desc = "An adhomian ghostly board, used in divination rituals. This one is blue and has the symbol of a moon on it."
|
||||
icon_state = "tajara_board"
|
||||
icon_state = "tajara_board"
|
||||
|
||||
@@ -67,8 +67,9 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_3"
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/item/stack/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
if(!iscoil())
|
||||
if(!uses_charge)
|
||||
to_chat(user, "There [src.amount == 1 ? "is" : "are"] <b>[src.amount]</b> [src.singular_name]\s in the stack.")
|
||||
|
||||
@@ -61,8 +61,9 @@
|
||||
to_chat(user, SPAN_WARNING("This object is far too large to wrap!"))
|
||||
return
|
||||
|
||||
/obj/item/stack/wrapping_paper/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/item/stack/wrapping_paper/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
to_chat(user, "There [amount == 1 ? "is" : "are"] about [amount] [singular_name]\s of paper left!")
|
||||
|
||||
/obj/item/stack/wrapping_paper/attack(mob/target, mob/user)
|
||||
@@ -198,10 +199,9 @@
|
||||
return
|
||||
return
|
||||
|
||||
/obj/item/stack/packageWrap/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
to_chat(user, SPAN_NOTICE("There are [amount] units of package wrap left!"))
|
||||
return
|
||||
/obj/item/stack/packageWrap/examine(mob/user, distance, is_adjacent)
|
||||
if(distance <= 1)
|
||||
to_chat(user, "There [amount == 1 ? "is" : "are"] about [amount] units of package wrap left!")
|
||||
|
||||
/obj/item/c_tube
|
||||
name = "cardboard tube"
|
||||
|
||||
@@ -409,8 +409,9 @@
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
var/dart_count = 5
|
||||
|
||||
/obj/item/toy/crossbow/examine(mob/user)
|
||||
if(..(user, 2) && dart_count)
|
||||
/obj/item/toy/crossbow/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 2 && dart_count)
|
||||
to_chat(user, "<span class='notice'>\The [src] is loaded with [dart_count] foam dart\s.</span>")
|
||||
|
||||
/obj/item/toy/crossbow/attackby(obj/item/I, mob/user)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return (user.Adjacent(T) && user.get_active_hand() == src && !user.stat && !user.restrained())
|
||||
|
||||
/obj/item/rfd/examine(var/mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(loc == user)
|
||||
to_chat(user, "It currently holds [stored_matter]/30 matter units.")
|
||||
|
||||
@@ -539,7 +539,7 @@
|
||||
return
|
||||
|
||||
/obj/item/rfd/transformer/examine(var/mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(loc == user)
|
||||
if(malftransformermade)
|
||||
to_chat(user, "There is already a transformer machine made!")
|
||||
|
||||
@@ -127,8 +127,9 @@ var/const/NO_EMAG_ACT = -50
|
||||
/obj/item/card/id/Destroy()
|
||||
return ..()
|
||||
|
||||
/obj/item/card/id/examine(mob/user)
|
||||
if (..(user, 1))
|
||||
/obj/item/card/id/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if (distance <= 1)
|
||||
show(user)
|
||||
|
||||
/obj/item/card/id/on_slotmove(var/mob/living/user, slot)
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
unset_registered_user(registered_user)
|
||||
return ..()
|
||||
|
||||
/obj/item/card/id/syndicate/examine(mob/user)
|
||||
..()
|
||||
if(Adjacent(user))
|
||||
/obj/item/card/id/syndicate/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
if(user == registered_user)
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("It is at [charge]/[initial(charge)] charge.")))
|
||||
|
||||
|
||||
@@ -994,7 +994,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/rolled/examine(mob/user)
|
||||
. = ..()
|
||||
if(. && filter)
|
||||
if(filter)
|
||||
to_chat(user, "Capped off one end with a filter.")
|
||||
|
||||
/obj/item/clothing/mask/smokable/cigarette/rolled/update_icon()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
var/contain_parts = 1
|
||||
|
||||
/obj/item/circuitboard/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(build_path)
|
||||
var/obj/machine = new build_path // instantiate to get the name and desc
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("This circuitboard will build a <b>[capitalize_first_letters(machine.name)]</b>: [machine.desc]")))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return
|
||||
|
||||
/obj/item/circuitboard/unary_atmos/examine()
|
||||
..()
|
||||
. = ..()
|
||||
to_chat(usr, "The jumper is connecting the [dir2text(machine_dir)] pins.")
|
||||
|
||||
/obj/item/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/cloaking_device/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if (!cell)
|
||||
to_chat(user, "It needs a power cell to function.")
|
||||
else
|
||||
|
||||
@@ -55,8 +55,9 @@
|
||||
to_chat(user,"<span class='notice'>\The reagents inside [src] are already secured!</span>")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/extinguisher_refill/examine(var/mob/user) //Copied from inhalers.
|
||||
if(!..(user, 2))
|
||||
/obj/item/reagent_containers/extinguisher_refill/examine(mob/user, distance) //Copied from inhalers.
|
||||
. = ..()
|
||||
if(!distance <= 2)
|
||||
return
|
||||
|
||||
if(is_open_container())
|
||||
@@ -126,8 +127,9 @@
|
||||
reagents.add_reagent(/singleton/reagent/toxin/fertilizer/monoammoniumphosphate, max_water)
|
||||
..()
|
||||
|
||||
/obj/item/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
/obj/item/extinguisher/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(distance <= 0)
|
||||
to_chat(user,"\The [src] contains [src.reagents.total_volume] units of reagents.")
|
||||
to_chat(user,"The safety is [safety ? "on" : "off"].")
|
||||
return
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
welding_tool.forceMove(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/flamethrower/examine(mob/user)
|
||||
..()
|
||||
if(Adjacent(user))
|
||||
/obj/item/flamethrower/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
if(gas_tank)
|
||||
to_chat(user, SPAN_NOTICE("Release pressure is set to [throw_amount] kPa. The tank has about [round(gas_tank.air_contents.return_pressure(), 10)] kPa left in it."))
|
||||
else
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
to_chat(user, "<span class='warning'>\The [W] is empty.</span>")
|
||||
|
||||
/obj/item/grenade/chem_grenade/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(detonator)
|
||||
to_chat(user, "With attached [detonator.name]")
|
||||
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/grenade/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
/obj/item/grenade/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 0)
|
||||
if(det_time > 1)
|
||||
to_chat(user, "The timer is set to [det_time/10] seconds.")
|
||||
return
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
/obj/item/implant/integrated_circuit/emp_act(severity)
|
||||
IC.emp_act(severity)
|
||||
|
||||
/obj/item/implant/integrated_circuit/examine(mob/user)
|
||||
IC.examine(user)
|
||||
/obj/item/implant/integrated_circuit/examine(mob/user, distance, is_adjacent)
|
||||
IC.examine(user, distance, is_adjacent)
|
||||
|
||||
/obj/item/implant/integrated_circuit/attackby(var/obj/item/O, var/mob/user)
|
||||
if(O.iscrowbar() || istype(O, /obj/item/device/integrated_electronics) || istype(O, /obj/item/integrated_circuit) || O.isscrewdriver() || istype(O, /obj/item/cell/device) )
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/material/twohanded/spear/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(explosive)
|
||||
to_chat(user, "It has \the [explosive] strapped to it.")
|
||||
|
||||
@@ -472,8 +472,9 @@
|
||||
|
||||
RemoveFuel(FuelToRemove)
|
||||
|
||||
/obj/item/material/twohanded/chainsaw/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/item/material/twohanded/chainsaw/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
to_chat(user, "A heavy-duty chainsaw meant for cutting wood. Contains <b>[round(REAGENT_VOLUME(reagents, fuel_type))]</b> unit\s of fuel.")
|
||||
if(powered)
|
||||
to_chat(user, SPAN_NOTICE("It is currently powered on."))
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
reagents.add_reagent(refill_reagent, refill_rate)
|
||||
|
||||
/obj/item/mop/advanced/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
to_chat(user, SPAN_NOTICE("\The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>."))
|
||||
|
||||
/obj/item/mop/advanced/Destroy()
|
||||
|
||||
@@ -31,9 +31,9 @@ var/list/tape_roll_applications = list()
|
||||
var/crumpled = 0
|
||||
var/icon_base
|
||||
|
||||
/obj/item/tape/examine(mob/user, distance)
|
||||
/obj/item/tape/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(LAZYLEN(crumplers) && Adjacent(user))
|
||||
if(LAZYLEN(crumplers) && is_adjacent)
|
||||
to_chat(user, SPAN_WARNING("\The [initial(name)] has been crumpled by [english_list(crumplers)]."))
|
||||
|
||||
/obj/item/taperoll/police
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/storage/box/examine(var/mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if (health < maxHealth)
|
||||
if (health >= (maxHealth * 0.5))
|
||||
to_chat(user, SPAN_WARNING("It is slightly torn."))
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/storage/box/fancy/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(!icon_type || !storage_type)
|
||||
return
|
||||
if(contents.len <= 0)
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
max_storage_space = 16
|
||||
use_sound = 'sound/items/storage/briefcase.ogg'
|
||||
|
||||
/obj/item/storage/secure/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/item/storage/secure/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
to_chat(user, text("The service panel is [src.open ? "open" : "closed"]."))
|
||||
|
||||
/obj/item/storage/secure/attackby(obj/item/W as obj, mob/user as mob)
|
||||
|
||||
@@ -116,10 +116,10 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/wallet/examine(mob/user)
|
||||
/obj/item/storage/wallet/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
var/obj/item/card/id/id = GetID()
|
||||
if(istype(id) && Adjacent(user))
|
||||
if(istype(id) && is_adjacent)
|
||||
id.show(user)
|
||||
|
||||
/obj/item/storage/wallet/random/fill()
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/item/melee/baton/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
/obj/item/melee/baton/examine(mob/user, distance)
|
||||
. = ..()
|
||||
if(!distance <= 1)
|
||||
return
|
||||
|
||||
if(bcell)
|
||||
to_chat(user, "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>")
|
||||
else
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
/obj/item/tank/air/adjust_initial_gas()
|
||||
air_contents.adjust_multi(GAS_OXYGEN, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, GAS_NITROGEN, (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD)
|
||||
|
||||
/obj/item/tank/air/examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas[GAS_OXYGEN] < 1 && loc==user)
|
||||
/obj/item/tank/air/examine(mob/user, distance, is_adjacent)
|
||||
if((distance <= 0) && air_contents.gas[GAS_OXYGEN] < 1 && loc==user)
|
||||
to_chat(user, "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>")
|
||||
|
||||
/*
|
||||
@@ -146,8 +146,8 @@
|
||||
/obj/item/tank/emergency_oxygen/adjust_initial_gas()
|
||||
air_contents.adjust_gas(GAS_OXYGEN, (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
|
||||
/obj/item/tank/emergency_oxygen/examine(mob/user)
|
||||
if(..(user, 0) && air_contents.gas[GAS_OXYGEN] < 0.2 && loc==user)
|
||||
/obj/item/tank/emergency_oxygen/examine(mob/user, distance, is_adjacent)
|
||||
if((distance <= 0) && air_contents.gas[GAS_OXYGEN] < 0.2 && loc==user)
|
||||
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"))
|
||||
|
||||
/obj/item/tank/emergency_oxygen/engi
|
||||
@@ -161,4 +161,4 @@
|
||||
icon_state = "emergency_double"
|
||||
item_state = "emergency_engi"
|
||||
gauge_icon = "indicator_emergency_double"
|
||||
volume = 10
|
||||
volume = 10
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/tank/examine(mob/user)
|
||||
. = ..(user, 0)
|
||||
if(.)
|
||||
/obj/item/tank/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 0)
|
||||
var/celsius_temperature = air_contents.temperature - T0C
|
||||
var/descriptive
|
||||
switch(celsius_temperature)
|
||||
|
||||
@@ -335,8 +335,9 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
/obj/item/weldingtool/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 0)
|
||||
to_chat(user, text("[icon2html(src, user)] [] contains []/[] units of fuel!", src.name, get_fuel(),src.max_fuel ))
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/W, mob/user)
|
||||
@@ -791,7 +792,7 @@
|
||||
|
||||
/obj/item/combitool/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(. && tools.len)
|
||||
if(tools.len)
|
||||
to_chat(user, "It has the following fittings: <b>[english_list(tools)]</b>.")
|
||||
|
||||
/obj/item/combitool/iswrench()
|
||||
@@ -850,7 +851,7 @@
|
||||
|
||||
/obj/item/powerdrill/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(. && tools.len)
|
||||
if(tools.len)
|
||||
to_chat(user, "It has the following fittings:")
|
||||
for(var/tool in tools)
|
||||
to_chat(user, "- [tool][tools[current_tool] == tool ? " (selected)" : ""]")
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
icon_state = "[icon_base][deployed]"
|
||||
|
||||
/obj/item/trap/animal/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(captured)
|
||||
var/datum/L = captured.resolve()
|
||||
if (L)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
starting_maxhealth = maxhealth
|
||||
|
||||
/obj/structure/barricade/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
to_chat(user, SPAN_INFO("It is recommended to stand flush to a barricade or one tile away for maximum efficiency."))
|
||||
if(is_wired)
|
||||
to_chat(user, SPAN_INFO("There is a length of wire strewn across the top of this barricade."))
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
var/build_state = BARRICADE_BSTATE_SECURED //Look at __game.dm for barricade defines
|
||||
|
||||
/obj/structure/barricade/metal/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
switch(build_state)
|
||||
if(BARRICADE_BSTATE_SECURED)
|
||||
to_chat(user, SPAN_INFO("The protection panel is still tighly screwed in place."))
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return 0
|
||||
|
||||
/obj/structure/barricade/plasteel/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
|
||||
switch(build_state)
|
||||
if(BARRICADE_BSTATE_SECURED)
|
||||
|
||||
@@ -377,7 +377,7 @@ LINEN BINS
|
||||
|
||||
|
||||
/obj/structure/bedsheetbin/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
|
||||
if(amount < 1)
|
||||
to_chat(user, "There are no bed sheets in the bin.")
|
||||
|
||||
@@ -32,9 +32,9 @@ var/global/list/total_active_bonfires = list()
|
||||
total_active_bonfires -= src
|
||||
. = ..()
|
||||
|
||||
/obj/structure/bonfire/examine(mob/user)
|
||||
..()
|
||||
if(get_dist(src, user) > 2)
|
||||
/obj/structure/bonfire/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance > 2)
|
||||
return
|
||||
if(on_fire)
|
||||
switch(fuel)
|
||||
|
||||
@@ -100,8 +100,9 @@
|
||||
else
|
||||
to_chat(user, "\The [src] is full.")
|
||||
|
||||
/obj/structure/closet/examine(mob/user)
|
||||
if(!src.opened && (..(user, 1) || isobserver(user)))
|
||||
/obj/structure/closet/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1 && !src.opened)
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in contents)
|
||||
if(!I.anchored)
|
||||
@@ -111,7 +112,7 @@
|
||||
if(!src.opened && isobserver(user))
|
||||
to_chat(user, "It contains: [counting_english_list(contents)]")
|
||||
|
||||
if(src.opened && linked_teleporter && (Adjacent(user) || isobserver(user)))
|
||||
if(src.opened && linked_teleporter && is_adjacent)
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("There appears to be a device attached to the interior backplate of \the [src]...")))
|
||||
|
||||
/obj/structure/closet/proc/stored_weight()
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
/obj/structure/sign/flag/attack_hand(mob/user)
|
||||
switch(user.a_intent)
|
||||
if(I_HELP)
|
||||
user.examinate(src)
|
||||
examinate(user, src)
|
||||
if(I_DISARM)
|
||||
user.visible_message(SPAN_NOTICE("\The [user] begins to carefully fold up \the [src]."), SPAN_NOTICE("You begin to carefully fold up \the [src]."))
|
||||
if(do_after(user, 50))
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
. = ..()
|
||||
health = maxHealth
|
||||
|
||||
/obj/structure/gore/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
/obj/structure/gore/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 2)
|
||||
var/health_div = health / maxHealth
|
||||
if(health_div >= 0.9)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] appears completely intact."))
|
||||
@@ -80,4 +81,4 @@
|
||||
return FALSE
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
return !density
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
. = ..()
|
||||
health = maxHealth
|
||||
|
||||
/obj/structure/bed/nest/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
/obj/structure/bed/nest/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 2)
|
||||
var/health_div = health / maxHealth
|
||||
if(health_div >= 0.9)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] appears completely intact."))
|
||||
|
||||
@@ -88,8 +88,9 @@
|
||||
/obj/structure/janitorialcart/proc/get_short_status()
|
||||
return "Contents: [english_list(contents)]"
|
||||
|
||||
/obj/structure/janitorialcart/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/structure/janitorialcart/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
if (mybucket)
|
||||
var/contains = mybucket.reagents.total_volume
|
||||
to_chat(user, "[icon2html(src, user)] The bucket contains [contains] unit\s of liquid!")
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
janitorial_supplies -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/mopbucket/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
/obj/structure/mopbucket/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
to_chat(user, "Contains [reagents.total_volume] unit\s of water.")
|
||||
|
||||
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
// Since Topic() never seems to interact with usr on more than a superficial
|
||||
// level, it should be fine to let anyone mess with the board other than ghosts.
|
||||
/obj/structure/noticeboard/examine(var/mob/user)
|
||||
if(!user)
|
||||
user = usr
|
||||
. = ..()
|
||||
if(user.Adjacent(src))
|
||||
var/dat = "<B>Noticeboard</B><BR>"
|
||||
for(var/obj/item/paper/P in src)
|
||||
|
||||
@@ -72,7 +72,15 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/railing/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks severely damaged!"))
|
||||
if(0.25 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks damaged!"))
|
||||
if(0.5 to 1.0)
|
||||
to_chat(user, SPAN_NOTICE("It has a few scrapes and dents."))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[density ? "closed" : "open"]</b> to passage.")))
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[anchored ? "" : "not"] screwed</b> to the floor.")))
|
||||
|
||||
@@ -87,17 +95,6 @@
|
||||
return !density
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/examine(mob/user)
|
||||
..()
|
||||
if(health < maxhealth)
|
||||
switch(health / maxhealth)
|
||||
if(0.0 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks severely damaged!"))
|
||||
if(0.25 to 0.5)
|
||||
to_chat(user, SPAN_WARNING("It looks damaged!"))
|
||||
if(0.5 to 1.0)
|
||||
to_chat(user, SPAN_NOTICE("It has a few scrapes and dents."))
|
||||
|
||||
/obj/structure/railing/proc/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/open = FALSE
|
||||
|
||||
/obj/structure/sarcophagus/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(!open)
|
||||
to_chat(user, "\The [src]'s lid is closed shut.")
|
||||
else
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/simple_door/examine(mob/user)
|
||||
..(user)
|
||||
. = ..()
|
||||
if(lock)
|
||||
to_chat(user, "<span class='notice'>It appears to have a lock.</span>")
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
playsound(src.loc, 'sound/weapons/blade_open.ogg', 50, 1)
|
||||
closed = !closed
|
||||
|
||||
/obj/item/pocketwatch/examine(mob/user)
|
||||
..()
|
||||
if (get_dist(src, user) <= 1)
|
||||
/obj/item/pocketwatch/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if (distance <= 1)
|
||||
checktime()
|
||||
|
||||
/obj/item/pocketwatch/verb/checktime(mob/user)
|
||||
@@ -214,4 +214,4 @@
|
||||
else
|
||||
ticktock = "Tick"
|
||||
to_chat(H, "<span class='notice'><i>[ticktock]. . .</i></span>")
|
||||
sound_to(H, 'sound/effects/singlebeat.ogg')
|
||||
sound_to(H, 'sound/effects/singlebeat.ogg')
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/bed/stool/chair/remote/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(portable_type)
|
||||
to_chat(user, FONT_SMALL(SPAN_NOTICE("Can be packed up by using a wrench on it.")))
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
atmos_canpass = CANPASS_PROC
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
. = ..(user)
|
||||
. = ..()
|
||||
|
||||
if(health == maxhealth)
|
||||
to_chat(user, SPAN_NOTICE("It looks fully intact."))
|
||||
|
||||
Reference in New Issue
Block a user