Browse Source

foreshadowing

pbs
jake 5 years ago
parent
commit
a6c8c959fc
  1. 4
      src/ship/room.rs

4
src/ship/room.rs

@ -1,6 +1,8 @@
use std::convert::{From, Into, TryFrom, TryInto}; use std::convert::{From, Into, TryFrom, TryInto};
use crate::ship::map::Maps; use crate::ship::map::Maps;
use crate::ship::drops::DropTable;
use crate::entity::character::SectionID;
#[derive(Debug)] #[derive(Debug)]
pub enum RoomCreationError { pub enum RoomCreationError {
@ -166,7 +168,7 @@ impl RoomState {
difficulty + 0x22 difficulty + 0x22
} }
pub fn from_create_room(create_room: &libpso::packet::ship::CreateRoom) -> Result<RoomState, RoomCreationError> {
pub fn from_create_room(create_room: &libpso::packet::ship::CreateRoom, section_id: SectionID) -> Result<RoomState, RoomCreationError> {
if [create_room.battle, create_room.challenge, create_room.single_player].iter().sum::<u8>() > 1 { if [create_room.battle, create_room.challenge, create_room.single_player].iter().sum::<u8>() > 1 {
return Err(RoomCreationError::InvalidMode) return Err(RoomCreationError::InvalidMode)
} }

Loading…
Cancel
Save