Powered Entities


This mod will create power lines between most of the base game's entities that require power.

Content
4 years ago
0.13 - 1.1
2.05K
Power

g you forgot something with the api

4 years ago

we also have to call Recalculate_Powered_Entities, and you should mention that we only have to do it on init and config changed

4 years ago

Good point, I've added some more information to the main page. Does that look good?

4 years ago

from what i've seen in your code i think it needs to be done on every configuration changed? i'm not sure..

4 years ago

Oh I thought you meant to tell mod authors to call it. It's quite a heavy action to be honest (the player sees a few second freeze on large factories), so I'm not sure if triggering it on every single configuration changed is a good idea.

I could probably track if a new entity was added and after a small lag run the recalculate though. I'll sit down and take a look at what I can do.

4 years ago

Ok, the new version will trigger a recalculate with a 5 second delay after the last entity is added through the remote call.

New response