Skip to content

Commit 0d985f8

Browse files
authored
Adds lesser strange seeds (#5935)
## About The Pull Request this adds "Lesser Strange Seeds", which biogenerators can print. these have a more extensive reagent blacklist (in addition to the usual list of stuff that strange seeds can't make) ## Why It's Good For The Game Feels like a good middle-ground between nuking strange seeds and leaving them un-nerfed ## Changelog :cl: add: Added "Lesser Strange Seeds", variants of strange seeds with a wider limitation on reagents. balance: Biogenerators can now only print lesser strange seeds. Other sources of strange seeds remain unchanged. /:cl:
1 parent 5ecbdbc commit 0d985f8

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

code/modules/hydroponics/seeds.dm

+8-1
Original file line numberDiff line numberDiff line change
@@ -610,14 +610,21 @@
610610
var/amount_random_reagents = rand(lower, upper)
611611
for(var/i in 1 to amount_random_reagents)
612612
var/random_amount = rand(4, 15) * 0.01 // this must be multiplied by 0.01, otherwise, it will not properly associate
613-
var/datum/plant_gene/reagent/R = new(get_random_reagent_id(), random_amount)
613+
var/datum/plant_gene/reagent/R = new(pick_reagent(), random_amount) // monkestation edit: pick_reagent proc
614614
if(R.can_add(src))
615615
if(!R.try_upgrade_gene(src))
616616
genes += R
617617
else
618618
qdel(R)
619619
reagents_from_genes()
620620

621+
// monkestation start: pick_reagent proc
622+
/// Returns a random reagent ID.
623+
/// Just a wrapper around [get_random_reagent_id] by default, this exists so subtypes can override it.
624+
/obj/item/seeds/proc/pick_reagent()
625+
return get_random_reagent_id()
626+
// monkestation end
627+
621628
/obj/item/seeds/proc/add_random_traits(lower = 0, upper = 2)
622629
var/amount_random_traits = rand(lower, upper)
623630
for(var/i in 1 to amount_random_traits)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/obj/item/seeds/random/lesser
2+
name = "pack of lesser strange seeds"
3+
desc = "Mysterious seeds as strange as their name implies, albeit with less potential than their \"normal\" counterparts."
4+
/// Typecache of reagents forbidden from appearing.
5+
/// This is not an exhaustive list, as any reagent without REAGENT_CAN_BE_SYNTHESIZED is also blacklisted.
6+
var/static/list/reagent_blacklist = typecacheof(list(
7+
/datum/reagent/aslimetoxin,
8+
/datum/reagent/drug/blastoff,
9+
/datum/reagent/drug/demoneye,
10+
/datum/reagent/drug/twitch,
11+
/datum/reagent/magillitis,
12+
/datum/reagent/medicine/antipathogenic/changeling,
13+
/datum/reagent/medicine/changelinghaste,
14+
/datum/reagent/medicine/coagulant,
15+
/datum/reagent/medicine/regen_jelly,
16+
/datum/reagent/medicine/stimulants,
17+
/datum/reagent/medicine/syndicate_nanites,
18+
/datum/reagent/metalgen,
19+
/datum/reagent/mulligan,
20+
/datum/reagent/mutationtoxin,
21+
/datum/reagent/prefactor_a,
22+
/datum/reagent/prefactor_b,
23+
/datum/reagent/reaction_agent,
24+
/datum/reagent/spider_extract,
25+
))
26+
27+
/obj/item/seeds/random/lesser/pick_reagent()
28+
var/static/list/valid_reagent_list
29+
if(isnull(valid_reagent_list))
30+
LAZYINITLIST(valid_reagent_list)
31+
for(var/datum/reagent/reagent_path as anything in subtypesof(/datum/reagent))
32+
if(!(reagent_path::chemical_flags & REAGENT_CAN_BE_SYNTHESIZED))
33+
continue
34+
if(is_type_in_typecache(reagent_path, reagent_blacklist))
35+
continue
36+
valid_reagent_list += reagent_path
37+
return pick(valid_reagent_list)

monkestation/code/modules/research/designs/biogenerator_designs.dm

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/datum/design/strange_seeds
2+
name = "Lesser Strange Seeds"
3+
build_path = /obj/item/seeds/random/lesser
4+
15
/datum/design/rat_cube // Monkestation, useful for chaplain and pathologist.
26
name = "Mouse Cube"
37
id = "rcube" // R for Rat

tgstation.dme

+1
Original file line numberDiff line numberDiff line change
@@ -7464,6 +7464,7 @@
74647464
#include "monkestation\code\modules\hydroponics\seeds.dm"
74657465
#include "monkestation\code\modules\hydroponics\grown\coconut.dm"
74667466
#include "monkestation\code\modules\hydroponics\grown\honeydew.dm"
7467+
#include "monkestation\code\modules\hydroponics\grown\random.dm"
74677468
#include "monkestation\code\modules\hydroponics\machines\composter.dm"
74687469
#include "monkestation\code\modules\hydroponics\machines\splicer.dm"
74697470
#include "monkestation\code\modules\hydroponics\mutations\_mutations.dm"

0 commit comments

Comments
 (0)