Page 1 of 1
Add prototype definition?
Posted: Tue Jan 26, 2021 9:24 am
by ss_Baum
Just a short question.
Is it possible to add a prototype definition to a prototype like energy-usage to a belt?
Or do I have to create a ElectricEnergyInterface that is placed on the same position of the original entity, so that there are two entities placed.
Re: Add prototype definition?
Posted: Tue Jan 26, 2021 9:26 am
by DaveMcW
No.
Yes.
Re: Add prototype definition?
Posted: Tue Jan 26, 2021 9:33 am
by ss_Baum
Thank you for your fast reply.
Re: Add prototype definition?
Posted: Tue Jan 26, 2021 10:01 am
by bormand
DaveMcW wrote: Tue Jan 26, 2021 9:26 amYes.
Are they optimized like solar panels or accumulators? Or every EEI is calculated separately?
Re: Add prototype definition?
Posted: Tue Jan 26, 2021 10:07 am
by boskid
bormand wrote: Tue Jan 26, 2021 10:01 amAre they optimized like solar panels or accumulators? Or every EEI is calculated separately?
EEI works as normal active entity: they will take their time in entity update to refill/use their energy buffer, and they are visited one by one by electric network update when distributing energy. Solar panels and accumulators do not take time in entity update and in electric network update the whole group is taken as a single record (in case of accumulators there are extra group conditions like the same state of charge).
Re: Add prototype definition?
Posted: Tue Jan 26, 2021 11:28 am
by ss_Baum
Actually one more question,
because I can't place to entities at the same time (I think) I probably have to use create_entity in my control.lua.
Is there a special thing I have to consider?
Like should I use the target definition for the create entity?
API I used:
https://lua-api.factorio.com/latest/Lua ... ate_entity
Re: Add prototype definition?
Posted: Tue Jan 26, 2021 12:55 pm
by darkfrei
ss_Baum wrote: Tue Jan 26, 2021 9:24 am
Just a short question.
Is it possible to add a prototype definition to a prototype like energy-usage to a belt?
Or do I have to create a ElectricEnergyInterface that is placed on the same position of the original entity, so that there are two entities placed.
See mod:
https://mods.factorio.com/mod/PoweredBelts