Geoff the Medio wrote:
A nearly-complete solution to preventing double-production of buildings would need an extra condition...
In the SVN version, I've added an Enqueued condition, which should be usable something like:
Code:
Enqueued type = Building name = "BLD_OBSERVATORY" empire = Source.Owner low = 0 high = 1
which will match planets where the indicated empire has within the indicated range of number of items enqueued of the indicated type and name.
For preventing multiple-enqueues of a particular building, you'd just need to specify high = 0, which would exclude any planet with 1 or more of the indicated building type enqueued. (low = 0 is assumed if not specified.) To prevent multiple production of a particular building, you'd want to And this with a condition that checks how many of the building are already present on the planet, so that having one present or enqueued prevents any more from being enqueued or having PP applied if already enqueued.
This also works for ship designs (type = Ship) by name or number, so a ship could have a condition that matches planets where the same design is enqueued (using design = Source.DesignID) or location conditions could refer to predefined ship designs by name, as in
Code:
Enqueued type = Ship name = "SD_SCOUT" low = 1
which would match any planet where at least one "Scout" ship (of the predefined variety) is enqueued by any empire.
I haven't actually tested this, though.
Edit: There's probably a bit of a problem with using the Enqueued condition: the location condition is tested to decide if something can be added to the queue, and to decide if something on the queue can receive PP that turn. That means that for something not be enqueuable, it also will not receive any funding, and if it does receive funding, it is enqueuable. So, if the limit for something on the queue is set at 1, then it will be enqueuable, but not fundable once on the queue. If the limit is 2, it will be enqueuable twice, though won't be fundable after the second copy is enqueued.