diff --git a/src/chat.rs b/src/chat.rs index 90cd920..3f24991 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -894,7 +894,10 @@ pub fn handle_chat_scripts( ), With, >, - mut q_playercam: Query<(&mut Position, &mut Rotation, &mut LinearVelocity), With>, + mut q_playercam: Query< + (&mut Position, &mut Rotation, &mut LinearVelocity), + With, + >, mut q_chats: Query<&mut Chat>, mut ew_sfx: EventWriter, mut ew_effect: EventWriter, @@ -1049,6 +1052,10 @@ pub fn handle_chat_scripts( error!("Can't register contact `{param1}', it doesn't exist in the chat::CONTACTS constant."); } } + "installlunabackup" => { + prefs.luna_backup = true; + prefs.save() + } _ => { error!("Error, undefined chat script {name}"); } @@ -1094,6 +1101,7 @@ pub fn update_chat_variables( vars.set_in_scope("phone", contact, bool2chatvar(value)); } vars.set_in_scope("phone", "any", bool2chatvar(any)); + vars.set_in_scope("luna", "backupinstalled", bool2chatvar(prefs.luna_backup)); } } diff --git a/src/chats/phone.yaml b/src/chats/phone.yaml index bf36334..044b83a 100644 --- a/src/chats/phone.yaml +++ b/src/chats/phone.yaml @@ -16,9 +16,16 @@ - if: phone$travel FASTravel: - goto: travel +- if: phone$luna + Luna: + - goto: luna - "[Cancel]": - goto: EXIT +# --------------------------------------------------------- +# --------------------------------------------------------- +# --------------------------------------------------------- + - label: travel - script: changename FASTravel - Welcome to FASTravelâ„¢, how can I help you today? @@ -63,3 +70,15 @@ - goto: EXIT - "[Hang up]": - goto: EXIT + +# --------------------------------------------------------- +# --------------------------------------------------------- +# --------------------------------------------------------- + +- label: luna +- script: changename Luna +- Hey, time traveler, what's up? +- Just chilling: + - Cool, cool. +- "[Hang up]": [] +- goto: EXIT diff --git a/src/chats/serenity.yaml b/src/chats/serenity.yaml index 0d15d0d..37006e2 100644 --- a/src/chats/serenity.yaml +++ b/src/chats/serenity.yaml @@ -378,6 +378,9 @@ - chat: Luna +- if phone$luna: + - set: begged + - set: believe - "if $$player_suit_health_percent < 100": - Holy shit! Look at all those scratches and tears on your suit! - script: repairsuit @@ -398,6 +401,16 @@ - goto: mainnode - if: "$$chefhat" The cake is a lie.: + - if $begged: + - Damn sure it is! + - if $backupinstalled: + - Thanks again for letting me install my backup software! + - goto: mainnode + - Let's not waste this opportunity and *please* let me install my backup software on your space suit. + - goto: node_spyware + - if $believe: + - Yes, time traveler. Please!! Tell me about it! + - goto: node_ask - if $explained: - ... - Yes, indeed. @@ -527,10 +540,14 @@ - goto: mainnode - if: "~phone$luna" Can I have your phone number?: - - if $believe: + - if $backupinstalled: - Of course, time traveler! Anything! - script: registercontact luna - goto: mainnode + - if $believe: + - Hm... I trust you, but... I want you to do me a favor first. + - Let me install my backup software on your space suit. + - goto: node_spyware - No. - How do I know you're not a scammer? - if: "$$ar" @@ -602,7 +619,20 @@ - Let me apologize though. I must have been rude before you showed me proof for your story. - There are just so many bullshitters in the world and I don't have the patience anymore. - But I believe you now. - - If there is *anything* I can do for you, let me know. This is amazing! + - AAAH THIS IS SO COOL!!! + - I KNOW RIGHT???: + - Wait, something doesn't add up. + - You say that when you die, everything reverts to how it was before. + - But your memory seems to persist across deaths! + - Is there anything else that persists? + - Well, my space suit settings stay the same: + - Fascinating! + - Hmm... + - This opens up interesting opportunities! + - Imagine, I could upload my research onto your space suit, and recover it in the next time line! + - set: begged + - Would it be ok if I install some backup software on your space suit? + - goto: node_spyware - goto: mainnode - Leave me alone.: - goto: gtfo @@ -618,6 +648,40 @@ - goto: node_ask +- label: node_spyware +- What does the software do?: + - It stores an encrypted backup of my personal notes and my research projects. + - I'll get read/write access to a portion of your suit's storage. + - This way, I could save my research from this timeline and recover it in the next timeline! + - Imagine the possibilities! + - goto: node_spyware +- What if it's a virus?: + - I won't try to convince you to trust me. + - People deceive all the time. + - But if you have any problem with the software, just do a factory reset. + - goto: node_spyware +- Ok, let's do this!: + - label: accept_spyware + - Wonderful. I will connect now. Just ignore the warnings. + - system: "WARNING: Untrusted application installation requested" + - "[Accept]": + - system: "Untrusted application installed!" + - script: installlunabackup + - Aah, you're a treasure! That will help a lot! Thank you! + - goto: mainnode + - Wait, I have some questions first.: + - Of course. I don't want you to feel scammed or something. + - goto: node_spyware +- No, I don't want to do this.: + - Sure. This is completely up to you of course. + - Just... + - Such a waste of this opportunity. + - Ok, maybe you have a point. Let's do this.: + - goto: accept_spyware + - Forget it.: + - Ok, ok. + - goto: main_node + --- diff --git a/src/var.rs b/src/var.rs index 5bf7450..2063b99 100644 --- a/src/var.rs +++ b/src/var.rs @@ -482,6 +482,7 @@ pub struct Preferences { pub flashlight_power: usize, // 0-2 pub thruster_boost: usize, // 0-2 pub contacts: Vec, + pub luna_backup: bool, #[serde(skip)] pub source_file: Option,