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

41 lines
1.4 KiB
Plaintext

// Pineapple!
/obj/item/seeds/pineapple
name = "pineapple seed pack"
desc = "Oooooooooooooh!"
icon_state = "seed-pineapple"
species = "pineapple"
plantname = "Pineapple Plant"
product = /obj/item/food/grown/pineapple
lifespan = 40
endurance = 30
growthstages = 3
growing_icon = 'icons/obj/service/hydroponics/growing_fruits.dmi'
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/juicing)
mutatelist = list(/obj/item/seeds/apple)
reagents_add = list(/datum/reagent/consumable/nutriment/vitamin = 0.02, /datum/reagent/consumable/nutriment = 0.2, /datum/reagent/water = 0.04)
graft_gene = /datum/plant_gene/trait/juicing
/obj/item/food/grown/pineapple
seed = /obj/item/seeds/pineapple
name = "pineapples"
desc = "Blorble."
icon_state = "pineapple"
bite_consumption_mod = 2
force = 4
throwforce = 8
hitsound = 'sound/items/weapons/bladeslice.ogg'
attack_verb_continuous = list("stings", "pines")
attack_verb_simple = list("sting", "pine")
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
foodtypes = FRUIT | PINEAPPLE
tastes = list("pineapple" = 1)
wine_power = 40
/obj/item/food/grown/pineapple/make_processable()
AddElement(/datum/element/processable, TOOL_KNIFE, /obj/item/food/pineappleslice, 3, 15, screentip_verb = "Cut")
/obj/item/food/grown/pineapple/juice_typepath()
return /datum/reagent/consumable/pineapplejuice