BuildingType
    name = "BLD_PLANET_BEACON"
    description = "BLD_PLANET_BEACON_DESC"
    buildcost = 1
    buildtime = 1
    location = And [
        Planet
        Not Contains Building name = "BLD_PLANET_BEACON"
        OwnedBy empire = Source.Owner
        Number high = 6 condition = And [
            Planet
            InSystem id = RootCandidate.SystemID
        ]
    ]

    enqueuelocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    effectsgroups = [
        [[SPECIES_LIKES_OR_DISLIKES_BUILDING_STABILITY_EFFECTS]]
    
        EffectsGroup
            scope = Source
            activation = WithinStarlaneJumps jumps = 0 condition = And [
                Planet
                Focus type = "FOCUS_PLANET_DRIVE"
            ]
            effects = Destroy
    ]
    icon = "icons/building/beacon.png"

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