BuildingType
    name = "BLD_SHIPYARD_ENRG_SOLAR"
    description = "BLD_SHIPYARD_ENRG_SOLAR_DESC"
    buildcost = 1200 * [[BUILDING_COST_MULTIPLIER]]
    buildtime = 5
    tags = "ORBITAL"
    location = And [
        Planet
        OwnedBy empire = Source.Owner
        Not Contains Building name = "BLD_SHIPYARD_ENRG_SOLAR"
        [[LOCATION_ALLOW_ENQUEUE_IF_PREREQ_ENQUEUED(BLD_SHIPYARD_BASE)]]
        [[LOCATION_ALLOW_BUILD_IF_PREREQ_ENQUEUED(BLD_SHIPYARD_ENRG_COMP)]]
        Or [
            Star type = BlackHole
            Enqueued type = Building name = "BLD_ART_BLACK_HOLE"
            ContainedBy And [
                Object id = RootCandidate.SystemID
                Star type = Red
                Contains And [
                    InSystem id = RootCandidate.SystemID
                    Planet
                    OwnedBy empire = Source.Owner
                    Enqueued type = Building name = "BLD_ART_BLACK_HOLE"
                ]
            ]
        ]
    ]
    enqueuelocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    effectsgroups = [
        [[SPECIES_LIKES_OR_DISLIKES_BUILDING_STABILITY_EFFECTS]]
    ]
    icon = "icons/building/shipyard-16.png"

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