Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seedless now works for spliced plants #3508

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions monkestation/code/modules/hydroponics/seeds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@
var/atom/movable/parent = loc //for ease of access
var/t_amount = 0
var/list/result = list()
var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc //needed for TK
var/output_loc = parent.Adjacent(user) ? user.drop_location() : parent.drop_location() //needed for TK
var/product_name
var/yield_amount = getYield()
var/seedless = get_gene(/datum/plant_gene/trait/seedless)
if(yield_amount >= 10)
yield_amount = 10 + log(1.02) * (getYield() - 1)
while(t_amount < yield_amount)
var/picked_object = pick(produce_list)
if(prob(10))
if(!seedless && prob(10))
var/obj/item/seeds/seed_prod
if(prob(30) && special_mutations.len)
var/datum/hydroponics/plant_mutation/spliced_mutation/picked_mutation = pick(special_mutations)
if(prob(30) && length(special_mutations))
var/datum/hydroponics/plant_mutation/spliced_mutation/picked_mutation = pick(special_mutations)
var/obj/item/seeds/created_seed = picked_mutation.created_seed
seed_prod = new created_seed(output_loc)
else
Expand All @@ -53,8 +54,8 @@
t_amount++
else
var/obj/item/food/grown/t_prod
if(prob(10) && special_mutations.len)
var/datum/hydroponics/plant_mutation/spliced_mutation/picked_mutation = pick(special_mutations)
if(prob(10) && length(special_mutations))
var/datum/hydroponics/plant_mutation/spliced_mutation/picked_mutation = pick(special_mutations)
var/obj/item/produced_item = picked_mutation.created_product
t_prod = new produced_item(output_loc)
else
Expand Down
Loading