|
|
@ -410,14 +410,13 @@ impl<EG: EntityGateway + Clone + 'static> ShipServerStateBuilder<EG> { |
|
|
|
item_state: items::state::ItemState::default(),
|
|
|
|
ip: self.ip.unwrap_or_else(|| Ipv4Addr::new(127,0,0,1)),
|
|
|
|
port: self.port.unwrap_or(SHIP_PORT),
|
|
|
|
#[allow(clippy::box_default)] // this lint leads to another which just doesn't work
|
|
|
|
shops: Arc::new(self.shops.unwrap_or(Box::new(StandardItemShops::default()))),
|
|
|
|
shops: Arc::new(self.shops.unwrap_or_else(|| Box::<StandardItemShops>::default())),
|
|
|
|
blocks: Blocks(blocks),
|
|
|
|
event: self.event.unwrap_or(Holiday::None),
|
|
|
|
map_builder: Arc::new(self.map_builder.unwrap_or(Box::new(generate_free_roam_maps))),
|
|
|
|
drop_table_builder: Arc::new(self.drop_table_builder.unwrap_or(Box::new(StandardDropTable::new))),
|
|
|
|
standard_quest_builder: Arc::new(self.standard_quest_builder.unwrap_or(Box::new(load_standard_quests))),
|
|
|
|
government_quest_builder: Arc::new(self.government_quest_builder.unwrap_or(Box::new(load_government_quests))),
|
|
|
|
map_builder: Arc::new(self.map_builder.unwrap_or_else(|| Box::new(generate_free_roam_maps))),
|
|
|
|
drop_table_builder: Arc::new(self.drop_table_builder.unwrap_or_else(|| Box::new(StandardDropTable::new))),
|
|
|
|
standard_quest_builder: Arc::new(self.standard_quest_builder.unwrap_or_else(|| Box::new(load_standard_quests))),
|
|
|
|
government_quest_builder: Arc::new(self.government_quest_builder.unwrap_or_else(|| Box::new(load_government_quests))),
|
|
|
|
|
|
|
|
auth_token: self.auth_token.unwrap_or_else(|| AuthToken("".into())),
|
|
|
|
ship_list: Arc::new(RwLock::new(Vec::new())),
|
|
|
|