Page 1 of 1

A way to prevent entities recieving beacon effects

Posted: Sun May 14, 2017 5:20 am
by CmdrKeen
I'm trying to make a mod with custom mining drills that lack module slots and cannot receive beacon effects. Unfortunately there's no way (that I know of) to prevent effects from being received at the moment. I'd like to have a method added to accomplish this.

Re: A way to prevent entities recieving beacon effects

Posted: Mon May 15, 2017 8:26 am
by bobingabout
Placing certain modules in an entity is controlled by the "allowed_effects" tag (I think that's what it's called), specifying no effects would prevent any module from being fitted.
I'm fairly sure this also prevents the effect being received from a transmitter.

However, I think mining drills might be a bit of an exception right now. Productivity is usually only allowed on recipes that are on the module's filter, yet can be placed in a mining drill even though no recipes are involved.

It would require more research, but I'm fairly sure you will require some... "Modding interface" being added to the game for this case.

Re: A way to prevent entities recieving beacon effects

Posted: Mon May 15, 2017 10:25 pm
by CmdrKeen
Placing certain modules in an entity is controlled by the "allowed_effects" tag (I think that's what it's called), specifying no effects would prevent any module from being fitted.
I'm fairly sure this also prevents the effect being received from a transmitter.

However, I think mining drills might be a bit of an exception right now. Productivity is usually only allowed on recipes that are on the module's filter, yet can be placed in a mining drill even though no recipes are involved.
I tried changing allowed_effects, but that only affects the module slots. The beacon effects still applied.

I'm also realizing that a method of disabling the mining productivity research for certain mining drill prototypes would also be needed for my mod. (at least without disabling the productivity research entirely)

Re: A way to prevent entities recieving beacon effects

Posted: Mon May 15, 2017 10:27 pm
by Distelzombie
Inserters or nuclear reactors do not gain from beacons. Maybe you'll find something useful in their code.