From 925deba57eed69bec3382e30648af6b4b687a2b6 Mon Sep 17 00:00:00 2001 From: Condorra Date: Fri, 6 Oct 2023 22:32:15 +1100 Subject: [PATCH] Implement scavenge command --- blastmud_game/src/db.rs | 36 +++- .../src/message_handler/user_commands.rs | 4 + .../message_handler/user_commands/scavenge.rs | 147 +++++++++++++++ blastmud_game/src/models/item.rs | 7 + .../src/regular_tasks/queued_command.rs | 9 +- blastmud_game/src/services/spawn.rs | 30 ++- .../src/static_content/possession_type.rs | 3 + .../static_content/possession_type/junk.rs | 19 ++ blastmud_game/src/static_content/room.rs | 24 ++- .../src/static_content/room/melbs.rs | 171 +++++++++++++++++- 10 files changed, 440 insertions(+), 10 deletions(-) create mode 100644 blastmud_game/src/message_handler/user_commands/scavenge.rs create mode 100644 blastmud_game/src/static_content/possession_type/junk.rs diff --git a/blastmud_game/src/db.rs b/blastmud_game/src/db.rs index 23083959..b5fb69e3 100644 --- a/blastmud_game/src/db.rs +++ b/blastmud_game/src/db.rs @@ -3,7 +3,7 @@ use crate::message_handler::ListenerSession; use crate::models::{ consent::{Consent, ConsentType}, corp::{Corp, CorpCommType, CorpId, CorpMembership}, - item::{Item, ItemFlag, LocationActionType}, + item::{Item, ItemFlag, LocationActionType, Scavtype}, session::Session, task::{Task, TaskParse}, user::User, @@ -788,6 +788,29 @@ impl DBTrans { } } + pub async fn find_scavhidden_item_by_location<'a>( + self: &'a Self, + location: &'a str, + scavtype: &Scavtype, + max_difficulty: i64, + ) -> DResult> { + match self + .pg_trans()? + .query_opt( + "SELECT details FROM items WHERE details->>'location' = $1 AND \ + details->'action_type'->'Scavhidden'->'scavtype' = $2::JSONB AND \ + (details->'action_type'->'Scavhidden'->>'difficulty')::INT8 <= $3 \ + ORDER BY details->>'display' + LIMIT 1", + &[&location, &serde_json::to_value(scavtype)?, &max_difficulty], + ) + .await? + { + None => Ok(None), + Some(i) => Ok(Some(serde_json::from_value(i.get("details"))?)), + } + } + pub async fn save_item_model(self: &Self, details: &Item) -> DResult<()> { self.pg_trans()? .execute( @@ -817,6 +840,17 @@ impl DBTrans { Ok(()) } + pub async fn clean_scavhidden<'a>(self: &'a Self) -> DResult<()> { + self.pg_trans()? + .execute( + "DELETE FROM items WHERE \ + details->'action_type'->'Scavhidden' IS NOT NULL", + &[], + ) + .await?; + Ok(()) + } + pub async fn find_session_for_player<'a>( self: &'a Self, item_code: &'a str, diff --git a/blastmud_game/src/message_handler/user_commands.rs b/blastmud_game/src/message_handler/user_commands.rs index e854941e..ed98dfc7 100644 --- a/blastmud_game/src/message_handler/user_commands.rs +++ b/blastmud_game/src/message_handler/user_commands.rs @@ -64,6 +64,7 @@ pub mod rent; mod report; mod reset_spawns; pub mod say; +pub mod scavenge; mod score; mod sign; pub mod sit; @@ -225,6 +226,9 @@ static REGISTERED_COMMANDS: UserVerbRegistry = phf_map! { "\'" => say::VERB, "say" => say::VERB, + "scavenge" => scavenge::VERB, + "search" => scavenge::VERB, + "sc" => score::VERB, "score" => score::VERB, diff --git a/blastmud_game/src/message_handler/user_commands/scavenge.rs b/blastmud_game/src/message_handler/user_commands/scavenge.rs new file mode 100644 index 00000000..bd0d7c51 --- /dev/null +++ b/blastmud_game/src/message_handler/user_commands/scavenge.rs @@ -0,0 +1,147 @@ +use super::{ + drop::consider_expire_job_for_item, get_player_item_or_fail, user_error, UResult, UserVerb, + UserVerbRef, VerbContext, +}; +use crate::{ + models::item::{LocationActionType, Scavtype, SkillType}, + regular_tasks::queued_command::{ + queue_command_and_save, QueueCommand, QueueCommandHandler, QueuedCommandContext, + }, + services::{ + capacity::{check_item_capacity, CapacityLevel}, + comms::broadcast_to_room, + skills::skill_check_and_grind, + }, +}; +use ansi::ansi; +use async_trait::async_trait; +use std::time; + +pub struct QueueHandler; +#[async_trait] +impl QueueCommandHandler for QueueHandler { + async fn start_command(&self, ctx: &mut QueuedCommandContext<'_>) -> UResult { + if ctx.item.death_data.is_some() { + user_error( + "You try to search the area, but you realise your ghost hands aren't good for searching".to_owned(), + )?; + } + broadcast_to_room( + &ctx.trans, + &ctx.item.location, + None, + &format!( + ansi!("{} starts methodically searching the area.\n"), + ctx.item.display_for_sentence(true, 1, true), + ), + Some(&format!( + ansi!("{} starts methodically searching the area.\n"), + ctx.item.display_for_sentence(false, 1, true), + )), + ) + .await?; + Ok(time::Duration::from_secs(3)) + } + + #[allow(unreachable_patterns)] + async fn finish_command(&self, ctx: &mut QueuedCommandContext<'_>) -> UResult<()> { + if ctx.item.death_data.is_some() { + user_error( + "You try to search the area, but you realise your ghost hands aren't good for searching".to_owned(), + )?; + } + let scav = ctx + .item + .total_skills + .get(&SkillType::Scavenge) + .unwrap_or(&0.0) + .clone(); + let found_opt = ctx + .trans + .find_scavhidden_item_by_location( + &ctx.item.location, + &Scavtype::Scavenge, + (scav * 100.0).max(0.0) as i64, + ) + .await?; + let mut found = match found_opt { + None => user_error("You have a look, and you're pretty sure there's nothing to find here. [Try searching elsewhere, or come back later]".to_owned())?, + Some(v) => v, + }; + let diff: f64 = (match found.action_type { + LocationActionType::Scavhidden { difficulty, .. } => difficulty, + _ => 800, + }) as f64 + / 100.0; + + if skill_check_and_grind(&ctx.trans, &mut ctx.item, &SkillType::Scavenge, diff).await? < 0.0 + { + // No crit fail for now, it is either yes or no. + match ctx.get_session().await? { + None => {}, + Some((sess, _)) => + ctx.trans.queue_for_session(&sess, Some("You give up searching, but you still have a feeling there is something here.\n")).await? + } + return Ok(()); + } + + found.action_type = LocationActionType::Normal; + match check_item_capacity(&ctx.trans, &ctx.item, found.weight).await? { + CapacityLevel::OverBurdened | CapacityLevel::AboveItemLimit => { + consider_expire_job_for_item(&ctx.trans, &found).await?; + broadcast_to_room( + &ctx.trans, + &ctx.item.location, + None, + &format!("{} seems to have found {} - but can't carry it so drops it on the ground.\n", + ctx.item.display_for_sentence(true, 1, true), + found.display_for_sentence(true, 1, false), + ), + Some(&format!( + "{} seems to have found {} - but can't carry it so drops it on the ground.\n", + ctx.item.display_for_sentence(false, 1, true), + found.display_for_sentence(false, 1, false),)), + ).await?; + } + _ => { + broadcast_to_room( + &ctx.trans, + &ctx.item.location, + None, + &format!( + "{} seems to have found {}.\n", + ctx.item.display_for_sentence(true, 1, true), + found.display_for_sentence(true, 1, false), + ), + Some(&format!( + "{} seems to have found {}.\n", + ctx.item.display_for_sentence(false, 1, true), + found.display_for_sentence(false, 1, false), + )), + ) + .await?; + found.location = ctx.item.refstr(); + } + } + ctx.trans.save_item_model(&found).await?; + + Ok(()) + } +} + +pub struct Verb; +#[async_trait] +impl UserVerb for Verb { + async fn handle( + self: &Self, + ctx: &mut VerbContext, + _verb: &str, + _remaining: &str, + ) -> UResult<()> { + let player_item = get_player_item_or_fail(ctx).await?; + queue_command_and_save(ctx, &player_item, &QueueCommand::Scavenge).await?; + Ok(()) + } +} +static VERB_INT: Verb = Verb; +pub static VERB: UserVerbRef = &VERB_INT as UserVerbRef; diff --git a/blastmud_game/src/models/item.rs b/blastmud_game/src/models/item.rs index 568c5b84..e42faf35 100644 --- a/blastmud_game/src/models/item.rs +++ b/blastmud_game/src/models/item.rs @@ -261,6 +261,11 @@ pub enum Subattack { Wrestling, } +#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)] +pub enum Scavtype { + Scavenge, +} + #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)] pub enum LocationActionType { Normal, @@ -270,6 +275,7 @@ pub enum LocationActionType { Wielded, Attacking(Subattack), InstalledOnDoorAsLock(Direction), + Scavhidden { difficulty: u64, scavtype: Scavtype }, } impl LocationActionType { @@ -277,6 +283,7 @@ impl LocationActionType { use LocationActionType::*; match self { InstalledOnDoorAsLock(_) => false, + Scavhidden { .. } => false, _ => true, } } diff --git a/blastmud_game/src/regular_tasks/queued_command.rs b/blastmud_game/src/regular_tasks/queued_command.rs index 6a03e4f3..6f9ad951 100644 --- a/blastmud_game/src/regular_tasks/queued_command.rs +++ b/blastmud_game/src/regular_tasks/queued_command.rs @@ -3,7 +3,8 @@ use super::{TaskHandler, TaskRunContext}; use crate::db::DBTrans; use crate::message_handler::user_commands::{ close, cut, drink, drop, eat, fill, get, improvise, make, movement, open, put, recline, remove, - sit, stand, use_cmd, user_error, wear, wield, CommandHandlingError, UResult, VerbContext, + scavenge, sit, stand, use_cmd, user_error, wear, wield, CommandHandlingError, UResult, + VerbContext, }; use crate::message_handler::ListenerSession; use crate::models::session::Session; @@ -102,6 +103,7 @@ pub enum QueueCommand { Remove { possession_id: String, }, + Scavenge, Sit { item: Option, }, @@ -143,6 +145,7 @@ impl QueueCommand { Put { .. } => "Put", Recline { .. } => "Recline", Remove { .. } => "Remove", + Scavenge => "Scavenge", Sit { .. } => "Sit", Stand { .. } => "Stand", Use { .. } => "Use", @@ -249,6 +252,10 @@ fn queue_command_registry( "Remove", &remove::QueueHandler as &(dyn QueueCommandHandler + Sync + Send), ), + ( + "Scavenge", + &scavenge::QueueHandler as &(dyn QueueCommandHandler + Sync + Send), + ), ( "Sit", &sit::QueueHandler as &(dyn QueueCommandHandler + Sync + Send), diff --git a/blastmud_game/src/services/spawn.rs b/blastmud_game/src/services/spawn.rs index 76676ed7..b0c3ac65 100644 --- a/blastmud_game/src/services/spawn.rs +++ b/blastmud_game/src/services/spawn.rs @@ -3,12 +3,12 @@ use crate::db::DBTrans; use crate::{ message_handler::user_commands::rent::recursively_destroy_or_move_item, models::{ - item::{LiquidDetails, LiquidType}, + item::{LiquidDetails, LiquidType, LocationActionType}, task::{Task, TaskDetails, TaskMeta, TaskRecurrence}, }, regular_tasks::{TaskHandler, TaskRunContext}, services::Item, - static_content::{possession_type::PossessionType, StaticTask}, + static_content::{possession_type::PossessionType, room::room_list, StaticTask}, DResult, }; use async_recursion::async_recursion; @@ -17,6 +17,7 @@ use log::{info, warn}; use mockall_double::double; use once_cell::sync::OnceCell; use rand::{thread_rng, Rng}; +use rand_distr::Distribution; use std::collections::BTreeMap; use std::time; @@ -168,6 +169,31 @@ pub async fn refresh_all_spawn_points(trans: &DBTrans) -> DResult<()> { trans.save_item_model(&location_mut).await?; } } + + // Also all scav spawns... + trans.clean_scavhidden().await?; + for room in room_list().iter() { + for scav in &room.scavtable { + if thread_rng().gen_bool(scav.p_present) { + let difflevel = { + let mut rng = thread_rng(); + (rand_distr::Normal::new(scav.difficulty_mean, scav.difficulty_stdev)? + .sample(&mut rng) + * 100.0) + .max(0.0) as u64 + }; + let mut item: Item = scav.possession_type.clone().into(); + item.item_code = format!("{}", trans.alloc_item_code().await?); + item.location = format!("room/{}", room.code); + item.action_type = LocationActionType::Scavhidden { + difficulty: difflevel, + scavtype: scav.scavtype.clone(), + }; + trans.save_item_model(&item).await?; + } + } + } + Ok(()) } diff --git a/blastmud_game/src/static_content/possession_type.rs b/blastmud_game/src/static_content/possession_type.rs index ba615a58..924c96d2 100644 --- a/blastmud_game/src/static_content/possession_type.rs +++ b/blastmud_game/src/static_content/possession_type.rs @@ -24,6 +24,7 @@ mod corp_licence; mod fangs; mod food; pub mod head_armour; +mod junk; pub mod lock; pub mod lower_armour; mod meat; @@ -442,6 +443,7 @@ pub enum PossessionType { Steak, AnimalSkin, SeveredHead, + RustySpike, // Craft benches KitchenStove, // Recipes @@ -532,6 +534,7 @@ pub fn possession_data() -> &'static BTreeMap &'static Vec<(PossessionType, PossessionData)> { + static D: OnceCell> = OnceCell::new(); + &D.get_or_init(|| { + vec![( + PossessionType::RustySpike, + PossessionData { + display: "rusty metal spike", + aliases: vec!["spike"], + details: + "A sharp, rusty spike of metal. You might be able to make something with this, but it is otherwise useless", + weight: 250, + ..Default::default() + }, + )] + }) +} diff --git a/blastmud_game/src/static_content/room.rs b/blastmud_game/src/static_content/room.rs index 89e3472b..74a847c7 100644 --- a/blastmud_game/src/static_content/room.rs +++ b/blastmud_game/src/static_content/room.rs @@ -4,7 +4,7 @@ use crate::db::DBTrans; use crate::{ message_handler::user_commands::UResult, models::{ - item::{DoorState, Item, ItemFlag}, + item::{DoorState, Item, ItemFlag, Scavtype}, journal::JournalType, user::WristpadHack, }, @@ -335,6 +335,14 @@ pub trait RoomEnterTrigger { async fn handle_enter(self: &Self, ctx: &mut QueuedCommandContext, room: &Room) -> UResult<()>; } +pub struct Scavinfo { + pub possession_type: PossessionType, + pub p_present: f64, // probability it is there. + pub difficulty_mean: f64, + pub difficulty_stdev: f64, + pub scavtype: Scavtype, +} + pub struct Room { pub zone: &'static str, // Other zones where it can be seen on the map and accessed. @@ -359,6 +367,7 @@ pub struct Room { pub wristpad_hack_allowed: Option, pub journal: Option, pub enter_trigger: Option<&'static (dyn RoomEnterTrigger + Sync + Send)>, + pub scavtable: Vec, } impl Default for Room { @@ -384,6 +393,7 @@ impl Default for Room { wristpad_hack_allowed: None, journal: None, enter_trigger: None, + scavtable: vec![], } } } @@ -555,6 +565,18 @@ mod test { } } + #[test] + fn room_shorts_should_be_display_length_2() { + assert_eq!( + room_list() + .iter() + .map(|r| (r.code, ansi::strip_special_characters(r.short))) + .filter(|(_c, s)| s.len() != 2) + .collect::>(), + vec![] + ); + } + #[test] fn room_map_by_code_should_have_repro_xv_chargen() { assert_eq!( diff --git a/blastmud_game/src/static_content/room/melbs.rs b/blastmud_game/src/static_content/room/melbs.rs index 3abc8e03..2c1d0c0a 100644 --- a/blastmud_game/src/static_content/room/melbs.rs +++ b/blastmud_game/src/static_content/room/melbs.rs @@ -1,9 +1,23 @@ use super::{ - Direction, Exit, ExitClimb, ExitTarget, GridCoords, Room, RoomStock, SecondaryZoneRecord, + Direction, Exit, ExitClimb, ExitTarget, GridCoords, Room, RoomStock, Scavinfo, + SecondaryZoneRecord, +}; +use crate::{ + models::item::{ItemFlag, Scavtype}, + static_content::possession_type::PossessionType, }; -use crate::{models::item::ItemFlag, static_content::possession_type::PossessionType}; use ansi::ansi; +fn street_scavtable() -> Vec { + vec![Scavinfo { + possession_type: PossessionType::RustySpike, + p_present: 1.0, + difficulty_mean: 7.0, + difficulty_stdev: 1.0, + scavtype: Scavtype::Scavenge, + }] +} + pub fn room_list() -> Vec { vec!( Room { @@ -26,6 +40,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -47,6 +62,7 @@ pub fn room_list() -> Vec { ..Default::default() }, ), + scavtable: street_scavtable(), should_caption: false, ..Default::default() }, @@ -82,6 +98,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -108,6 +125,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -134,6 +152,7 @@ pub fn room_list() -> Vec { } ], should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -160,6 +179,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -187,6 +207,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -243,6 +264,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -265,6 +287,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -291,6 +314,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -313,6 +337,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -347,6 +372,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -369,6 +395,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -395,6 +422,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -421,6 +449,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -466,6 +495,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -473,7 +503,7 @@ pub fn room_list() -> Vec { secondary_zones: vec!(), code: "melbs_kings_110_laneway", name: "110 Kings Laneway", - short: ansi!("="), + short: ansi!("=="), description: "A narrow grotty and dingy laneway between concrete walls, both covered with layer upon layer of graffiti. The concrete path has long cracks on its surface", description_less_explicit: None, grid_coords: GridCoords { x: 2, y: 9, z: 0 }, @@ -488,6 +518,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -569,6 +600,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -592,6 +624,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -614,6 +647,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -636,6 +670,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -662,6 +697,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -706,6 +742,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -728,6 +765,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -754,6 +792,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -776,6 +815,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -798,6 +838,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -820,6 +861,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -846,6 +888,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -868,6 +911,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -890,6 +934,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -912,6 +957,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -934,6 +980,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -957,6 +1004,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -979,6 +1027,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1001,6 +1050,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1023,6 +1073,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1049,6 +1100,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1072,6 +1124,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1095,6 +1148,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1117,6 +1171,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1143,6 +1198,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1165,6 +1221,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1187,6 +1244,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1209,6 +1267,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1235,6 +1294,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1257,6 +1317,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1279,6 +1340,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1301,6 +1363,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -1324,6 +1387,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1346,6 +1410,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1368,6 +1433,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1394,6 +1460,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -1417,6 +1484,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1439,6 +1507,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1461,6 +1530,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1487,6 +1557,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1509,6 +1580,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1531,6 +1603,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1553,6 +1626,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1579,6 +1653,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1601,6 +1676,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1623,6 +1699,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1645,6 +1722,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -1668,6 +1746,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1694,6 +1773,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1746,6 +1826,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1776,6 +1857,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1798,6 +1880,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1820,6 +1903,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1842,6 +1926,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1872,6 +1957,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1894,6 +1980,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1916,6 +2003,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1938,6 +2026,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1968,6 +2057,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -1990,6 +2080,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2012,6 +2103,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2034,6 +2126,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -2057,6 +2150,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2079,6 +2173,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2101,6 +2196,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2124,6 +2220,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2147,6 +2244,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2178,6 +2276,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2215,6 +2314,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2245,6 +2345,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2271,6 +2372,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2297,7 +2399,7 @@ pub fn room_list() -> Vec { } ), ..Default::default() - }, + }, Room { zone: "melbs", secondary_zones: vec!(), @@ -2322,6 +2424,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2369,6 +2472,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2399,6 +2503,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2421,6 +2526,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2443,6 +2549,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2465,6 +2572,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2491,6 +2599,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2556,6 +2665,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2621,6 +2731,7 @@ pub fn room_list() -> Vec { }, ), should_caption: true, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2643,6 +2754,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2665,6 +2777,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2687,6 +2800,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2721,6 +2835,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2751,6 +2866,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2773,6 +2889,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2795,6 +2912,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2817,6 +2935,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2847,6 +2966,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2869,6 +2989,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2891,6 +3012,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2913,6 +3035,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -2936,6 +3059,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2958,6 +3082,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -2980,6 +3105,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3003,6 +3129,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3026,6 +3153,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3048,6 +3176,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3070,6 +3199,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3092,6 +3222,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3114,6 +3245,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3144,6 +3276,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3166,6 +3299,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3188,6 +3322,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3210,6 +3345,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, @@ -3233,6 +3369,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3255,6 +3392,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3277,6 +3415,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3303,6 +3442,7 @@ pub fn room_list() -> Vec { } ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3328,6 +3468,7 @@ pub fn room_list() -> Vec { } ), should_caption: true, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3350,6 +3491,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3372,6 +3514,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3394,6 +3537,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3416,6 +3560,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3438,6 +3583,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3468,6 +3614,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3490,6 +3637,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3512,6 +3660,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3534,10 +3683,10 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, - // New content marker Room { zone: "melbs", secondary_zones: vec!(), @@ -3558,6 +3707,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3580,6 +3730,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3602,6 +3753,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3625,6 +3777,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3648,6 +3801,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3670,6 +3824,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3692,6 +3847,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3714,6 +3870,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3736,6 +3893,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3758,6 +3916,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3780,6 +3939,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() }, Room { @@ -3802,6 +3962,7 @@ pub fn room_list() -> Vec { }, ), should_caption: false, + scavtable: street_scavtable(), ..Default::default() } )