1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
/* Allows the current building to be enqueued if the given prerequisite is built or enqueued.
Takes the prerequisite name as parameter; Usage:
[[LOCATION_ALLOW_ENQUEUE_IF_PREREQ_ENQUEUED(BLD_SHIPYARD_BASE)]]
*/
LOCATION_ALLOW_ENQUEUE_IF_PREREQ_ENQUEUED
'''Or [
Contains And [
Building name = "@1@"
OwnedBy empire = Source.Owner
]
// Allows enqueue if this is not enqueued but prerequisite @1@ is
And [
Enqueued type = Building name = "@1@"
Not Enqueued type = Building name = CurrentContent
]
]'''
/* Allows the current building to be build if the given prerequisite is built or enqueued.
Takes the prerequisite name as parameter; Usage:
[[LOCATION_ALLOW_BUILD_IF_PREREQ_ENQUEUED(BLD_SHIPYARD_ORBITAL_DRYDOCK)]]
*/
LOCATION_ALLOW_BUILD_IF_PREREQ_ENQUEUED
'''Or [
Contains And [
Building name = "@1@"
OwnedBy empire = Source.Owner
]
Enqueued type = Building name = "@1@"
]'''
ENQUEUE_BUILD_ONE_PER_PLANET
'''And [
// Only check for own buildings. The client may have seen a building once, which has been
// destroyed while outside vision range. In this case the building remains forever in the
// client's context, but it should not stop a player from rebuilding the same type.
Not Contains And [ Building name = CurrentContent OwnedBy empire = Source.Owner ]
Not Enqueued type = Building name = CurrentContent
OwnedBy empire = Source.Owner
]'''
ENQUEUE_ARTIFICIAL_PLANET_EXCLUSION
'''And [
Not Contains Building name = "BLD_ART_PLANET"
Not Contains Building name = "BLD_ART_FACTORY_PLANET"
Not Contains Building name = "BLD_ART_PARADISE_PLANET"
Not Enqueued type = Building name = "BLD_ART_PLANET"
Not Enqueued type = Building name = "BLD_ART_FACTORY_PLANET"
Not Enqueued type = Building name = "BLD_ART_PARADISE_PLANET"
]'''
// @1@ code before each planet type
// @2@ code after each planet type
FOR_ALL_TERRAFORM_PLANET_TYPES
'''@1@BARREN@2@
@1@TUNDRA@2@
@1@DESERT@2@
@1@TERRAN@2@
@1@OCEAN@2@
@1@SWAMP@2@
@1@TOXIC@2@
@1@INFERNO@2@
@1@RADIATED@2@
@1@BARREN@2@'''
|