contract EtherLambosBuilding is EtherLambosSale {

    // Limits the number of cars the contract owner can ever create.
    //uint256 public constant PROMO_CREATION_LIMIT = 5000;
    //uint256 public constant GEN0_CREATION_LIMIT = 45000;


    // Counts the number of cars the contract owner has created.
    uint256 public lambosBuildCount;


    /// @dev we can build lambos. Only callable by COO
    /// @param _attributes the encoded attributes of the lambo to be created, any value is accepted
    /// @param _owner the future owner of the created lambo. Default to contract COO
    /// @param _model the model of the created lambo. 
    function createLambo(uint256 _attributes, address _owner, uint64 _model) external onlyCOO {
        address lamboOwner = _owner;
        if (lamboOwner == address(0)) {
             lamboOwner = cooAddress;
        }
        //require(promoCreatedCount < PROMO_CREATION_LIMIT);

        lambosBuildCount++;
        _createLambo(_attributes, lamboOwner, _model);
    }

    function bulkCreateLambo(uint256 _attributes, address _owner, uint64 _model,uint256 count, uint256 startNo) external onlyCOO {
        address lamboOwner = _owner;
        uint256 att=_attributes;
        if (lamboOwner == address(0)) {
             lamboOwner = cooAddress;
        }
        
        //do some replacing
            //_attributes=_attributes-part*(10 ** 66);
        
        
        //require(promoCreatedCount < PROMO_CREATION_LIMIT);
        for(uint256 i=0;i<count;i++)
            {
            lambosBuildCount++;
            att=_attributes+(startNo+i)*(10 ** 66);
            _createLambo(att, lamboOwner, _model);
            }
    }
}
/// @title all functions related to creating lambos
function createLambo(uint256 _attributes, address _owner, uint64 _model) external onlyCOO {
    address lamboOwner = _owner;
    if (lamboOwner == address(0)) {
         lamboOwner = cooAddress;
    }
    //require(promoCreatedCount < PROMO_CREATION_LIMIT);

    lambosBuildCount++;
    _createLambo(_attributes, lamboOwner, _model);
}

/// @dev we can build lambos. Only callable by COO
/// @param _attributes the encoded attributes of the lambo to be created, any value is accepted
/// @param _owner the future owner of the created lambo. Default to contract COO
/// @param _model the model of the created lambo. 