|
|
@ -2,7 +2,7 @@ use serde::{Serialize, Deserialize}; |
|
|
|
|
|
|
|
|
|
|
|
use crate::entity::character::{CharacterEntityId, SectionID};
|
|
|
|
use crate::ship::room::{Episode, Difficulty, RoomMode};
|
|
|
|
use crate::ship::room::{Episode, Difficulty};
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(PartialEq, Eq, Copy, Clone, Debug, Hash, PartialOrd, Ord, Serialize, Deserialize)]
|
|
|
@ -62,34 +62,6 @@ pub struct NewRoomEntity { |
|
|
|
pub difficulty: Difficulty,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl NewRoomEntity {
|
|
|
|
fn new(name: String, section_id: SectionID, mode: RoomMode) -> NewRoomEntity {
|
|
|
|
NewRoomEntity {
|
|
|
|
name: name,
|
|
|
|
section_id: section_id,
|
|
|
|
mode: match mode {
|
|
|
|
RoomMode::Single {..} => RoomEntityMode::Single,
|
|
|
|
RoomMode::Multi {..} => RoomEntityMode::Multi,
|
|
|
|
RoomMode::Challenge {..} => RoomEntityMode::Challenge,
|
|
|
|
RoomMode::Battle {..} => RoomEntityMode::Battle,
|
|
|
|
},
|
|
|
|
episode: match mode {
|
|
|
|
RoomMode::Single { episode, .. } => episode,
|
|
|
|
RoomMode::Multi { episode, ..} => episode ,
|
|
|
|
RoomMode::Challenge { episode, ..} => episode,
|
|
|
|
RoomMode::Battle { episode, ..} => episode,
|
|
|
|
},
|
|
|
|
difficulty: match mode {
|
|
|
|
RoomMode::Single { difficulty, .. } => difficulty,
|
|
|
|
RoomMode::Multi { difficulty, ..} => difficulty ,
|
|
|
|
RoomMode::Challenge {..} => Difficulty::Normal,
|
|
|
|
RoomMode::Battle { difficulty, ..} => difficulty,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, Serialize)]
|
|
|
|
pub enum RoomNote {
|
|
|
|
Create {
|
|
|
|