Page 1 of 1
Building count
Posted: Fri May 13, 2016 11:03 pm
by Sworn
Is it possible to count how many of XXX buildings you have placed (in the world)?
A conditions that you select a building and it's returns how many do you have placed in your world.
You have in a circuit conditions the Total of Robots, and would be perfect if you could get the total of Roboports, then any time you place a new roboport, with some combinator will be possible to count how many roboports you have and create more robots.
Like if you want 250 robots per RoboPort, so using the arithimetic combinator you could do Total Robots * TotalRoboports and use this a condition to starts the robot production while it's less then this result.
Re: Building count
Posted: Sat May 14, 2016 4:38 pm
by burgerhex
This is the only thing I can think of, but it might lag you: Grab a deconstruction planner, go to the top corner of your base, walk all the way to the bottom of your base (DON'T LET GO OF YOUR MOUSE), and it'll tell you how much of each building you have.
Re: Building count
Posted: Sat May 14, 2016 5:28 pm
by sparr
A mod could certainly add this. Maybe post a feature request to one of the mods that adds smarts to the logistics network?
Re: Building count
Posted: Wed May 18, 2016 2:32 pm
by creekz
burgerhex wrote:This is the only thing I can think of, but it might lag you: Grab a deconstruction planner, go to the top corner of your base, walk all the way to the bottom of your base (DON'T LET GO OF YOUR MOUSE), and it'll tell you how much of each building you have.
Wouldn't it be better to use a Blueprint instead of deconstruction planner? Your base wouldn't vanish if you let the mouse go. x)
Re: Building count
Posted: Wed May 18, 2016 7:14 pm
by garath
Couldn't you get a rough count of buildings by looking at power usage?
Re: Building count
Posted: Sun May 22, 2016 10:21 pm
by sparr
I want to implement this. Counting the buildings is trivial. The problem is where/how to show it to the player. I can't figure out if/how you can write new info to the existing UI, or if I'm going to have to add a new GUI button/panel like some of the logistics mods do.
Re: Building count
Posted: Thu Jun 30, 2016 1:20 am
by Sworn
you could show as the same of the robots count on the logistc network, like one more wire condition.
Re: Building count
Posted: Thu Jun 30, 2016 3:28 am
by sparr
What would the one new wire signal mean? I thought you wanted a count of each building type.
Re: Building count
Posted: Thu Jun 30, 2016 1:56 pm
by safan
It would be handy if it gets a console command like:
>> count
gives count of all buildings
>> count roboports
gives count of the roboports
but then you can't use it yet for the logistic network.
Re: Building count
Posted: Thu Jul 28, 2016 6:28 am
by Sworn
if " Counting the buildings is trivial", you could add the build count to an signal and "some how" filter the building type. Something like a filter. A block that has one slot, you filter the building on this slot and it's output a signal with that building count