Undocumented restriction on LuaEquipment.shield

Place to report issues and suggest improvements to the API documentation.
half a cat
Inserter
Inserter
Posts: 41
Joined: Sun Jul 16, 2023 4:03 pm
Contact:

Undocumented restriction on LuaEquipment.shield

Post by half a cat »

For equipment that is not shield equipment, writing to `LuaEquipment.shield` will abort the game with error message "Equipment is not shields.". Please add this restriction to the API documentation (https://lua-api.factorio.com/latest/cla ... tml#shield). I believe that the following description would be correct: This field is only writable if the type is `energy-shield-equipment`.
Post Reply

Return to “Documentation Improvement Requests”