Tree pollution-damage, color variant, and more

Post Reply
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Tree pollution-damage, color variant, and more

Post by Reika »

Exactly as it sounds, various tree parameters:

* The damage state of a tree from pollution, so it can be healed (the map-settings imply this happens automatically, but I have never seen it actually happen, despite real-world days of zero pollution).

* Which "variant" of the entity it is (not all trees with the same entity name look the same, being rotated and colored differently)
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Bilka »

I added LuaEntity::tree_stage_index for the next version, the variant can already be read/set using https://lua-api.factorio.com/latest/Lua ... _variation.
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
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Reika »

That does not really address my needs; I need the ability to basically perfectly clone a tree.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Bilka »

You can read and set the variant, color index and the "pollution damage" as you call it, what is missing to clone the tree?
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
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Reika »

Bilka wrote:
Fri Jun 07, 2019 6:47 am
You can read and set the variant, color index and the "pollution damage" as you call it, what is missing to clone the tree?
Your linked parameters make no mention of pollution damage.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Bilka »

Reika wrote:
Fri Jun 07, 2019 2:45 pm
Your linked parameters make no mention of pollution damage.
Bilka wrote:
Thu May 23, 2019 2:31 pm
I added LuaEntity::tree_stage_index for the next version
That's the same thing
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
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Reika »

Bilka wrote:
Fri Jun 07, 2019 2:49 pm
Reika wrote:
Fri Jun 07, 2019 2:45 pm
Your linked parameters make no mention of pollution damage.
Bilka wrote:
Thu May 23, 2019 2:31 pm
I added LuaEntity::tree_stage_index for the next version
That's the same thing
...How would I be supposed to know this? I really recommend changing the name to something descriptive of its actual function.
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3133
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Bilka »

It's actual function is reading the tree stage. Trees can/could spawn with different stages depending on the tree richness setting, so naming it something related to pollution would be wrong. If you browse the wiki, you will find that we also call it stage on there, so it should be obvious enough for most users.
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
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Tree pollution-damage, color variant, and more

Post by Reika »

Bilka wrote:
Fri Jun 07, 2019 2:59 pm
It's actual function is reading the tree stage. Trees can/could spawn with different stages depending on the tree richness setting, so naming it something related to pollution would be wrong. If you browse the wiki, you will find that we also call it stage on there, so it should be obvious enough for most users.
In that case there should be some mention on the documentation that this is also pollution damage, because Ctrl-F for "pollution" coming up with zero results makes the user not dig deeper.
Image

Post Reply

Return to “Implemented mod requests”