From da65f5ea077640357b28f580629f3960a52ea751 Mon Sep 17 00:00:00 2001 From: Return Date: Sat, 24 Aug 2024 09:46:34 -0500 Subject: [PATCH] Removes code edits allowing Botany plants to mutate any botany trait (#1896) ## About The Pull Request Deletes 6 lines that make it so _every_ trait is mutatable, fixing the problem with the DNA manipulator (worth noting the problem itself was not the manipulator it was some lines of code that allowed any trait to be selected) Also steals #1614 ## Why It's Good For The Game Prevents any future issues of Botany powergaming by mutating anti-magic deathnettles that do 95 brute, then turn into a killer tomato when you click them in hand ## Proof Of Testing ![image](https://github.com/Bubberstation/Bubberstation/assets/110273561/18d500f8-540e-43aa-a173-a8b51c7c4d40) I cannot add it :( ## Changelog :cl: ReturnToZender, Shellspeed (DNA machine fix) balance: Plants can no longer mutate traits that were specifically marked as not mutatable Fix: Plant DNA manipulators now properly respect upgrades /:cl: --------- Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> --- .../circuitboards/machine_circuitboards.dm | 6 ++--- .../code/modules/hydroponics/gene_modder.dm | 25 +++++++++++-------- .../code/modules/hydroponics/plant_genes.dm | 10 -------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/modular_zubbers/code/game/objects/items/circuitboards/machine_circuitboards.dm b/modular_zubbers/code/game/objects/items/circuitboards/machine_circuitboards.dm index 12fef7f2be6..76c27261e67 100644 --- a/modular_zubbers/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/modular_zubbers/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -3,7 +3,7 @@ greyscale_colors = CIRCUIT_COLOR_SERVICE build_path = /obj/machinery/plantgenes req_components = list( - /obj/item/stock_parts/servo = 1, - /obj/item/stock_parts/micro_laser = 1, + /datum/stock_part/servo = 1, + /datum/stock_part/micro_laser = 1, /obj/item/stack/sheet/glass = 1, - /obj/item/stock_parts/scanning_module = 1) + /datum/stock_part/scanning_module = 1) diff --git a/modular_zubbers/code/modules/hydroponics/gene_modder.dm b/modular_zubbers/code/modules/hydroponics/gene_modder.dm index ae2c60fabd6..ff2c907e2d1 100644 --- a/modular_zubbers/code/modules/hydroponics/gene_modder.dm +++ b/modular_zubbers/code/modules/hydroponics/gene_modder.dm @@ -26,28 +26,31 @@ var/min_wchance = 67 var/min_wrate = 10 +/datum/plant_gene/reagent + mutability_flags = PLANT_GENE_GRAFTABLE | PLANT_GENE_REMOVABLE + /obj/machinery/plantgenes/RefreshParts() // Comments represent the max you can set per tier, respectively. seeds.dm [219] clamps these for us but we don't want to mislead the viewer. . = ..() - for(var/obj/item/stock_parts/servo/M in component_parts) - if(M.rating > 3) + for(var/datum/stock_part/servo/M in component_parts) + if(M.tier > 3) max_potency = 95 else - max_potency = initial(max_potency) + (M.rating**3) // 53,59,77,95 Clamps at 100 + max_potency = initial(max_potency) + (M.tier**3) // 53,59,77,95 Clamps at 100 - max_yield = initial(max_yield) + (M.rating*2) // 4,6,8,10 Clamps at 10 + max_yield = initial(max_yield) + (M.tier*2) // 4,6,8,10 Clamps at 10 - for(var/obj/item/stock_parts/scanning_module/SM in component_parts) - if(SM.rating > 3) //If you create t5 parts I'm a step ahead mwahahaha! + for(var/datum/stock_part/scanning_module/SM in component_parts) + if(SM.tier > 3) //If you create t5 parts I'm a step ahead mwahahaha! min_production = 1 else - min_production = 12 - (SM.rating * 3) //9,6,3,1. Requires if to avoid going below clamp [1] + min_production = 12 - (SM.tier * 3) //9,6,3,1. Requires if to avoid going below clamp [1] - max_endurance = initial(max_endurance) + (SM.rating * 25) // 35,60,85,100 Clamps at 10min 100max + max_endurance = initial(max_endurance) + (SM.tier * 25) // 35,60,85,100 Clamps at 10min 100max - for(var/obj/item/stock_parts/micro_laser/ML in component_parts) - var/wratemod = ML.rating * 2.5 + for(var/datum/stock_part/micro_laser/ML in component_parts) + var/wratemod = ML.tier * 2.5 min_wrate = FLOOR(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low - min_wchance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low + min_wchance = 67-(ML.tier*16) // 48,35,19,3 Clamps at 0 and 67 You want this low /* lets not add the snowflake editor for plant people rn for(var/obj/item/circuitboard/machine/plantgenes/vaultcheck in component_parts) diff --git a/modular_zubbers/code/modules/hydroponics/plant_genes.dm b/modular_zubbers/code/modules/hydroponics/plant_genes.dm index 67584d3e4e0..c6fb47908ea 100644 --- a/modular_zubbers/code/modules/hydroponics/plant_genes.dm +++ b/modular_zubbers/code/modules/hydroponics/plant_genes.dm @@ -1,18 +1,8 @@ -/datum/plant_gene - mutability_flags = PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE - -/datum/plant_gene/reagent - mutability_flags = PLANT_GENE_REMOVABLE | PLANT_GENE_MUTATABLE | PLANT_GENE_GRAFTABLE - -/datum/plant_gene/trait/backfire - mutability_flags = PLANT_GENE_GRAFTABLE //Making this mutatable causes bugs and linters to fail. - /datum/plant_gene/trait/repeated_harvest/New(...) seed_blacklist += /obj/item/seeds/seedling seed_blacklist += /obj/item/seeds/seedling/evil . = ..() - /* * Returns the formatted name of the plant gene. *