Files
SyncIt21andGitHub 468b351b86 Axes grind & juice vars into procs (#94592)
## About The Pull Request
Inspired by #94233. `grind_results`(list) & `juice_typepath`(typepath)
are only used when grinding & juicing after which the atom is deleted.
This means if that object is not processed these vars occupy memory &
don't do anything.

Now these values are only generated on demand by calling their
respective procs. Considering how these vars are on the obj level the
memory savings are quite significant

## Changelog
🆑
refactor: grinding & juicing have been refactored to occupy low memory.
Report bugs on github
code: improved grinding & juicing code
/🆑
2025-12-25 20:40:35 +01:00

107 lines
3.6 KiB
Plaintext

// Cocoa Pod
/obj/item/seeds/cocoapod
name = "cocoa pod seed pack"
desc = "These seeds grow into cacao trees. They look fattening." //SIC: cocoa is the seeds. The trees are spelled cacao.
icon_state = "seed-cocoapod"
species = "cocoapod"
plantname = "Cocao Tree"
product = /obj/item/food/grown/cocoapod
lifespan = 20
maturation = 5
production = 5
yield = 2
instability = 20
growthstages = 5
growing_icon = 'icons/obj/service/hydroponics/growing_fruits.dmi'
icon_grow = "cocoapod-grow"
icon_dead = "cocoapod-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/cocoapod/vanillapod, /obj/item/seeds/cocoapod/bungotree)
reagents_add = list(/datum/reagent/consumable/coco = 0.25, /datum/reagent/consumable/nutriment = 0.1)
/obj/item/food/grown/cocoapod
seed = /obj/item/seeds/cocoapod
name = "cocoa pod"
desc = "Fattening... Mmmmm... chucklate."
icon_state = "cocoapod"
bite_consumption_mod = 2
foodtypes = FRUIT
tastes = list("cocoa" = 1)
distill_reagent = /datum/reagent/consumable/ethanol/creme_de_cacao
// Vanilla Pod
/obj/item/seeds/cocoapod/vanillapod
name = "vanilla pod seed pack"
desc = "These seeds grow into vanilla trees. They look fattening."
icon_state = "seed-vanillapod"
species = "vanillapod"
plantname = "Vanilla Tree"
product = /obj/item/food/grown/vanillapod
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = null
reagents_add = list(/datum/reagent/consumable/vanilla = 0.25, /datum/reagent/consumable/nutriment = 0.1)
/obj/item/food/grown/vanillapod
seed = /obj/item/seeds/cocoapod/vanillapod
name = "vanilla pod"
desc = "Fattening... Mmmmm... vanilla."
icon_state = "vanillapod"
bite_consumption_mod = 2
foodtypes = FRUIT
tastes = list("vanilla" = 1)
distill_reagent = /datum/reagent/consumable/vanilla //Takes longer, but you can get even more vanilla from it.
/obj/item/seeds/cocoapod/bungotree
name = "bungo tree seed pack"
desc = "These seeds grow into bungo trees. They appear to be heavy and almost perfectly spherical."
icon_state = "seed-bungotree"
plant_icon_offset = 4
species = "bungotree"
plantname = "Bungo Tree"
product = /obj/item/food/grown/bungofruit
lifespan = 30
maturation = 4
yield = 3
production = 7
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = null
reagents_add = list(/datum/reagent/consumable/enzyme = 0.1, /datum/reagent/consumable/nutriment = 0.1)
growthstages = 4
growing_icon = 'icons/obj/service/hydroponics/growing_fruits.dmi'
icon_grow = "bungotree-grow"
icon_dead = "bungotree-dead"
rarity = 15
/obj/item/food/grown/bungofruit
seed = /obj/item/seeds/cocoapod/bungotree
name = "bungo fruit"
desc = "A strange fruit, tough leathery skin protects its juicy flesh and large poisonous seed."
icon_state = "bungo"
bite_consumption_mod = 2
trash_type = /obj/item/food/grown/bungopit
foodtypes = FRUIT
tastes = list("bungo" = 2, "tropical fruitiness" = 1)
distill_reagent = null
/obj/item/food/grown/bungofruit/juice_typepath()
return /datum/reagent/consumable/bungojuice
/obj/item/food/grown/bungopit
seed = /obj/item/seeds/cocoapod/bungotree
name = "bungo pit"
icon_state = "bungopit"
bite_consumption_mod = 5
desc = "A large seed, it is said to be potent enough to be able to stop a mans heart."
w_class = WEIGHT_CLASS_TINY
throwforce = 5
throw_speed = 3
throw_range = 7
foodtypes = TOXIC
tastes = list("acrid bitterness" = 1)
/obj/item/food/grown/bungopit/Initialize(mapload)
. =..()
reagents.clear_reagents()
reagents.add_reagent(/datum/reagent/toxin/bungotoxin, seed.potency * 0.10) //More than this will kill at too low potency
reagents.add_reagent(/datum/reagent/consumable/nutriment, seed.potency * 0.04)