Deletes unused hydroponics code (#80156)

## About The Pull Request

`/obj/item/seeds/sample` was completely unused, ever since it's
inception in #16082
(https://github.com/tgstation/tgstation/pull/16082/commits/d513f52244e07263d32e402e9de3f92cc25403a9)
as far as I can tell

(Me when "adds plant samples for future use" never makes use of them in
the future)

All this does is complicate hydro code so it dies. 
Anything it is doing should be handled by genes probably

While I was here I made sure nothing in `can_add` will break and touched
up the code a tiny tiny bit. I kept it as `SHOULD_CALL_PARENT` even
though it doesn't make use of it at the moment because every trait
currently calls parent / respects return value, so sure, why not

## Changelog

Not necessary
This commit is contained in:
MrMelbert
2023-12-06 19:58:26 -07:00
committed by GitHub
parent 5af1479406
commit bb5165100b
6 changed files with 6 additions and 28 deletions
+1 -1
View File
@@ -900,7 +900,7 @@
reagent_source.update_appearance()
return 1
else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample))
else if(istype(O, /obj/item/seeds))
if(!myseed)
if(istype(O, /obj/item/seeds/kudzu))
investigate_log("had Kudzu planted in it by [key_name(user)] at [AREACOORD(src)].", INVESTIGATE_BOTANY)
+4 -4
View File
@@ -23,7 +23,8 @@
* Returns TRUE if the seed can take the gene, and FALSE otherwise.
*/
/datum/plant_gene/proc/can_add(obj/item/seeds/our_seed)
return !istype(our_seed, /obj/item/seeds/sample) // Samples can't accept new genes.
SHOULD_CALL_PARENT(TRUE)
return TRUE
/// Copies over vars and information about our current gene to a new gene and returns the new instance of gene.
/datum/plant_gene/proc/Copy()
@@ -151,9 +152,8 @@
if(!.)
return FALSE
for(var/obj/item/seeds/found_seed as anything in seed_blacklist)
if(istype(source_seed, found_seed))
return FALSE
if(is_type_in_list(source_seed, seed_blacklist))
return FALSE
for(var/datum/plant_gene/trait/trait in source_seed.genes)
if(trait_ids & trait.trait_ids)
-21
View File
@@ -1,21 +0,0 @@
/obj/item/seeds/sample
name = "plant sample"
icon_state = "sample-empty"
potency = -1
yield = -1
var/sample_color = "#FFFFFF"
/obj/item/seeds/sample/Initialize(mapload)
. = ..()
if(sample_color)
var/mutable_appearance/filling = mutable_appearance(icon, "sample-filling")
filling.color = sample_color
add_overlay(filling)
/obj/item/seeds/sample/get_unique_analyzer_text()
return "The DNA of this sample is damaged beyond recovery, it can't support life on its own."
/obj/item/seeds/sample/alienweed
name = "alien weed sample"
icon_state = "alienweed"
sample_color = null
+1 -1
View File
@@ -3,7 +3,7 @@
// Maybe some day it would be used as unit test.
// -------- IT IS NOW!
/datum/unit_test/plantgrowth/Run()
var/list/paths = subtypesof(/obj/item/seeds) - /obj/item/seeds - typesof(/obj/item/seeds/sample) - /obj/item/seeds/lavaland
var/list/paths = subtypesof(/obj/item/seeds) - /obj/item/seeds - /obj/item/seeds/lavaland
for(var/seedpath in paths)
var/obj/item/seeds/seed = new seedpath
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

-1
View File
@@ -4020,7 +4020,6 @@
#include "code\modules\hydroponics\hydroponics.dm"
#include "code\modules\hydroponics\hydroponics_chemreact.dm"
#include "code\modules\hydroponics\plant_genes.dm"
#include "code\modules\hydroponics\sample.dm"
#include "code\modules\hydroponics\seed_extractor.dm"
#include "code\modules\hydroponics\seeds.dm"
#include "code\modules\hydroponics\unique_plant_genes.dm"