From 8a0a0cc2c98ceb456ca2cf7be208718b64c71434 Mon Sep 17 00:00:00 2001 From: Phantastic-Swan Date: Thu, 2 Jul 2026 00:42:51 +0200 Subject: [PATCH] Plant Analyzer chemical tab bluescreen fix on starthistle seeds (#96669) ## About The Pull Request When scanning the chemical contents of the starthistle seeds and corpse flowers, the plant analyzer TGUI menu threw a bluescreen related to a null list. This PR fixes that. The actual problem was that in `code/game/objects/items/devices/scanners/plant_analyzer.dm:285`, `make_seed_data` proc which was responsible for collecting seed data to send to the TGUI only ever initialized the `distill_reagent`, `juice_name` and `grind_results` list entries when the plant had a produce - which starthistles and corpse flowers do not have. I fixed it by simply initializing these 2 entries as empty at the beginning of the proc. ## Why It's Good For The Game Fixes a UI bluescreen. Before: image Upon opening the chemical tab of the plant analyzer when analyzing corpse flowers, the tab bluescreens. After: image The chemical tab not bluescreening. --- code/game/objects/items/devices/scanners/plant_analyzer.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/objects/items/devices/scanners/plant_analyzer.dm b/code/game/objects/items/devices/scanners/plant_analyzer.dm index 4adfec93629..97bd1630d63 100644 --- a/code/game/objects/items/devices/scanners/plant_analyzer.dm +++ b/code/game/objects/items/devices/scanners/plant_analyzer.dm @@ -303,6 +303,9 @@ ) seed_data["removable_traits"] = list() seed_data["core_traits"] = list() + seed_data["distill_reagent"] = "" + seed_data["juice_name"] = "" + seed_data["grind_results"] = list() for(var/datum/plant_gene/trait/trait in seed.genes) if(trait.mutability_flags & PLANT_GENE_REMOVABLE) seed_data["removable_traits"] += trait.type