BuildingType
    name = "BLD_SHIPYARD_AST_REF"
    description = "BLD_SHIPYARD_AST_REF_DESC"
    buildcost = 500 * [[BUILDING_COST_MULTIPLIER]]
    buildtime = 5
    location = And [
        Planet
        Not Contains Building name = "BLD_SHIPYARD_AST_REF"
        Planet type = Asteroids
        OwnedBy empire = Source.Owner
        Or  [
            Contains And [
                Building name = "BLD_SHIPYARD_AST"
                OwnedBy empire = Source.Owner
                ]
            Enqueued type = Building name = "BLD_SHIPYARD_AST"
            ]
        Not Contains And [
            Building name = "BLD_SHIPYARD_AST_REF"
            OwnedBy empire = Source.Owner
        ]
    ]
    EnqueueLocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    icon = "icons/building/shipyard-6.png"

#include "/scripting/common/enqueue.macros"
#include "/scripting/common/base_prod.macros"