diff --git a/code/__DEFINES/botany.dm b/code/__DEFINES/botany.dm index d2e4d4e739c..f5c20b91c05 100644 --- a/code/__DEFINES/botany.dm +++ b/code/__DEFINES/botany.dm @@ -3,6 +3,7 @@ #define YIELD_WEED_MINIMUM 3 #define YIELD_WEED_MAXIMUM 10 #define STATIC_NUTRIENT_CAPACITY 10 +#define GENE_SHEAR_MIN_HEALTH 15 //Both available scanning modes for the plant analyzer. #define PLANT_SCANMODE_STATS 0 diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 90c86cbbd7b..569b62d4268 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -657,7 +657,7 @@ if(!myseed) to_chat(user, "The tray is empty.") return - if(plant_health <= 15) + if(plant_health <= GENE_SHEAR_MIN_HEALTH) to_chat(user, "This plant looks too unhealty to be sheared right now.") return @@ -673,6 +673,10 @@ return if(!user.canUseTopic(src, BE_CLOSE)) return + if(!myseed) + return + if(plant_health <= GENE_SHEAR_MIN_HEALTH) //Check health again to make sure they're not keeping inputs open to get free shears. + return for(var/datum/plant_gene/gene in myseed.genes) if(gene.name == removed_trait) if(myseed.genes.Remove(gene))