Entity enable/disbale to generate lua event

Things that we aren't going to implement
Post Reply
User avatar
Sandman2003
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Nov 30, 2014 5:02 am
Contact:

Entity enable/disbale to generate lua event

Post by Sandman2003 »

I would like to be able to define an event that will trigger based on a (definable) entity type changing status from enabled to disabled or vice versa via in game circuit network conditions. Currently (as far as I can see), this has to be done by an on_nth_tick function that checks current status versus prior status, so an actual lua event could greatly improve mod performance versus this method.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Entity enable/disbale to generate lua event

Post by eradicator »

So basically a completely new prototype whichs sole purpose is to raise an event when it recieves a hard-coded (or better runtime determined?) circuit signal?
I guess that could be pretty useful for multi-entities with heavily customized behavior too. Would also make it possible to have "on/off" switches for basically any entity.

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

Re: Entity enable/disbale to generate lua event

Post by Rseding91 »

This currently isn't possible because the entire circuit network doesn't use events. The network operates by checking the signals each tick to see if the current condition is satisfied and if it is it operates. If not, it doesn't operate.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Sandman2003
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Sun Nov 30, 2014 5:02 am
Contact:

Re: Entity enable/disbale to generate lua event

Post by Sandman2003 »

Unfortunate, but I understand. Thanks Rseding91.

Post Reply

Return to “Won't implement”