Page 1 of 1

[Request] CraftingMachine.default_crafting_tint

Posted: Sun Jul 28, 2019 9:46 am
by Deadlock989
Currently, if a recipe doesn't specify crafting_tint, and the animation for that machine tries to use that recipe, the tints are all set to black by default. If the animation layers are additive then that ends up as fully transparent.

It is possible to run through every single recipe in data.raw and set a crafting_tint for those recipes which don't already have one - but you will never catch them all because any other mod could create recipes after you.

Could CraftingMachine (i.e. AssemblingMachine, Furnace and I suppose RocketSilo) get a default_crafting_tint property? This would be exactly the same format as Recipe.crafting_tint and only be applied when the active recipe does not specify its own crafting tint.

Use case: I have an assembling machine which uses crafting tints in its animations. They are used in additive layers so if a recipe doesn't specify a tint, it looks to the player like part of the animation isn't drawn at all. I could restrict the machine to a specialist crafting category, but it would be nice to have the option for it to use any existing recipe of type "crafting" without having to process the entire set of recipes and do heroic, doomed-to-failure measures in data-final-fixes.

Re: [Request] CraftingMachine.default_crafting_tint

Posted: Sun Jul 28, 2019 12:55 pm
by Bilka
Okay, added in the next version as "default_recipe_tint".

Re: [Request] CraftingMachine.default_crafting_tint

Posted: Sun Jul 28, 2019 2:26 pm
by Deadlock989
Brilliant. Thank you very much.