Files
SyncIt21 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

61 lines
2.4 KiB
Plaintext

//Korta Nut
/obj/item/seeds/korta_nut
name = "korta nut seed pack"
desc = "These seeds grow into korta nut bushes, native to Tizira."
icon_state = "seed-korta"
species = "kortanut"
plantname = "Korta Nut Bush"
product = /obj/item/food/grown/korta_nut
lifespan = 55
endurance = 35
yield = 5
growing_icon = 'icons/obj/service/hydroponics/growing_fruits.dmi'
icon_grow = "kortanut-grow"
icon_dead = "kortanut-dead"
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/one_bite)
mutatelist = list(/obj/item/seeds/korta_nut/sweet)
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
/obj/item/food/grown/korta_nut
seed = /obj/item/seeds/korta_nut
name = "korta nut"
desc = "A little nut of great importance. Has a peppery shell which can be ground into flour and a soft, pulpy interior that produces a milky fluid when juiced. Or you can eat them whole, as a quick snack."
icon_state = "korta_nut"
foodtypes = NUTS
tastes = list("peppery heat" = 1)
distill_reagent = /datum/reagent/consumable/ethanol/kortara
/obj/item/food/grown/korta_nut/grind_results()
return list(/datum/reagent/consumable/korta_flour = 0)
/obj/item/food/grown/korta_nut/juice_typepath()
return /datum/reagent/consumable/korta_milk
//Sweet Korta Nut
/obj/item/seeds/korta_nut/sweet
name = "sweet korta nut seed pack"
desc = "These seeds grow into sweet korta nuts, a mutation of the original species that produces a thick syrup that Tizirans use for desserts."
icon_state = "seed-sweetkorta"
species = "kortanut"
plantname = "Sweet Korta Nut Bush"
product = /obj/item/food/grown/korta_nut/sweet
maturation = 10
production = 10
mutatelist = null
reagents_add = list(/datum/reagent/consumable/korta_nectar = 0.1, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.1)
rarity = PLANT_MODERATELY_RARE
/obj/item/food/grown/korta_nut/sweet
seed = /obj/item/seeds/korta_nut/sweet
name = "sweet korta nut"
desc = "A sweet treat lizards love to eat."
icon_state = "korta_nut"
tastes = list("peppery sweet" = 1)
distill_reagent = /datum/reagent/consumable/ethanol/kortara
/obj/item/food/grown/korta_nut/sweet/grind_results()
return list(/datum/reagent/consumable/korta_flour = 0)
/obj/item/food/grown/korta_nut/sweet/juice_typepath()
return /datum/reagent/consumable/korta_nectar