Skip to content

Commit

Permalink
[MIRROR] Deletes unused hydroponics code [MDB IGNORE] (#1015)
Browse files Browse the repository at this point in the history
* Deletes unused hydroponics code (#80156)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: MrMelbert <[email protected]>
  • Loading branch information
3 people authored Dec 7, 2023
1 parent a4300b4 commit 4f576bf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
2 changes: 1 addition & 1 deletion code/modules/hydroponics/hydroponics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions code/modules/hydroponics/plant_genes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down
21 changes: 0 additions & 21 deletions code/modules/hydroponics/sample.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/modules/unit_tests/plantgrowth_tests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified icons/obj/service/hydroponics/seeds.dmi
Binary file not shown.
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4120,7 +4120,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"
Expand Down

0 comments on commit 4f576bf

Please sign in to comment.