diff --git a/blastmud_game/src/db.rs b/blastmud_game/src/db.rs index 9ff32ed..3755058 100644 --- a/blastmud_game/src/db.rs +++ b/blastmud_game/src/db.rs @@ -386,6 +386,7 @@ impl DBTrans { } } + #[allow(dead_code)] pub async fn save_session_model<'a>( self: &'a Self, session: &'a ListenerSession, @@ -455,9 +456,7 @@ impl DBTrans { // be reset on restart. for to_copy in [ "display", - "display_less_explicit", "details", - "details_less_explicit", "total_xp", "total_stats", "total_skills", @@ -1022,8 +1021,7 @@ impl DBTrans { &format!( "WITH {} SELECT details FROM relevant_items \ WHERE \ - ((lower(details->>'display') LIKE $1) \ - OR (lower(details ->>'display_less_explicit') LIKE $1) \ + (lower(details->>'display') LIKE $1) \ OR EXISTS (SELECT 1 FROM jsonb_array_elements(aliases) AS al(alias) WHERE \ LOWER(alias#>>'{{}}') LIKE $1)) {} \ ORDER BY {} ABS(length(details->>'display')-$3) ASC \ diff --git a/blastmud_game/src/message_handler/user_commands/buy.rs b/blastmud_game/src/message_handler/user_commands/buy.rs index 89aeae4..9f3b0cf 100644 --- a/blastmud_game/src/message_handler/user_commands/buy.rs +++ b/blastmud_game/src/message_handler/user_commands/buy.rs @@ -60,10 +60,6 @@ impl UserVerb for Verb { .display .to_lowercase() .starts_with(&match_item) - || possession_type - .display_less_explicit - .map(|d| d.to_lowercase().starts_with(&match_item)) - .unwrap_or(false) || possession_type .aliases .iter() diff --git a/blastmud_game/src/message_handler/user_commands/fire.rs b/blastmud_game/src/message_handler/user_commands/fire.rs index 76c6baf..da8e6e9 100644 --- a/blastmud_game/src/message_handler/user_commands/fire.rs +++ b/blastmud_game/src/message_handler/user_commands/fire.rs @@ -25,11 +25,6 @@ impl UserVerb for Verb { .into_iter() .filter(|it| { it.display.to_lowercase().starts_with(&npc_name) - || it - .display_less_explicit - .as_ref() - .map(|v| v.to_lowercase().starts_with(&npc_name)) - .unwrap_or(false) || it .aliases .iter() @@ -54,7 +49,7 @@ impl UserVerb for Verb { &ctx.session, Some(&format!( "A hushed silence falls over the room as you fire {}.\n", - npc.display_for_session(&ctx.session_dat), + npc.display_for_sentence(1, false), )), ) .await?; diff --git a/blastmud_game/src/message_handler/user_commands/follow.rs b/blastmud_game/src/message_handler/user_commands/follow.rs index d47f381..af6357e 100644 --- a/blastmud_game/src/message_handler/user_commands/follow.rs +++ b/blastmud_game/src/message_handler/user_commands/follow.rs @@ -123,7 +123,7 @@ pub async fn stop_following(trans: &DBTrans, follower: &mut Item) -> UResult<()> .await? { if follower.item_type == "player" { - if let Some((session, session_dat)) = + if let Some((session, _session_dat)) = trans.find_session_for_player(&follower.item_code).await? { trans @@ -131,7 +131,7 @@ pub async fn stop_following(trans: &DBTrans, follower: &mut Item) -> UResult<()> &session, Some(&format!( "You are no longer following {}.\n", - old_item.display_for_session(&session_dat) + old_item.display_for_sentence(1, false) )), ) .await?; @@ -243,7 +243,7 @@ impl UserVerb for Verb { &ctx.session, Some(&format!( "You are now following {}.\n", - &follow_whom.display_for_session(&ctx.session_dat) + &follow_whom.display_for_sentence(1, false) )), ) .await?; diff --git a/blastmud_game/src/message_handler/user_commands/hire.rs b/blastmud_game/src/message_handler/user_commands/hire.rs index 5bba30c..f5acd92 100644 --- a/blastmud_game/src/message_handler/user_commands/hire.rs +++ b/blastmud_game/src/message_handler/user_commands/hire.rs @@ -70,13 +70,13 @@ impl TaskHandler for ChargeWagesTaskHandler { let sess_and_dat = ctx.trans.find_session_for_player(&hired_by).await?; if hire_dat.price > bill_user.credits { - if let Some((sess, sess_dat)) = sess_and_dat { + if let Some((sess, _sess_dat)) = sess_and_dat { ctx.trans .queue_for_session( &sess, Some(&format!( "{} says: \"{}\"\n", - &npc.display_for_session(&sess_dat), + &npc.display_for_sentence(1, false), RESIGNATION_NOTICE )), ) @@ -96,10 +96,10 @@ impl TaskHandler for ChargeWagesTaskHandler { ctx.trans.save_user_model(&bill_user).await?; match sess_and_dat.as_ref() { None => {}, - Some((sess, sess_dat)) => ctx.trans.queue_for_session( + Some((sess, _sess_dat)) => ctx.trans.queue_for_session( sess, Some(&format!( ansi!("Your wristpad beeps for a deduction of ${} for wages for {}.\n"), - &hire_dat.price, &npc.display_for_session(&sess_dat) + &hire_dat.price, &npc.display_for_sentence(1, false) )) ).await? } @@ -139,7 +139,7 @@ impl UserVerb for Verb { { msg.push_str(&format!( "* {} @ ${} / {}\n", - emp.display_for_session(&ctx.session_dat), + emp.display_for_sentence(1, false), hire_dat.price, humantime::format_duration(std::time::Duration::from_secs( hire_dat.frequency_secs, @@ -185,7 +185,7 @@ impl UserVerb for Verb { ansi!( "{} says: \"You wouldn't be able to afford me.\"" ), - npc.display_for_session(&ctx.session_dat) + npc.display_for_sentence(1, false) ))?; } @@ -208,7 +208,7 @@ impl UserVerb for Verb { &ctx.session, Some(&format!( "You hire {}, and your wristpad beeps for a deduction of ${}.\n", - npc.display_for_session(&ctx.session_dat), + npc.display_for_sentence(1, false), hire_dat.price )), ) diff --git a/blastmud_game/src/message_handler/user_commands/improvise.rs b/blastmud_game/src/message_handler/user_commands/improvise.rs index bc03573..83b30c5 100644 --- a/blastmud_game/src/message_handler/user_commands/improvise.rs +++ b/blastmud_game/src/message_handler/user_commands/improvise.rs @@ -436,7 +436,7 @@ impl UserVerb for Verb { if item.item_type != "possession" { user_error(format!( "You can't improvise with {}!", - &item.display_for_session(&ctx.session_dat) + &item.display_for_sentence(1, false) ))? } input_ids.insert(item.item_code.to_owned()); diff --git a/blastmud_game/src/message_handler/user_commands/less_explicit_mode.rs b/blastmud_game/src/message_handler/user_commands/less_explicit_mode.rs index d93e6b0..4697615 100644 --- a/blastmud_game/src/message_handler/user_commands/less_explicit_mode.rs +++ b/blastmud_game/src/message_handler/user_commands/less_explicit_mode.rs @@ -6,14 +6,10 @@ pub struct Verb; impl UserVerb for Verb { async fn handle( self: &Self, - ctx: &mut VerbContext, + _ctx: &mut VerbContext, _verb: &str, _remaining: &str, ) -> UResult<()> { - (*ctx.session_dat).less_explicit_mode = true; - ctx.trans - .save_session_model(ctx.session, ctx.session_dat) - .await?; Ok(()) } } diff --git a/blastmud_game/src/message_handler/user_commands/load.rs b/blastmud_game/src/message_handler/user_commands/load.rs index ab4e975..7912978 100644 --- a/blastmud_game/src/message_handler/user_commands/load.rs +++ b/blastmud_game/src/message_handler/user_commands/load.rs @@ -49,7 +49,7 @@ impl UserVerb for Verb { }) if hired_by == &player_item.item_code => {} _ => user_error(format!( "{} doesn't seem to be letting you do that. Try hiring {} first!", - npc.display_for_session(&ctx.session_dat), + npc.display_for_sentence(1, false), npc.pronouns.object ))?, } diff --git a/blastmud_game/src/message_handler/user_commands/look.rs b/blastmud_game/src/message_handler/user_commands/look.rs index aa4de68..110ccc8 100644 --- a/blastmud_game/src/message_handler/user_commands/look.rs +++ b/blastmud_game/src/message_handler/user_commands/look.rs @@ -151,7 +151,7 @@ pub async fn describe_normal_item( .map(|(it, _)| it) { any_part_text = true; - let display = top_item.display_for_session(&ctx.session_dat); + let display = top_item.display_for_sentence(1, false); if !seen_clothes.contains(&display) { seen_clothes.insert(display.clone()); contents_desc.push_str(&format!( @@ -333,8 +333,8 @@ pub async fn describe_normal_item( ctx.session, Some(&format!( "{}\n{}\n{}", - &item.display_for_session(&ctx.session_dat), - item.details_for_session(&ctx.session_dat).unwrap_or(""), + &item.display_for_sentence(1, false), + &item.details.as_ref().map(|d| d.as_str()).unwrap_or(""), contents_desc, )), ) @@ -396,9 +396,9 @@ pub async fn describe_room( &word_wrap( &format!( ansi!("{} ({})\n{}{}.{}\n{}\n"), - item.display_for_session(&ctx.session_dat), + item.display_for_sentence(1, false), zone, - item.details_for_session(&ctx.session_dat).unwrap_or(""), + &item.details.as_ref().map(|d| d.as_str()).unwrap_or(""), item.details_dyn_suffix .as_ref() .map(|d| d.as_str()) @@ -432,9 +432,9 @@ pub async fn describe_dynroom( &word_wrap( &format!( ansi!("{} ({})\n{}.{}\n{}\n"), - item.display_for_session(&ctx.session_dat), + item.display_for_sentence(1, false), dynzone.zonename, - item.details_for_session(&ctx.session_dat).unwrap_or(""), + &item.details.as_ref().map(|d| d.as_str()).unwrap_or(""), contents, exits_for_dyn(dynroom) ), @@ -463,7 +463,7 @@ async fn describe_door( .await? .first() { - let lock_desc = lock.display_for_session(&ctx.session_dat); + let lock_desc = lock.display_for_sentence(1, false); msg.push_str(&format!(" The door is locked with {}", &lock_desc)); } msg.push('\n'); @@ -511,7 +511,7 @@ async fn list_room_contents<'l>(ctx: &'l VerbContext<'_>, item: &'l Item) -> URe if let Some(sit_on) = ctx.trans.find_item_by_type_code(on_type, on_code).await? { buf.push_str("on "); - buf.push_str(&sit_on.display_for_session(&ctx.session_dat)); + buf.push_str(&sit_on.display_for_sentence(1, false)); } } } @@ -523,7 +523,7 @@ async fn list_room_contents<'l>(ctx: &'l VerbContext<'_>, item: &'l Item) -> URe if let Some(sit_on) = ctx.trans.find_item_by_type_code(on_type, on_code).await? { buf.push_str("on "); - buf.push_str(&sit_on.display_for_session(&ctx.session_dat)); + buf.push_str(&sit_on.display_for_sentence(1, false)); } } } @@ -557,7 +557,7 @@ async fn list_room_contents<'l>(ctx: &'l VerbContext<'_>, item: &'l Item) -> URe Some((ttype, tcode)) => { match ctx.trans.find_item_by_type_code(ttype, tcode).await? { None => buf.push_str("someone"), - Some(it) => buf.push_str(&it.display_for_session(&ctx.session_dat)), + Some(it) => buf.push_str(&it.display_for_sentence(1, false)), } } }, diff --git a/blastmud_game/src/message_handler/user_commands/make.rs b/blastmud_game/src/message_handler/user_commands/make.rs index 7a7af84..6a2cea5 100644 --- a/blastmud_game/src/message_handler/user_commands/make.rs +++ b/blastmud_game/src/message_handler/user_commands/make.rs @@ -379,7 +379,7 @@ impl UserVerb for Verb { match (recipe_craft.bench.as_ref(), bench.as_ref()) { (Some(bench_type), None) => user_error(format!( "The {} can only be made on the {}.", - &instructions.display_for_session(&ctx.session_dat), + &instructions.display_for_sentence(1, false), possession_data() .get(bench_type) .map(|pd| pd.display) @@ -390,7 +390,7 @@ impl UserVerb for Verb { { user_error(format!( "The {} can only be made on the {}.", - &instructions.display_for_session(&ctx.session_dat), + &instructions.display_for_sentence(1, false), possession_data() .get(bench_type) .map(|pd| pd.display) diff --git a/blastmud_game/src/message_handler/user_commands/movement.rs b/blastmud_game/src/message_handler/user_commands/movement.rs index cc96991..91d1692 100644 --- a/blastmud_game/src/message_handler/user_commands/movement.rs +++ b/blastmud_game/src/message_handler/user_commands/movement.rs @@ -594,9 +594,7 @@ async fn attempt_move_immediate( for attacker in &attackers[..] { if let Some((atype, acode)) = attacker.split_once("/") { if let Some(aitem) = ctx.trans.find_item_by_type_code(atype, acode).await? { - if let Some((_, session_dat)) = session.as_ref() { - attacker_names.push(aitem.display_for_session(session_dat)); - } + attacker_names.push(aitem.display_for_sentence(1, false)); // We don't push the actual attacker Item, because another attacker // might re-target this attacker when we escape, causing the structure // to be out of date. Instead, we push the type, code pair and look it diff --git a/blastmud_game/src/message_handler/user_commands/page.rs b/blastmud_game/src/message_handler/user_commands/page.rs index 51a0a00..20fdc2f 100644 --- a/blastmud_game/src/message_handler/user_commands/page.rs +++ b/blastmud_game/src/message_handler/user_commands/page.rs @@ -60,7 +60,7 @@ impl UserVerb for Verb { ctx.session, Some(&format!( ansi!("You page {} on your wristpad: \"{}\"\n"), - to_whom.display_for_session(&ctx.session_dat), + to_whom.display_for_sentence(1, false), say_what )), ) @@ -90,7 +90,7 @@ impl UserVerb for Verb { &other_session, Some(&format!( ansi!("Your wristpad beeps with page from {}: \"{}\"\n"), - player_item.display_for_session(&ctx.session_dat), + player_item.display_for_sentence(1, false), say_what )), ) diff --git a/blastmud_game/src/message_handler/user_commands/put.rs b/blastmud_game/src/message_handler/user_commands/put.rs index b6c579a..9502217 100644 --- a/blastmud_game/src/message_handler/user_commands/put.rs +++ b/blastmud_game/src/message_handler/user_commands/put.rs @@ -248,8 +248,8 @@ impl UserVerb for Verb { .queue_for_session(&ctx.session, Some( &format!("For ease of later use, you decide to rip the pages out of {} before placing them in {}.\n", - &target.display_for_session(&ctx.session_dat), - &into_what.display_for_session(&ctx.session_dat)), + &target.display_for_sentence(1, false), + &into_what.display_for_sentence(1, false)), ) ).await?; for page in pages { diff --git a/blastmud_game/src/message_handler/user_commands/use_cmd.rs b/blastmud_game/src/message_handler/user_commands/use_cmd.rs index 78e978a..b105bfe 100644 --- a/blastmud_game/src/message_handler/user_commands/use_cmd.rs +++ b/blastmud_game/src/message_handler/user_commands/use_cmd.rs @@ -267,11 +267,7 @@ impl QueueCommandHandler for QueueHandler { { item_mut.possession_type = Some(new_poss.clone()); item_mut.display = new_poss_dat.display.to_owned(); - item_mut.display_less_explicit = - new_poss_dat.display_less_explicit.map(|d| d.to_owned()); item_mut.details = Some(new_poss_dat.details.to_owned()); - item_mut.details_less_explicit = - new_poss_dat.details_less_explicit.map(|d| d.to_owned()); item_mut.aliases = new_poss_dat .aliases .iter() diff --git a/blastmud_game/src/message_handler/user_commands/whisper.rs b/blastmud_game/src/message_handler/user_commands/whisper.rs index f9a2046..35957bb 100644 --- a/blastmud_game/src/message_handler/user_commands/whisper.rs +++ b/blastmud_game/src/message_handler/user_commands/whisper.rs @@ -49,8 +49,8 @@ impl UserVerb for Verb { ctx.session, Some(&format!( ansi!("{} whispers to {}: \"{}\"\n"), - player_item.display_for_session(&ctx.session_dat), - to_whom.display_for_session(&ctx.session_dat), + player_item.display_for_sentence(1, false), + to_whom.display_for_sentence(1, false), say_what )), ) @@ -85,8 +85,8 @@ impl UserVerb for Verb { &other_session, Some(&format!( ansi!("{} whispers to {}: \"{}\"\n"), - player_item.display_for_session(&ctx.session_dat), - to_whom.display_for_session(&ctx.session_dat), + player_item.display_for_sentence(1, false), + to_whom.display_for_sentence(1, false), say_what )), ) diff --git a/blastmud_game/src/models/item.rs b/blastmud_game/src/models/item.rs index 3710b2e..eebe69b 100644 --- a/blastmud_game/src/models/item.rs +++ b/blastmud_game/src/models/item.rs @@ -1,4 +1,4 @@ -use super::{effect::EffectType, session::Session}; +use super::effect::EffectType; use crate::{ language, regular_tasks::queued_command::QueueCommand, @@ -672,9 +672,7 @@ pub struct Item { pub death_data: Option, pub details: Option, pub details_dyn_suffix: Option, - pub details_less_explicit: Option, pub display: String, - pub display_less_explicit: Option, pub door_states: Option>, pub dynamic_entrance: Option, pub flags: Vec, @@ -732,18 +730,6 @@ impl Item { buf } } - pub fn display_for_session<'l>(self: &'l Self, _session: &Session) -> String { - self.display_for_sentence(1, false) - } - - pub fn details_for_session<'l>(self: &'l Self, session: &Session) -> Option<&'l str> { - self.details.as_ref().map(|dets| { - session.explicit_if_allowed( - dets.as_str(), - self.details_less_explicit.as_ref().map(String::as_str), - ) - }) - } pub fn refstr(&self) -> String { format!("{}/{}", &self.item_type, &self.item_code) @@ -794,9 +780,7 @@ impl Default for Item { death_data: None, details: None, details_dyn_suffix: None, - details_less_explicit: None, display: "Item".to_owned(), - display_less_explicit: None, door_states: None, dynamic_entrance: None, flags: vec![], diff --git a/blastmud_game/src/models/session.rs b/blastmud_game/src/models/session.rs index 0cd8bc7..09cf9a1 100644 --- a/blastmud_game/src/models/session.rs +++ b/blastmud_game/src/models/session.rs @@ -5,32 +5,16 @@ use serde::{Deserialize, Serialize}; #[serde(default)] pub struct Session { pub source: String, - pub less_explicit_mode: bool, // DEPRECATED pub last_active: Option>, // Reminder: Consider backwards compatibility when updating this. New fields should generally // be an Option, or you should ensure the default value is sensible, or things will // crash out for existing sessions. } -impl Session { - pub fn explicit_if_allowed<'l>( - self: &Self, - explicit: &'l str, - non_explicit: Option<&'l str>, - ) -> &'l str { - if self.less_explicit_mode { - non_explicit.unwrap_or(explicit) - } else { - explicit - } - } -} - impl Default for Session { fn default() -> Self { Session { source: "unknown".to_owned(), - less_explicit_mode: false, last_active: None, } } diff --git a/blastmud_game/src/services/combat.rs b/blastmud_game/src/services/combat.rs index 10f388a..3d570d9 100644 --- a/blastmud_game/src/services/combat.rs +++ b/blastmud_game/src/services/combat.rs @@ -86,7 +86,7 @@ pub async fn soak_damage( if clothes_damage > 0 { clothing.health -= clothes_damage; if victim.item_type == "player" { - if let Some((vic_sess, sess_dat)) = + if let Some((vic_sess, _sess_dat)) = trans.find_session_for_player(&victim.item_code).await? { trans @@ -94,7 +94,7 @@ pub async fn soak_damage( &vic_sess, Some(&format!( "A few bits and pieces fly off your {}.\n", - clothing.display_for_session(&sess_dat) + clothing.display_for_sentence(1, false) )), ) .await?; @@ -112,7 +112,7 @@ pub async fn soak_damage( .delete_item(&clothing.item_type, &clothing.item_code) .await?; if victim.item_type == "player" { - if let Some((vic_sess, sess_dat)) = + if let Some((vic_sess, _sess_dat)) = trans.find_session_for_player(&victim.item_code).await? { trans @@ -120,7 +120,7 @@ pub async fn soak_damage( &vic_sess, Some(&format!( "Your {} is completely destroyed; it crumbles away to nothing.\n", - clothing.display_for_session(&sess_dat) + clothing.display_for_sentence(1, false) )), ) .await?; @@ -1114,7 +1114,7 @@ pub async fn switch_to_feint(ctx: &VerbContext<'_>, who: &Arc) -> UResult< if to_whom.species != SpeciesType::Human && to_whom.species != SpeciesType::Robot { user_error(format!( "You don't think {} will pay any attention to a feint.", - to_whom.display_for_session(&ctx.session_dat) + to_whom.display_for_sentence(1, false) ))?; } diff --git a/blastmud_game/src/services/sharing.rs b/blastmud_game/src/services/sharing.rs index eda9128..b8c4049 100644 --- a/blastmud_game/src/services/sharing.rs +++ b/blastmud_game/src/services/sharing.rs @@ -551,7 +551,7 @@ pub async fn start_conversation( if initiator.item_type != "player" { user_error("Only players can initiate conversation with players".to_owned())?; } - let (_other_sess, other_sessdat) = + let (_other_sess, _other_sessdat) = trans .find_session_for_player(&acceptor.item_code) .await? @@ -579,7 +579,7 @@ pub async fn start_conversation( ), &acceptor.display_for_sentence(1, false), &acceptor.pronouns.subject, - initiator.display_for_session(&other_sessdat) + initiator.display_for_sentence(1, false) )) })?; } else { diff --git a/blastmud_game/src/static_content/dumper.rs b/blastmud_game/src/static_content/dumper.rs index 93be5df..c02039f 100644 --- a/blastmud_game/src/static_content/dumper.rs +++ b/blastmud_game/src/static_content/dumper.rs @@ -35,7 +35,6 @@ fn room_to_simpleroom(room: &Room) -> Option> { short: room.short.clone(), grid_coords: room.grid_coords.clone(), description: room.description.clone(), - description_less_explicit: room.description_less_explicit.clone(), exits: simple_exits, should_caption: room.should_caption.clone(), repel_npc: room.repel_npc.clone(), diff --git a/blastmud_game/src/static_content/dynzone.rs b/blastmud_game/src/static_content/dynzone.rs index fa8f375..686f545 100644 --- a/blastmud_game/src/static_content/dynzone.rs +++ b/blastmud_game/src/static_content/dynzone.rs @@ -97,7 +97,6 @@ impl Dynzone { item_code: roomcode, display: room.name.to_owned(), details: Some(room.description.to_owned()), - details_less_explicit: room.description_less_explicit.map(|s| s.to_owned()), location: format!("dynzone/{}", &code), special_data: Some(ItemSpecialData::DynroomData { dynzone_code: self.zonetype.to_str().to_owned(), @@ -179,7 +178,6 @@ pub struct Dynroom { pub name: &'static str, pub short: &'static str, pub description: &'static str, - pub description_less_explicit: Option<&'static str>, pub exits: Vec, pub should_caption: bool, pub item_flags: Vec, @@ -194,7 +192,6 @@ impl Default for Dynroom { name: "Undefined", short: "XX", description: "A generic room", - description_less_explicit: None, exits: vec![], should_caption: false, item_flags: vec![], diff --git a/blastmud_game/src/static_content/dynzone/cokmurl_apartment.rs b/blastmud_game/src/static_content/dynzone/cokmurl_apartment.rs index 1adf6a8..7d0bcba 100644 --- a/blastmud_game/src/static_content/dynzone/cokmurl_apartment.rs +++ b/blastmud_game/src/static_content/dynzone/cokmurl_apartment.rs @@ -13,7 +13,6 @@ pub fn zone() -> Dynzone { name: "Door step", short: "DS", description: "A sleek hallway, painted white, and lit by futuristic looking bluish-white strip lights that run along the edges of the ceiling. Soft navy blue carpet covers the floor. A beige painted door seems to lead into a private studio apartment", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::WEST, @@ -36,7 +35,6 @@ pub fn zone() -> Dynzone { name: "Studio apartment", short: "ST", description: "An oddly comfortable studio apartment, with worn grey carpet covering the floor. A window to the east has spectacular views of Melbs and the bleak and desolate wasteland beyond it", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::WEST, diff --git a/blastmud_game/src/static_content/dynzone/murl_deluxe_corporate.rs b/blastmud_game/src/static_content/dynzone/murl_deluxe_corporate.rs index ef5fc2d..a2b6a07 100644 --- a/blastmud_game/src/static_content/dynzone/murl_deluxe_corporate.rs +++ b/blastmud_game/src/static_content/dynzone/murl_deluxe_corporate.rs @@ -16,7 +16,6 @@ pub fn zone() -> Dynzone { of the bleak wasteland to the north. The walls are painted white, and a long reception \ desk, enamelled to look like dark wood, is built into the room. It is well lit \ with cool white LED lights recessed into the ceiling above", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::WEST, @@ -39,7 +38,6 @@ pub fn zone() -> Dynzone { name: "Common Room", short: "CO", description: "A large central room, carpeted with floor tiles alternating between light and dark grey in a checkerboard pattern. The walls are painted white, and the room is dimly lit from above with warm white LED bulbs", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::WEST, @@ -79,7 +77,6 @@ pub fn zone() -> Dynzone { name: "North Wing", short: "NW", description: "A spacious office, carpeted with floor tiles alternating between light and dark grey in a checkerboard pattern. The walls are painted white, and the room is dimly lit from above with warm white LED bulbs", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::NORTH, @@ -104,7 +101,6 @@ pub fn zone() -> Dynzone { name: "North Balcony", short: "NB", description: "A timber balcony cantilevered on to the north side of the building, complete with an auto-irrigated garden, and glass front panels exposing a breath-taking view of the desolate lands to the north", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::SOUTH, @@ -124,7 +120,6 @@ pub fn zone() -> Dynzone { name: "East Wing", short: "EW", description: "A spacious office, carpeted with floor tiles alternating between light and dark grey in a checkerboard pattern. The walls are painted white, and the room is dimly lit from above with warm white LED bulbs", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::EAST, @@ -149,7 +144,6 @@ pub fn zone() -> Dynzone { name: "Store room", short: "SR", description: "A strong-room apparently designed to preserve people or things in any emergency. The walls, floor, and ceiling all appear to be made of thick steel", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::WEST, @@ -169,7 +163,6 @@ pub fn zone() -> Dynzone { name: "Health centre", short: "HC", description: "A room apparently designed as a kind of corporate sick-bay. The floor is tiled, and the walls are painted with white glossy easy-wipe paint", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::NORTHEAST, @@ -189,7 +182,6 @@ pub fn zone() -> Dynzone { name: "Kitchen", short: "KT", description: "A room apparently designed for food preparation. It is tiled with small light green tiles that cover the walls and floor, and has an abundance of water and drain fittings", - description_less_explicit: None, exits: vec!( Exit { direction: Direction::NORTH, diff --git a/blastmud_game/src/static_content/fixed_item.rs b/blastmud_game/src/static_content/fixed_item.rs index 2c5429f..7641f7e 100644 --- a/blastmud_game/src/static_content/fixed_item.rs +++ b/blastmud_game/src/static_content/fixed_item.rs @@ -14,7 +14,6 @@ pub struct FixedItem { pub code: String, pub name: String, pub description: String, - pub description_less_explicit: Option, pub location: String, pub proper_noun: bool, pub aliases: Vec, @@ -27,7 +26,6 @@ impl Default for FixedItem { code: "default".to_owned(), name: "default".to_owned(), description: "A thingy".to_owned(), - description_less_explicit: None, location: "unset".to_owned(), proper_noun: true, aliases: vec![], @@ -55,7 +53,6 @@ fn fixed_item_list() -> &'static Vec { and I have a robot police force to keep you safe from the worst baddies, \ but be warned - there still are some dangers near by, and the world \ further out, outside my realm, is a dangerous and radioactive place.\"".to_owned(), - description_less_explicit: None, location: "room/repro_xv_updates".to_owned(), proper_noun: false, aliases: vec!["poster".to_owned()], @@ -71,7 +68,6 @@ fn fixed_item_list() -> &'static Vec { dogs were friendly companions and not the menace they are today. It smells \ faintly of iron. [Try drink from fountain or, if you have a suitable \ container, fill container from fountain].").to_owned(), - description_less_explicit: None, location: "room/melbs_kingst_40".to_owned(), proper_noun: false, aliases: vec!["fountain".to_owned()], @@ -109,7 +105,6 @@ pub fn static_items() -> Box> { item_type: "fixed_item".to_owned(), display: r.name.clone(), details: Some(r.description.clone()), - details_less_explicit: r.description_less_explicit.as_ref().map(|d| d.clone()), location: r.location.clone(), is_static: true, aliases: r.aliases.iter().map(|s| (*s).clone()).collect(), diff --git a/blastmud_game/src/static_content/possession_type.rs b/blastmud_game/src/static_content/possession_type.rs index d8a240a..c4e978a 100644 --- a/blastmud_game/src/static_content/possession_type.rs +++ b/blastmud_game/src/static_content/possession_type.rs @@ -310,9 +310,7 @@ pub struct SitData { pub struct PossessionData { pub weapon_data: Option, pub display: &'static str, - pub display_less_explicit: Option<&'static str>, pub details: &'static str, - pub details_less_explicit: Option<&'static str>, pub aliases: Vec<&'static str>, pub max_health: u64, pub charge_data: Option, @@ -338,9 +336,7 @@ impl Default for PossessionData { Self { weapon_data: None, display: "Thingy", - display_less_explicit: None, details: "A generic looking thing", - details_less_explicit: None, aliases: vec![], max_health: 10, weight: 250, @@ -441,9 +437,7 @@ impl Into for PossessionType { item_type: "possession".to_owned(), possession_type: Some(self.clone()), display: possession_dat.display.to_owned(), - display_less_explicit: possession_dat.display_less_explicit.map(|d| d.to_owned()), details: Some(possession_dat.details.to_owned()), - details_less_explicit: possession_dat.details_less_explicit.map(|d| d.to_owned()), aliases: possession_dat .aliases .iter() diff --git a/blastmud_game/src/static_content/room.rs b/blastmud_game/src/static_content/room.rs index c6e60a6..195898f 100644 --- a/blastmud_game/src/static_content/room.rs +++ b/blastmud_game/src/static_content/room.rs @@ -383,7 +383,6 @@ pub struct Room { pub short: String, pub grid_coords: GridCoords, pub description: String, - pub description_less_explicit: Option, pub exits: Vec, pub should_caption: bool, pub repel_npc: bool, @@ -411,7 +410,6 @@ impl Default for Room { short: "DF".to_owned(), grid_coords: GridCoords { x: 0, y: 0, z: 0 }, description: "default".to_owned(), - description_less_explicit: None, exits: vec![], should_caption: true, repel_npc: false, @@ -440,7 +438,6 @@ pub struct SimpleRoom { pub short: String, pub grid_coords: GridCoords, pub description: String, - pub description_less_explicit: Option, pub exits: Vec, pub should_caption: bool, pub repel_npc: bool, @@ -477,7 +474,6 @@ impl Into for SimpleRoom { short: parse_ansi_markup(&self.short).unwrap(), grid_coords: self.grid_coords, description: parse_ansi_markup(&self.description).unwrap(), - description_less_explicit: self.description_less_explicit, exits: self.exits.into_iter().map(|e| e.into()).collect(), should_caption: self.should_caption, repel_npc: self.repel_npc, @@ -505,7 +501,6 @@ impl<'a, T: Default> Default for SimpleRoom { short: "DF".to_owned(), grid_coords: GridCoords { x: 0, y: 0, z: 0 }, description: "default".to_owned(), - description_less_explicit: None, exits: vec![], should_caption: true, repel_npc: false, @@ -569,7 +564,6 @@ pub fn room_static_items() -> Box> { item_type: "room".to_owned(), display: r.name.to_owned(), details: Some(r.description.to_owned()), - details_less_explicit: r.description_less_explicit.as_ref().map(|d| d.to_owned()), location: format!("zone/{}", r.zone), is_static: true, flags: r.item_flags.clone(), diff --git a/blastmud_game/src/static_content/room/computer_museum.rs b/blastmud_game/src/static_content/room/computer_museum.rs index c9e1576..c222a71 100644 --- a/blastmud_game/src/static_content/room/computer_museum.rs +++ b/blastmud_game/src/static_content/room/computer_museum.rs @@ -22,7 +22,6 @@ pub fn fixed_items() -> Vec { code: "computer_museum_club_door_lock".to_owned(), name: "basic keyed lock".to_owned(), description: "A basic lock that looks like it needs a key to open".to_owned(), - description_less_explicit: None, location: "room/computer_museum_hackers_club".to_owned(), proper_noun: false, aliases: vec!["lock".to_owned()], diff --git a/blastmud_game/src/static_content/room/general_hospital.rs b/blastmud_game/src/static_content/room/general_hospital.rs index 8a2588c..ee47779 100644 --- a/blastmud_game/src/static_content/room/general_hospital.rs +++ b/blastmud_game/src/static_content/room/general_hospital.rs @@ -181,7 +181,6 @@ pub fn room_list() -> Vec { stretchers. It smells strongly of phenolic cleaners. At the front of the room \ a triage nurse assures everyone coming in they will be assessed by doctors \ a minute after arriving. Doctors pace the floor treating patients").to_owned(), - description_less_explicit: None, grid_coords: GridCoords { x: 0, y: 0, z: 0 }, exits: vec!( Exit { diff --git a/schema/schema.sql b/schema/schema.sql index 64eda56..a59648c 100644 --- a/schema/schema.sql +++ b/schema/schema.sql @@ -28,7 +28,6 @@ CREATE INDEX item_by_loc ON items ((details->>'location')); CREATE INDEX item_by_static ON items ((cast(details->>'is_static' as boolean))); CREATE INDEX item_by_display ON items (lower(details->>'display')); CREATE INDEX item_by_owner ON items (lower(details->>'owner')); -CREATE INDEX item_by_display_less_explicit ON items (lower(details->>'display_less_explicit')); CREATE INDEX item_by_following ON items ((details->'following'->>'follow_whom')); CREATE UNIQUE INDEX item_dynamic_entrance ON items ( (details->'dynamic_entrance'->>'source_item'),