diff --git a/src/chat.rs b/src/chat.rs index 2d0d0e3..29ac594 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -902,6 +902,7 @@ pub fn handle_chat_scripts( mut ew_sfx: EventWriter, mut ew_effect: EventWriter, mut ew_achievement: EventWriter, + mut log: ResMut, id2pos: Res, id2v: Res, mut prefs: ResMut, @@ -1045,6 +1046,17 @@ pub fn handle_chat_scripts( if CONTACTS.contains(¶m1) { let param1_string = param1.to_string(); if !prefs.contacts.contains(¶m1_string) { + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Achieve)); + let name = if let Some(index) = CONTACTS.iter().position(|&x| x == param1) { + CONTACTS_PRETTY[index] + } else { + "ERROR" + }; + log.add( + format!("Unlocked phone number: {name}!"), + "".to_string(), + hud::LogLevel::Achievement, + ); prefs.contacts.push(param1_string); prefs.save(); } @@ -1053,6 +1065,7 @@ pub fn handle_chat_scripts( } } "installlunabackup" => { + ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Achieve)); prefs.luna_backup = true; prefs.save() }