Page 1 of 1

Surface.upgrade_area{} returns information

Posted: Sun Sep 01, 2019 1:44 pm
by Mylon
I'd like to build a mod which automatically upgrades modules to the next tier as they're made available to the logistic network. What I'm struggling with is limiting how many upgrade requests are made.

Likely the best way to do this would be to have some information returned by the upgrade_area function. Either the number of entities flagged, or (perhaps with a flag passed to the function) a table of the entities themselves.

Re: Surface.upgrade_area{} returns information

Posted: Sun Sep 01, 2019 2:54 pm
by Optera
Would being able to find only entities flagged for upgrades in a specific area help you?
viewtopic.php?f=28&t=75132

Re: Surface.upgrade_area{} returns information

Posted: Sun Sep 01, 2019 3:04 pm
by Mylon
Optera wrote:
Sun Sep 01, 2019 2:54 pm
Would being able to find only entities flagged for upgrades in a specific area help you?
viewtopic.php?f=28&t=75132
This would also solve my usecase, as I could do a count_entities_filtered before and after to determine how many were upgraded.