adds resource check when trying to buy new building