Runtime access to spawner protection flag

Techjar
Inserter
Inserter
Posts: 29
Joined: Tue Jan 13, 2015 11:33 pm
Contact:

Runtime access to spawner protection flag

Post by Techjar »

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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16212
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Runtime access to spawner protection flag

Post by Rseding91 »

I've added LuaEntity::protected read/write for 2.1.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”