mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
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:
@@ -535,29 +535,29 @@
|
||||
if (!mapload)
|
||||
addtimer(CALLBACK(src, PROC_REF(update)), 5, TIMER_UNIQUE)
|
||||
|
||||
/obj/machinery/power/apc/examine(mob/user, distance, is_adjacent)
|
||||
/obj/machinery/power/apc/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(distance <= 1)
|
||||
if(stat & BROKEN)
|
||||
to_chat(user, "Looks broken.")
|
||||
. += SPAN_WARNING("It looks broken.")
|
||||
return
|
||||
if(opened)
|
||||
if(has_electronics && terminal)
|
||||
to_chat(user, "The cover is [opened==COVER_REMOVED?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"].")
|
||||
. += "The cover is [opened==COVER_REMOVED?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
|
||||
else if (has_electronics == HAS_ELECTRONICS_NONE && terminal)
|
||||
to_chat(user, "There are some wires but not any electronics.")
|
||||
. += "There are some wires but not any electronics."
|
||||
else if (has_electronics != HAS_ELECTRONICS_NONE && !terminal)
|
||||
to_chat(user, "Electronics are installed but not wired.")
|
||||
. += "Electronics are installed but not wired."
|
||||
else /* if (has_electronics == HAS_ELECTRONICS_NONE && !terminal) */
|
||||
to_chat(user, "There are no electronics nor connected wires.")
|
||||
. += "There are no electronics nor connected wires."
|
||||
|
||||
else
|
||||
if (stat & MAINT)
|
||||
to_chat(user, "The cover is closed. Something wrong with it: it doesn't work.")
|
||||
. += SPAN_WARNING("The cover is closed. Something wrong with it: it doesn't work.")
|
||||
else if (hacker)
|
||||
to_chat(user, "The cover is locked.")
|
||||
. += "The cover is locked."
|
||||
else
|
||||
to_chat(user, "The cover is closed.")
|
||||
. += "The cover is closed."
|
||||
|
||||
|
||||
// update the APC icon to show the three base states
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
/obj/machinery/power/breakerbox/activated/LateInitialize()
|
||||
set_state(1)
|
||||
|
||||
/obj/machinery/power/breakerbox/examine(mob/user)
|
||||
/obj/machinery/power/breakerbox/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(on)
|
||||
to_chat(user, SPAN_GOOD("It seems to be online."))
|
||||
. += SPAN_GOOD("It seems to be online.")
|
||||
else
|
||||
to_chat(user, SPAN_BAD("It seems to be offline."))
|
||||
. += SPAN_BAD("It seems to be offline.")
|
||||
|
||||
/obj/machinery/power/breakerbox/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
|
||||
@@ -657,12 +657,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
w_class = ITEMSIZE_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/stack/cable_coil/examine(mob/user)
|
||||
/obj/item/stack/cable_coil/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(!uses_charge)
|
||||
to_chat(user, "There [src.amount == 1 ? "is" : "are"] <b>[src.amount]</b> [src.singular_name]\s of cable in the coil.")
|
||||
. += "There [src.amount == 1 ? "is" : "are"] <b>[src.amount]</b> [src.singular_name]\s of cable in the coil."
|
||||
else
|
||||
to_chat(user, "You have enough charge to produce <b>[get_amount()]</b>.")
|
||||
. += "You have enough charge to produce <b>[get_amount()]</b>."
|
||||
|
||||
/obj/item/stack/cable_coil/verb/make_restraint()
|
||||
set name = "Make Cable Restraints"
|
||||
|
||||
@@ -81,16 +81,18 @@
|
||||
return amount_used
|
||||
|
||||
|
||||
/obj/item/cell/examine(mob/user, distance, is_adjacent)
|
||||
/obj/item/cell/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
|
||||
if(distance > 1)
|
||||
return
|
||||
|
||||
if(maxcharge <= 2500)
|
||||
to_chat(user, "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge]J, and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%.")
|
||||
. += "[desc]"
|
||||
. += "The manufacturer's label states this cell has a power rating of [maxcharge]J, and that you should not swallow it."
|
||||
. += "The charge meter reads [round(src.percent() )]%."
|
||||
else
|
||||
to_chat(user, "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]J!\nThe charge meter reads [round(src.percent() )]%.")
|
||||
. += "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]J!"
|
||||
. += "The charge meter reads [round(src.percent() )]%."
|
||||
|
||||
/obj/item/cell/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/reagent_containers/syringe))
|
||||
|
||||
@@ -28,24 +28,24 @@
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light_construct/examine(mob/user, distance, is_adjacent)
|
||||
/obj/machinery/light_construct/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
switch(stage)
|
||||
if(1)
|
||||
to_chat(user, SPAN_NOTICE("It's an empty frame."))
|
||||
. += SPAN_NOTICE("It's an empty frame.")
|
||||
if(2)
|
||||
to_chat(user, SPAN_NOTICE("It's wired."))
|
||||
. += SPAN_NOTICE("It's wired.")
|
||||
if(3)
|
||||
to_chat(user, SPAN_NOTICE("The casing is closed."))
|
||||
. += SPAN_NOTICE("The casing is closed.")
|
||||
|
||||
if (cell_connectors)
|
||||
if (cell)
|
||||
to_chat(user, SPAN_NOTICE("You see [cell] inside the casing."))
|
||||
. += SPAN_NOTICE("You see [cell] inside the casing.")
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("The casing has no power cell installed."))
|
||||
. += SPAN_NOTICE("The casing has no power cell installed.")
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("This casing doesn't support a backup power cell."))
|
||||
. += SPAN_WARNING("This casing doesn't support a backup power cell.")
|
||||
|
||||
/obj/machinery/light_construct/attackby(obj/item/W, mob/living/user)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -383,19 +383,19 @@
|
||||
return TRUE
|
||||
|
||||
// examine verb
|
||||
/obj/machinery/light/examine(mob/user)
|
||||
/obj/machinery/light/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
switch(status)
|
||||
if(LIGHT_OK)
|
||||
to_chat(user, "It is turned [!(stat & POWEROFF) ? "on" : "off"].")
|
||||
. += "It is turned [!(stat & POWEROFF) ? "on" : "off"]."
|
||||
if(LIGHT_EMPTY)
|
||||
to_chat(user, "\The [fitting] has been removed.")
|
||||
. += "\The [fitting] has been removed."
|
||||
if(LIGHT_BURNED)
|
||||
to_chat(user, "\The [fitting] is burnt out.")
|
||||
. += "\The [fitting] is burnt out."
|
||||
if(LIGHT_BROKEN)
|
||||
to_chat(user, "\The [fitting] has been smashed.")
|
||||
. += "\The [fitting] has been smashed."
|
||||
if(cell)
|
||||
to_chat(user, "The charge meter reads [round((cell.charge / cell.maxcharge) * 100, 0.1)]%.")
|
||||
. += "The charge meter reads [round((cell.charge / cell.maxcharge) * 100, 0.1)]%."
|
||||
|
||||
// attack with item - insert light (if right type), otherwise try to break the light
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
icon_state = "[base_icon]_[active]"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/portgen/examine(mob/user, distance, is_adjacent)
|
||||
/obj/machinery/power/portgen/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
if(active)
|
||||
to_chat(user, SPAN_NOTICE("The generator is on."))
|
||||
. += SPAN_NOTICE("The generator is on.")
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("The generator is off."))
|
||||
. += SPAN_NOTICE("The generator is off.")
|
||||
|
||||
/obj/machinery/power/portgen/emp_act(severity)
|
||||
. = ..()
|
||||
@@ -159,12 +159,14 @@
|
||||
|
||||
power_gen = round(initial(power_gen) * (max(2, temp_rating) / 2))
|
||||
|
||||
/obj/machinery/power/portgen/basic/examine(mob/user, distance, is_adjacent)
|
||||
/obj/machinery/power/portgen/basic/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
to_chat(user, "\The [src] appears to be producing [power_gen*power_output] W.")
|
||||
to_chat(user, "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper.")
|
||||
if(IsBroken()) to_chat(user, SPAN_WARNING("\The [src] seems to have broken down."))
|
||||
if(overheating) to_chat(user, SPAN_DANGER("\The [src] is overheating!"))
|
||||
. += "\The [src] appears to be producing [power_gen*power_output] W."
|
||||
. += "There [sheets == 1 ? "is" : "are"] [sheets] sheet\s left in the hopper."
|
||||
if(IsBroken())
|
||||
. += SPAN_WARNING("\The [src] seems to have broken down.")
|
||||
if(overheating)
|
||||
. += SPAN_DANGER("\The [src] is overheating!")
|
||||
|
||||
/obj/machinery/power/portgen/basic/HasFuel()
|
||||
var/needed_sheets = power_output / time_per_sheet
|
||||
@@ -489,9 +491,9 @@
|
||||
create_reagents(coolant_volume)
|
||||
..()
|
||||
|
||||
/obj/machinery/power/portgen/basic/fusion/examine(mob/user, distance, is_adjacent)
|
||||
/obj/machinery/power/portgen/basic/fusion/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
to_chat(user, "The auxilary tank shows [reagents.total_volume]u of liquid in it.")
|
||||
. += "The auxilary tank shows [reagents.total_volume]u of liquid in it."
|
||||
|
||||
/obj/machinery/power/portgen/basic/fusion/UseFuel()
|
||||
if(reagents.has_reagent(coolant_reagent))
|
||||
|
||||
@@ -35,17 +35,17 @@
|
||||
|
||||
var/datum/effect_system/sparks/spark_system
|
||||
|
||||
/obj/machinery/power/emitter/examine(mob/user, distance, is_adjacent)
|
||||
/obj/machinery/power/emitter/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(EMITTER_LOOSE)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] isn't attached to anything and is not ready to fire."))
|
||||
. += SPAN_NOTICE("\The [src] isn't attached to anything and is not ready to fire.")
|
||||
if(EMITTER_BOLTED)
|
||||
to_chat(user, SPAN_NOTICE("\The [src] is bolted to the floor, but not yet ready to fire."))
|
||||
. += SPAN_NOTICE("\The [src] is bolted to the floor, but not yet ready to fire.")
|
||||
if(EMITTER_WELDED)
|
||||
to_chat(user, SPAN_WARNING("\The [src] is bolted and welded to the floor, and ready to fire."))
|
||||
. += SPAN_WARNING("\The [src] is bolted and welded to the floor, and ready to fire.")
|
||||
if(is_adjacent)
|
||||
to_chat(user, SPAN_NOTICE("The shot counter display reads: [shot_counter]"))
|
||||
. += SPAN_NOTICE("The shot counter display reads: [shot_counter] shots.")
|
||||
|
||||
/obj/machinery/power/emitter/Destroy()
|
||||
if(special_emitter)
|
||||
|
||||
@@ -83,20 +83,17 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
icon_state = "end_cap"
|
||||
reference = "end_cap"
|
||||
|
||||
/obj/structure/particle_accelerator/examine(mob/user)
|
||||
/obj/structure/particle_accelerator/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
switch(construction_state)
|
||||
if(0)
|
||||
desc = "[initial(desc)] Looks like it's not attached to the flooring."
|
||||
. += "Looks like it's not attached to the flooring."
|
||||
if(1)
|
||||
desc = "[initial(desc)] It's missing some cables."
|
||||
. += "It's missing some cables."
|
||||
if(2)
|
||||
desc = "[initial(desc)] The panel is open."
|
||||
. += "The panel is open."
|
||||
if(3)
|
||||
desc = "[initial(desc)] It seems completely assembled."
|
||||
if(powered)
|
||||
desc = initial(desc)
|
||||
. = ..()
|
||||
return
|
||||
. += "It seems completely assembled."
|
||||
|
||||
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user)
|
||||
if(istool(W))
|
||||
@@ -237,21 +234,17 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
|
||||
/obj/machinery/particle_accelerator/update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/particle_accelerator/examine(mob/user)
|
||||
/obj/machinery/particle_accelerator/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
switch(construction_state)
|
||||
if(0)
|
||||
desc = "[initial(desc)] Looks like it's not attached to the flooring."
|
||||
. += "Looks like it's not attached to the flooring."
|
||||
if(1)
|
||||
desc = "[initial(desc)] It's missing some cables."
|
||||
. += "It's missing some cables."
|
||||
if(2)
|
||||
desc = "[initial(desc)] The panel is open."
|
||||
. += "The panel is open."
|
||||
if(3)
|
||||
desc = "[initial(desc)] It seems completely assembled."
|
||||
if(powered)
|
||||
desc = initial(desc)
|
||||
. = ..()
|
||||
return
|
||||
|
||||
. += "It seems completely assembled."
|
||||
|
||||
/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user)
|
||||
if(istool(W))
|
||||
|
||||
@@ -123,17 +123,17 @@
|
||||
if(!should_be_mapped)
|
||||
warning("Non-buildable or Non-magical SMES at [src.x]X [src.y]Y [src.z]Z")
|
||||
|
||||
/obj/machinery/power/smes/examine(mob/user)
|
||||
/obj/machinery/power/smes/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(is_badly_damaged())
|
||||
to_chat(user, SPAN_DANGER("\The [src] is damaged to the point of non-function!"))
|
||||
. += SPAN_DANGER("\The [src] is damaged to the point of non-function!")
|
||||
if(open_hatch)
|
||||
to_chat(user, SPAN_SUBTLE("The maintenance hatch is open."))
|
||||
. += SPAN_SUBTLE("The maintenance hatch is open.")
|
||||
if (max_coils > 1 && Adjacent(user))
|
||||
var/list/coils = list()
|
||||
for(var/obj/item/smes_coil/C in component_parts)
|
||||
coils += C
|
||||
to_chat(user, "The [max_coils] coil slots contain: [counting_english_list(coils)]")
|
||||
. += "The [max_coils] coil slots contain: [counting_english_list(coils)]."
|
||||
|
||||
/obj/machinery/power/smes/proc/can_function()
|
||||
if(is_badly_damaged())
|
||||
|
||||
@@ -15,14 +15,12 @@
|
||||
var/ChargeCapacity = 5000000
|
||||
var/IOCapacity = 250000
|
||||
|
||||
/obj/item/smes_coil/examine(mob/user, distance, is_adjacent)
|
||||
/obj/item/smes_coil/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(is_adjacent)
|
||||
to_chat(user, "The label reads:\
|
||||
<div class='notice' style='padding-left:2rem'>Only certified professionals are allowed to handle and install this component.<br>\
|
||||
Charge capacity: [ChargeCapacity/1000000] MJ<br>\
|
||||
Input/Output rating: [IOCapacity/1000] kW</div>",
|
||||
trailing_newline = FALSE)
|
||||
. += "The label reads: Only certified professionals are allowed to handle and install this component."
|
||||
. += "Charge capacity: [ChargeCapacity/1000000] MJ."
|
||||
. += "Input/Output rating: [IOCapacity/1000] kW."
|
||||
|
||||
// 20% Charge Capacity, 60% I/O Capacity. Used for substation/outpost SMESs.
|
||||
/obj/item/smes_coil/weak
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/singularity/energy_ball/examine(mob/user)
|
||||
/obj/singularity/energy_ball/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
|
||||
. = ..()
|
||||
if(orbiting_balls.len)
|
||||
to_chat(user, "There are [orbiting_balls.len] energy balls orbiting \the [src].")
|
||||
. += "There are [orbiting_balls.len] energy balls orbiting \the [src]."
|
||||
|
||||
|
||||
/obj/singularity/energy_ball/proc/move_the_basket_ball(var/move_amount)
|
||||
|
||||
Reference in New Issue
Block a user