Plant Analyzer UX Revamp (#92667)

## About The Pull Request

<img width="1300" height="706" alt="image"
src="https://github.com/user-attachments/assets/c7971eab-6af3-4fea-94f5-b76104696b73"
/>

1. Chems are no longer hidden in an icon's tooltip. There is a separate
tab for chems. Right clicking to do a chem scan will pull up the chem
tab, but you can also just use the two buttons at the top - Closes
#91172

2. You no longer need to repeatedly scan a tray to update the UI.
Standing adjacent to a scanned tray will update it regularly.

3. Units have been redefined from pure seconds to minutes/seconds where
applicable.

4. The report has been swapped around, with tray on top and plant on
bottom.

5. The nutrient bar is now colored based on contents of the tray. It no
longer has a tooltip listing the tray's contents, that's now in the
chemicals tab.

6. Auto-grow, pollinating, and yield modifier icons have been brought
center below the tray, instead of in the top right section. They now
change color to make it more apparent at a glance.

7. Traits have been moved from icons to a collapsible list at the bottom
of the UI, and are now printed entirely. They still have tooltips
explaining what they do.

8. Grafted gene was moved center below the plant, and is now printed
entirely.

9. Mutations have been moved to a collapsible list center below the
plant.

10. Plants now indicate if they are dead in the UI.

11. Scanning produce now lists all the chemicals inside it on top of all
the chemicals it produces. - Closes #89443, Closes #90793

12. Restores lost behavior of seed unique data - Closes #90706

Also

13. Added Hydroponics to Runtime station

14. Added screentip for dumping reagents from hydro-trays

## Why It's Good For The Game

While I was initially supportive of the move to a plant analyzer UI it
was undeniable it was a huge UX stepdown from printing results to chat.

This PR aims to bring back some of those lost UX features by making more
information visible at a glance (instead of requiring memorization of
mystery meat icons or hovering over many elements to find information
hidden in tooltips)

I know it's a little bit of a mess with the colors and layout, I planned
on doing a whole custom css and layout and such but I kinda just wanted
to get it out.

## Changelog

🆑 Melbert
qol: Plant analyzer: Scanning a tray will regularly update the UI with
the tray's information while you stand adjacent to it, no longer
requiring you re-scan the tray to update it.
qol: Plant analyzer: UI is now split between chems and stats - RMB will
open directly to the chem tab.
qol: Plant analyzer: UI received several UX changes - listing out more
information at a glance, rather than behind tooltips or icons
fix: Plant analyzer: Chem scanning plants now shows the plant's current
chemical contents once again (on top of their genes)
fix: Plant analyzer: Unique seed data (kudzu mutation, replica pod dna)
is shown again
qol: Added hydroponics to runtime station
qol: Added screentip to hydroponic trays for clearing reagents
/🆑
This commit is contained in:
MrMelbert
2025-09-02 18:57:41 -07:00
committed by GitHub
parent 0001c4a5eb
commit d2b92afe55
12 changed files with 857 additions and 269 deletions
+3 -4
View File
@@ -106,11 +106,10 @@
sampleDNA = null
contains_sample = FALSE
/obj/item/seeds/replicapod/get_unique_analyzer_text()
/obj/item/seeds/replicapod/get_unique_analyzer_data()
if(contains_sample)
return "It contains a blood sample with blood DNA (UE) \"[sampleDNA]\"." //blood DNA (UE) shows in medical records and is readable by forensics scanners
else
return null
return list("Blood DNA" = sampleDNA)
return null
/obj/item/seeds/replicapod/harvest(mob/user) //now that one is fun -- Urist
var/obj/machinery/hydroponics/parent = loc
@@ -50,13 +50,12 @@
plant(user)
to_chat(user, span_notice("You plant the kudzu. You monster."))
/obj/item/seeds/kudzu/get_unique_analyzer_text()
var/kudzu_mutations = ""
var/output_message = ""
for(var/datum/spacevine_mutation/SM in mutations)
kudzu_mutations += "[(kudzu_mutations == "") ? "" : ", "][SM.name]"
output_message += "Plant Mutations: [(kudzu_mutations == "") ? "None." : "[kudzu_mutations]."]"
return output_message
/obj/item/seeds/kudzu/get_unique_analyzer_data()
var/list/all_mutations = list()
for(var/datum/spacevine_mutation/vine_trait in mutations)
all_mutations[vine_trait.name] = vine_trait.description
return list("Kudzu Traits" = all_mutations)
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/reagents)
var/list/temp_mut_list = list()
+3 -3
View File
@@ -111,16 +111,16 @@
if(HAS_SILICON_ACCESS(user))
return NONE
context[SCREENTIP_CONTEXT_RMB] = "Empty nutrients"
switch(plant_status)
if(HYDROTRAY_PLANT_DEAD)
context[SCREENTIP_CONTEXT_LMB] = "Remove dead plant"
return CONTEXTUAL_SCREENTIP_SET
if(HYDROTRAY_PLANT_HARVESTABLE)
context[SCREENTIP_CONTEXT_LMB] = "Harvest plant"
return CONTEXTUAL_SCREENTIP_SET
return NONE
return CONTEXTUAL_SCREENTIP_SET
// If the plant is harvestable, we can graft it with secateurs or harvest it with a plant bag.
if(plant_status == HYDROTRAY_PLANT_HARVESTABLE)
+4 -2
View File
@@ -452,9 +452,11 @@
/**
* Override for seeds with unique text for their analyzer. (No newlines at the start or end of unique text!)
* Returns null if no unique text, or a string of text if there is.
* Returns null if no unique data
* Return an assoc list (label = text) to add a new line to the analyzer
* Return an assoc list (label = list(text = tooltip, text = tooltip)) to add a new collapsible section to the analyzer
*/
/obj/item/seeds/proc/get_unique_analyzer_text()
/obj/item/seeds/proc/get_unique_analyzer_data()
return null
/**