Compare commits

..

No commits in common. "6f4d44febca34895a74083f25671c078886d0b2d" and "e0c9c4186c5109f8dd46a13e01c2907bdd802883" have entirely different histories.

7 changed files with 47 additions and 72 deletions

View file

@ -26,8 +26,8 @@ pub const CHATS: &[&str] = &[
include_str!("chats/thebe.yaml"),
];
pub const CONTACTS: &[&str] = &["travel", "luna"];
pub const CONTACTS_PRETTY: &[&str] = &["FASTravel", "Luna"];
pub const CONTACTS: &[&str] = &["icarus", "travel", "luna", "nox"];
pub const CONTACTS_PRETTY: &[&str] = &["Icarus", "FASTravel", "Luna", "Nox"];
pub const CONTACTS_UNKNOWN: &str = "[Unknown]";
pub const TEXT_CONTINUE: &str = "Continue...";
@ -902,7 +902,6 @@ pub fn handle_chat_scripts(
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
mut ew_achievement: EventWriter<game::AchievementEvent>,
mut log: ResMut<hud::Log>,
id2pos: Res<game::Id2Pos>,
id2v: Res<game::Id2V>,
mut prefs: ResMut<Preferences>,
@ -1046,17 +1045,6 @@ pub fn handle_chat_scripts(
if CONTACTS.contains(&param1) {
let param1_string = param1.to_string();
if !prefs.contacts.contains(&param1_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();
}
@ -1065,7 +1053,6 @@ pub fn handle_chat_scripts(
}
}
"installlunabackup" => {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Achieve));
prefs.luna_backup = true;
prefs.save()
}

View file

@ -25,7 +25,6 @@
- label: interesting
- Serenity Station is famous for the best pizza across the Jovian Rings.
- Look for the neon sign of the pizzeria nearby.
- goto: fastravel
---
@ -41,7 +40,6 @@
- This area is an industrial paradise for asteroid miners.
- Though it has been recently abandoned due to the excessive particle radiation.
- I advise you to minimize the duration of your stay here.
- goto: fastravel
---
@ -55,28 +53,25 @@
- include: BusStops
- label: interesting
- The main attraction around here is the gorgeous view onto Jupiter from far up ahead.
- goto: fastravel
---
- chat: BusStops
- I wish I could use this shuttle service from anywhere!:
- Actually, you can!
- if phone$travel:
- Just give us a phone call, we'll pick you up!
- WHY IS EVERYTHING SO GREEN???:
- We advertise our services with the signature green cross.
- Thanks to this, you will find us even when your radio systems are damaged.
- FASTravel provides a beacon in the dark, creating a safer place for everybody.
- goto: fastravel
- script: registercontact travel
- Here's our phone number, call us any time and we'll pick you up!
- Bus stop?! How does this work?:
- FASTravel is the most convenient way to travel the vast distances of space.
- Just activate your suit's built-in cryostasis. A FASTravel carrier will pick you up and you will wake up at your destination in the blink of an eye.
- Of course we will supply you with free oxygen and ensure your safety.
- goto: fastravel
- Can I take a spacecraft with me?:
- Absolutely.
- goto: fastravel
- if: $busstop != serenity
Take me to Serenity Station, please.:
- FASTravel wishes you a pleasant journey.
- script: cryofadeout
- sleep: 2
- script: cryotrip serenity
- goto: EXIT
- if: $busstop != farview
Take me to Farview Station, please.:
- FASTravel wishes you a pleasant journey.
@ -91,25 +86,20 @@
- sleep: 2
- script: cryotrip metisprime
- goto: EXIT
- Can you please fill up my oxygen tank?:
- if: $busstop != serenity
Take me to Serenity Station, please.:
- FASTravel wishes you a pleasant journey.
- script: cryofadeout
- sleep: 2
- script: cryotrip serenity
- goto: EXIT
- Can you please fill up my oxygen tank without taking me anywhere?:
- script: refilloxygen 1000
- Of course, you can count on FASTravel!
- goto: fastravel
- I have some questions...:
- Of course, go ahead!
- WHY IS EVERYTHING SO GREEN???:
- We advertise our services with the signature green cross.
- Thanks to this, you will find us even when your radio systems are damaged.
- FASTravel provides a beacon in the dark, creating a safer place for everybody.
- goto: fastravel
- Bus stop?! How does this work?:
- FASTravel is the most convenient way to travel the vast distances of space.
- Just activate your suit's built-in cryostasis. A FASTravel carrier will pick you up and you will wake up at your destination in the blink of an eye.
- Of course we will supply you with free oxygen and ensure your safety.
- goto: fastravel
- Can I take a spacecraft with me?:
- Absolutely.
- goto: fastravel
- I wish I could use your services from anywhere!:
- Actually, you can!
- script: registercontact travel
- Here's our phone number, call us any time!
- Is there anything interesting to do around here?:
- goto: interesting
- No, thank you.:

View file

@ -36,6 +36,12 @@
- goto: thx
- Leave me alone!:
- goto: EXIT
- Micrometeorites?:
- Those tiny 混蛋 that fly right through you, leaving holes in your suit. And your body.
- Ouch! Thank you so much.:
- goto: thx
- Whatever... I didn't ask for this.:
- goto: didntask
- How are you feeling?

View file

@ -563,7 +563,7 @@ actor -3300 10 0 pizzeria
rotationy -90
pronoun he
actor 30 0 -40 suitv2
actor 30 -12 -40 suitv2
template person
relativeto player
name Icarus

View file

@ -150,7 +150,9 @@ impl Cycle {
Some(current_index - 1)
}
}
Cycle::Unchanged => Some(current_index),
Cycle::Unchanged => {
Some(current_index)
}
}
}
}
@ -286,7 +288,9 @@ pub fn handle_game_event(
pronoun: None,
talking_speed: 0.0,
};
ew_conv.send(chat::StartConversationEvent { talker: talker });
ew_conv.send(chat::StartConversationEvent {
talker: talker,
});
}
}
}

View file

@ -481,20 +481,12 @@ pub fn update_menu(
id2pos.0.get(cmd::ID_PLAYER),
id2pos.0.get(cmd::ID_JUPITER),
) {
let clock = if player_pos.y.abs() < 1e7 && player_pos.distance(*jupiter_pos) < 1e10 {
let (clock_max, clock_current) =
nature::pos_to_orbit_time(*player_pos, *jupiter_pos, nature::JUPITER_MASS);
format!(
"{} of {}",
nature::format_seconds_to_hour_min(clock_current),
nature::format_seconds_to_hour_min(clock_max)
)
} else {
String::from("ERROR: Not in orbit around Jupiter.")
};
text.sections[0].value = format!(
"Orbital Clock:\n{}\n{} {}",
clock,
"Orbital Clock:\n{} of {}\n{} {}",
nature::format_seconds_to_hour_min(clock_current),
nature::format_seconds_to_hour_min(clock_max),
GAME_NAME,
settings.version.as_str()
);

View file

@ -263,9 +263,5 @@ pub fn pos_to_orbit_time(pos: DVec3, orbited_pos: DVec3, orbited_mass: f64) -> (
}
pub fn format_seconds_to_hour_min(seconds: f64) -> String {
return format!(
"{:02.0}:{:02.0}",
seconds / 3600.0,
(seconds % 3600.0) / 60.0
);
return format!("{:02.0}:{:02.0}", seconds / 3600.0, (seconds % 3600.0) / 60.0);
}