room_join_requirements #49

Merged
jake merged 6 commits from room_join_requirements into master 2021-09-30 21:55:51 -04:00
Showing only changes of commit 6980355c00 - Show all commits

View File

@ -35,11 +35,6 @@ pub fn create_room(id: ClientId,
return Ok(Box::new(vec![(id, SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 20 \nto create Hard rooms.".into())))].into_iter())) return Ok(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 => {
if level < 1 {
return Ok(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
_ => {unreachable!()}, _ => {unreachable!()},
}; };
@ -112,11 +107,6 @@ pub fn join_room(id: ClientId,
return Ok(Box::new(vec![(id, SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 20 \nto join Hard rooms.".into())))].into_iter())) return Ok(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 => {
if level < 1 {
return Ok(Box::new(vec![(id, SendShipPacket::SmallDialog(SmallDialog::new("You must be at least level 1 \nto join Normal rooms.".into())))].into_iter()))
}
},
}; };
let original_area = client_location.get_area(id).unwrap(); let original_area = client_location.get_area(id).unwrap();