Fixed plant analyzer crash when the plant graft gives reagent gene, rather than trait gene [NO GBP] (#89089)

## About The Pull Request


![image](https://github.com/user-attachments/assets/3d4c5d7a-904c-4b63-a6c8-8c65e1a490da)

Didn't know that some plants have reagent traits defined for grafted
traits.

It didn't work because the trait_db contained only subtypes of
`/datum/plant_gene/trait`, but not `/datum/plant_gene/reagent`.

## Why It's Good For The Game

Fix

## Changelog

🆑
fix: Fixed plant analyzer UI crashing on plants that have a reagent gene
on their graft
fix: Plants with reagent traits in the graft now properly say the name
of the grafted reagent
/🆑
This commit is contained in:
Andrew
2025-01-17 18:21:40 -08:00
committed by GitHub
parent 1c8def7837
commit 0f24743cbb
7 changed files with 14 additions and 11 deletions
+2 -2
View File
@@ -268,10 +268,10 @@
var/list/data = list()
data["cycle_seconds"] = HYDROTRAY_CYCLE_DELAY / 10
data["trait_db"] = list()
for(var/datum/plant_gene/trait/trait as anything in GLOB.plant_traits)
for(var/datum/plant_gene/trait as anything in GLOB.plant_traits)
var/trait_data = list(list(
"path" = trait.type,
"name" = trait.name,
"name" = trait.get_name(),
"icon" = trait.icon,
"description" = trait.description
))