[Request] CraftingMachine.default_crafting_tint

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

[Request] CraftingMachine.default_crafting_tint

Post 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.
Bilka
Factorio Staff
Factorio Staff
Posts: 3314
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [Request] CraftingMachine.default_crafting_tint

Post by Bilka »

Okay, added in the next version as "default_recipe_tint".
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Request] CraftingMachine.default_crafting_tint

Post by Deadlock989 »

Brilliant. Thank you very much.
Post Reply

Return to “Implemented mod requests”