simple-entity with runtime color
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
simple-entity with runtime color
Now that simple-entities can have graphic variations, they can *almost* replace the rotating car hack for nixie tubes. However, as far as I can tell, I can't apply runtime tints to a simple-entity or any of the obvious variants thereof, which is what's holding me back from switching. Is there any way to tint a simple-entity? If not, can we have tintable one?
Last edited by justarandomgeek on Mon Jun 26, 2017 10:27 pm, edited 1 time in total.
Re: simple-entity with runtime tint
Virtually everything that takes a sprite can take a tint value as well.
You just sent "tint" in the prototype sprite definition and it's tinted.
You just sent "tint" in the prototype sprite definition and it's tinted.
If you want to get ahold of me I'm almost always on Discord.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: simple-entity with runtime tint
I don't want to define a different entity prototype for each color that might come up though, I want to set simple-entity.color at runtime (based on circuit signals/lamp colors), to replace both the car, and the character i'm putting in it to have something with controllable graphics (via variations) and color.Rseding91 wrote:Virtually everything that takes a sprite can take a tint value as well.
You just sent "tint" in the prototype sprite definition and it's tinted.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: simple-entity with runtime tint
To clarify further, I want to be able to set `apply_runtime_tint = true` on the sprite for a simple-entity of some sort, and then at runtime set both it's variation and color as required in control.lua.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: simple-entity with runtime tint
According to Visual Studio's profiling, the updating of positions on cars/characters used by Nixie Tubes (and re-linking them to lognets) is apparently ~30% of the CPU time factorio uses for me currently. The only thing preventing me from switching them to use a simple-entity variant instead for this *HUGE* performance improvement is the lack of color support.