Merge branch 'v0' of ssh://ssh.spbr.net:51122/spacebar/rust-nex into v0
All checks were successful
Build and Test / fast-racing-neo (push) Successful in 2m13s
Build and Test / splatoon (push) Successful in 2m38s
Build and Test / wii-u-chat (push) Successful in 2m59s
Build and Test / wii-sports-club (push) Successful in 3m17s
Build and Test / mario-tennis (push) Successful in 3m36s
Build and Test / friends (push) Successful in 3m52s
Build and Test / splatoon-testfire (push) Successful in 4m16s
Build and Test / super-mario-maker (push) Successful in 5m42s
Build and Test / puyopuyo (push) Successful in 6m7s
Build and Test / minecraft-wiiu (push) Successful in 6m26s
All checks were successful
Build and Test / fast-racing-neo (push) Successful in 2m13s
Build and Test / splatoon (push) Successful in 2m38s
Build and Test / wii-u-chat (push) Successful in 2m59s
Build and Test / wii-sports-club (push) Successful in 3m17s
Build and Test / mario-tennis (push) Successful in 3m36s
Build and Test / friends (push) Successful in 3m52s
Build and Test / splatoon-testfire (push) Successful in 4m16s
Build and Test / super-mario-maker (push) Successful in 5m42s
Build and Test / puyopuyo (push) Successful in 6m7s
Build and Test / minecraft-wiiu (push) Successful in 6m26s
This commit is contained in:
commit
f678bcc929
3 changed files with 23 additions and 24 deletions
|
|
@ -399,31 +399,28 @@ impl ExtendedMatchmakeSession {
|
|||
|
||||
#[cfg(feature = "splatoon")]
|
||||
{
|
||||
if search_criteria
|
||||
.attribs
|
||||
.get(0)
|
||||
.map(|str| str.parse().ok())
|
||||
.flatten()
|
||||
!= self.session.attributes.get(0).map(|v| *v)
|
||||
{
|
||||
if search_criteria.attribs.get(0).is_some_and(|s| {
|
||||
self.session
|
||||
.attributes
|
||||
.get(0)
|
||||
.is_some_and(|a| s.0.contains(a))
|
||||
}) {
|
||||
return Ok(false);
|
||||
}
|
||||
if search_criteria
|
||||
.attribs
|
||||
.get(2)
|
||||
.map(|str| str.parse().ok())
|
||||
.flatten()
|
||||
!= self.session.attributes.get(2).map(|v| *v)
|
||||
{
|
||||
if search_criteria.attribs.get(2).is_some_and(|s| {
|
||||
self.session
|
||||
.attributes
|
||||
.get(2)
|
||||
.is_some_and(|a| s.0.contains(a))
|
||||
}) {
|
||||
return Ok(false);
|
||||
}
|
||||
if search_criteria
|
||||
.attribs
|
||||
.get(3)
|
||||
.map(|str| str.parse().ok())
|
||||
.flatten()
|
||||
!= self.session.attributes.get(3).map(|v| *v)
|
||||
{
|
||||
if search_criteria.attribs.get(3).is_some_and(|s| {
|
||||
self.session
|
||||
.attributes
|
||||
.get(3)
|
||||
.is_some_and(|a| s.0.contains(a))
|
||||
}) {
|
||||
return Ok(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ use rnex_core::rmc::structures::variant::Variant;
|
|||
|
||||
use rnex_core::PID;
|
||||
|
||||
use crate::rmc::structures::string_set::StringSet;
|
||||
|
||||
// rmc structure
|
||||
#[derive(RmcSerialize, Debug, Clone, Default, PartialEq)]
|
||||
#[rmc_struct(0)]
|
||||
|
|
@ -75,7 +77,7 @@ cfg_if! {
|
|||
#[derive(RmcSerialize, Debug, Clone)]
|
||||
#[rmc_struct(3)]
|
||||
pub struct MatchmakeSessionSearchCriteria {
|
||||
pub attribs: Vec<String>,
|
||||
pub attribs: Vec<StringSet<u32>>,
|
||||
pub game_mode: String,
|
||||
pub minimum_participants: String,
|
||||
pub maximum_participants: String,
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ use std::{collections::HashSet, hash::Hash, str::FromStr, string::ToString};
|
|||
|
||||
use rnex_core::rmc::structures::RmcSerialize;
|
||||
|
||||
#[derive(Debug)]
|
||||
struct StringSet<T: FromStr + ToString + Eq>(HashSet<T>)
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct StringSet<T: FromStr + ToString + Eq>(pub HashSet<T>)
|
||||
where
|
||||
<T as FromStr>::Err: std::error::Error + Send + Sync + 'static;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue