BuildingType
    name = "BLD_SPACE_ELEVATOR"
    description = "BLD_SPACE_ELEVATOR_DESC"
    buildcost = 150 * [[BUILDING_COST_MULTIPLIER]]
    buildtime = 6
    location = And [
        Planet
        OwnedBy empire = Source.Owner
        Not Contains Building name = "BLD_SPACE_ELEVATOR"
        Not Planet type = Asteroids
        TargetPopulation low = 1
    ]
    enqueuelocation = [[ENQUEUE_BUILD_ONE_PER_PLANET]]
    effectsgroups = [
        [[SPECIES_LIKES_OR_DISLIKES_BUILDING_STABILITY_EFFECTS]]
    
        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet size = Tiny
            ]
            effects = SetMaxSupply value = Value + 1

        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet size = Small
            ]
            effects = SetMaxSupply value = Value + 2

        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet size = Medium
            ]
            effects = SetMaxSupply value = Value + 3

        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet size = Large
            ]
            effects = SetMaxSupply value = Value + 4

        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet size = Huge
            ]
            effects = SetMaxSupply value = Value + 5

        EffectsGroup
            scope = And [
                Object id = Source.PlanetID
                Planet type = GasGiant
            ]
            effects = SetMaxSupply value = Value + 3
    ]
    icon = "icons/building/space-elevator.png"

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