Browse Source

Merge pull request 'add droptable to roomstate' (#103) from fix_droptable_thing into master

pbs
jake 5 years ago
parent
commit
ebe93253a1
  1. 4
      Cargo.toml
  2. 5
      src/ship/room.rs

4
Cargo.toml

@ -19,8 +19,8 @@ path = "src/main.rs"
[dependencies]
libpso = { git = "http://git.sharnoth.com/jake/libpso" }
async-std = { version = "1.4.0", features = ["unstable"] }
futures = "0.3.1"
async-std = { version = "1.5.0", features = ["unstable"] }
futures = "0.3.4"
rand = "0.7.3"
rand_chacha = "0.2.2"
mio = "0.6"

5
src/ship/room.rs

@ -119,14 +119,13 @@ impl RoomMode {
}
#[derive(Debug)]
pub struct RoomState {
pub mode: RoomMode,
pub name: String,
pub password: [u16; 16],
//pub maps: [u32; 0x20],
pub maps: Maps,
// drop_table
pub drop_table: Box<DropTable<rand_chacha::ChaCha20Rng>>,
// items on ground
// enemy info
}
@ -201,8 +200,8 @@ impl RoomState {
mode: room_mode,
name: String::from_utf16_lossy(&create_room.name).trim_matches(char::from(0)).into(),
password: create_room.password,
//maps: [0; 0x20],
maps: Maps::new(room_mode.episode()),
drop_table: Box::new(DropTable::new(room_mode.episode(), room_mode.difficulty(), section_id)),
})
}

Loading…
Cancel
Save