revert saving state about luna introduction
This commit is contained in:
parent
b7838e0f5a
commit
e54aea5b46
11
src/chat.rs
11
src/chat.rs
|
@ -834,7 +834,6 @@ pub fn handle_chat_scripts(
|
||||||
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
|
||||||
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
|
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
|
||||||
mut ew_achievement: EventWriter<game::AchievementEvent>,
|
mut ew_achievement: EventWriter<game::AchievementEvent>,
|
||||||
mut prefs: ResMut<var::Preferences>,
|
|
||||||
id2pos: Res<game::Id2Pos>,
|
id2pos: Res<game::Id2Pos>,
|
||||||
id2v: Res<game::Id2V>,
|
id2v: Res<game::Id2V>,
|
||||||
) {
|
) {
|
||||||
|
@ -942,10 +941,6 @@ pub fn handle_chat_scripts(
|
||||||
"drinkpizza" => {
|
"drinkpizza" => {
|
||||||
ew_achievement.send(game::AchievementEvent::DrinkPizza);
|
ew_achievement.send(game::AchievementEvent::DrinkPizza);
|
||||||
}
|
}
|
||||||
"save_state_luna_intro" => {
|
|
||||||
prefs.state_luna_intro = true;
|
|
||||||
prefs.save();
|
|
||||||
}
|
|
||||||
_ => {
|
_ => {
|
||||||
error!("Error, undefined chat script {name}");
|
error!("Error, undefined chat script {name}");
|
||||||
}
|
}
|
||||||
|
@ -957,7 +952,6 @@ pub fn update_chat_variables(
|
||||||
mut vars: ResMut<var::GameVars>,
|
mut vars: ResMut<var::GameVars>,
|
||||||
settings: Res<var::Settings>,
|
settings: Res<var::Settings>,
|
||||||
q_player: Query<&actor::Suit, With<actor::Player>>,
|
q_player: Query<&actor::Suit, With<actor::Player>>,
|
||||||
prefs: ResMut<var::Preferences>,
|
|
||||||
) {
|
) {
|
||||||
if let Ok(suit) = q_player.get_single() {
|
if let Ok(suit) = q_player.get_single() {
|
||||||
vars.set_in_scope(
|
vars.set_in_scope(
|
||||||
|
@ -970,11 +964,6 @@ pub fn update_chat_variables(
|
||||||
"player_suit_health_percent",
|
"player_suit_health_percent",
|
||||||
((suit.integrity * 100.0).round() as u8).to_string(),
|
((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) {
|
let wears_chefhat = if let Some(ava) = hud::PLAYER_AR_AVATARS.get(settings.ar_avatar) {
|
||||||
match ava.0 {
|
match ava.0 {
|
||||||
hud::Avatar::ChefHat => 1,
|
hud::Avatar::ChefHat => 1,
|
||||||
|
|
|
@ -455,9 +455,6 @@ pub struct Preferences {
|
||||||
pub shadows_sun: bool,
|
pub shadows_sun: bool,
|
||||||
pub avatar: usize,
|
pub avatar: usize,
|
||||||
|
|
||||||
// permanent game state
|
|
||||||
pub state_luna_intro: bool,
|
|
||||||
|
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
pub source_file: Option<String>,
|
pub source_file: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue