Page 1 of 1

Add apply_recipe_tint to animation def

Posted: Thu Sep 14, 2017 3:35 pm
by Arch666Angel
I want to apply a recipe depending tint to an entity when the recipe is chosen, that is staying on permanently. In working_visualisations it will only show when the machine is running. For example:

Code: Select all

animation={
	layers={
	  {
		filename = "__test__/graphics/entity/test/test-background.png",
		width = 224,
		height = 224,
		line_length = 5,
		frame_count = 25,
		shift = {0, 0},
		animation_speed = 1,
		apply_recipe_tint = "primary",
	  },
	  {
		filename = "__test__/graphics/entity/test/test.png",
		width = 224,
		height = 224,
		line_length = 5,
		frame_count = 25,
		shift = {0, 0},
		animation_speed = 1,
	  },
	}
},

Re: Add apply_recipe_tint to animation def

Posted: Thu Sep 14, 2017 7:30 pm
by bobingabout
Arch666Angel wrote:I want to apply a recipe depending tint to an entity when the recipe is chosen, that is staying on permanently. In working_visualisations it will only show when the machine is running. For example:
this isn't actually a question, nor request for help.

I don't know how to do what you want to do though.

Re: Add apply_recipe_tint to animation def

Posted: Thu Sep 14, 2017 11:05 pm
by Arch666Angel
The request is in the topic.

As it seems apply_recipe_tint can only be used in working_visualisations:

Code: Select all

working_visualisations = {
  {
  apply_recipe_tint = "primary",
  animation = {}
  }
}
I would like to use it in other defintions for animations, like the fixed tint command. Use case:

From left to right: background layer, top layer, composed sprite. The background layer is the one that should have the tint. There is also a working_visualisation on top.
example111.png
example111.png (127.49 KiB) Viewed 1684 times

Request - Add recipe_tint to animation(s)

Posted: Sun May 20, 2018 12:53 pm
by Arch666Angel
Currently you can only use the recipe_tint inside working_visualisation. Would it be possible to also enable the use inside animations and/or any definition for crafting machines?

Re: Add apply_recipe_tint to animation def

Posted: Tue Sep 01, 2020 8:02 am
by Bilka
Merged the above post with the existing topic.

This is now possible by setting always_draw on the working visualization that has the recipe tint set. Here is an example, I set always_draw for all layers of the chemical plants working visualisation:
Image