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.
LuaEntity.result_quality type is inconsistent with description
Re: LuaEntity.result_quality type is inconsistent with description
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.
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.