returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 80 \nto create Ultimate rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 80 \nto create Ultimate rooms.".into())))].into_iter()))
}
}
},
},
room::Difficulty::VeryHard=>{
room::Difficulty::VeryHard=>{
iflevel<40{
iflevel<40{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 40 \nto create Very Hard rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 40 \nto create Very Hard rooms.".into())))].into_iter()))
}
}
},
},
room::Difficulty::Hard=>{
room::Difficulty::Hard=>{
iflevel<20{
iflevel<20{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 20 \nto create Hard rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 20 \nto create Hard rooms.".into())))].into_iter()))
}
}
},
},
room::Difficulty::Normal=>{
room::Difficulty::Normal=>{
iflevel<1{
iflevel<1{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 1 \nto create Normal rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 1 \nto create Normal rooms.".into())))].into_iter()))
}
}
},
},
// i can't believe you've done this
// i can't believe you've done this
@ -99,22 +99,22 @@ pub fn join_room(id: ClientId,
matchroom.mode.difficulty(){
matchroom.mode.difficulty(){
room::Difficulty::Ultimate=>{
room::Difficulty::Ultimate=>{
iflevel<80{
iflevel<80{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 80 \nto join Ultimate rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 80 \nto join Ultimate rooms.".into())))].into_iter()))
}
}
},
},
room::Difficulty::VeryHard=>{
room::Difficulty::VeryHard=>{
iflevel<40{
iflevel<40{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 40 \nto join Very Hard rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 40 \nto join Very Hard rooms.".into())))].into_iter()))
}
}
},
},
room::Difficulty::Hard=>{
room::Difficulty::Hard=>{
iflevel<20{
iflevel<20{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 20 \nto join Hard rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 20 \nto join Hard rooms.".into())))].into_iter()))
}
}
},
},
room::Difficulty::Normal=>{
room::Difficulty::Normal=>{
iflevel<1{
iflevel<1{
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 1 \nto join Normal rooms.\0".into())))].into_iter()))
returnOk(Box::new(vec![(id,SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 1 \nto join Normal rooms.".into())))].into_iter()))