Page 1 of 1

Undocumented restriction on LuaEquipment.shield

Posted: Thu Mar 13, 2025 2:43 am
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`.

Re: Undocumented restriction on LuaEquipment.shield

Posted: Tue May 06, 2025 7:54 am
by Therenas
Thanks for the report. It is indeed unusual for attributes like that to error, I noted it for the next release.