Adds examine boxes. (#18370)

* Adds examine boxes.

* lint

* what kind of dreams did you dream?

* unlimited

* midgardsormr

* sdsd

* fixes

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2024-02-11 21:58:20 +00:00
committed by GitHub
co-authored by Matt Atlas
parent d57c5e7c43
commit 4423d03f2f
296 changed files with 1317 additions and 1257 deletions
@@ -31,20 +31,20 @@
update_icon()
starting_maxhealth = maxhealth
/obj/structure/barricade/examine(mob/user)
/obj/structure/barricade/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, SPAN_INFO("It is recommended to stand flush to a barricade or one tile away for maximum efficiency."))
. += 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."))
. += SPAN_INFO("There is a length of wire strewn across the top of this barricade.")
switch(damage_state)
if(BARRICADE_DMG_NONE)
to_chat(user, SPAN_INFO("It appears to be in good shape."))
. += SPAN_INFO("It appears to be in good shape.")
if(BARRICADE_DMG_SLIGHT)
to_chat(user, SPAN_WARNING("It's slightly damaged, but still very functional."))
. += SPAN_WARNING("It's slightly damaged, but still very functional.")
if(BARRICADE_DMG_MODERATE)
to_chat(user, SPAN_WARNING("It's quite beat up, but it's holding together."))
. += SPAN_WARNING("It's quite beat up, but it's holding together.")
if(BARRICADE_DMG_HEAVY)
to_chat(user, SPAN_WARNING("It's crumbling apart, just a few more blows will tear it apart!"))
. += SPAN_WARNING("It's crumbling apart, just a few more blows will tear it apart!")
/obj/structure/barricade/update_icon()
overlays.Cut()
@@ -14,15 +14,15 @@
can_wire = TRUE
var/build_state = BARRICADE_BSTATE_SECURED //Look at __game.dm for barricade defines
/obj/structure/barricade/metal/examine(mob/user)
/obj/structure/barricade/metal/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
switch(build_state)
if(BARRICADE_BSTATE_SECURED)
to_chat(user, SPAN_INFO("The protection panel is still tighly screwed in place."))
. += SPAN_INFO("The protection panel is still tighly screwed in place.")
if(BARRICADE_BSTATE_UNSECURED)
to_chat(user, SPAN_INFO("The protection panel has been removed, you can see the anchor bolts."))
. += SPAN_INFO("The protection panel has been removed, you can see the anchor bolts.")
if(BARRICADE_BSTATE_MOVABLE)
to_chat(user, SPAN_INFO("The protection panel has been removed and the anchor bolts loosened. It's ready to be taken apart."))
. += SPAN_INFO("The protection panel has been removed and the anchor bolts loosened. It's ready to be taken apart.")
/obj/structure/barricade/metal/attackby(obj/item/W, mob/user)
if(W.iswelder())
@@ -42,16 +42,15 @@
else
return 0
/obj/structure/barricade/plasteel/examine(mob/user)
/obj/structure/barricade/plasteel/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
switch(build_state)
if(BARRICADE_BSTATE_SECURED)
to_chat(user, SPAN_INFO("The protection panel is still tighly screwed in place."))
. += SPAN_INFO("The protection panel is still tighly screwed in place.")
if(BARRICADE_BSTATE_UNSECURED)
to_chat(user, SPAN_INFO("The protection panel has been removed, you can see the anchor bolts."))
. += SPAN_INFO("The protection panel has been removed, you can see the anchor bolts.")
if(BARRICADE_BSTATE_MOVABLE)
to_chat(user, SPAN_INFO("The protection panel has been removed and the anchor bolts loosened. It's ready to be taken apart."))
. += SPAN_INFO("The protection panel has been removed and the anchor bolts loosened. It's ready to be taken apart.")
/obj/structure/barricade/plasteel/weld_cade(obj/item/W, mob/user)
busy = TRUE
+4 -5
View File
@@ -376,16 +376,15 @@ LINEN BINS
var/obj/item/hidden = null
/obj/structure/bedsheetbin/examine(mob/user)
/obj/structure/bedsheetbin/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(amount < 1)
to_chat(user, "There are no bed sheets in the bin.")
. += "There are no bed sheets in the bin."
return
if(amount == 1)
to_chat(user, "There is one bed sheet in the bin.")
. += "There is one bed sheet in the bin."
return
to_chat(user, "There are [amount] bed sheets in the bin.")
. += "There are [amount] bed sheets in the bin."
/obj/structure/bedsheetbin/update_icon()
+6 -6
View File
@@ -32,22 +32,22 @@ GLOBAL_LIST_EMPTY(total_active_bonfires)
GLOB.total_active_bonfires -= src
. = ..()
/obj/structure/bonfire/examine(mob/user, distance, is_adjacent)
/obj/structure/bonfire/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance > 2)
return
if(on_fire)
switch(fuel)
if(0 to 200)
to_chat(user, "\The [src] is burning weakly.")
. += "\The [src] is burning weakly."
if(200 to 600)
to_chat(user, "\The [src] is gently burning.")
. += "\The [src] is gently burning."
if(600 to 900)
to_chat(user, "\The [src] is burning steadily.")
. += "\The [src] is burning steadily."
if(900 to 1300)
to_chat(user, "The flames are dancing wildly!")
. += "The flames are dancing wildly!"
if(1300 to 2000)
to_chat(user, "The fire is roaring!")
. += "The fire is roaring!"
/obj/structure/bonfire/update_icon()
if(on_fire)
@@ -90,30 +90,30 @@
/obj/structure/closet/proc/content_info(mob/user, content_size)
if(!content_size)
to_chat(user, "\The [src] is empty.")
. = "\The [src] is empty."
else if(storage_capacity > content_size*4)
to_chat(user, "\The [src] is barely filled.")
. = "\The [src] is barely filled."
else if(storage_capacity > content_size*2)
to_chat(user, "\The [src] is less than half full.")
. = "\The [src] is less than half full."
else if(storage_capacity > content_size)
to_chat(user, "\The [src] still has some free space.")
. = "\The [src] still has some free space."
else
to_chat(user, "\The [src] is full.")
. = "\The [src] is full."
/obj/structure/closet/examine(mob/user, distance, is_adjacent)
/obj/structure/closet/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance <= 1 && !src.opened)
var/content_size = 0
for(var/obj/item/I in contents)
if(!I.anchored)
content_size += Ceiling(I.w_class/2)
content_info(user, content_size)
. += content_info(user, content_size)
if(!src.opened && isobserver(user))
to_chat(user, "It contains: [counting_english_list(contents)]")
. += "It contains: [counting_english_list(contents)]"
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]...")))
. += FONT_SMALL(SPAN_NOTICE("There appears to be a device attached to the interior backplate of \the [src]..."))
/obj/structure/closet/proc/stored_weight()
var/content_size = 0
+2 -2
View File
@@ -27,7 +27,7 @@
if(our_creator)
creator = our_creator
/obj/structure/reagent_crystal/examine(mob/user)
/obj/structure/reagent_crystal/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
var/state
var/current_damage = health / initial(health)
@@ -40,7 +40,7 @@
state = SPAN_WARNING("The crystal has scratches and deeper grooves on its surface.")
if(0.8 to 1)
state = SPAN_NOTICE("The crystal looks structurally sound.")
to_chat(user, state)
. += state
/obj/structure/reagent_crystal/proc/take_damage(var/damage)
health -= damage
@@ -31,9 +31,9 @@
. = ..()
update_state()
/obj/structure/door_assembly/examine(mob/user)
/obj/structure/door_assembly/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "It is currently facing [dir2text(dir)].")
. += "It is currently facing [dir2text(dir)]."
/obj/structure/door_assembly/door_assembly_generic
base_name = "airlock"
+6 -6
View File
@@ -18,20 +18,20 @@
var/reinforcing = 0
var/plating = FALSE
/obj/structure/girder/examine(mob/user, distance, infix, suffix)
/obj/structure/girder/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
var/state
var/current_damage = health / initial(health)
switch(current_damage)
if(0 to 0.2)
state = "<span class='danger'>The support struts are collapsing!</span>"
state = SPAN_DANGER("The support struts are collapsing!")
if(0.2 to 0.4)
state = "<span class='warning'>The support struts are warped!</span>"
state = SPAN_WARNING("The support struts are warped!")
if(0.4 to 0.8)
state = "<span class='notice'>The support struts are dented, but holding together.</span>"
state = SPAN_NOTICE("The support struts are dented, but holding together.")
if(0.8 to 1)
state = "<span class='notice'>The support struts look completely intact.</span>"
to_chat(user, state)
state = SPAN_NOTICE("The support struts look completely intact.")
. += state
/obj/structure/girder/displaced
name = "displaced girder"
+5 -5
View File
@@ -13,18 +13,18 @@
. = ..()
health = maxHealth
/obj/structure/gore/examine(mob/user, distance, is_adjacent)
/obj/structure/gore/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance <= 2)
var/health_div = health / maxHealth
if(health_div >= 0.9)
to_chat(user, SPAN_NOTICE("\The [src] appears completely intact."))
. += SPAN_NOTICE("\The [src] appears completely intact.")
else if(health_div >= 0.7)
to_chat(user, SPAN_NOTICE("\The [src] is starting to tear somewhat."))
. += SPAN_NOTICE("\The [src] is starting to tear somewhat.")
else if(health_div >= 0.4)
to_chat(user, SPAN_WARNING("\The [src] is starting to fall apart."))
. += SPAN_WARNING("\The [src] is starting to fall apart.")
else
to_chat(user, SPAN_WARNING("\The [src] is barely holding itself together!"))
. += SPAN_WARNING("\The [src] is barely holding itself together!")
/obj/structure/gore/proc/healthcheck()
if(health <= 0)
+5 -5
View File
@@ -13,18 +13,18 @@
. = ..()
health = maxHealth
/obj/structure/bed/nest/examine(mob/user, distance, is_adjacent)
/obj/structure/bed/nest/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance <= 2)
var/health_div = health / maxHealth
if(health_div >= 0.9)
to_chat(user, SPAN_NOTICE("\The [src] appears completely intact."))
. += SPAN_NOTICE("\The [src] appears completely intact.")
else if(health_div >= 0.7)
to_chat(user, SPAN_NOTICE("\The [src] is starting to tear somewhat."))
. += SPAN_NOTICE("\The [src] is starting to tear somewhat.")
else if(health_div >= 0.4)
to_chat(user, SPAN_WARNING("\The [src] is starting to fall apart."))
. += SPAN_WARNING("\The [src] is starting to fall apart.")
else
to_chat(user, SPAN_WARNING("\The [src] is barely holding itself together!"))
. += SPAN_WARNING("\The [src] is barely holding itself together!")
/obj/structure/bed/nest/update_icon()
return
+3 -3
View File
@@ -88,14 +88,14 @@
/obj/structure/janitorialcart/proc/get_short_status()
return "Contents: [english_list(contents)]"
/obj/structure/janitorialcart/examine(mob/user, distance, is_adjacent)
/obj/structure/janitorialcart/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
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!")
. += "[icon2html(src, user)] The bucket contains [contains] unit\s of liquid!"
else
to_chat(user, "[icon2html(src, user)] There is no bucket mounted on it!")
. += "[icon2html(src, user)] There is no bucket mounted on it!"
//everything else is visible, so doesn't need to be mentioned
+2 -2
View File
@@ -18,10 +18,10 @@
GLOB.janitorial_supplies -= src
return ..()
/obj/structure/mopbucket/examine(mob/user, distance, is_adjacent)
/obj/structure/mopbucket/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance <= 1)
to_chat(user, "Contains [reagents.total_volume] unit\s of water.")
. += "It contains [reagents.total_volume] unit\s of water."
/obj/structure/mopbucket/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/mop))
+1 -1
View File
@@ -34,7 +34,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(mob/user, distance, is_adjacent)
/obj/structure/noticeboard/examine(mob/user, distance, is_adjacent, infix, suffix)
if(is_adjacent)
var/dat = "<B>Noticeboard</B><BR>"
for(var/obj/item/paper/P in src)
+6 -6
View File
@@ -71,18 +71,18 @@
R.update_icon()
return ..()
/obj/structure/railing/examine(mob/user)
/obj/structure/railing/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(health < maxhealth)
switch(health / maxhealth)
if(0.0 to 0.5)
to_chat(user, SPAN_WARNING("It looks severely damaged!"))
. += SPAN_WARNING("It looks severely damaged!")
if(0.25 to 0.5)
to_chat(user, SPAN_WARNING("It looks damaged!"))
. += 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.")))
. += SPAN_NOTICE("It has a few scrapes and dents.")
. += FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[density ? "closed" : "open"]</b> to passage."))
. += FONT_SMALL(SPAN_NOTICE("\The [src] is <b>[anchored ? "" : "not"] screwed</b> to the floor."))
/obj/structure/railing/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover,/obj/item/projectile))
+3 -3
View File
@@ -44,13 +44,13 @@ FLOOR SAFES
space += I.w_class
I.forceMove(src)
/obj/structure/safe/examine(mob/user)
/obj/structure/safe/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(broken)
to_chat(user, SPAN_WARNING("\The [src]'s locking system has been drilled open!"))
. += SPAN_WARNING("\The [src]'s locking system has been drilled open!")
else if(time_to_drill < 300 SECONDS)
var/time_left = max(round(time_to_drill / 10), 0)
to_chat(user, SPAN_WARNING("There are only [time_left] second\s of drilling left until \the [src] is broken!"))
. += SPAN_WARNING("There are only [time_left] second\s of drilling left until \the [src] is broken!")
/obj/structure/safe/Destroy()
if(drill)
+3 -3
View File
@@ -7,12 +7,12 @@
anchored = 0
var/open = FALSE
/obj/structure/sarcophagus/examine(mob/user)
/obj/structure/sarcophagus/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(!open)
to_chat(user, "\The [src]'s lid is closed shut.")
. += "\The [src]'s lid is closed shut."
else
to_chat(user, "\The [src]'s lid is open.")
. += "\The [src]'s lid is open."
/obj/structure/sarcophagus/Initialize()
. = ..()
+2 -2
View File
@@ -58,10 +58,10 @@
lock = null
return ..()
/obj/structure/simple_door/examine(mob/user)
/obj/structure/simple_door/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(lock)
to_chat(user, "<span class='notice'>It appears to have a lock.</span>")
. += SPAN_NOTICE("It appears to have a lock.")
/obj/structure/simple_door/CollidedWith(atom/user)
..()
@@ -17,10 +17,10 @@
STOP_PROCESSING(SSprocessing, src)
return ..()
/obj/structure/bed/stool/chair/remote/examine(mob/user)
/obj/structure/bed/stool/chair/remote/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(portable_type)
to_chat(user, FONT_SMALL(SPAN_NOTICE("Can be packed up by using a wrench on it.")))
. += FONT_SMALL(SPAN_NOTICE("Can be packed up by using a wrench on it."))
/obj/structure/bed/stool/chair/remote/update_icon()
return
+9 -9
View File
@@ -33,28 +33,28 @@
atmos_canpass = CANPASS_PROC
/obj/structure/window/examine(mob/user)
/obj/structure/window/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(health == maxhealth)
to_chat(user, SPAN_NOTICE("It looks fully intact."))
. += SPAN_NOTICE("It looks fully intact.")
else
var/perc = health / maxhealth
if(perc > 0.75)
to_chat(user, SPAN_NOTICE("It has a few cracks."))
. += SPAN_NOTICE("It has a few cracks.")
else if(perc > 0.5)
to_chat(user, SPAN_WARNING("It looks slightly damaged."))
. += SPAN_WARNING("It looks slightly damaged.")
else if(perc > 0.25)
to_chat(user, SPAN_WARNING("It looks moderately damaged."))
. += SPAN_WARNING("It looks moderately damaged.")
else
to_chat(user, SPAN_DANGER("It looks heavily damaged."))
. += SPAN_DANGER("It looks heavily damaged.")
if(silicate)
if (silicate < 30)
to_chat(user, SPAN_NOTICE("It has a thin layer of silicate."))
. += SPAN_NOTICE("It has a thin layer of silicate.")
else if (silicate < 70)
to_chat(user, SPAN_NOTICE("It is covered in silicate."))
. += SPAN_NOTICE("It is covered in silicate.")
else
to_chat(user, SPAN_NOTICE("There is a thick layer of silicate covering it."))
. += SPAN_NOTICE("There is a thick layer of silicate covering it.")
/obj/structure/window/proc/update_nearby_icons()
SSicon_smooth.add_to_queue_neighbors(src)