BuildingType
    name = "BLD_SHIPYARD_ENRG_SOLAR"
    description = "BLD_SHIPYARD_ENRG_SOLAR_DESC"
    buildcost = 1200 * [[BUILDING_COST_MULTIPLIER]]
    buildtime = 5
    tags = "ORBITAL"
    location = And [
        Planet
        Not Contains Building name = "BLD_SHIPYARD_ENRG_SOLAR"
        Or  [
            Contains And [
                Building name = "BLD_SHIPYARD_ENRG_COMP"
                OwnedBy empire = Source.Owner
                ]
            Enqueued type = Building name = "BLD_SHIPYARD_ENRG_COMP"
        ]
        Contains And [
            Building name = "BLD_SHIPYARD_BASE"
            OwnedBy empire = Source.Owner
        ]
        Or [
            Star type = BlackHole
            Enqueued type = Building name = "BLD_ART_BLACK_HOLE"
            ContainedBy And [
                Star type = Red
                Contains And [
                    Planet
                    OwnedBy empire = Source.Owner
                    Enqueued type = Building name = "BLD_ART_BLACK_HOLE"
                ]
            ]
        ]
        OwnedBy empire = Source.Owner
    ]
    EnqueueLocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    icon = "icons/building/shipyard-16.png"

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