contract HappyFacePlace is IERC721Receiver{
    
    address natealex;
    
    uint previousBlockNumber;
    
    uint totalAscended = 0;
    
    ChainFaces chainFaces;
    
    modifier ZomaNotAllowed {
        require(msg.sender == natealex);
        _;
    }
    
    constructor () public{
        natealex = msg.sender;
        chainFaces = ChainFaces(0x91047Abf3cAb8da5A9515c8750Ab33B4f1560a7A);
    }
    
    function MintAFaceForTheHappyPlace() public ZomaNotAllowed{
        //A Block a Face keeps the Faces Happy
        require(previousBlockNumber < block.number,"Each block deserves a Face in the Happy Face Place.");
        require(address(this).balance > 20 finney, "Any amount of Eth is worth eternal pleasure.");
        previousBlockNumber = block.number-10; //Lets not get too crazy in here loves
        
        //Come home to papa
        chainFaces.createFace.value(14 finney)(4206969);
        
        totalAscended++;
    }
    
    function UseDifferentAddress(address addr) public ZomaNotAllowed{
        natealex = addr;
    }
    
    function AddEth() public payable{
        //Zoma you can use this one if you like >.>
        require(msg.value > 0 wei);
    }
    
    function SubWei(uint weiAmt) public ZomaNotAllowed{
        msg.sender.transfer(weiAmt);
    }
    function EmptyEth() public ZomaNotAllowed{
        msg.sender.transfer(address(this).balance);
    }
    function GetTotalAscended() external view returns(uint){
        return totalAscended;
    }
    //IERC721Receiver implementation
    function onERC721Received(address, address, uint256, bytes memory) public returns (bytes4) {
        return this.onERC721Received.selector;
    }
}
function onERC721Received(address, address, uint256, bytes memory) public returns (bytes4) {
        return this.onERC721Received.selector;
    }
//IERC721Receiver implementation