From cbe164b1142d22786d03d09e0dae854ed99ac6ae Mon Sep 17 00:00:00 2001 From: RafRoq Date: Thu, 20 Jun 2024 15:22:13 -0300 Subject: [PATCH 01/17] adds new trait and bug fixes --- code/modules/hydroponics/grown.dm | 4 ++++ code/modules/hydroponics/plant_genes.dm | 18 ++++++++++++++++++ code/modules/hydroponics/unique_plant_genes.dm | 8 ++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index b392dc67ba06..a35e0b64a9f7 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -75,6 +75,10 @@ . = ..() //Only call it here because we want all the genes and shit to be applied before we add edibility. God this code is a mess. + var/datum/plant_gene/trait/trait_noreact = seed.get_gene(/datum/plant_gene/trait/noreact) + if(trait_noreact) + trait_noreact.on_new_plant(src, loc) + 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! diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index d84bf59dbd67..ff941cd868fb 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -566,6 +566,24 @@ new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... qdel(our_plant) +/datum/plant_gene/trait/noreact + name = "Catalytic Inhibitor Serum" + description = "This genetic trait enables the plant to produce a serum that effectively halts chemical reactions within its tissues." + mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE + +/datum/plant_gene/trait/noreact/on_new_plant(obj/item/our_plant, newloc) + . = ..() + if(!.) + return + ENABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) + RegisterSignal(our_plant, COMSIG_PLANT_ON_SQUASH, PROC_REF(noreact_on_squash)) + +/datum/plant_gene/trait/noreact/proc/noreact_on_squash(obj/item/our_plant, atom/target) + SIGNAL_HANDLER + + DISABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) + our_plant.reagents.handle_reactions() + /** * A plant trait that causes the plant's capacity to double. * diff --git a/code/modules/hydroponics/unique_plant_genes.dm b/code/modules/hydroponics/unique_plant_genes.dm index 61bde105bc9f..9611316364cf 100644 --- a/code/modules/hydroponics/unique_plant_genes.dm +++ b/code/modules/hydroponics/unique_plant_genes.dm @@ -499,10 +499,14 @@ . = ..() if(!.) return - + var/obj/item/food/grown/grown_plant = our_plant + var/obj/item/seeds/our_seed = our_plant.get_plant_seed() if(istype(grown_plant)) - grown_plant.max_volume = new_capcity + if(our_seed.get_gene(/datum/plant_gene/trait/maxchem)) + grown_plant.max_volume = new_capcity*2 + else + grown_plant.max_volume = new_capcity /// Omegaweed's funny 420 max volume gene /datum/plant_gene/trait/modified_volume/omega_weed From ee6128a7928459d8dee72ef3f79ea8578ba90f08 Mon Sep 17 00:00:00 2001 From: RafRoq Date: Thu, 20 Jun 2024 17:30:47 -0300 Subject: [PATCH 02/17] add gene to uplink --- code/modules/hydroponics/gene_modder.dm | 4 ++++ code/modules/uplink/uplink_items/job.dm | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 70fae57a0bb8..1381f6e165c1 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -426,6 +426,10 @@ var/read_only = 0 //Well, it's still a floppy disk obj_flags = UNIQUE_RENAME +/obj/item/disk/plantgene/syndicate + gene = new /datum/plant_gene/trait/noreact + read_only = 1 + /obj/item/disk/plantgene/Initialize(mapload) . = ..() add_overlay("datadisk_gene") diff --git a/code/modules/uplink/uplink_items/job.dm b/code/modules/uplink/uplink_items/job.dm index fad2f28193c3..b44860f6e873 100644 --- a/code/modules/uplink/uplink_items/job.dm +++ b/code/modules/uplink/uplink_items/job.dm @@ -84,6 +84,14 @@ cost = 4 restricted_roles = list(JOB_COOK, JOB_BOTANIST, JOB_CLOWN, JOB_MIME) +/datum/uplink_item/role_restricted/syndicate_plant_gene + name = "Catalytic Inhibitor Serum Plant Data Disk" + desc = "This plant data disk contains the genetic blueprint for the Catalytic Inhibitor Serum gene.\ + enabling plants to produce a serum that halts all internal chemical reactions" + item = /obj/item/disk/plantgene/syndicate + cost = 20 + restricted_roles = list(JOB_BOTANIST) + /datum/uplink_item/role_restricted/combat_baking name = "Combat Bakery Kit" desc = "A kit of clandestine baked weapons. Contains a baguette which a skilled mime could use as a sword, \ From cb236d832ff6f2a146e0b80d0145b1bba6e501f6 Mon Sep 17 00:00:00 2001 From: RafRoq Date: Thu, 20 Jun 2024 17:54:31 -0300 Subject: [PATCH 03/17] remove noreact from strange seeds opsie --- code/modules/hydroponics/plant_genes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index ff941cd868fb..45c2342bb135 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -569,7 +569,7 @@ /datum/plant_gene/trait/noreact name = "Catalytic Inhibitor Serum" description = "This genetic trait enables the plant to produce a serum that effectively halts chemical reactions within its tissues." - mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE + mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_GRAFTABLE /datum/plant_gene/trait/noreact/on_new_plant(obj/item/our_plant, newloc) . = ..() From c4dbedf303645fd0e114270ec302a366c45b188a Mon Sep 17 00:00:00 2001 From: RafRoq Date: Sat, 22 Jun 2024 20:58:41 -0300 Subject: [PATCH 04/17] bug fix for real now --- code/modules/hydroponics/grown.dm | 8 ++++++++ code/modules/hydroponics/plant_genes.dm | 3 +-- code/modules/hydroponics/unique_plant_genes.dm | 6 +----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index a35e0b64a9f7..ee27bd52c681 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -42,6 +42,8 @@ var/alt_icon /// Should we pixel offset ourselves at init? for mapping var/offset_at_init = TRUE + // this volume can be altered by densified chemicals trait + var/volume_rate = 1 /obj/item/food/grown/Initialize(mapload, obj/item/seeds/new_seed) if(!tastes) @@ -65,9 +67,14 @@ make_dryable() // Go through all traits in their genes and call on_new_plant from them. + // TODO: we need a priority queue for traits,some of them need to be called first for(var/datum/plant_gene/trait/trait in seed.genes) trait.on_new_plant(src, loc) + // needs to be run after traits are called because some of them alter max_volume and volume_rate + // since traits do not know in which order they were run we need to do it here + max_volume *= volume_rate + // Set our default bitesize: bite size = 1 + (potency * 0.05) * (max_volume * 0.01) * modifier // A 100 potency, non-densified plant = 1 + (5 * 1 * modifier) = 6u bite size // For reference, your average 100 potency tomato has 14u of reagents - So, with no modifier it is eaten in 3 bites @@ -75,6 +82,7 @@ . = ..() //Only call it here because we want all the genes and shit to be applied before we add edibility. God this code is a mess. + // we want this trait to run after reagents component is added to the plant var/datum/plant_gene/trait/trait_noreact = seed.get_gene(/datum/plant_gene/trait/noreact) if(trait_noreact) trait_noreact.on_new_plant(src, loc) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 45c2342bb135..ef0485e8e090 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -605,8 +605,7 @@ var/obj/item/food/grown/grown_plant = our_plant if(istype(grown_plant, /obj/item/food/grown)) - //Grown foods use the edible component so we need to change their max_volume var - grown_plant.max_volume *= rate + grown_plant.volume_rate = rate else //Grown inedibles however just use a reagents holder, so. our_plant.reagents?.maximum_volume *= rate diff --git a/code/modules/hydroponics/unique_plant_genes.dm b/code/modules/hydroponics/unique_plant_genes.dm index 9611316364cf..9b6094d24e48 100644 --- a/code/modules/hydroponics/unique_plant_genes.dm +++ b/code/modules/hydroponics/unique_plant_genes.dm @@ -501,12 +501,8 @@ return var/obj/item/food/grown/grown_plant = our_plant - var/obj/item/seeds/our_seed = our_plant.get_plant_seed() if(istype(grown_plant)) - if(our_seed.get_gene(/datum/plant_gene/trait/maxchem)) - grown_plant.max_volume = new_capcity*2 - else - grown_plant.max_volume = new_capcity + grown_plant.max_volume = new_capcity /// Omegaweed's funny 420 max volume gene /datum/plant_gene/trait/modified_volume/omega_weed From 7c795c1bfd449f99976d600364b02c2481acaf90 Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:58:27 -0300 Subject: [PATCH 05/17] Update code/modules/hydroponics/unique_plant_genes.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/unique_plant_genes.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/hydroponics/unique_plant_genes.dm b/code/modules/hydroponics/unique_plant_genes.dm index 9b6094d24e48..938ecadb78d8 100644 --- a/code/modules/hydroponics/unique_plant_genes.dm +++ b/code/modules/hydroponics/unique_plant_genes.dm @@ -499,7 +499,6 @@ . = ..() if(!.) return - var/obj/item/food/grown/grown_plant = our_plant if(istype(grown_plant)) grown_plant.max_volume = new_capcity From 5238df04b1b261bfae8ad8afb997e99938a2f759 Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:58:56 -0300 Subject: [PATCH 06/17] Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index ee27bd52c681..26505af007c1 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -81,12 +81,12 @@ bite_consumption = 1 + round(max((seed.potency * BITE_SIZE_POTENCY_MULTIPLIER), 1) * (max_volume * BITE_SIZE_VOLUME_MULTIPLIER) * bite_consumption_mod) . = ..() //Only call it here because we want all the genes and shit to be applied before we add edibility. God this code is a mess. - - // we want this trait to run after reagents component is added to the plant + //Monkestation Edit Begin + //We want this trait to run after reagents component is added to the plant var/datum/plant_gene/trait/trait_noreact = seed.get_gene(/datum/plant_gene/trait/noreact) if(trait_noreact) trait_noreact.on_new_plant(src, loc) - + //Monkestation Edit End 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! From c1c21364f81fbcda070a1dd758c06613f9223d4f Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:59:15 -0300 Subject: [PATCH 07/17] Update code/modules/hydroponics/plant_genes.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/plant_genes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index ef0485e8e090..7c75c23d14ad 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -605,7 +605,7 @@ var/obj/item/food/grown/grown_plant = our_plant if(istype(grown_plant, /obj/item/food/grown)) - grown_plant.volume_rate = rate + grown_plant.volume_rate = rate //Monkestation Edit else //Grown inedibles however just use a reagents holder, so. our_plant.reagents?.maximum_volume *= rate From 3bfbd65c7c0f82325b65fe80b42e526dfb98082b Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:59:23 -0300 Subject: [PATCH 08/17] Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 26505af007c1..2346f079336c 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -43,7 +43,7 @@ /// Should we pixel offset ourselves at init? for mapping var/offset_at_init = TRUE // this volume can be altered by densified chemicals trait - var/volume_rate = 1 + var/volume_rate = 1 //Monkestation Edit /obj/item/food/grown/Initialize(mapload, obj/item/seeds/new_seed) if(!tastes) From 28d81320adf4476f8bd94f6af0e96d8f129cf448 Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:59:39 -0300 Subject: [PATCH 09/17] Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 2346f079336c..7b85bc7a4a46 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -71,8 +71,8 @@ for(var/datum/plant_gene/trait/trait in seed.genes) trait.on_new_plant(src, loc) - // needs to be run after traits are called because some of them alter max_volume and volume_rate - // since traits do not know in which order they were run we need to do it here + //Needs to be run after traits are called because some of them alter max_volume and volume_rate + //Since traits do not know in which order they were run we need to do it here max_volume *= volume_rate // Set our default bitesize: bite size = 1 + (potency * 0.05) * (max_volume * 0.01) * modifier From e21e7ae378f07a99117a6546716398326aeeb25b Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:59:50 -0300 Subject: [PATCH 10/17] Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 7b85bc7a4a46..1abd5135f0f7 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -67,7 +67,7 @@ make_dryable() // Go through all traits in their genes and call on_new_plant from them. - // TODO: we need a priority queue for traits,some of them need to be called first + //TODO: We need a priority queue for traits,some of them need to be called first for(var/datum/plant_gene/trait/trait in seed.genes) trait.on_new_plant(src, loc) From bcd1de9819ff9259b54d097d10a750fda6456a9c Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:59:56 -0300 Subject: [PATCH 11/17] Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 1abd5135f0f7..fd57612e60ee 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -42,7 +42,7 @@ var/alt_icon /// Should we pixel offset ourselves at init? for mapping var/offset_at_init = TRUE - // this volume can be altered by densified chemicals trait + //This volume can be altered by densified chemicals trait var/volume_rate = 1 //Monkestation Edit /obj/item/food/grown/Initialize(mapload, obj/item/seeds/new_seed) From 199683a2c9cb1ce0c4c27d01d30e792a0e6e4e7d Mon Sep 17 00:00:00 2001 From: Rafael <34388545+RafRoq@users.noreply.github.com> Date: Tue, 2 Jul 2024 17:00:10 -0300 Subject: [PATCH 12/17] Update code/modules/hydroponics/grown.dm Co-authored-by: ancient-engineer <103686984+ancient-engineer@users.noreply.github.com> --- code/modules/hydroponics/grown.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index fd57612e60ee..d69c8ac769d7 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -73,7 +73,7 @@ //Needs to be run after traits are called because some of them alter max_volume and volume_rate //Since traits do not know in which order they were run we need to do it here - max_volume *= volume_rate + max_volume *= volume_rate //Monkestation Edit // Set our default bitesize: bite size = 1 + (potency * 0.05) * (max_volume * 0.01) * modifier // A 100 potency, non-densified plant = 1 + (5 * 1 * modifier) = 6u bite size From 70633789aea62dd724d3f540197b1824461feade Mon Sep 17 00:00:00 2001 From: RafRoq Date: Tue, 2 Jul 2024 20:13:33 -0300 Subject: [PATCH 13/17] resolve comments --- code/modules/hydroponics/gene_modder.dm | 4 ---- code/modules/uplink/uplink_items/job.dm | 8 -------- monkestation/code/modules/hydroponics/gene_modder.dm | 3 +++ monkestation/code/modules/uplink/uplink_items/job.dm | 8 ++++++++ 4 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 monkestation/code/modules/hydroponics/gene_modder.dm diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 1381f6e165c1..70fae57a0bb8 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -426,10 +426,6 @@ var/read_only = 0 //Well, it's still a floppy disk obj_flags = UNIQUE_RENAME -/obj/item/disk/plantgene/syndicate - gene = new /datum/plant_gene/trait/noreact - read_only = 1 - /obj/item/disk/plantgene/Initialize(mapload) . = ..() add_overlay("datadisk_gene") diff --git a/code/modules/uplink/uplink_items/job.dm b/code/modules/uplink/uplink_items/job.dm index b44860f6e873..fad2f28193c3 100644 --- a/code/modules/uplink/uplink_items/job.dm +++ b/code/modules/uplink/uplink_items/job.dm @@ -84,14 +84,6 @@ cost = 4 restricted_roles = list(JOB_COOK, JOB_BOTANIST, JOB_CLOWN, JOB_MIME) -/datum/uplink_item/role_restricted/syndicate_plant_gene - name = "Catalytic Inhibitor Serum Plant Data Disk" - desc = "This plant data disk contains the genetic blueprint for the Catalytic Inhibitor Serum gene.\ - enabling plants to produce a serum that halts all internal chemical reactions" - item = /obj/item/disk/plantgene/syndicate - cost = 20 - restricted_roles = list(JOB_BOTANIST) - /datum/uplink_item/role_restricted/combat_baking name = "Combat Bakery Kit" desc = "A kit of clandestine baked weapons. Contains a baguette which a skilled mime could use as a sword, \ diff --git a/monkestation/code/modules/hydroponics/gene_modder.dm b/monkestation/code/modules/hydroponics/gene_modder.dm new file mode 100644 index 000000000000..530b0cfcf126 --- /dev/null +++ b/monkestation/code/modules/hydroponics/gene_modder.dm @@ -0,0 +1,3 @@ +/obj/item/disk/plantgene/syndicate + gene = new /datum/plant_gene/trait/noreact + read_only = 1 diff --git a/monkestation/code/modules/uplink/uplink_items/job.dm b/monkestation/code/modules/uplink/uplink_items/job.dm index 216d4cb5987d..82cc7c1cdab7 100644 --- a/monkestation/code/modules/uplink/uplink_items/job.dm +++ b/monkestation/code/modules/uplink/uplink_items/job.dm @@ -11,3 +11,11 @@ /datum/uplink_item/role_restricted/modified_syringe_gun surplus = 50 + +/datum/uplink_item/role_restricted/syndicate_plant_gene + name = "Catalytic Inhibitor Serum Plant Data Disk" + desc = "This plant data disk contains the genetic blueprint for the Catalytic Inhibitor Serum gene.\ + enabling plants to produce a serum that halts all internal chemical reactions" + item = /obj/item/disk/plantgene/syndicate + cost = 20 + restricted_roles = list(JOB_BOTANIST) From 69569e09ad8b9508b955adc3945244a2c4f14298 Mon Sep 17 00:00:00 2001 From: RafRoq Date: Tue, 2 Jul 2024 20:16:53 -0300 Subject: [PATCH 14/17] resolve comments --- code/modules/hydroponics/plant_genes.dm | 23 ------------------- .../code/modules/hydroponics/plant_genes.dm | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index b26592a1e467..337e5b448bf4 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -566,24 +566,6 @@ new /obj/effect/decal/cleanable/molten_object(T) //Leave a pile of goo behind for dramatic effect... qdel(our_plant) -/datum/plant_gene/trait/noreact - name = "Catalytic Inhibitor Serum" - description = "This genetic trait enables the plant to produce a serum that effectively halts chemical reactions within its tissues." - mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_GRAFTABLE - -/datum/plant_gene/trait/noreact/on_new_plant(obj/item/our_plant, newloc) - . = ..() - if(!.) - return - ENABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) - RegisterSignal(our_plant, COMSIG_PLANT_ON_SQUASH, PROC_REF(noreact_on_squash)) - -/datum/plant_gene/trait/noreact/proc/noreact_on_squash(obj/item/our_plant, atom/target) - SIGNAL_HANDLER - - DISABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) - our_plant.reagents.handle_reactions() - /** * A plant trait that causes the plant's capacity to double. * @@ -1042,8 +1024,3 @@ /datum/plant_gene/trait/plant_type/alien_properties name ="?????" icon = "reddit-alien" - -/datum/plant_gene/trait/seedless - name = "Seedless" - description = "The plant is unable to produce seeds" - mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE diff --git a/monkestation/code/modules/hydroponics/plant_genes.dm b/monkestation/code/modules/hydroponics/plant_genes.dm index 293eb65d1d40..9286215baa9c 100644 --- a/monkestation/code/modules/hydroponics/plant_genes.dm +++ b/monkestation/code/modules/hydroponics/plant_genes.dm @@ -13,3 +13,26 @@ . = ..() if(!.) return + +/datum/plant_gene/trait/seedless + name = "Seedless" + description = "The plant is unable to produce seeds" + mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE + +/datum/plant_gene/trait/noreact + name = "Catalytic Inhibitor Serum" + description = "This genetic trait enables the plant to produce a serum that effectively halts chemical reactions within its tissues." + mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_GRAFTABLE + +/datum/plant_gene/trait/noreact/on_new_plant(obj/item/our_plant, newloc) + . = ..() + if(!.) + return + ENABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) + RegisterSignal(our_plant, COMSIG_PLANT_ON_SQUASH, PROC_REF(noreact_on_squash)) + +/datum/plant_gene/trait/noreact/proc/noreact_on_squash(obj/item/our_plant, atom/target) + SIGNAL_HANDLER + + DISABLE_BITFIELD(our_plant.reagents.flags, NO_REACT) + our_plant.reagents.handle_reactions() From 4fea34b88ba6ce85a3c9ee89fed1d93b747cc025 Mon Sep 17 00:00:00 2001 From: RafRoq Date: Tue, 2 Jul 2024 20:30:10 -0300 Subject: [PATCH 15/17] ... --- code/modules/hydroponics/gene_modder.dm | 4 ++++ monkestation/code/modules/hydroponics/gene_modder.dm | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 monkestation/code/modules/hydroponics/gene_modder.dm diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 70fae57a0bb8..fad5063ec7e7 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -426,6 +426,10 @@ var/read_only = 0 //Well, it's still a floppy disk obj_flags = UNIQUE_RENAME +/obj/item/disk/plantgene/syndicate // Monkestation item + gene = new /datum/plant_gene/trait/noreact + read_only = 1 + /obj/item/disk/plantgene/Initialize(mapload) . = ..() add_overlay("datadisk_gene") diff --git a/monkestation/code/modules/hydroponics/gene_modder.dm b/monkestation/code/modules/hydroponics/gene_modder.dm deleted file mode 100644 index 530b0cfcf126..000000000000 --- a/monkestation/code/modules/hydroponics/gene_modder.dm +++ /dev/null @@ -1,3 +0,0 @@ -/obj/item/disk/plantgene/syndicate - gene = new /datum/plant_gene/trait/noreact - read_only = 1 From e193629a3c42b00547bdf133f6b27d7de38f6008 Mon Sep 17 00:00:00 2001 From: RafRoq Date: Tue, 2 Jul 2024 20:33:41 -0300 Subject: [PATCH 16/17] fix potency limiter bug --- code/modules/hydroponics/grown/mushrooms.dm | 2 +- code/modules/hydroponics/seeds.dm | 6 ------ monkestation/code/modules/hydroponics/plant_genes.dm | 11 ----------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/code/modules/hydroponics/grown/mushrooms.dm b/code/modules/hydroponics/grown/mushrooms.dm index 3b94cebeab6a..ee207c129598 100644 --- a/code/modules/hydroponics/grown/mushrooms.dm +++ b/code/modules/hydroponics/grown/mushrooms.dm @@ -232,7 +232,7 @@ potency = 30 //-> brightness growthstages = 4 rarity = 20 - genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/plant_type/fungal_metabolism, /datum/plant_gene/trait/potencylimit) + genes = list(/datum/plant_gene/trait/glow, /datum/plant_gene/trait/plant_type/fungal_metabolism) growing_icon = 'icons/obj/hydroponics/growing_mushrooms.dmi' possible_mutations = list(/datum/hydroponics/plant_mutation/glow_cap, /datum/hydroponics/plant_mutation/shadow_shroom) reagents_add = list(/datum/reagent/uranium/radium = 0.1, /datum/reagent/phosphorus = 0.1, /datum/reagent/consumable/nutriment = 0.04) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index bb7911aea17e..fd250f5870a9 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -428,12 +428,6 @@ if(potency == -1) return - var/max_potency = MAX_PLANT_YIELD - for(var/datum/plant_gene/trait/trait in genes) - if(trait.trait_flags & TRAIT_LIMIT_POTENCY) - max_potency = 100 - break - potency = clamp(potency + adjustamt, 0, max_potency) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency) if(C) diff --git a/monkestation/code/modules/hydroponics/plant_genes.dm b/monkestation/code/modules/hydroponics/plant_genes.dm index 9286215baa9c..60d8e6519f38 100644 --- a/monkestation/code/modules/hydroponics/plant_genes.dm +++ b/monkestation/code/modules/hydroponics/plant_genes.dm @@ -2,17 +2,6 @@ * this limits potency, it is used for plants that have strange behavior above 100 potency. * */ -/datum/plant_gene/trait/potencylimit - name = "potency limiter" - icon = "lightbulb" - description = "limits potency to 100, used for some plants to avoid lag and similar issues." - trait_flags = TRAIT_LIMIT_POTENCY - mutability_flags = PLANT_GENE_GRAFTABLE - -/datum/plant_gene/trait/potencylimit/on_new_plant(obj/item/our_plant, newloc) - . = ..() - if(!.) - return /datum/plant_gene/trait/seedless name = "Seedless" From efa34ee3ac4248c8b908c3d93e34e79815730d33 Mon Sep 17 00:00:00 2001 From: RafRoq Date: Tue, 2 Jul 2024 20:38:34 -0300 Subject: [PATCH 17/17] i'm making a piss mess --- code/modules/hydroponics/seeds.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index fd250f5870a9..369bc020127f 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -428,6 +428,7 @@ if(potency == -1) return + var/max_potency = MAX_PLANT_YIELD potency = clamp(potency + adjustamt, 0, max_potency) var/datum/plant_gene/core/C = get_gene(/datum/plant_gene/core/potency) if(C)