std::vector<om_vehicle> overmapbuffer::get_vehicle(int x, int y, int z, bool require_pda)
{
    std::vector<om_vehicle> result;
    if( z != 0 ) {
        return result;
    }
    // if the player is not carrying a PDA then he cannot see the vehicle.
    if( require_pda && !g->u.has_pda() ) {
        return result;
    }
    overmap *om = get_existing_om_global(x, y);
    if( om == nullptr ) {
        return result;
    }
    for( const auto &ov : om->vehicles ) {
        if ( ov.second.x == x && ov.second.y == y ) {
            result.push_back( ov.second );
        }
    }
    return result;
}
bool overmapbuffer::has_vehicle(int x, int y, int z, bool require_pda)
{
    if (z) {
        return false;
    }

    // if the player is not carrying a PDA then he cannot see the vehicle.
    if (require_pda && !g->u.has_pda()) {
        return false;
    }

    overmap const *const om = get_existing_om_global(x, y);
    if (!om) {
        return false;
    }

    for (auto const &v : om->vehicles) {
        if (v.second.x == x && v.second.y == y) {
            return true;
        }
    }

    return false;;
}
bool overmapbuffer::seen(int x, int y, int z) const
{
    const overmap *om = get_existing_om_global(x, y);
    return (om != NULL) && const_cast<overmap*>(om)->seen(x, y, z);
}
bool overmapbuffer::has_vehicle(int x, int y, int z, bool require_pda) const
{
    const overmap *om = get_existing_om_global(x, y);
    return (om != NULL) && om->has_vehicle(x, y, z, require_pda);
}
bool overmapbuffer::has_note(int x, int y, int z) const
{
    const overmap *om = get_existing_om_global(x, y);
    return (om != NULL) && om->has_note(x, y, z);
}
bool overmapbuffer::is_explored(int x, int y, int z)
{
    const overmap *om = get_existing_om_global(x, y);
    return (om != NULL) && om->is_explored(x, y, z);
}