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
+2 -2
View File
@@ -9,7 +9,7 @@
var/flush = 0
var/mob/living/silicon/ai/carded_ai
/obj/item/aicard/examine(mob/user)
/obj/item/aicard/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
var/message = "Status of [carded_ai] is: "
if(!carded_ai)
@@ -20,7 +20,7 @@
message += SPAN_NOTICE("active.")
else
message += SPAN_WARNING("inactive.")
to_chat(user, message)
. += message
/obj/item/aicard/attack(mob/living/silicon/decoy/M as mob, mob/user as mob, var/target_zone)
if (!istype (M, /mob/living/silicon/decoy))
@@ -15,12 +15,12 @@
if(!augment_type)
augment_type = new new_augment(src)
/obj/item/device/augment_implanter/examine(mob/user)
/obj/item/device/augment_implanter/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(augment_type)
to_chat(user, FONT_SMALL(SPAN_NOTICE("\The [augment_type] can be seen floating inside \the [src]'s biogel.")))
. += FONT_SMALL(SPAN_NOTICE("\The [augment_type] can be seen floating inside \the [src]'s biogel."))
else
to_chat(user, FONT_SMALL(SPAN_WARNING("It is spent.")))
. += FONT_SMALL(SPAN_WARNING("It is spent."))
/obj/item/device/augment_implanter/afterattack(mob/living/L, mob/user, proximity)
if(!proximity)
+6 -6
View File
@@ -477,17 +477,17 @@
playsound(usr, 'sound/machines/click.ogg', 50)
update_icon()
/obj/item/auto_cpr/examine(mob/user, distance, is_adjacent)
/obj/item/auto_cpr/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
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"]."))
. += SPAN_NOTICE("\The [src]'s [EPP] is currently [epp_mode ? "on" : "off"], while the Auto CPR is [cpr_mode ? "on" : "off"].")
if(battery)
to_chat(user, SPAN_NOTICE("It currently has a battery with [battery.percent()]% charge."))
. += SPAN_NOTICE("It currently has a battery with [battery.percent()]% charge.")
if(tank)
to_chat(user, SPAN_NOTICE("It has [icon2html(tank, user)] \the [tank] installed. The meter shows [round(tank.air_contents.return_pressure())]kPa, \
with the pressure set to [round(tank.distribute_pressure)]kPa.[epp_active ? " The [EPP] is active." : ""]"))
. += SPAN_NOTICE("It has [icon2html(tank, user)] \the [tank] installed. The meter shows [round(tank.air_contents.return_pressure())]kPa, \
with the pressure set to [round(tank.distribute_pressure)]kPa.[epp_active ? " The [EPP] is active." : ""]")
if(breath_mask)
to_chat(user, SPAN_NOTICE("It has [icon2html(breath_mask, user)] \the [breath_mask] installed."))
. += SPAN_NOTICE("It has [icon2html(breath_mask, user)] \the [breath_mask] installed.")
#undef EPP
+2 -2
View File
@@ -12,9 +12,9 @@
var/loaded = 1
var/mode = "completely"
/obj/item/device/dociler/examine(var/mob/user)
/obj/item/device/dociler/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "<span class='notice'>It is currently set to [mode] docile mode.</span>")
. += "<span class='notice'>It is currently set to [mode] docile mode.</span>"
/obj/item/device/dociler/attack_self(var/mob/user)
if(mode == "somewhat")
+3 -3
View File
@@ -17,13 +17,13 @@
var/last_use = 0
/obj/item/device/flash/examine(mob/user, distance)
/obj/item/device/flash/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(!broken)
var/num_charges = max(0, max_charges - times_used)
to_chat(user, SPAN_NOTICE("The charge indicator shows [num_charges] charge[num_charges == 1 ? "" : "s"] remain[num_charges == 1 ? "s" : ""]."))
. += SPAN_NOTICE("The charge indicator shows [num_charges] charge[num_charges == 1 ? "" : "s"] remain[num_charges == 1 ? "s" : ""].")
else
to_chat(user, SPAN_WARNING("\The [src]'s bulb is burnt out!"))
. += SPAN_WARNING("\The [src]'s bulb is burnt out!")
/obj/item/device/flash/proc/clumsy_check(mob/user)
if(user && (user.is_clumsy()) && prob(50))
+3 -3
View File
@@ -33,13 +33,13 @@
radiation_count = SSradiation.get_rads_at_turf(get_turf(src))
update_icon()
/obj/item/device/geiger/examine(mob/user)
/obj/item/device/geiger/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
var/msg = "[scanning ? "ambient" : "stored"] Radiation level: [radiation_count ? radiation_count : "0"] IU/s."
if(radiation_count > RAD_LEVEL_LOW)
to_chat(user, SPAN_WARNING("[msg]"))
. += SPAN_WARNING("[msg]")
else
to_chat(user, SPAN_NOTICE("[msg]"))
. += SPAN_NOTICE("[msg]")
/obj/item/device/geiger/attack_self(mob/user)
scanning = !scanning
@@ -21,10 +21,10 @@
unload_warrant()
return ..()
/obj/item/device/holowarrant/examine(mob/user, distance, is_adjacent)
/obj/item/device/holowarrant/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(selected_warrant)
to_chat(user, "It's a holographic warrant for '[selected_warrant.name]'.")
. += "It's a holographic warrant for '[selected_warrant.name]'."
/obj/item/device/holowarrant/attack_self(mob/living/user as mob)
if(!LAZYLEN(SSrecords.warrants))
@@ -124,14 +124,14 @@
M.update_inv_r_ear()
M.update_inv_head()
/obj/item/device/flashlight/examine(mob/user, distance, is_adjacent)
/obj/item/device/flashlight/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(power_use && brightness_level)
to_chat(user, SPAN_NOTICE("\The [src] is set to [brightness_level]."))
. += 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."))
. += 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)].")))
. += FONT_SMALL(SPAN_NOTICE("\The [src] is facing [dir2text(dir)]."))
/obj/item/device/flashlight/attack_self(mob/user)
if(always_on)
@@ -72,12 +72,12 @@
failmsg = "The [name]'s refill light blinks red."
..()
/obj/item/device/lightreplacer/examine(mob/user, distance, is_adjacent)
/obj/item/device/lightreplacer/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance <= 2)
to_chat(user, "It has [uses] lights remaining.")
. += "It has [uses] lights remaining."
if (store_broken)
to_chat(user, "It is storing [stored()]/[max_stored] broken lights.")
. += "It is storing [stored()]/[max_stored] broken lights."
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass")
@@ -76,17 +76,17 @@
status = STATUS_ACTIVE
attach(newtarget)
/obj/item/device/magnetic_lock/examine(mob/user)
/obj/item/device/magnetic_lock/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if (status == STATUS_BROKEN)
to_chat(user, "<span class='danger'>It looks broken!</span>")
. += "<span class='danger'>It looks broken!</span>"
else
if (powercell)
var/power = round(powercell.charge / powercell.maxcharge * 100)
to_chat(user, "<span class='notice'>The powercell is at [power]% charge.</span>")
. += "<span class='notice'>The powercell is at [power]% charge.</span>"
else
to_chat(user, "<span class='warning'>It has no powercell to power it!")
. += "<span class='warning'>It has no powercell to power it!"
/obj/item/device/magnetic_lock/attack_hand(var/mob/user)
add_fingerprint(user)
+2 -2
View File
@@ -69,9 +69,9 @@
user.drop_from_inventory(src,O)
qdel(src)
/obj/item/device/modkit/examine(mob/user)
/obj/item/device/modkit/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "It looks as though it modifies voidsuits to fit [target_species] users.")
. += "It looks as though it modifies voidsuits to fit [target_species] users."
/obj/item/device/modkit/tajaran
name = "tajaran voidsuit modification kit"
@@ -289,9 +289,9 @@
playsound(get_turf(src), 'sound/effects/spray3.ogg', 30, 1, -6)
return .
/obj/item/device/paint_sprayer/examine(mob/user)
/obj/item/device/paint_sprayer/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "It is configured to produce the '[decal]' decal with a direction of '[paint_dir]' using [paint_colour] paint.")
. += "It is configured to produce the '[SPAN_NOTICE(decal)]' decal with a direction of '[SPAN_NOTICE(paint_dir)]' using [SPAN_NOTICE(paint_colour)] paint."
/obj/item/device/paint_sprayer/verb/choose_colour()
set name = "Choose Colour"
@@ -13,10 +13,11 @@
var/upkeep_cost = 2
var/obj/aura/personal_shield/device/shield
/obj/item/device/personal_shield/examine(mob/user, distance, is_adjacent)
/obj/item/device/personal_shield/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
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."))
. += SPAN_NOTICE("\The [src] has [cell.charge] charge remaining.")
. += SPAN_NOTICE("Shield upkeep costs [upkeep_cost] charge, and blocking a shot costs [SPAN_NOTICE(charge_per_shot)] charge.")
/obj/item/device/personal_shield/Initialize()
. = ..()
@@ -31,6 +31,6 @@
/obj/item/device/pipe_painter/attack_self(var/mob/user)
mode = tgui_input_list(user, "Which colour do you want to use?", "Pipe Painter", modes, mode)
/obj/item/device/pipe_painter/examine(var/mob/user)
/obj/item/device/pipe_painter/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "It is in [mode] mode.")
. += "It is in [mode] mode."
@@ -17,10 +17,10 @@ GLOBAL_LIST_EMPTY(teleportbeacons)
GLOB.teleportbeacons -= src
return ..()
/obj/item/device/radio/beacon/examine(mob/user)
/obj/item/device/radio/beacon/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(anchored)
to_chat(user, SPAN_NOTICE("It's been secured to the ground with anchoring screws."))
. += SPAN_NOTICE("It's been secured to the ground with anchoring screws.")
/obj/item/device/radio/beacon/attack_hand(mob/user)
if(anchored)
@@ -56,14 +56,14 @@
/obj/item/device/radio/headset/list_channels(var/mob/user)
return list_secure_channels()
/obj/item/device/radio/headset/examine(mob/user, distance, is_adjacent)
/obj/item/device/radio/headset/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(!(is_adjacent && radio_desc))
return
to_chat(user, "The following channels are available:")
to_chat(user, radio_desc)
. += "The following channels are available:"
. += radio_desc
/obj/item/device/radio/headset/setupRadioDescription()
if(translate_binary || translate_hivenet)
@@ -515,13 +515,13 @@ var/global/list/default_interrogation_channels = list(
return get_hearers_in_view(canhear_range, src)
/obj/item/device/radio/examine(mob/user, distance, is_adjacent)
/obj/item/device/radio/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(show_modify_on_examine && (distance <= 1))
if (b_stat)
user.show_message("<span class='notice'>\The [src] can be attached and modified!</span>")
. += SPAN_NOTICE("\The [src] can be attached and modified!")
else
user.show_message("<span class='notice'>\The [src] can not be modified or attached!</span>")
. += SPAN_NOTICE("\The [src] can not be modified or attached!")
/obj/item/device/radio/attackby(obj/item/W as obj, mob/user as mob)
..()
+5 -5
View File
@@ -25,11 +25,11 @@
camera = new(src)
become_hearing_sensitive(ROUNDSTART_TRAIT)
/obj/item/device/spy_bug/examine(mob/user, distance)
/obj/item/device/spy_bug/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
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.")
. += "It's a tiny camera, microphone, and transmission device in a happy union."
. += "Needs to be both configured and brought in contact with monitor device to be fully functional."
/obj/item/device/spy_bug/attack_self(mob/user)
radio.set_broadcasting(!radio.get_broadcasting())
@@ -68,10 +68,10 @@
radio = new(src)
become_hearing_sensitive(ROUNDSTART_TRAIT)
/obj/item/device/spy_monitor/examine(mob/user, distance)
/obj/item/device/spy_monitor/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
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.")
. += "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)
if(operating)
@@ -210,7 +210,7 @@
M.update_inv_back()
M.update_inv_s_store()
/obj/item/device/suit_cooling_unit/examine(mob/user, distance)
/obj/item/device/suit_cooling_unit/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(!distance <= 1)
@@ -218,26 +218,26 @@
if(on)
if(attached_to_suit(src.loc))
to_chat(user, SPAN_NOTICE("It's switched on and running."))
. += SPAN_NOTICE("It's switched on and running.")
else if(ishuman(loc))
var/mob/living/carbon/human/H = loc
if(H.species.flags & ACCEPTS_COOLER)
to_chat(user, SPAN_NOTICE("It's switched on and running, connected to the cooling systems of [H]."))
. += SPAN_NOTICE("It's switched on and running, connected to the cooling systems of [H].")
else
to_chat(user, SPAN_NOTICE("It's switched on, but not attached to anything."))
. += SPAN_NOTICE("It's switched on, but not attached to anything.")
else
to_chat(user, SPAN_NOTICE("It is switched off."))
. += SPAN_NOTICE("It is switched off.")
if(cover_open)
if(cell)
to_chat(user, SPAN_NOTICE("The panel is open, exposing \the [cell]."))
. += SPAN_NOTICE("The panel is open, exposing \the [cell].")
else
to_chat(user, SPAN_NOTICE("The panel is open."))
. += SPAN_NOTICE("The panel is open.")
if(cell)
to_chat(user, SPAN_NOTICE("The charge meter reads [round(cell.percent())]%."))
. += SPAN_NOTICE("The charge meter reads [round(cell.percent())]%.")
else
to_chat(user, SPAN_NOTICE("It doesn't have a power cell installed."))
. += SPAN_NOTICE("It doesn't have a power cell installed.")
/obj/item/device/suit_cooling_unit/no_cell
celltype = null
+3 -3
View File
@@ -25,10 +25,10 @@
GLOB.listening_objects += src
. = ..()
/obj/item/device/tvcamera/examine(mob/user)
/obj/item/device/tvcamera/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "Video feed is currently: [camera.status ? "<span style='color: rgb(51, 204, 51);font-weight: bold;'>Online</span>" : "<span style='color: rgb(204, 0, 0); font-weight: bold;'>Offline</span>"]")
to_chat(user, "Audio feed is currently: [radio.get_broadcasting() ? "<span style='color: rgb(51, 204, 51); font-weight: bold;'>Online</span>" : "<span style='color: rgb(204, 0, 0); font-weight: bold;'>Offline</span>"]")
. += "Video feed is currently: [camera.status ? "<span style='color: rgb(51, 204, 51);font-weight: bold;'>Online</span>" : "<span style='color: rgb(204, 0, 0); font-weight: bold;'>Offline</span>"]"
. += "Audio feed is currently: [radio.get_broadcasting() ? "<span style='color: rgb(51, 204, 51); font-weight: bold;'>Online</span>" : "<span style='color: rgb(204, 0, 0); font-weight: bold;'>Offline</span>"]"
/obj/item/device/tvcamera/attack_self(mob/user)
add_fingerprint(user)