Combo entity: accum + chest. How?

Place to get help with not working mods / modding interface.
Post Reply
apriori
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Combo entity: accum + chest. How?

Post by apriori »

How can I create (or simulate) an entity, that consumes energy while being charged and can get items like chest (to put and pick items with inserters and loaders)? And power consumption should be calculated correctly to be shown in energy stats window.
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.

apriori
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Re: Combo entity: accum + chest. How?

Post by apriori »

Nobody knows? Maybe I should just spawn chest-like entity and hidden accu with output=0 in the same position?
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Combo entity: accum + chest. How?

Post by Mooncat »

Yes, using script to place another hidden entity should be the only solution right now.
If your chest will constantly consume a fixed amount of energy, I would suggest using entities that have the drain property, like assembling-machine.
If the amount of energy consumption will change in runtime, you will have to use electric-energy-interface.
Remember to set destructible and minable to false for the hidden entity.

Post Reply

Return to “Modding help”