Problems and inconsistences in lua api docs

Place to report issues and suggest improvements to the API documentation.
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Problems and inconsistences in lua api docs

Post by GlassBricks »

Hi Bilka & co, it's me again!

This has now evolved into a random list of things I've noticed are inconsistent or problematic in the lua-api docs.
Title has been updated to latest version where all these issues are still confirmed.

The following concepts don't seem to be referenced anywhere else:
- VirtualSignalId
- LogisticSections, LogisticSection, BlueprintLogisticFilter
- BurnerUsageID
- CircuitNetworkSelection Currently an completely empty table??
- RaiseEventParameters

Yes, I do have a thing doing DFS/floodfill shenanigans over things in the api docs json. The above are some unconnected components.
Last edited by GlassBricks on Fri Nov 22, 2024 5:36 am, edited 4 times in total.
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.12] Unused (?) concepts in runtime docs

Post by GlassBricks »

More:
defines.default_icon_size is empty and unused

In SoundPath's description, the last 2 "notes" have been removed. Compare with docs for v1.1.110

In FluidIdentification, ForceIdentification, TechnologyIdentification, "Identification" has been shortened to "ID", but not for SurfaceIdentification and PlayerIdentification.

In LuaGuiElement::elem_value, ItemIdAndQualityPair can replace the generic "table" type.
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.12] Unused (?) concepts in runtime docs, and other inconsistencies

Post by GlassBricks »

LuaPostEntityDiedEventFilter::type is specified to only be "ghost", but the variant parameter imply that type can also be `"type"`.
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.12] Unused (?) concepts in runtime docs, and other inconsistencies

Post by GlassBricks »

[2.0.15] PipeConnectionDefinition::linked_connection_id has type uint32. But uint32 doesn't exist, it should be just uint
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.12] Unused (?) concepts in runtime docs, and other inconsistencies

Post by GlassBricks »

[2.0.17] LuaControl set_driving takes parameters of type "bool", they should be "boolean"?
There's also a typo in that method's description. Spell checker?
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.12] Unused (?) concepts in runtime docs, and other inconsistencies

Post by GlassBricks »

`SpacingItem` has fields with types `uint32_t` `int32_t`... did you mean uint/int?
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.12] Unused (?) concepts in runtime docs, and other inconsistencies

Post by GlassBricks »

TechnologySlotStyleSpecification::drag_handle_style references EmptyWidgetStyle, which does not exist.
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.21] Problems and inconsistences in lua api docs

Post by GlassBricks »

[2.0.24]
TriggerEffect has "DamageEntityTriggerEffectItem" as a union member, but that type no longer exists (did you mean "DamagerTriggerEffectItem")?
GlassBricks
Inserter
Inserter
Posts: 48
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [2.0.21] Problems and inconsistences in lua api docs

Post by GlassBricks »

[2.0.39] the newly LuaSchedule::get_records, set_records, and clear_records have parameters of type "uint: interrupt_index" instead of "interrupt_index: uint".

...have you considered making a compiler to check for type errors? I guess I accidentally have
Bilka
Factorio Staff
Factorio Staff
Posts: 3357
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Problems and inconsistences in lua api docs

Post by Bilka »

GlassBricks wrote: Thu Mar 06, 2025 12:16 am ...have you considered making a compiler to check for type errors? I guess I accidentally have
It errors, that's how a bunch of things you mentioned here got found and fixed independently.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Documentation Improvement Requests”