Allow shooting_entity on LuaEntity turrets to be set to nil

Post Reply
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Allow shooting_entity on LuaEntity turrets to be set to nil

Post by Reika »

LuaEntity already has 'shooting_entity', but it cannot be set to nil to tell the turret not to target anything (or clear an existing target). In fact, there seems to be no way to set a turret to "No current target" at all.
Image

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow shooting_entity on LuaEntity turrets to be set to nil

Post by Rseding91 »

Ok, I changed it for 0.17 so it can be set to nil. Now, the next tick the turret updates it will look for a new target so I'm not sure if it's that useful.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Allow shooting_entity on LuaEntity turrets to be set to nil

Post by Reika »

Rseding91 wrote:Ok, I changed it for 0.17 so it can be set to nil. Now, the next tick the turret updates it will look for a new target so I'm not sure if it's that useful.
Does on_tick run after this? If so, I can just clear it every tick, and so prevent a firing upon things it should not shoot.
Image

Post Reply

Return to “Implemented mod requests”