Compare commits
No commits in common. "6f4d44febca34895a74083f25671c078886d0b2d" and "e0c9c4186c5109f8dd46a13e01c2907bdd802883" have entirely different histories.
6f4d44febc
...
e0c9c4186c
17
src/chat.rs
17
src/chat.rs
|
@ -26,8 +26,8 @@ pub const CHATS: &[&str] = &[
|
||||||
include_str!("chats/thebe.yaml"),
|
include_str!("chats/thebe.yaml"),
|
||||||
];
|
];
|
||||||
|
|
||||||
pub const CONTACTS: &[&str] = &["travel", "luna"];
|
pub const CONTACTS: &[&str] = &["icarus", "travel", "luna", "nox"];
|
||||||
pub const CONTACTS_PRETTY: &[&str] = &["FASTravel", "Luna"];
|
pub const CONTACTS_PRETTY: &[&str] = &["Icarus", "FASTravel", "Luna", "Nox"];
|
||||||
pub const CONTACTS_UNKNOWN: &str = "[Unknown]";
|
pub const CONTACTS_UNKNOWN: &str = "[Unknown]";
|
||||||
|
|
||||||
pub const TEXT_CONTINUE: &str = "Continue...";
|
pub const TEXT_CONTINUE: &str = "Continue...";
|
||||||
|
@ -902,7 +902,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 log: ResMut<hud::Log>,
|
|
||||||
id2pos: Res<game::Id2Pos>,
|
id2pos: Res<game::Id2Pos>,
|
||||||
id2v: Res<game::Id2V>,
|
id2v: Res<game::Id2V>,
|
||||||
mut prefs: ResMut<Preferences>,
|
mut prefs: ResMut<Preferences>,
|
||||||
|
@ -1046,17 +1045,6 @@ pub fn handle_chat_scripts(
|
||||||
if CONTACTS.contains(¶m1) {
|
if CONTACTS.contains(¶m1) {
|
||||||
let param1_string = param1.to_string();
|
let param1_string = param1.to_string();
|
||||||
if !prefs.contacts.contains(¶m1_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.contacts.push(param1_string);
|
||||||
prefs.save();
|
prefs.save();
|
||||||
}
|
}
|
||||||
|
@ -1065,7 +1053,6 @@ pub fn handle_chat_scripts(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"installlunabackup" => {
|
"installlunabackup" => {
|
||||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Achieve));
|
|
||||||
prefs.luna_backup = true;
|
prefs.luna_backup = true;
|
||||||
prefs.save()
|
prefs.save()
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
- label: interesting
|
- label: interesting
|
||||||
- Serenity Station is famous for the best pizza across the Jovian Rings.
|
- Serenity Station is famous for the best pizza across the Jovian Rings.
|
||||||
- Look for the neon sign of the pizzeria nearby.
|
- Look for the neon sign of the pizzeria nearby.
|
||||||
- goto: fastravel
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -41,7 +40,6 @@
|
||||||
- This area is an industrial paradise for asteroid miners.
|
- This area is an industrial paradise for asteroid miners.
|
||||||
- Though it has been recently abandoned due to the excessive particle radiation.
|
- Though it has been recently abandoned due to the excessive particle radiation.
|
||||||
- I advise you to minimize the duration of your stay here.
|
- I advise you to minimize the duration of your stay here.
|
||||||
- goto: fastravel
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -55,28 +53,25 @@
|
||||||
- include: BusStops
|
- include: BusStops
|
||||||
- label: interesting
|
- label: interesting
|
||||||
- The main attraction around here is the gorgeous view onto Jupiter from far up ahead.
|
- The main attraction around here is the gorgeous view onto Jupiter from far up ahead.
|
||||||
- goto: fastravel
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
- chat: BusStops
|
- chat: BusStops
|
||||||
- I wish I could use this shuttle service from anywhere!:
|
- WHY IS EVERYTHING SO GREEN???:
|
||||||
- Actually, you can!
|
- We advertise our services with the signature green cross.
|
||||||
- if phone$travel:
|
- Thanks to this, you will find us even when your radio systems are damaged.
|
||||||
- Just give us a phone call, we'll pick you up!
|
- FASTravel provides a beacon in the dark, creating a safer place for everybody.
|
||||||
- goto: fastravel
|
- goto: fastravel
|
||||||
- script: registercontact travel
|
- Bus stop?! How does this work?:
|
||||||
- Here's our phone number, call us any time and we'll pick you up!
|
- 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
|
- 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
|
- if: $busstop != farview
|
||||||
Take me to Farview Station, please.:
|
Take me to Farview Station, please.:
|
||||||
- FASTravel wishes you a pleasant journey.
|
- FASTravel wishes you a pleasant journey.
|
||||||
|
@ -91,27 +86,22 @@
|
||||||
- sleep: 2
|
- sleep: 2
|
||||||
- script: cryotrip metisprime
|
- script: cryotrip metisprime
|
||||||
- goto: EXIT
|
- 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
|
- script: refilloxygen 1000
|
||||||
- Of course, you can count on FASTravel!
|
- Of course, you can count on FASTravel!
|
||||||
- goto: fastravel
|
- I wish I could use your services from anywhere!:
|
||||||
- I have some questions...:
|
- Actually, you can!
|
||||||
- Of course, go ahead!
|
- script: registercontact travel
|
||||||
- WHY IS EVERYTHING SO GREEN???:
|
- Here's our phone number, call us any time!
|
||||||
- We advertise our services with the signature green cross.
|
- Is there anything interesting to do around here?:
|
||||||
- Thanks to this, you will find us even when your radio systems are damaged.
|
- goto: interesting
|
||||||
- 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
|
|
||||||
- Is there anything interesting to do around here?:
|
|
||||||
- goto: interesting
|
|
||||||
- No, thank you.:
|
- No, thank you.:
|
||||||
- Feel free to come back any time.
|
- Feel free to come back any time.
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
|
|
|
@ -36,6 +36,12 @@
|
||||||
- goto: thx
|
- goto: thx
|
||||||
- Leave me alone!:
|
- Leave me alone!:
|
||||||
- goto: EXIT
|
- 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?
|
- How are you feeling?
|
||||||
|
|
|
@ -563,7 +563,7 @@ actor -3300 10 0 pizzeria
|
||||||
rotationy -90
|
rotationy -90
|
||||||
pronoun he
|
pronoun he
|
||||||
|
|
||||||
actor 30 0 -40 suitv2
|
actor 30 -12 -40 suitv2
|
||||||
template person
|
template person
|
||||||
relativeto player
|
relativeto player
|
||||||
name Icarus
|
name Icarus
|
||||||
|
|
|
@ -150,7 +150,9 @@ impl Cycle {
|
||||||
Some(current_index - 1)
|
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,
|
pronoun: None,
|
||||||
talking_speed: 0.0,
|
talking_speed: 0.0,
|
||||||
};
|
};
|
||||||
ew_conv.send(chat::StartConversationEvent { talker: talker });
|
ew_conv.send(chat::StartConversationEvent {
|
||||||
|
talker: talker,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
src/menu.rs
18
src/menu.rs
|
@ -481,20 +481,12 @@ pub fn update_menu(
|
||||||
id2pos.0.get(cmd::ID_PLAYER),
|
id2pos.0.get(cmd::ID_PLAYER),
|
||||||
id2pos.0.get(cmd::ID_JUPITER),
|
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) =
|
||||||
let (clock_max, clock_current) =
|
nature::pos_to_orbit_time(*player_pos, *jupiter_pos, nature::JUPITER_MASS);
|
||||||
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!(
|
text.sections[0].value = format!(
|
||||||
"Orbital Clock:\n{}\n{} {}",
|
"Orbital Clock:\n{} of {}\n{} {}",
|
||||||
clock,
|
nature::format_seconds_to_hour_min(clock_current),
|
||||||
|
nature::format_seconds_to_hour_min(clock_max),
|
||||||
GAME_NAME,
|
GAME_NAME,
|
||||||
settings.version.as_str()
|
settings.version.as_str()
|
||||||
);
|
);
|
||||||
|
|
|
@ -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 {
|
pub fn format_seconds_to_hour_min(seconds: f64) -> String {
|
||||||
return format!(
|
return format!("{:02.0}:{:02.0}", seconds / 3600.0, (seconds % 3600.0) / 60.0);
|
||||||
"{:02.0}:{:02.0}",
|
|
||||||
seconds / 3600.0,
|
|
||||||
(seconds % 3600.0) / 60.0
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue