luna now installs backup software on player's space suit

This commit is contained in:
yuni 2024-10-27 02:06:51 +02:00
parent 51f024900b
commit 038a18ef5e
4 changed files with 95 additions and 3 deletions

View file

@ -894,7 +894,10 @@ pub fn handle_chat_scripts(
), ),
With<actor::Player>, With<actor::Player>,
>, >,
mut q_playercam: Query<(&mut Position, &mut Rotation, &mut LinearVelocity), With<actor::PlayerCamera>>, mut q_playercam: Query<
(&mut Position, &mut Rotation, &mut LinearVelocity),
With<actor::PlayerCamera>,
>,
mut q_chats: Query<&mut Chat>, mut q_chats: Query<&mut Chat>,
mut ew_sfx: EventWriter<audio::PlaySfxEvent>, mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
mut ew_effect: EventWriter<visual::SpawnEffectEvent>, mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
@ -1049,6 +1052,10 @@ pub fn handle_chat_scripts(
error!("Can't register contact `{param1}', it doesn't exist in the chat::CONTACTS constant."); 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}"); 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", contact, bool2chatvar(value));
} }
vars.set_in_scope("phone", "any", bool2chatvar(any)); vars.set_in_scope("phone", "any", bool2chatvar(any));
vars.set_in_scope("luna", "backupinstalled", bool2chatvar(prefs.luna_backup));
} }
} }

View file

@ -16,9 +16,16 @@
- if: phone$travel - if: phone$travel
FASTravel: FASTravel:
- goto: travel - goto: travel
- if: phone$luna
Luna:
- goto: luna
- "[Cancel]": - "[Cancel]":
- goto: EXIT - goto: EXIT
# ---------------------------------------------------------
# ---------------------------------------------------------
# ---------------------------------------------------------
- label: travel - label: travel
- script: changename FASTravel - script: changename FASTravel
- Welcome to FASTravel™, how can I help you today? - Welcome to FASTravel™, how can I help you today?
@ -63,3 +70,15 @@
- goto: EXIT - goto: EXIT
- "[Hang up]": - "[Hang up]":
- goto: EXIT - goto: EXIT
# ---------------------------------------------------------
# ---------------------------------------------------------
# ---------------------------------------------------------
- label: luna
- script: changename Luna
- Hey, time traveler, what's up?
- Just chilling:
- Cool, cool.
- "[Hang up]": []
- goto: EXIT

View file

@ -378,6 +378,9 @@
- chat: Luna - chat: Luna
- if phone$luna:
- set: begged
- set: believe
- "if $$player_suit_health_percent < 100": - "if $$player_suit_health_percent < 100":
- Holy shit! Look at all those scratches and tears on your suit! - Holy shit! Look at all those scratches and tears on your suit!
- script: repairsuit - script: repairsuit
@ -398,6 +401,16 @@
- goto: mainnode - goto: mainnode
- if: "$$chefhat" - if: "$$chefhat"
The cake is a lie.: 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: - if $explained:
- ... - ...
- Yes, indeed. - Yes, indeed.
@ -527,10 +540,14 @@
- goto: mainnode - goto: mainnode
- if: "~phone$luna" - if: "~phone$luna"
Can I have your phone number?: Can I have your phone number?:
- if $believe: - if $backupinstalled:
- Of course, time traveler! Anything! - Of course, time traveler! Anything!
- script: registercontact luna - script: registercontact luna
- goto: mainnode - 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. - No.
- How do I know you're not a scammer? - How do I know you're not a scammer?
- if: "$$ar" - if: "$$ar"
@ -602,7 +619,20 @@
- Let me apologize though. I must have been rude before you showed me proof for your story. - 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. - There are just so many bullshitters in the world and I don't have the patience anymore.
- But I believe you now. - 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 - goto: mainnode
- Leave me alone.: - Leave me alone.:
- goto: gtfo - goto: gtfo
@ -618,6 +648,40 @@
- goto: node_ask - 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
--- ---

View file

@ -482,6 +482,7 @@ pub struct Preferences {
pub flashlight_power: usize, // 0-2 pub flashlight_power: usize, // 0-2
pub thruster_boost: usize, // 0-2 pub thruster_boost: usize, // 0-2
pub contacts: Vec<String>, pub contacts: Vec<String>,
pub luna_backup: bool,
#[serde(skip)] #[serde(skip)]
pub source_file: Option<String>, pub source_file: Option<String>,