Refactors the examine proc to return a list of strings (#12280)

This commit is contained in:
farie82
2019-09-25 22:05:01 -07:00
committed by variableundefined
parent 40a4cd1b75
commit 0e8ddb2afe
210 changed files with 808 additions and 830 deletions
@@ -142,8 +142,8 @@ var/global/list/image/splatter_cache = list()
icon_state = "writing1"
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
..(user)
to_chat(user, "<span class='notice'>It reads: <font color='[basecolor]'>\"[message]\"<font></span>")
. = ..()
. += "<span class='notice'>It reads: <font color='[basecolor]'>\"[message]\"<font></span>"
/obj/effect/decal/cleanable/blood/gibs
name = "gibs"
+1 -1
View File
@@ -33,7 +33,7 @@
/obj/structure/glowshroom/examine(mob/user)
. = ..()
to_chat(user, "This is a [generation]\th generation [name]!")
. += "This is a [generation]\th generation [name]!"
/obj/structure/glowshroom/Destroy()
QDEL_NULL(myseed)
+3 -3
View File
@@ -168,7 +168,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
src.loc = T
/obj/item/examine(mob/user, var/distance = -1)
/obj/item/examine(mob/user)
var/size
switch(src.w_class)
if(WEIGHT_CLASS_TINY)
@@ -184,7 +184,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
if(WEIGHT_CLASS_GIGANTIC)
size = "gigantic"
. = ..(user, distance, "", "It is a [size] item.")
. = ..(user, "", "It is a [size] item.")
if(user.research_scanner) //Mob has a research scanner active.
var/msg = "*--------* <BR>"
@@ -205,7 +205,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
else
msg += "<span class='danger'>No extractable materials detected.</span><BR>"
msg += "*--------*"
to_chat(user, msg)
. += msg
/obj/item/afterattack(atom/target, mob/user, proximity, params)
SEND_SIGNAL(src, COMSIG_ITEM_AFTERATTACK, target, user, proximity, params)
@@ -68,8 +68,8 @@
/obj/item/lightreplacer/examine(mob/user)
..()
to_chat(user, status_string())
. = ..()
. += status_string()
/obj/item/lightreplacer/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/sheet/glass))
@@ -29,5 +29,5 @@
mode = input("Which colour do you want to use?", "Pipe Painter", mode) in modes
/obj/item/pipe_painter/examine(mob/user)
..(user)
to_chat(user, "It is in [mode] mode.")
. = ..()
. += "<span class='notice'>It is in [mode] mode.</span>"
@@ -48,12 +48,11 @@
/obj/item/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
/obj/item/radio/headset/examine(mob/user, var/distance = -1)
if(!(..(user, 1) && radio_desc))
return
to_chat(user, "The following channels are available:")
to_chat(user, radio_desc)
/obj/item/radio/headset/examine(mob/user)
. = ..()
if(in_range(src, user) && radio_desc)
. += "The following channels are available:"
. += radio_desc
/obj/item/radio/headset/handle_message_mode(mob/living/M as mob, list/message_pieces, channel)
if(channel == "special")
@@ -595,14 +595,13 @@ var/global/list/default_medbay_channels = list(
return null
/obj/item/radio/examine(mob/user, var/distance = -1)
. = ..(user, distance)
if((in_range(src, user) || loc == user))
/obj/item/radio/examine(mob/user)
. = ..()
if(in_range(src, user) || loc == user)
if(b_stat)
user.show_message("<span class='notice'>\the [src] can be attached and modified!</span>")
. += "<span class='notice'>\the [src] can be attached and modified!</span>"
else
user.show_message("<span class='notice'>\the [src] can not be modified or attached!</span>")
return .
. += "<span class='notice'>\the [src] can not be modified or attached!</span>"
/obj/item/radio/attackby(obj/item/W as obj, mob/user as mob, params)
..()
+2 -2
View File
@@ -339,8 +339,8 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
var/accuracy // 0 is the best accuracy.
/obj/item/analyzer/examine(mob/user)
.=..()
to_chat(user, "<span class='info'>Alt-click [src] to activate the barometer function.</span>")
. = ..()
. += "<span class='info'>Alt-click [src] to activate the barometer function.</span>"
/obj/item/analyzer/attack_self(mob/user as mob)
@@ -26,8 +26,9 @@
return ..()
/obj/item/taperecorder/examine(mob/user)
if(..(user, 1))
to_chat(user, "The wire panel is [open_panel ? "opened" : "closed"].")
. = ..()
if(in_range(user, src))
. += "The wire panel is [open_panel ? "opened" : "closed"]."
/obj/item/taperecorder/attackby(obj/item/I, mob/user)
@@ -31,11 +31,11 @@ effective or pretty fucking useless.
var/max_uses = 5
/obj/item/batterer/examine(mob/user)
..(user)
. = ..()
if(times_used >= max_uses)
to_chat(user, "<span class='notice'>[src] is out of charge.</span>")
. += "<span class='notice'>[src] is out of charge.</span>"
if(times_used < max_uses)
to_chat(user, "<span class='notice'>[src] has [max_uses-times_used] charges left.</span>")
. += "<span class='notice'>[src] has [max_uses-times_used] charges left.</span>"
/obj/item/batterer/attack_self(mob/living/carbon/user, flag = 0, emp = 0)
if(!user)
+5 -4
View File
@@ -49,12 +49,13 @@
return ..()
/obj/item/stack/examine(mob/user)
if(..(user, 1))
. = ..()
if(in_range(user, src))
if(singular_name)
to_chat(user, "There are [amount] [singular_name]\s in the stack.")
. += "There are [amount] [singular_name]\s in the stack."
else
to_chat(user, "There are [amount] [name]\s in the stack.")
to_chat(user,"<span class='notice'>Alt-click to take a custom amount.</span>")
. += "There are [amount] [name]\s in the stack."
. +="<span class='notice'>Alt-click to take a custom amount.</span>"
/obj/item/stack/proc/add(newamount)
amount += newamount
+6 -5
View File
@@ -641,13 +641,14 @@ obj/item/toy/cards/singlecard
obj/item/toy/cards/singlecard/examine(mob/user)
if(..(user, 0))
. = ..()
if(get_dist(user, src) <= 0)
if(ishuman(user))
var/mob/living/carbon/human/cardUser = user
if(cardUser.get_item_by_slot(slot_l_hand) == src || cardUser.get_item_by_slot(slot_r_hand) == src)
cardUser.visible_message("<span class='notice'>[cardUser] checks [cardUser.p_their()] card.</span>", "<span class='notice'>The card reads: [src.cardname]</span>")
else
to_chat(cardUser, "<span class='notice'>You need to have the card in your hand to check it.</span>")
. += "<span class='notice'>You need to have the card in your hand to check it.</span>"
obj/item/toy/cards/singlecard/verb/Flip()
@@ -1470,9 +1471,9 @@ obj/item/toy/cards/deck/syndicate/black
fake_bullets = rand(2, 7)
/obj/item/toy/russian_revolver/trick_revolver/examine(mob/user) //Sneaky sneaky
..()
to_chat(user, "Has [fake_bullets] round\s remaining.")
to_chat(user, "[fake_bullets] of those are live rounds.")
. = ..()
. += "Has [fake_bullets] round\s remaining."
. += "[fake_bullets] of those are live rounds."
/obj/item/toy/russian_revolver/trick_revolver/post_shot(user)
to_chat(user, "<span class='danger'>[src] did look pretty dodgey!</span>")
+2 -2
View File
@@ -82,8 +82,8 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
/obj/item/rcd/examine(mob/user)
. = ..()
to_chat(user, "MATTER: [matter]/[max_matter] matter-units.")
to_chat(user, "MODE: [mode].")
. += "MATTER: [matter]/[max_matter] matter-units."
. += "MODE: [mode]."
/obj/item/rcd/Destroy()
QDEL_NULL(spark_system)
+2 -2
View File
@@ -57,9 +57,9 @@
..()
/obj/item/twohanded/rcl/examine(mob/user)
..()
. = ..()
if(loaded)
to_chat(user, "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>")
. += "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>"
/obj/item/twohanded/rcl/Destroy()
QDEL_NULL(loaded)
@@ -23,12 +23,12 @@
return ..()
/obj/item/bee_briefcase/examine(mob/user)
..()
. = ..()
if(loc == user)
if(bees_left)
to_chat(user, "<span class='warning'>There are [bees_left] bees still inside in briefcase!</span>")
. += "<span class='warning'>There are [bees_left] bees still inside in briefcase!</span>"
else
to_chat(user, "<span class='danger'>The bees are gone... Colony collapse disorder?</span>")
. += "<span class='danger'>The bees are gone... Colony collapse disorder?</span>"
/obj/item/bee_briefcase/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers/syringe))
+9 -9
View File
@@ -118,20 +118,21 @@
SetOwnerInfo(H)
/obj/item/card/id/examine(mob/user)
if(..(user, 1))
. = ..()
if(in_range(user, src))
show(usr)
else
to_chat(user, "<span class='warning'>It is too far away.</span>")
. += "<span class='warning'>It is too far away.</span>"
if(guest_pass)
to_chat(user, "<span class='notice'>There is a guest pass attached to this ID card</span>")
. += "<span class='notice'>There is a guest pass attached to this ID card</span>"
if(world.time < guest_pass.expiration_time)
to_chat(user, "<span class='notice'>It expires at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].</span>")
. += "<span class='notice'>It expires at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].</span>"
else
to_chat(user, "<span class='warning'>It expired at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].</span>")
to_chat(user, "<span class='notice'>It grants access to following areas:</span>")
. += "<span class='warning'>It expired at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].</span>"
. += "<span class='notice'>It grants access to following areas:</span>"
for(var/A in guest_pass.temp_access)
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
to_chat(user, "<span class='notice'>Issuing reason: [guest_pass.reason].</span>")
. += "<span class='notice'>[get_access_desc(A)].</span>"
. += "<span class='notice'>Issuing reason: [guest_pass.reason].</span>"
/obj/item/card/id/proc/show(mob/user as mob)
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
@@ -141,7 +142,6 @@
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
popup.open()
return
/obj/item/card/id/attack_self(mob/user as mob)
user.visible_message("[user] shows you: [bicon(src)] [src.name]. The assignment on the card: [src.assignment]",\
+2 -2
View File
@@ -44,8 +44,8 @@
update_charge()
/obj/item/defibrillator/examine(mob/user)
..(user)
to_chat(user, "<span class='notice'>Ctrl-click to remove the paddles from the defibrillator.</span>")
. = ..()
. += "<span class='notice'>Ctrl-click to remove the paddles from the defibrillator.</span>"
/obj/item/defibrillator/proc/update_power()
if(bcell)
@@ -40,7 +40,7 @@
/obj/item/extinguisher/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>The safety is [safety ? "on" : "off"].</span>")
. += "<span class='notice'>The safety is [safety ? "on" : "off"].</span>"
/obj/item/extinguisher/New()
@@ -141,9 +141,9 @@
update_icon()
/obj/item/flamethrower/examine(mob/user)
..()
. = ..()
if(ptank)
to_chat(user, "<span class='notice'>[src] has \a [ptank] attached. Alt-click to remove it.</span>")
. += "<span class='notice'>[src] has \a [ptank] attached. Alt-click to remove it.</span>"
/obj/item/flamethrower/proc/toggle_igniter(mob/user)
if(!ptank)
@@ -37,7 +37,7 @@
return ..()
/obj/item/grenade/chem_grenade/examine(mob/user)
..(user)
. = ..()
display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state
@@ -62,5 +62,5 @@
qdel(src)
/obj/item/grenade/iedcasing/examine(mob/user)
..()
to_chat(user, "You can't tell when it will explode!")
. = ..()
. += "You can't tell when it will explode!"
@@ -48,12 +48,12 @@
/obj/item/grenade/examine(mob/user)
..(user)
. = ..()
if(display_timer)
if(det_time > 1)
to_chat(user, "The timer is set to [det_time/10] second\s.")
. += "The timer is set to [det_time/10] second\s."
else
to_chat(user, "\The [src] is set for instant detonation.")
. += "\The [src] is set for instant detonation."
/obj/item/grenade/attack_self(mob/user as mob)
if(!active)
@@ -47,7 +47,7 @@
/obj/item/nullrod/examine(mob/living/user)
. = ..()
if(sanctify_force)
to_chat(user, "<span class='notice'>It bears the inscription: 'Sanctified weapon of the inquisitors. Only the worthy may wield. Nobody shall expect us.'</span>")
. += "<span class='notice'>It bears the inscription: 'Sanctified weapon of the inquisitors. Only the worthy may wield. Nobody shall expect us.'</span>"
/obj/item/nullrod/proc/reskin_holy_weapon(mob/M)
var/list/holy_weapons_list = typesof(/obj/item/nullrod)
@@ -330,10 +330,10 @@
add_fingerprint(user)
/obj/item/melee/energy/cleaving_saw/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It is [active ? "open, will cleave enemies in a wide arc and deal additional damage to fauna":"closed, and can be used for rapid consecutive attacks that cause fauna to bleed"].<br>\
. = ..()
. += "<span class='notice'>It is [active ? "open, will cleave enemies in a wide arc and deal additional damage to fauna":"closed, and can be used for rapid consecutive attacks that cause fauna to bleed"].<br>\
Both modes will build up existing bleed effects, doing a burst of high damage if the bleed is built up high enough.<br>\
Transforming it immediately after an attack causes the next attack to come out faster.</span>")
Transforming it immediately after an attack causes the next attack to come out faster.</span>"
/obj/item/melee/energy/cleaving_saw/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is [active ? "closing [src] on [user.p_their()] neck" : "opening [src] into [user.p_their()] chest"]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
+2 -2
View File
@@ -106,8 +106,8 @@
reagents.add_reagent(refill_reagent, refill_rate)
/obj/item/mop/advanced/examine(mob/user)
..()
to_chat(user, "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>")
. = ..()
. += "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>"
/obj/item/mop/advanced/Destroy()
if(refill_enabled)
@@ -22,16 +22,14 @@
return ..()
/obj/item/pneumatic_cannon/examine(mob/user)
..()
. = ..()
if(!in_range(user, src))
to_chat(user, "<span class='notice'>You'll need to get closer to see any more.</span>")
return
for(var/obj/item/I in loadedItems)
spawn(0)
to_chat(user, "<span class='info'>[bicon(I)] It has \the [I] loaded.</span>")
if(tank)
to_chat(user, "<span class='notice'>[bicon(tank)] It has \the [tank] mounted onto it.</span>")
. += "<span class='notice'>You'll need to get closer to see any more.</span>"
else
if(tank)
. += "<span class='notice'>[bicon(tank)] It has \the [tank] mounted onto it.</span>"
for(var/obj/item/I in loadedItems)
. += "<span class='info'>[bicon(I)] It has \the [I] loaded.</span>"
/obj/item/pneumatic_cannon/attackby(obj/item/W, mob/user, params)
..()
+4 -5
View File
@@ -21,12 +21,11 @@
return ..()
/obj/item/melee/powerfist/examine(mob/user)
..()
. = ..()
if(!in_range(user, src))
to_chat(user, "<span class='notice'>You'll need to get closer to see any more.</span>")
return
if(tank)
to_chat(user, "<span class='notice'>[bicon(tank)] It has [tank] mounted onto it.</span>")
. += "<span class='notice'>You'll need to get closer to see any more.</span>"
else if(tank)
. += "<span class='notice'>[bicon(tank)] It has [tank] mounted onto it.</span>"
/obj/item/melee/powerfist/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/tank))
@@ -29,20 +29,20 @@
/obj/item/storage/backpack/examine(mob/user)
var/space_used = 0
if(!..(user, 1))
return
for(var/obj/item/I in contents)
space_used += I.w_class
if(!space_used)
to_chat(user, "<span class='notice'> [src] is empty.</span>")
else if(space_used <= max_combined_w_class*0.6)
to_chat(user, "<span class='notice'> [src] still has plenty of remaining space.</span>")
else if(space_used <= max_combined_w_class*0.8)
to_chat(user, "<span class='notice'> [src] is beginning to run out of space.</span>")
else if(space_used < max_combined_w_class)
to_chat(user, "<span class='notice'> [src] doesn't have much space left.</span>")
else
to_chat(user, "<span class='notice'> [src] is full.</span>")
. = ..()
if(in_range(user, src))
for(var/obj/item/I in contents)
space_used += I.w_class
if(!space_used)
. += "<span class='notice'> [src] is empty.</span>"
else if(space_used <= max_combined_w_class*0.6)
. += "<span class='notice'> [src] still has plenty of remaining space.</span>"
else if(space_used <= max_combined_w_class*0.8)
. += "<span class='notice'> [src] is beginning to run out of space.</span>"
else if(space_used < max_combined_w_class)
. += "<span class='notice'> [src] doesn't have much space left.</span>"
else
. += "<span class='notice'> [src] is full.</span>"
/*
* Backpack Types
@@ -26,15 +26,15 @@
return
/obj/item/storage/fancy/examine(mob/user)
if(!..(user, 1))
return
if(contents.len <= 0)
to_chat(user, "There are no [src.icon_type]s left in the box.")
else if(contents.len == 1)
to_chat(user, "There is one [src.icon_type] left in the box.")
else
to_chat(user, "There are [src.contents.len] [src.icon_type]s in the box.")
. = ..()
if(in_range(user, src))
var/len = LAZYLEN(contents)
if(len <= 0)
. += "There are no [src.icon_type]s left in the box."
else if(len == 1)
. += "There is one [src.icon_type] left in the box."
else
. += "There are [src.contents.len] [src.icon_type]s in the box."
@@ -28,8 +28,9 @@
max_combined_w_class = 14
/obj/item/storage/secure/examine(mob/user)
if(..(user, 1))
to_chat(user, text("The service panel is [open ? "open" : "closed"]."))
. = ..()
if(in_range(user, src))
. += "The service panel is [open ? "open" : "closed"]."
/obj/item/storage/secure/attackby(obj/item/W as obj, mob/user as mob, params)
if(locked)
+4 -4
View File
@@ -73,13 +73,13 @@
icon_state = "[base_icon]"
/obj/item/melee/baton/examine(mob/user)
..(user)
. = ..()
if(isrobot(loc))
to_chat(user, "<span class='notice'>This baton is drawing power directly from your own internal charge.</span>")
. += "<span class='notice'>This baton is drawing power directly from your own internal charge.</span>"
if(bcell)
to_chat(user, "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>")
. += "<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
if(!bcell)
to_chat(user, "<span class='warning'>The baton does not have a power source installed.</span>")
. += "<span class='warning'>The baton does not have a power source installed.</span>"
/obj/item/melee/baton/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
@@ -35,11 +35,9 @@
/obj/item/tank/jetpack/examine(mob/user)
if(!..(user, 0))
return
if(air_contents.oxygen < 10)
to_chat(user, "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>")
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
@@ -156,11 +154,9 @@
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/jetpack/carbondioxide/examine(mob/user)
if(!..(user, 0))
return
if(air_contents.carbon_dioxide < 10)
to_chat(user, "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>")
. = ..()
if(get_dist(user, src) <= 0 && air_contents.carbon_dioxide < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/jetpack/suit
@@ -229,8 +225,7 @@
actions_types = list(/datum/action/item_action/toggle_jetpack, /datum/action/item_action/jetpack_stabilization)
/obj/item/tank/jetpack/rig/examine()
to_chat(usr, "It's a jetpack. If you can see this, report it on the bug tracker.")
return 0
. = list("It's a jetpack. If you can see this, report it on the bug tracker.")
/obj/item/tank/jetpack/rig/allow_thrust(num, mob/living/user)
if(!on)
@@ -23,10 +23,9 @@
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/oxygen/examine(mob/user)
if(..(user, 0))
if(air_contents.oxygen < 10)
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"))
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 10)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
obj/item/tank/oxygen/empty/New()
..()
@@ -72,10 +71,10 @@ obj/item/tank/oxygen/empty/New()
item_state = "air"
/obj/item/tank/air/examine(mob/user)
if(..(user, 0))
if(air_contents.oxygen < 1 && loc==usr)
to_chat(user, "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>")
user << sound('sound/effects/alert.ogg')
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 1)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/air/New()
..()
@@ -121,10 +120,10 @@ obj/item/tank/oxygen/empty/New()
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/plasma/plasmaman/examine(mob/user)
if(..(user, 0))
if(air_contents.toxins < 0.2 && loc==usr)
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of plasma!</span>"))
user << sound('sound/effects/alert.ogg')
. = ..()
if(get_dist(user, src) <= 0 && air_contents.toxins < 0.2)
. += "<span class='danger'>The meter on [src] indicates you are almost out of plasma!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
/obj/item/tank/plasma/plasmaman/belt
@@ -159,10 +158,10 @@ obj/item/tank/oxygen/empty/New()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/emergency_oxygen/examine(mob/user)
if(..(user, 0))
if(air_contents.oxygen < 0.2 && loc==usr)
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"))
user << sound('sound/effects/alert.ogg')
. = ..()
if(get_dist(user, src) <= 0 && air_contents.oxygen < 0.2)
. += "<span class='danger'>The meter on [src] indicates you are almost out of air!</span>"
playsound(user, 'sound/effects/alert.ogg', 50, 1)
obj/item/tank/emergency_oxygen/empty/New()
..()
@@ -215,10 +214,9 @@ obj/item/tank/emergency_oxygen/double/empty/New()
air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/tank/nitrogen/examine(mob/user)
if(..(user, 0))
if(air_contents.nitrogen < 10)
to_chat(user, text("<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"))
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
. = ..()
if(get_dist(user, src) <= 0 && air_contents.nitrogen < 10)
. += "<span class='danger'>The meter on the [src.name] indicates you are almost out of air!</span>"
/obj/item/tank/emergency_oxygen/vox
name = "vox specialized nitrogen tank"
@@ -76,8 +76,7 @@
/obj/item/tank/examine(mob/user)
if(!..(user, 0))
return
. = ..()
var/obj/icon = src
if(istype(loc, /obj/item/assembly))
@@ -85,7 +84,7 @@
if(!in_range(src, user))
if(icon == src)
to_chat(user, "<span class='notice'>It's \a [bicon(icon)][src]! If you want any more information you'll need to get closer.</span>")
. += "<span class='notice'>It's \a [bicon(icon)][src]! If you want any more information you'll need to get closer.</span>"
return
var/celsius_temperature = air_contents.temperature-T0C
@@ -104,9 +103,7 @@
else
descriptive = "furiously hot"
to_chat(user, "<span class='notice'>\The [bicon(icon)][src] feels [descriptive]</span>")
return
. += "<span class='notice'>\The [bicon(icon)][src] feels [descriptive]</span>"
/obj/item/tank/blob_act()
if(prob(50))
+3 -2
View File
@@ -344,8 +344,9 @@
update_icon()
/obj/item/weldingtool/examine(mob/user)
if(..(user, 0))
to_chat(user, "It contains [get_fuel()] unit\s of fuel out of [max_fuel].")
. = ..()
if(get_dist(user, src) <= 0)
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -28,11 +28,11 @@
. = ..()
var/num = get_part_rating()
if (num == INFINITY)
to_chat(user, "It's sealed tight, completely full of supplies.")
. += "It's sealed tight, completely full of supplies."
else if (num == 0)
to_chat(user, "It's empty!")
. += "It's empty!"
else
to_chat(user, "It can restock [num] item\s.")
. += "It can restock [num] item\s."
/obj/item/vending_refill/get_part_rating()
if (!products || !contraband || !premium)
+4 -4
View File
@@ -160,15 +160,15 @@
return 1
/obj/structure/examine(mob/user)
..()
. = ..()
if(!(resistance_flags & INDESTRUCTIBLE))
if(burn_state == ON_FIRE)
to_chat(user, "<span class='warning'>It's on fire!</span>")
. += "<span class='warning'>It's on fire!</span>"
if(broken)
to_chat(user, "<span class='notice'>It appears to be broken.</span>")
. += "<span class='notice'>It appears to be broken.</span>"
var/examine_status = examine_status(user)
if(examine_status)
to_chat(user, examine_status)
. += examine_status
/obj/structure/proc/examine_status(mob/user) //An overridable proc, mostly for falsewalls.
var/healthpercent = (obj_integrity/max_integrity) * 100
+6 -7
View File
@@ -244,14 +244,13 @@ LINEN BINS
/obj/structure/bedsheetbin/examine(mob/user)
..(user)
. = ..()
if(amount < 1)
to_chat(user, "There are no bed sheets in the bin.")
return
if(amount == 1)
to_chat(user, "There is one bed sheet in the bin.")
return
to_chat(user, "There are [amount] bed sheets in the bin.")
. += "There are no bed sheets in the bin."
else if(amount == 1)
. += "There is one bed sheet in the bin."
else
. += "There are [amount] bed sheets in the bin."
/obj/structure/bedsheetbin/update_icon()
@@ -17,7 +17,7 @@
/obj/structure/closet/fireaxecabinet/examine(mob/user)
. = ..()
to_chat(user, "<span class='notice'>Use a multitool to lock/unlock it.</span>")
. += "<span class='notice'>Use a multitool to lock/unlock it.</span>"
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri
if(isrobot(user) || locked)
+4 -4
View File
@@ -148,12 +148,12 @@ GLOBAL_LIST_INIT(captain_display_cases, list())
start_showpiece_type = /obj/item/gun/projectile/automatic/pistol
/obj/structure/displaycase/examine(mob/user)
..(user)
to_chat(user, "<span class='notice'>Peering through the glass, you see that it contains:</span>")
. = ..()
. += "<span class='notice'>Peering through the glass, you see that it contains:</span>"
if(occupant)
to_chat(user, "[bicon(occupant)] <span class='notice'>\A [occupant].</span>")
. += "[bicon(occupant)] <span class='notice'>\A [occupant].</span>"
else
to_chat(user, "Nothing.")
. += "Nothing."
/obj/structure/displaycase/proc/dump()
if(occupant)
@@ -30,28 +30,28 @@
return ..()
/obj/structure/door_assembly/examine(mob/user)
..()
. = ..()
var/doorname = ""
if(created_name)
doorname = ", written on it is '[created_name]'"
switch(state)
if(AIRLOCK_ASSEMBLY_NEEDS_WIRES)
if(anchored)
to_chat(user, "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>")
. += "<span class='notice'>The anchoring bolts are <b>wrenched</b> in place, but the maintenance panel lacks <i>wiring</i>.</span>"
else
to_chat(user, "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>")
. += "<span class='notice'>The assembly is <b>welded together</b>, but the anchoring bolts are <i>unwrenched</i>.</span>"
if(AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS)
to_chat(user, "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>")
. += "<span class='notice'>The maintenance panel is <b>wired</b>, but the circuit slot is <i>empty</i>.</span>"
if(AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
to_chat(user, "<span class='notice'>The circuit is <b>connected loosely</b> to its slot, but the maintenance panel is <i>unscrewed and open</i>.</span>")
. += "<span class='notice'>The circuit is <b>connected loosely</b> to its slot, but the maintenance panel is <i>unscrewed and open</i>.</span>"
if(!mineral && !glass && !noglass)
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows and mineral covers.</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows and mineral covers.</span>"
else if(!mineral && glass && !noglass)
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for mineral covers.</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for mineral covers.</span>"
else if(mineral && !glass && !noglass)
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows.</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname]. There are <i>empty</i> slots for glass windows.</span>"
else
to_chat(user, "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>")
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
+2 -2
View File
@@ -29,8 +29,8 @@
has_extinguisher = new/obj/item/extinguisher
/obj/structure/extinguisher_cabinet/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to [opened ? "close":"open"] it.</span>")
. = ..()
. += "<span class='notice'>Alt-click to [opened ? "close":"open"] it.</span>"
/obj/structure/extinguisher_cabinet/AltClick(mob/living/user)
if(!istype(user) || user.incapacitated())
+5 -5
View File
@@ -14,16 +14,16 @@
. = ..()
switch(state)
if(GIRDER_REINF)
to_chat(user, "<span class='notice'>The support struts are <b>screwed</b> in place.</span>")
. += "<span class='notice'>The support struts are <b>screwed</b> in place.</span>"
if(GIRDER_REINF_STRUTS)
to_chat(user, "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>")
. += "<span class='notice'>The support struts are <i>unscrewed</i> and the inner <b>grille</b> is intact.</span>"
if(GIRDER_NORMAL)
if(can_displace)
to_chat(user, "<span class='notice'>The bolts are <b>lodged</b> in place.</span>")
. += "<span class='notice'>The bolts are <b>lodged</b> in place.</span>"
if(GIRDER_DISPLACED)
to_chat(user, "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>")
. += "<span class='notice'>The bolts are <i>loosened</i>, but the <b>screws</b> are holding [src] together.</span>"
if(GIRDER_DISASSEMBLED)
to_chat(user, "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>")
. += "<span class='notice'>[src] is disassembled! You probably shouldn't be able to see this examine message.</span>"
/obj/structure/girder/proc/refundMetal(metalAmount) //refunds metal used in construction when deconstructed
for(var/i=0;i < metalAmount;i++)
+3 -3
View File
@@ -54,11 +54,11 @@
obj_break()
/obj/structure/grille/examine(mob/user)
..()
. = ..()
if(anchored)
to_chat(user, "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>")
. += "<span class='notice'>It's secured in place with <b>screws</b>. The rods look like they could be <b>cut</b> through.</span>"
if(!anchored)
to_chat(user, "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>")
. += "<span class='notice'>The anchoring screws are <i>unscrewed</i>. The rods look like they could be <b>cut</b> through.</span>"
/obj/structure/grille/ratvar_act()
if(broken)
+2 -4
View File
@@ -33,7 +33,7 @@
return ..()
/obj/structure/guillotine/examine(mob/user)
..()
. = ..()
var/msg = ""
@@ -53,9 +53,7 @@
msg += "<br/>"
msg += "Someone appears to be strapped in. You can help them out, or you can harm them by activating the guillotine."
to_chat(user, msg)
return msg
. += msg
/obj/structure/guillotine/attack_hand(mob/user)
add_fingerprint(user)
+3 -3
View File
@@ -22,11 +22,11 @@
QDEL_IN(LAT, 0)
/obj/structure/lattice/examine(mob/user)
..()
deconstruction_hints(user)
. = ..()
. += deconstruction_hints(user)
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>")
return "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>"
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
if(resistance_flags & INDESTRUCTIBLE)
+3 -2
View File
@@ -21,8 +21,9 @@
return ..()
/obj/structure/mopbucket/examine(mob/user)
if(..(user, 1))
to_chat(usr, "[bicon(src)] [src] contains [reagents.total_volume] units of water left!")
. = ..()
if(in_range(user, src))
. += "[bicon(src)] [src] contains [reagents.total_volume] units of water left!"
/obj/structure/mopbucket/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/mop))
+2 -2
View File
@@ -13,9 +13,9 @@
. = ..()
switch(state)
if(PLASTIC_FLAPS_NORMAL)
to_chat(user, "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>")
. += "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>"
if(PLASTIC_FLAPS_DETACHED)
to_chat(user, "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>")
. += "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>sliced</b> apart.</span>"
/obj/structure/plasticflaps/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
+2 -2
View File
@@ -79,9 +79,9 @@ GLOBAL_LIST_EMPTY(safes)
/obj/structure/safe/examine(mob/user)
. = ..()
to_chat(user, "This model appears to have [number_of_tumblers] tumblers.")
. += "This model appears to have [number_of_tumblers] tumblers."
if(open)
to_chat(user, "The inside of the the door has numbers written on it: <b>[get_combination()]</b>")
. += "The inside of the the door has numbers written on it: <b>[get_combination()]</b>"
/obj/structure/safe/blob_act()
return
+2 -2
View File
@@ -11,8 +11,8 @@
var/lastuser = null
/obj/structure/spirit_board/examine(mob/user)
..(user)
to_chat(user, "[initial(desc)] The planchette is sitting at \"[planchette]\".")
. = ..()
. += "[initial(desc)] The planchette is sitting at \"[planchette]\"."
/obj/structure/spirit_board/attack_hand(mob/user as mob)
if(..())
+5 -5
View File
@@ -41,11 +41,11 @@
update_icon()
/obj/structure/table/examine(mob/user)
..()
deconstruction_hints(user)
. = ..()
. += deconstruction_hints(user)
/obj/structure/table/proc/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>")
return "<span class='notice'>The top is <b>screwed</b> on, but the main <b>bolts</b> are also visible.</span>"
/obj/structure/table/update_icon()
if(smooth && !flipped)
@@ -648,8 +648,8 @@
max_integrity = 20
/obj/structure/rack/examine(mob/user)
..()
to_chat(user, "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>")
. = ..()
. += "<span class='notice'>It's held together by a couple of <b>bolts</b>.</span>"
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
@@ -28,8 +28,8 @@
var/state = "01" //How far the door assembly has progressed
/obj/structure/windoor_assembly/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to rotate it clockwise.</span>")
. = ..()
. += "<span class='notice'>Alt-click to rotate it clockwise.</span>"
obj/structure/windoor_assembly/New(loc, set_dir)
..()
+8 -8
View File
@@ -49,23 +49,23 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
var/hitsound = 'sound/effects/Glasshit.ogg'
/obj/structure/window/examine(mob/user)
..()
. = ..()
if(reinf)
if(anchored && state == WINDOW_SCREWED_TO_FRAME)
to_chat(user, "<span class='notice'>The window is <b>screwed</b> to the frame.</span>")
. += "<span class='notice'>The window is <b>screwed</b> to the frame.</span>"
else if(anchored && state == WINDOW_IN_FRAME)
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> but <b>pried</b> into the frame.</span>")
. += "<span class='notice'>The window is <i>unscrewed</i> but <b>pried</b> into the frame.</span>"
else if(anchored && state == WINDOW_OUT_OF_FRAME)
to_chat(user, "<span class='notice'>The window is out of the frame, but could be <i>pried</i> in. It is <b>screwed</b> to the floor.</span>")
. += "<span class='notice'>The window is out of the frame, but could be <i>pried</i> in. It is <b>screwed</b> to the floor.</span>"
else if(!anchored)
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>")
. += "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>"
else
if(anchored)
to_chat(user, "<span class='notice'>The window is <b>screwed</b> to the floor.</span>")
. += "<span class='notice'>The window is <b>screwed</b> to the floor.</span>"
else
to_chat(user, "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>")
. += "<span class='notice'>The window is <i>unscrewed</i> from the floor, and could be deconstructed by <b>wrenching</b>.</span>"
if(!anchored && !fulltile)
to_chat(user, "<span class='notice'>Alt-click to rotate it.</span>")
. += "<span class='notice'>Alt-click to rotate it.</span>"
/obj/structure/window/New(Loc, direct)
..()