Beacon distribution effects

Post Reply
User avatar
Dustine
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Tue Mar 31, 2015 4:52 pm
Contact:

Beacon distribution effects

Post by Dustine »

Image
(The things on the orange box above)

You can already get a beacon's distribution efficiency on 0.15 with LuaEntityPrototype.distribution_effectivity, but to get a beacon's several effects currently you need to:

* Get the beacon's module inventory
* Iterate each module, get their effects which are part of its prototype, and add them
* Multiply by the beacon's distribution effectivity

If it's feasible for LuaEntity to have a read-only table of the summed effects (multiplied by the distribution effectivity or not, my issue here is the performance penalty on iterating on an inventory and checking module's prototypes), that'd be very helpful. Thank you!

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

Re: Beacon distribution effects

Post by Rseding91 »

I've added LuaEntity::effects read for 0.16.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Implemented mod requests”