mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Refactors the examine proc to return a list of strings (#12280)
This commit is contained in:
committed by
variableundefined
parent
40a4cd1b75
commit
0e8ddb2afe
@@ -105,11 +105,11 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/chem_dispenser/examine(mob/user)
|
||||
..()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>[src]'s maintenance hatch is open!</span>")
|
||||
. += "<span class='notice'>[src]'s maintenance hatch is open!</span>"
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
to_chat(user, "<span class='notice'>The status display reads: <br>Recharging <b>[recharge_amount]</b> power units per interval.<br>Power efficiency increased by <b>[round((powerefficiency * 1000) - 100, 1)]%</b>.<span>")
|
||||
. += "<span class='notice'>The status display reads: <br>Recharging <b>[recharge_amount]</b> power units per interval.<br>Power efficiency increased by <b>[round((powerefficiency * 1000) - 100, 1)]%</b>.<span>"
|
||||
|
||||
|
||||
/obj/machinery/chem_dispenser/process()
|
||||
|
||||
@@ -102,16 +102,15 @@
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/borghypo/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
var/empty = TRUE
|
||||
|
||||
var/empty = 1
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
. += "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>"
|
||||
empty = FALSE
|
||||
|
||||
for(var/datum/reagents/RS in reagent_list)
|
||||
var/datum/reagent/R = locate() in RS.reagent_list
|
||||
if(R)
|
||||
to_chat(user, "<span class='notice'>It currently has [R.volume] units of [R.name] stored.</span>")
|
||||
empty = 0
|
||||
|
||||
if(empty)
|
||||
to_chat(user, "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>")
|
||||
if(empty)
|
||||
. += "<span class='notice'>It is currently empty. Allow some time for the internal syntheszier to produce more.</span>"
|
||||
|
||||
@@ -51,10 +51,9 @@
|
||||
base_name = name
|
||||
|
||||
/obj/item/reagent_containers/glass/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
if(!is_open_container())
|
||||
to_chat(user, "<span class='notice'>Airtight lid seals it completely.</span>")
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2 && !is_open_container())
|
||||
. += "<span class='notice'>Airtight lid seals it completely.</span>"
|
||||
|
||||
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, def_zone)
|
||||
if(!is_open_container())
|
||||
|
||||
@@ -122,11 +122,11 @@
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/examine()
|
||||
..()
|
||||
. = ..()
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
to_chat(usr, "<span class='notice'>It is currently loaded.</span>")
|
||||
. += "<span class='notice'>It is currently loaded.</span>"
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>It is spent.</span>")
|
||||
. += "<span class='notice'>It is spent.</span>"
|
||||
|
||||
/obj/item/reagent_containers/hypospray/autoinjector/teporone //basilisks
|
||||
name = "teporone autoinjector"
|
||||
|
||||
@@ -83,8 +83,9 @@
|
||||
to_chat(user, "<span class='notice'>You [amount_per_transfer_from_this == 10 ? "remove" : "fix"] the nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
|
||||
|
||||
/obj/item/reagent_containers/spray/examine(mob/user)
|
||||
if(..(user, 0) && user == loc)
|
||||
to_chat(user, "[round(reagents.total_volume)] units left.")
|
||||
. = ..()
|
||||
if(get_dist(user, src) && user == loc)
|
||||
. += "[round(reagents.total_volume)] units left."
|
||||
|
||||
/obj/item/reagent_containers/spray/verb/empty()
|
||||
|
||||
|
||||
@@ -116,10 +116,9 @@
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
if(rig)
|
||||
to_chat(usr, "<span class='notice'>There is some kind of device rigged to the tank.</span>")
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2 && rig)
|
||||
. += "<span class='notice'>There is some kind of device rigged to the tank.</span>"
|
||||
|
||||
/obj/structure/reagent_dispensers/fueltank/attack_hand()
|
||||
if(rig)
|
||||
@@ -224,9 +223,9 @@
|
||||
var/paper_cups = 25 //Paper cups left from the cooler
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/examine(mob/user)
|
||||
if(!..(user, 2))
|
||||
return
|
||||
to_chat(user, "There are [paper_cups ? paper_cups : "no"] paper cups left.")
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
. += "There are [paper_cups ? paper_cups : "no"] paper cups left."
|
||||
|
||||
/obj/structure/reagent_dispensers/water_cooler/attack_hand(mob/living/user)
|
||||
if(!paper_cups)
|
||||
|
||||
Reference in New Issue
Block a user