[2.0.6] Wrong modding documentation for LuaLogisticPoint.filters

Bugs that are actually features.
User avatar
micromario
Fast Inserter
Fast Inserter
Posts: 118
Joined: Thu Apr 05, 2018 11:53 am
Contact:

[2.0.6] Wrong modding documentation for LuaLogisticPoint.filters

Post by micromario »

The docs define a flat struct for `LuaLogisticPoint.filters`
10-20-2024, 17-09-02.png
10-20-2024, 17-09-02.png (49.01 KiB) Viewed 289 times
However testing in-game reveals there is actually a nested value={} struct.
10-20-2024, 17-09-52.png
10-20-2024, 17-09-52.png (698.86 KiB) Viewed 289 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4153
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.6] Wrong modding documentation for LuaLogisticPoint.filters

Post by boskid »

I am going to call this Not a bug because you are showing CompiledLogisticFilter docs which is used by LuaLogisticPoint::filters, however the data you are showing is clearly coming from a different structure, possibly LuaLogisticSection::filters which uses LogisticFilter.

LuaLogisticPoint::filters returns array of CompiledLogisticFilter which should not contain empty items (instead there will be discontinuity on the `index` field. This data is going internally through a PropertyTree which is unable to give anything more advanced than numbers, strings and nested tables and yet in your case there is `import_from` present which contains LuaSpaceLocationPrototype (lua object). On top of this there is no index and there was an empty item at [1] given. Given the presence of `import_from` (which is only used on the LogisticFilters as it is the source data used by logistic filters) it is almost guaranteed you are simply looking at wrong docs which makes this not a bug.
Post Reply

Return to “Not a bug”