Page 1 of 1

Beacon distribution effects

Posted: Wed Oct 18, 2017 8:21 pm
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!

Re: Beacon distribution effects

Posted: Thu Oct 19, 2017 3:28 am
by Rseding91
I've added LuaEntity::effects read for 0.16.