BuildingType
    name = "BLD_SHIPYARD_ENRG_COMP"
    description = "BLD_SHIPYARD_ENRG_COMP_DESC"
    buildcost = 150 * [[BUILDING_COST_MULTIPLIER]]
    buildtime = 5
    tags = "ORBITAL"
    location = And [
        Planet
        OwnedBy empire = Source.Owner
        Not Contains Building name = "BLD_SHIPYARD_ENRG_COMP"
        [[LOCATION_ALLOW_ENQUEUE_IF_PREREQ_ENQUEUED(BLD_SHIPYARD_BASE)]]
        Or [
            Star type = [White Blue 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-10.png"

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