Merge pull request #10520 from Hatterhat/tg-40920

you like examining things? - port of tgstation 40920
This commit is contained in:
Ghom
2020-01-19 16:37:40 +01:00
committed by GitHub
38 changed files with 212 additions and 21 deletions
@@ -57,6 +57,11 @@
heat_capacity = initial(heat_capacity) / C
conduction_coefficient = initial(conduction_coefficient) * C
/obj/machinery/atmospherics/components/unary/cryo_cell/examine(mob/user) //this is leaving out everything but efficiency since they follow the same idea of "better matter bin, better results"
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Efficiency at <b>[efficiency*100]%</b>.</span>"
/obj/machinery/atmospherics/components/unary/cryo_cell/Destroy()
QDEL_NULL(radio)
QDEL_NULL(beaker)
@@ -66,10 +66,12 @@ God bless America.
oil_use = initial(oil_use) - (oil_efficiency * 0.0095)
fry_speed = oil_efficiency
/obj/machinery/deepfryer/examine()
/obj/machinery/deepfryer/examine(mob/user)
. = ..()
if(frying)
. += "You can make out \a [frying] in the oil."
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Frying at <b>[fry_speed*100]%</b> speed.<br>Using <b>[oil_use*10]</b> units of oil per second.</span>"
/obj/machinery/deepfryer/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/pill))
@@ -30,6 +30,14 @@
if(M.rating >= 2)
ignore_clothing = TRUE
/obj/machinery/gibber/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Outputting <b>[meat_produced]</b> meat slab(s) after <b>[gibtime*0.1]</b> seconds of processing.</span>"
for(var/obj/item/stock_parts/manipulator/M in component_parts)
if(M.rating >= 2)
. += "<span class='notice'>Gibber has been upgraded to process inorganic materials.</span>"
/obj/machinery/gibber/update_icon()
cut_overlays()
if (dirty)
@@ -1,6 +1,6 @@
/obj/machinery/monkey_recycler
name = "monkey recycler"
desc = "A machine used for recycling dead monkeys into monkey cubes. It currently produces 1 cube for every 5 monkeys inserted." // except it literally never does
desc = "A machine used for recycling dead monkeys into monkey cubes." // except it literally never does
icon = 'icons/obj/kitchen.dmi'
icon_state = "grinder"
layer = BELOW_OBJ_LAYER
@@ -22,7 +22,11 @@
cubes_made = M.rating
cube_production = cubes_made
required_grind = req_grind
src.desc = "A machine used for recycling dead monkeys into monkey cubes. It currently produces [cubes_made] cube(s) for every [required_grind] monkey(s) inserted."
/obj/machinery/monkey_recycler/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Producing <b>[cube_production]</b> cubes for every monkey inserted.</span>"
/obj/machinery/monkey_recycler/attackby(obj/item/O, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O))
@@ -21,6 +21,11 @@
for(var/obj/item/stock_parts/manipulator/M in component_parts)
rating_speed = M.rating
/obj/machinery/processor/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Outputting <b>[rating_amount]</b> item(s) at <b>[rating_speed*100]%</b> speed.</span>"
/obj/machinery/processor/proc/process_food(datum/food_processor_process/recipe, atom/movable/what)
if (recipe.output && loc && !QDELETED(src))
for(var/i = 0, i < rating_amount, i++)
@@ -33,6 +33,11 @@
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
max_n_of_items = 1500 * B.rating
/obj/machinery/smartfridge/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: This unit can hold a maximum of <b>[max_n_of_items]</b> items.</span>"
/obj/machinery/smartfridge/power_change()
..()
update_icon()
+6
View File
@@ -52,6 +52,12 @@
productivity = P
max_items = max_storage
/obj/machinery/biogenerator/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Productivity at <b>[productivity*100]%</b>.<br>Matter consumption reduced by <b>[(efficiency*25)-25]</b>%.<br>Machine can hold up to <b>[max_items]</b> pieces of produce.</span>"
/obj/machinery/biogenerator/on_reagent_change(changetype) //When the reagents change, change the icon as well.
update_icon()
+5
View File
@@ -46,6 +46,11 @@
maxwater = tmp_capacity * 50 // Up to 300
maxnutri = tmp_capacity * 5 // Up to 30
/obj/machinery/hydroponics/constructable/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Tray efficiency at <b>[rating*100]%</b>.</span>"
/obj/machinery/hydroponics/Destroy()
if(myseed)
qdel(myseed)
@@ -56,6 +56,11 @@
for(var/obj/item/stock_parts/manipulator/M in component_parts)
seed_multiplier = M.rating
/obj/machinery/seed_extractor/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Extracting <b>[seed_multiplier]</b> seed(s) per piece of produce.<br>Machine can store up to <b>[max_seeds]%</b> seeds.</span>"
/obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params)
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
+2
View File
@@ -103,6 +103,8 @@
. += "<span class='notice'>The generator has [sheets] units of [sheet_name] fuel left, producing [power_gen] per cycle.</span>"
if(crit_fail)
. += "<span class='danger'>The generator seems to have broken down.</span>"
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Fuel efficiency increased by <b>[(consumption*100)-100]%</b>.</span>"
/obj/machinery/power/port_gen/pacman/HasFuel()
if(sheets >= 1 / (time_per_sheet / power_output) - sheet_left)
+5
View File
@@ -36,6 +36,11 @@
power_gen = initial(power_gen) * part_level
/obj/machinery/power/rtg/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Power generation now at <b>[power_gen*0.001]</b>kW.</span>"
/obj/machinery/power/rtg/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-open", initial(icon_state), I))
return
@@ -68,6 +68,11 @@
sparks.attach(src)
sparks.set_up(1, TRUE, src)
/obj/machinery/power/emitter/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Emitting one beam each <b>[fire_delay*0.1]</b> seconds.<br>Power consumption at <b>[active_power_usage]W</b>.</span>"
/obj/machinery/power/emitter/ComponentInitialize()
. = ..()
AddComponent(/datum/component/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES)
+5
View File
@@ -36,6 +36,11 @@
zap_cooldown -= (C.rating * 20)
input_power_multiplier = power_multiplier
/obj/machinery/power/tesla_coil/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Power generation at <b>[input_power_multiplier*100]%</b>.<br>Shock interval at <b>[zap_cooldown*0.1]</b> seconds.</span>"
/obj/machinery/power/tesla_coil/on_construction()
if(anchored)
connect_to_network()
+10
View File
@@ -94,6 +94,11 @@
E += M.rating
efficiency = E / 6
/obj/machinery/power/compressor/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Efficiency at <b>[efficiency*100]%</b>.</span>"
/obj/machinery/power/compressor/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I))
return
@@ -176,6 +181,11 @@
P += C.rating
productivity = P / 6
/obj/machinery/power/turbine/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Productivity at <b>[productivity*100]%</b>.</span>"
/obj/machinery/power/turbine/locate_machinery()
if(compressor)
return
@@ -113,7 +113,9 @@
if(panel_open)
. += "<span class='notice'>[src]'s maintenance hatch is open!</span>"
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: <br>Recharging <b>[recharge_amount]</b> power units per interval.<br>Power efficiency increased by <b>[(powerefficiency*1000)-100]%</b>.<span>"
. += "<span class='notice'>The status display reads:\n\
Recharging <b>[recharge_amount]</b> power units per interval.\n\
Power efficiency increased by <b>[round((powerefficiency*1000)-100, 1)]%</b>.</span>"
switch(macrotier)
if(1)
. += "<span class='notice'>Macro granularity at <b>5u</b>.<span>"
@@ -52,6 +52,11 @@
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
heater_coefficient *= M.rating
/obj/machinery/chem_heater/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Heating reagents at <b>[heater_coefficient*1000]%</b> speed.</span>"
/obj/machinery/chem_heater/process()
..()
if(stat & NOPOWER)
+5
View File
@@ -82,6 +82,11 @@
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
badThingCoeff += M.rating
/obj/machinery/rnd/experimentor/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Malfunction probability reduced by <b>[badThingCoeff]%</b>.<br>Cooldown interval between experiments at <b>[resetTime*0.1]</b> seconds.</span>"
/obj/machinery/rnd/experimentor/proc/checkCircumstances(obj/item/O)
//snowflake check to only take "made" bombs
if(istype(O, /obj/item/transfer_valve))
@@ -73,6 +73,12 @@
total_rating = max(1, total_rating)
efficiency_coeff = total_rating
/obj/machinery/rnd/production/examine(mob/user)
. = ..()
var/datum/component/remote_materials/materials = GetComponent(/datum/component/remote_materials)
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Storing up to <b>[materials.local_size]</b> material units locally.<br>Material usage efficiency at <b>[efficiency_coeff*100]%</b>.</span>"
//we eject the materials upon deconstruction.
/obj/machinery/rnd/production/on_deconstruction()
for(var/obj/item/reagent_containers/glass/G in component_parts)
@@ -29,6 +29,11 @@
for(var/obj/item/stock_parts/scanning_module/P in component_parts)
scan_level += P.rating
/obj/machinery/nanite_chamber/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Scanning module has been upgraded to level <b>[scan_level]</b>.</span>"
/obj/machinery/nanite_chamber/proc/set_busy(status, message, working_icon)
busy = status
busy_message = message