Add ingredient_is_always_fresh to ItemIngredientPrototype

User avatar
Thremtopod
Inserter
Inserter
Posts: 31
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Add ingredient_is_always_fresh to ItemIngredientPrototype

Post by Thremtopod »

As a sort-of followup to this request, it would be great to have the ability to exclude an ingredient from a recipe result's freshness. The motivation is to have a recipe with both a spoilable catalyst ingredient and a regular spoilable ingredient; the catalyst can't currently be returned "unchanged" because it'll inherit its spoiled amount from both ingredients. The ability to ignore an ingredient's freshness would make this possible.

I do see that there's a potential scope-creep risk. When dealing with multiple spoilable ingredients and products, there's a possible temptation to want to have arbitrary control over how they interact with each other, which sounds like a nightmare. Hopefully this request is simple enough not to invite that. Spoiling is just too interesting a mechanic!
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4539
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Add ingredient_is_always_fresh to ItemIngredientPrototype

Post by boskid »

To not scope creep to much, for 2.1 i added ItemIngredientPrototype::spoil_weight which takes a value in range [0, 1]. If you set this value to 0, given ingredient will not contribute to the spoil percent of the products.
User avatar
Thremtopod
Inserter
Inserter
Posts: 31
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Re: Add ingredient_is_always_fresh to ItemIngredientPrototype

Post by Thremtopod »

Thank you, this is great!!
Post Reply

Return to “Implemented mod requests”