LuaEntity.result_quality type is inconsistent with description

curiosity
Filter Inserter
Filter Inserter
Posts: 484
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

LuaEntity.result_quality type is inconsistent with description

Post by curiosity »

https://lua-api.factorio.com/latest/cla ... lt_quality

The description says the property may be nil, but may not be set to nil. Meanwhile, the declaration says it always reads as LuaQualityPrototype, but accepts QualityID or nil. Seems like you misplaced the question mark.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 261
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: LuaEntity.result_quality type is inconsistent with description

Post by Therenas »

This is a bit awkward: The optionality applies to both read and write types, even though it might not look like it. This is something to be improved in the future.

In the meantime, I made it so the questionmark isn't directly attached to the write type, and made the description a bit less confusing for the next release.
Post Reply

Return to “Resolved Requests”