diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 0ab6803cb8e..1796cd487ef 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -279,9 +279,9 @@ dat += "" dat += "

Variant

" - dat += "" + dat += "" dat += "" - if(seed.variant != "") + if(seed.variant) dat += "" dat += "
[(seed.variant == "") ? "None" : seed.variant]
[seed.variant ? seed.variant : "None"]EditRemove
" else @@ -405,7 +405,7 @@ else if(href_list["del_v"]) if(!seed) return - seed.variant = "" + seed.variant = null seed.apply_variant_name() interact(usr) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 1438f70a6d7..e5d4f501c5d 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -42,7 +42,7 @@ seed.prepare_result(src) transform *= TRANSFORM_USING_VARIABLE(seed.potency, 100) + 0.5 //Makes the resulting produce's sprite larger or smaller based on potency! add_juice() - if(seed.variant && seed.variant != "") + if(seed.variant) name += " \[[seed.variant]]" /obj/item/reagent_containers/food/snacks/grown/Destroy() diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 356d35f8961..72117d41187 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -344,7 +344,7 @@ /obj/machinery/hydroponics/examine(user) . = ..() if(myseed) - if(myseed.variant != "") + if(myseed.variant) . += "It has the [myseed.variant] variant of [myseed.plantname] planted." else . += "It has [myseed.plantname] planted." diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index aa9393da0bf..c8f7395aa8c 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -339,11 +339,13 @@ if(!adj.Adjacent(user) || isnull(V)) return variant = copytext(sanitize(html_encode(trim(V))), 1, 64) + if(variant == "") + variant == null to_chat(user, "You [variant ? "change" : "remove"] the [plantname]'s variant designation.") apply_variant_name() /obj/item/seeds/proc/apply_variant_name() - var/V = (variant == "") ? "" : " \[[variant]]" // If we have a non-empty variant add it to the name + var/V = variant ? " \[[variant]]" : "" // If we have a non-empty variant add it to the name var/N = initial(name) if(copytext(name, 1, 13) == "experimental") // Don't delete 'experimental' N = "experimental " + N