Undocumented restriction on LuaEquipment.shield

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`.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 311
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: Undocumented restriction on LuaEquipment.shield

Post by Therenas »

Thanks for the report. It is indeed unusual for attributes like that to error, I noted it for the next release.
Post Reply

Return to “Resolved Requests”