From e54aea5b46a05c613a2c5e6d0e153b00b5b926c5 Mon Sep 17 00:00:00 2001 From: yuni Date: Fri, 2 Aug 2024 04:09:01 +0200 Subject: [PATCH] revert saving state about luna introduction --- src/chat.rs | 11 ----------- src/var.rs | 3 --- 2 files changed, 14 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index 3ec6663..ec73388 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -834,7 +834,6 @@ pub fn handle_chat_scripts( mut ew_sfx: EventWriter, mut ew_effect: EventWriter, mut ew_achievement: EventWriter, - mut prefs: ResMut, id2pos: Res, id2v: Res, ) { @@ -942,10 +941,6 @@ pub fn handle_chat_scripts( "drinkpizza" => { ew_achievement.send(game::AchievementEvent::DrinkPizza); } - "save_state_luna_intro" => { - prefs.state_luna_intro = true; - prefs.save(); - } _ => { error!("Error, undefined chat script {name}"); } @@ -957,7 +952,6 @@ pub fn update_chat_variables( mut vars: ResMut, settings: Res, q_player: Query<&actor::Suit, With>, - prefs: ResMut, ) { if let Ok(suit) = q_player.get_single() { vars.set_in_scope( @@ -970,11 +964,6 @@ pub fn update_chat_variables( "player_suit_health_percent", ((suit.integrity * 100.0).round() as u8).to_string(), ); - vars.set_in_scope( - "$", - "state_luna_intro", - if prefs.state_luna_intro { 1 } else { 0 }.to_string(), - ); let wears_chefhat = if let Some(ava) = hud::PLAYER_AR_AVATARS.get(settings.ar_avatar) { match ava.0 { hud::Avatar::ChefHat => 1, diff --git a/src/var.rs b/src/var.rs index edab738..f9c3578 100644 --- a/src/var.rs +++ b/src/var.rs @@ -455,9 +455,6 @@ pub struct Preferences { pub shadows_sun: bool, pub avatar: usize, - // permanent game state - pub state_luna_intro: bool, - #[serde(skip)] pub source_file: Option, }