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
+5 -5
View File
@@ -44,15 +44,15 @@
var/mutable_appearance/lid = mutable_appearance(icon, lid_icon)
add_overlay(lid)
/obj/item/reagent_containers/chem_disp_cartridge/examine(mob/user)
/obj/item/reagent_containers/chem_disp_cartridge/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "It has a capacity of [volume] units.")
. += "It has a capacity of [volume] units."
if(reagents.total_volume <= 0)
to_chat(user, "It is empty.")
. += "It is empty."
else
to_chat(user, "It contains [reagents.total_volume] units of liquid.")
. += "It contains [reagents.total_volume] units of liquid."
if(!is_open_container())
to_chat(user, "The cap is sealed.")
. += "The cap is sealed."
/obj/item/reagent_containers/chem_disp_cartridge/verb/verb_set_label(L as text)
set name = "Set Cartridge Label"
@@ -39,9 +39,9 @@
for(var/type in spawn_cartridges)
add_cartridge(new type(src))
/obj/machinery/chemical_dispenser/examine(mob/user)
/obj/machinery/chemical_dispenser/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
to_chat(user, "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more.")
. += "It has [cartridges.len] cartridges installed, and has space for [DISPENSER_MAX_CARTRIDGES - cartridges.len] more."
/obj/machinery/chemical_dispenser/proc/add_cartridge(obj/item/reagent_containers/chem_disp_cartridge/C, mob/user)
if(!istype(C))
@@ -155,11 +155,10 @@
attached_mob = null
STOP_PROCESSING(SSprocessing, src)
/obj/item/reagent_containers/blood/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/blood/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if (distance <= 2 && vampire_marks)
to_chat(user, SPAN_WARNING("There are teeth marks on it."))
return
. += SPAN_WARNING("There are sharp, canine-like teeth marks on it.")
/obj/item/reagent_containers/blood/attackby(obj/item/P as obj, mob/user as mob)
..()
@@ -126,14 +126,13 @@
to_chat(usr, SPAN_NOTICE("Synthesizer is now producing '[R.name]'."))
update_icon()
/obj/item/reagent_containers/hypospray/borghypo/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/hypospray/borghypo/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if (distance > 2)
return
var/singleton/reagent/R = GET_SINGLETON(reagent_ids[mode])
to_chat(user, SPAN_NOTICE("It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left."))
. += SPAN_NOTICE("It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.")
/obj/item/reagent_containers/hypospray/borghypo/service
name = "cyborg drink synthesizer"
@@ -102,12 +102,12 @@
worn_overlay = null
update_held_icon()
/obj/item/reagent_containers/dropper/examine(mob/user)
/obj/item/reagent_containers/dropper/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(LAZYLEN(reagents.reagent_volumes))
to_chat(user, SPAN_NOTICE("\The [src] is holding [reagents.total_volume] units out of [volume]. Current transfer is [amount_per_transfer_from_this] units."))
. += SPAN_NOTICE("\The [src] is holding [reagents.total_volume] units out of [volume]. Current transfer is [amount_per_transfer_from_this] units.")
else
to_chat(user, SPAN_NOTICE("It is empty."))
. += SPAN_NOTICE("It is empty.")
/obj/item/reagent_containers/dropper/electronic_pipette
name = "electronic pipette"
@@ -84,20 +84,20 @@ If you add a drink with an empty icon sprite, ensure it is in the same folder, e
return 1
return ..()
/obj/item/reagent_containers/food/drinks/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/food/drinks/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if (distance > 1)
return
if(!reagents || reagents.total_volume == 0)
to_chat(user, "<span class='notice'>\The [src] is empty!</span>")
. += "<span class='notice'>\The [src] is empty!</span>"
else if (reagents.total_volume <= volume * 0.25)
to_chat(user, "<span class='notice'>\The [src] is almost empty!</span>")
. += "<span class='notice'>\The [src] is almost empty!</span>"
else if (reagents.total_volume <= volume * 0.66)
to_chat(user, "<span class='notice'>\The [src] is half full!</span>")
. += "<span class='notice'>\The [src] is half full!</span>"
else if (reagents.total_volume <= volume * 0.90)
to_chat(user, "<span class='notice'>\The [src] is almost full!</span>")
. += "<span class='notice'>\The [src] is almost full!</span>"
else
to_chat(user, "<span class='notice'>\The [src] is full!</span>")
. += "<span class='notice'>\The [src] is full!</span>"
////////////////////////////////////////////////////////////////////////////////
@@ -69,10 +69,10 @@
QDEL_LIST(ingredients)
return ..()
/obj/item/reagent_containers/food/snacks/csandwich/examine(mob/user)
/obj/item/reagent_containers/food/snacks/csandwich/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
var/obj/item/O = pick(contents)
to_chat(user, SPAN_NOTICE("You think you can see [O.name] in there."))
. += SPAN_NOTICE("You think you can see [O.name] in there.")
/obj/item/reagent_containers/food/snacks/csandwich/roll
name = "roll"
@@ -141,21 +141,21 @@
return 1
/obj/item/reagent_containers/food/snacks/examine(mob/user, distance)
/obj/item/reagent_containers/food/snacks/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance > 1)
return
if (coating)
var/singleton/reagent/coating_reagent = GET_SINGLETON(coating)
to_chat(user, SPAN_NOTICE("It's coated in [coating_reagent.name]!"))
if (bitecount==0)
. += SPAN_NOTICE("It's coated in [coating_reagent.name]!")
if (!bitecount)
return
else if (bitecount==1)
to_chat(user, SPAN_NOTICE("\The [src] was bitten by someone!"))
. += SPAN_NOTICE("\The [src] was bitten by someone!")
else if (bitecount<=3)
to_chat(user, SPAN_NOTICE("\The [src] was bitten [bitecount] time\s!"))
. += SPAN_NOTICE("\The [src] was bitten [bitecount] time\s!")
else
to_chat(user, SPAN_NOTICE("\The [src] was bitten multiple times!"))
. += SPAN_NOTICE("\The [src] was bitten multiple times!")
/obj/item/reagent_containers/food/snacks/attackby(obj/item/W, mob/living/user)
@@ -24,27 +24,27 @@
. = ..()
AddComponent(/datum/component/base_name, name)
/obj/item/reagent_containers/glass/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/glass/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance > 2)
return
if(LAZYLEN(reagents.reagent_volumes))
to_chat(user, SPAN_NOTICE("It contains [round(reagents.total_volume, accuracy)] units of a reagent."))
. += SPAN_NOTICE("It contains [round(reagents.total_volume, accuracy)] units of a reagent.")
for(var/_T in reagents.reagent_volumes)
var/singleton/reagent/T = GET_SINGLETON(_T)
if(T.reagent_state == LIQUID)
to_chat(user, SPAN_NOTICE("You see something liquid in the beaker."))
. += SPAN_NOTICE("You see something liquid in the beaker.")
break // to stop multiple messages of this
if(T.reagent_state == GAS)
to_chat(user, SPAN_NOTICE("You see something gaseous in the beaker."))
. += SPAN_NOTICE("You see something gaseous in the beaker.")
break
if(T.reagent_state == SOLID)
to_chat(user, SPAN_NOTICE("You see something solid in the beaker."))
. += SPAN_NOTICE("You see something solid in the beaker.")
break
else
to_chat(user, SPAN_NOTICE("It is empty."))
. += SPAN_NOTICE("It is empty.")
if(!is_open_container())
to_chat(user, SPAN_NOTICE("An airtight lid seals it completely."))
. += SPAN_NOTICE("An airtight lid seals it completely.")
/obj/item/reagent_containers/glass/get_additional_forensics_swab_info()
var/list/additional_evidence = ..()
@@ -187,12 +187,12 @@
add_overlay(reagent_overlay)
update_held_icon()
/obj/item/reagent_containers/hypospray/autoinjector/examine(mob/user)
/obj/item/reagent_containers/hypospray/autoinjector/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(LAZYLEN(reagents.reagent_volumes))
to_chat(user, SPAN_NOTICE("It is currently loaded."))
. += SPAN_NOTICE("It is currently loaded.")
else
to_chat(user, SPAN_NOTICE("It is empty."))
. += SPAN_NOTICE("It is empty.")
/obj/item/reagent_containers/hypospray/autoinjector/inaprovaline
@@ -146,12 +146,12 @@
add_overlay(reagent_overlay)
update_held_icon()
/obj/item/reagent_containers/inhaler/examine(mob/user)
/obj/item/reagent_containers/inhaler/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(LAZYLEN(reagents.reagent_volumes))
to_chat(user, "<span class='notice'>It is currently loaded.</span>")
. += "<span class='notice'>It is currently loaded.</span>"
else
to_chat(user, "<span class='notice'>It is spent.</span>")
. += "<span class='notice'>It is spent.</span>"
/obj/item/reagent_containers/inhaler/dexalin
name_label = "dexalin"
@@ -32,7 +32,7 @@
filling.color = reagents.get_color()
add_overlay(filling)
/obj/item/reagent_containers/personal_inhaler_cartridge/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/personal_inhaler_cartridge/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if (distance > 2)
@@ -40,14 +40,14 @@
if(is_open_container())
if(LAZYLEN(reagents.reagent_volumes))
to_chat(user,"<span class='notice'>It contains [round(reagents.total_volume, accuracy)] units of non-aerosol mix.</span>")
. += "<span class='notice'>It contains [round(reagents.total_volume, accuracy)] units of non-aerosol mix.</span>"
else
to_chat(user,"<span class='notice'>It is empty.</span>")
. += "<span class='notice'>It is empty.</span>"
else
if(LAZYLEN(reagents.reagent_volumes))
to_chat(user,"<span class='notice'>The reagents are secured in the aerosol mix.</span>")
. += "<span class='notice'>The reagents are secured in the aerosol mix.</span>"
else
to_chat(user,"<span class='notice'>The cartridge seems spent.</span>")
. += "<span class='notice'>The cartridge seems spent.</span>"
/obj/item/reagent_containers/personal_inhaler_cartridge/attack_self(mob/user as mob)
if(is_open_container())
@@ -101,12 +101,12 @@
origin_tech = list(TECH_BIO = 2, TECH_MATERIAL = 2)
var/eject_when_empty = FALSE
/obj/item/personal_inhaler/examine(mob/user, distance, is_adjacent)
/obj/item/personal_inhaler/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance > 2)
return
if(stored_cartridge)
to_chat(user,"<span class='notice'>\The [stored_cartridge] is attached to \the [src].</span>")
. += "<span class='notice'>\The [stored_cartridge] is attached to \the [src].</span>"
/obj/item/personal_inhaler/update_icon()
cut_overlays()
@@ -113,10 +113,10 @@
spray_size = next_in_list(spray_size, spray_sizes)
to_chat(user, SPAN_NOTICE("You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray, with a [spray_size] lane spray."))
/obj/item/reagent_containers/spray/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/spray/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(is_adjacent)
to_chat(user, "[round(reagents.total_volume)] units left.")
. += "[round(reagents.total_volume)] units left."
/obj/item/reagent_containers/spray/verb/empty()
@@ -171,10 +171,10 @@
safety = 1
reagents_to_add = list(/singleton/reagent/capsaicin/condensed = 40)
/obj/item/reagent_containers/spray/pepper/examine(mob/user, distance, is_adjacent)
/obj/item/reagent_containers/spray/pepper/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(is_adjacent)
to_chat(user, "The safety is [safety ? "on" : "off"].")
. += "The safety is [safety ? "on" : "off"]."
/obj/item/reagent_containers/spray/pepper/AltClick()
return //No altclick functionality for pepper spray
@@ -15,7 +15,7 @@
drop_sound = 'sound/items/drop/backpack.ogg'
pickup_sound = 'sound/items/pickup/backpack.ogg'
/obj/item/reagent_containers/weldpack/examine(mob/user, distance)
/obj/item/reagent_containers/weldpack/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(ishuman(loc) && user != loc) // what if we want to sneak some reagents out of somewhere?
return
@@ -23,9 +23,9 @@
var/fuel_volume = REAGENT_VOLUME(reagents, /singleton/reagent/fuel)
if(!fuel_volume)
fuel_volume = 0
to_chat(user, SPAN_NOTICE("\The [src] has [reagents.total_volume]u of reagents in it, <b>[fuel_volume]u</b> of which is fuel."))
. += SPAN_NOTICE("\The [src] has [reagents.total_volume]u of reagents in it, <b>[fuel_volume]u</b> of which is fuel.")
else
to_chat(user, SPAN_WARNING("\The [src] is empty!"))
. += SPAN_WARNING("\The [src] is empty!")
/obj/item/reagent_containers/weldpack/attackby(obj/item/W, mob/user)
if(W.iswrench())
+5 -5
View File
@@ -21,11 +21,11 @@
src.verbs -= /obj/structure/reagent_dispensers/verb/set_APTFT
desc_info = ""
/obj/structure/reagent_dispensers/examine(mob/user, distance, is_adjacent)
/obj/structure/reagent_dispensers/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance > 2)
return
to_chat(user,"<span class='notice'>It contains [reagents.total_volume] units of reagents.</span>")
. += "<span class='notice'>It contains [reagents.total_volume] units of reagents.</span>"
/obj/structure/reagent_dispensers/verb/set_APTFT() //set amount_per_transfer_from_this
set name = "Set transfer amount"
@@ -128,14 +128,14 @@
var/obj/item/device/assembly_holder/rig = null
reagents_to_add = list(/singleton/reagent/fuel = 1000)
/obj/structure/reagent_dispensers/fueltank/examine(mob/user, distance, is_adjacent)
/obj/structure/reagent_dispensers/fueltank/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
if(distance > 2)
return
if (is_leaking)
to_chat(user, "<span class='warning'>Fuel faucet is wrenched open, leaking the fuel!</span>")
. += "<span class='warning'>Fuel faucet is wrenched open, leaking the fuel!</span>"
if(rig)
to_chat(user, "<span class='notice'>There is some kind of device rigged to the tank.</span>")
. += "<span class='notice'>There is some kind of device rigged to the tank.</span>"
/obj/structure/reagent_dispensers/fueltank/attack_hand(mob/user)
if (rig)