Runtime access to spawner protection flag
Runtime access to spawner protection flag
Spawners have an internal flag that controls whether it's protected from automated shooting by turrets, but unless I missed something, the only way I've found to set this flag is through a create entity trigger effect. There's no way to read to write the flag on an existing spawner entity. This could be a useful thing to have access to, like if a mod wants to do some custom targeting code and have it properly ignore these spawners, or if someone wanted to just change the protection status through a console command or otherwise.
Re: Runtime access to spawner protection flag
I've added LuaEntity::protected read/write for 2.1.
If you want to get ahold of me I'm almost always on Discord.