From b6509d25e663b235bf4d10af32403553c920c0a5 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Tue, 4 Feb 2020 06:34:42 +0100 Subject: [PATCH 1/4] Ports "Cleans up plante gene mutability." --- code/modules/hydroponics/grown/flowers.dm | 5 +++-- code/modules/hydroponics/grown/misc.dm | 5 +++-- code/modules/hydroponics/grown/mushrooms.dm | 7 ++++--- code/modules/hydroponics/plant_genes.dm | 4 +++- code/modules/hydroponics/seeds.dm | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 8cdf403b00..b9118f0bee 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -72,8 +72,9 @@ rarity = 30 /obj/item/seeds/poppy/lily/trumpet/Initialize() - ..() - unset_mutability(/datum/plant_gene/reagent/polypyr, PLANT_GENE_EXTRACTABLE) + . = ..() + if(!nogenes) + unset_mutability(/datum/plant_gene/reagent/polypyr, PLANT_GENE_EXTRACTABLE) /obj/item/reagent_containers/food/snacks/grown/trumpet seed = /obj/item/seeds/poppy/lily/trumpet diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm index e0a2453353..18ca5cc812 100644 --- a/code/modules/hydroponics/grown/misc.dm +++ b/code/modules/hydroponics/grown/misc.dm @@ -83,8 +83,9 @@ reagents_add = list(/datum/reagent/consumable/nutriment = 0.05, /datum/reagent/medicine/silibinin = 0.1) /obj/item/seeds/galaxythistle/Initialize() - ..() - unset_mutability(/datum/plant_gene/trait/invasive, PLANT_GENE_REMOVABLE) + . = ..() + if(!nogenes) + unset_mutability(/datum/plant_gene/trait/invasive, PLANT_GENE_REMOVABLE) /obj/item/reagent_containers/food/snacks/grown/galaxythistle seed = /obj/item/seeds/galaxythistle diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 7e43911c5c..2610a2c044 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -218,9 +218,10 @@ reagents_add = list(/datum/reagent/consumable/nutriment = 0.1) /obj/item/seeds/chanterelle/jupitercup/Initialize() - ..() - unset_mutability(/datum/plant_gene/reagent/liquidelectricity, PLANT_GENE_EXTRACTABLE) - unset_mutability(/datum/plant_gene/trait/plant_type/carnivory, PLANT_GENE_REMOVABLE) + . = ..() + if(!nogenes) + unset_mutability(/datum/plant_gene/reagent/liquidelectricity, PLANT_GENE_EXTRACTABLE) + unset_mutability(/datum/plant_gene/trait/plant_type/carnivory, PLANT_GENE_REMOVABLE) /obj/item/reagent_containers/food/snacks/grown/mushroom/jupitercup seed = /obj/item/seeds/chanterelle/jupitercup diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 99fd873995..756788898a 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -18,7 +18,9 @@ return !istype(S, /obj/item/seeds/sample) // Samples can't accept new genes /datum/plant_gene/proc/Copy() - return new type + var/datum/plant_gene/G = new type + G.mutability_flags = mutability_flags + return G /datum/plant_gene/proc/apply_vars(obj/item/seeds/S) // currently used for fire resist, can prob. be further refactored return diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index f459e97814..aa0e789721 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -37,7 +37,7 @@ var/weed_rate = 1 //If the chance below passes, then this many weeds sprout during growth var/weed_chance = 5 //Percentage chance per tray update to grow weeds -/obj/item/seeds/Initialize(loc, nogenes = 0) +/obj/item/seeds/Initialize(mapload, nogenes = 0) . = ..() pixel_x = rand(-8, 8) pixel_y = rand(-8, 8) From dcb3447c12e57899f8d70c44c8ab195be69f43be Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Tue, 4 Feb 2020 06:51:50 +0100 Subject: [PATCH 2/4] Update misc.dm --- code/modules/hydroponics/grown/misc.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown/misc.dm b/code/modules/hydroponics/grown/misc.dm index 18ca5cc812..b8496c865c 100644 --- a/code/modules/hydroponics/grown/misc.dm +++ b/code/modules/hydroponics/grown/misc.dm @@ -82,7 +82,7 @@ mutatelist = list() reagents_add = list(/datum/reagent/consumable/nutriment = 0.05, /datum/reagent/medicine/silibinin = 0.1) -/obj/item/seeds/galaxythistle/Initialize() +/obj/item/seeds/galaxythistle/Initialize(mapload, nogenes = FALSE) . = ..() if(!nogenes) unset_mutability(/datum/plant_gene/trait/invasive, PLANT_GENE_REMOVABLE) From 4e4b0d718ae4c38248cc01078979ac5512c9c8d4 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Tue, 4 Feb 2020 06:52:54 +0100 Subject: [PATCH 3/4] Update mushrooms.dm --- code/modules/hydroponics/grown/mushrooms.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 2610a2c044..554115eb5f 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -217,7 +217,7 @@ growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi' reagents_add = list(/datum/reagent/consumable/nutriment = 0.1) -/obj/item/seeds/chanterelle/jupitercup/Initialize() +/obj/item/seeds/chanterelle/jupitercup/Initialize(mapload, nogenes = FALSE) . = ..() if(!nogenes) unset_mutability(/datum/plant_gene/reagent/liquidelectricity, PLANT_GENE_EXTRACTABLE) From dd4e1d8f5796c54e0d099906393700e3e0852fa5 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Tue, 4 Feb 2020 06:57:07 +0100 Subject: [PATCH 4/4] Update flowers.dm --- code/modules/hydroponics/grown/flowers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index b9118f0bee..4843d863c5 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -71,7 +71,7 @@ reagents_add = list(/datum/reagent/consumable/nutriment = 0.05) rarity = 30 -/obj/item/seeds/poppy/lily/trumpet/Initialize() +/obj/item/seeds/poppy/lily/trumpet/Initialize(mapload, nogenes = FALSE) . = ..() if(!nogenes) unset_mutability(/datum/plant_gene/reagent/polypyr, PLANT_GENE_EXTRACTABLE)