diff --git a/src/ship/drops/mod.rs b/src/ship/drops/mod.rs index 5e9747f..e4f695d 100644 --- a/src/ship/drops/mod.rs +++ b/src/ship/drops/mod.rs @@ -112,7 +112,7 @@ pub struct ItemDrop { } -pub struct DropTable { +pub struct DropTable { monster_stats: HashMap, rare_table: RareDropTable, weapon_table: GenericWeaponTable, @@ -121,11 +121,11 @@ pub struct DropTable { unit_table: GenericUnitTable, tool_table: ToolTable, box_table: BoxDropTable, - rng: R, + rng: rand_chacha::ChaCha20Rng, } -impl DropTable { - pub fn new(episode: Episode, difficulty: Difficulty, section_id: SectionID) -> DropTable { +impl DropTable { + pub fn new(episode: Episode, difficulty: Difficulty, section_id: SectionID) -> DropTable { let monster_stats: HashMap = load_data_file(episode, difficulty, section_id, "monster_dar.toml"); DropTable { @@ -137,7 +137,7 @@ impl DropTable { unit_table: GenericUnitTable::new(episode, difficulty, section_id), tool_table: ToolTable::new(episode, difficulty, section_id), box_table: BoxDropTable::new(episode, difficulty, section_id), - rng: R::from_entropy(), + rng: rand_chacha::ChaCha20Rng::from_entropy(), } } @@ -203,6 +203,6 @@ mod test { let section_id = vec![SectionID::Viridia, SectionID::Greenill, SectionID::Skyly, SectionID::Bluefull, SectionID::Purplenum, SectionID::Pinkal, SectionID::Redria, SectionID::Oran, SectionID::Yellowboze, SectionID::Whitill] .into_iter().choose(&mut rng).unwrap(); - DropTable::::new(episode, difficulty, section_id); + DropTable::new(episode, difficulty, section_id); } } diff --git a/src/ship/room.rs b/src/ship/room.rs index 523169a..31e0b87 100644 --- a/src/ship/room.rs +++ b/src/ship/room.rs @@ -310,7 +310,7 @@ pub struct RoomState { pub name: String, pub password: [u16; 16], pub maps: Maps, - pub drop_table: Box>, + pub drop_table: Box, pub section_id: SectionID, pub random_seed: u32, pub bursting: bool,