Compare commits
4 commits
678979db7e
...
74ec6cf2c3
Author | SHA1 | Date | |
---|---|---|---|
yuni | 74ec6cf2c3 | ||
yuni | 47d93e88e6 | ||
yuni | 6a3fa7c64c | ||
yuni | da956130c5 |
|
@ -27,6 +27,8 @@ pub const CHATS: &[&str] = &[
|
||||||
];
|
];
|
||||||
|
|
||||||
pub const CONTACTS: &[&str] = &["icarus", "travel", "luna", "nox"];
|
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...";
|
pub const TEXT_CONTINUE: &str = "Continue...";
|
||||||
|
|
||||||
|
@ -1000,7 +1002,7 @@ pub fn handle_chat_scripts(
|
||||||
"cryofadeout" => {
|
"cryofadeout" => {
|
||||||
ew_effect.send(visual::SpawnEffectEvent {
|
ew_effect.send(visual::SpawnEffectEvent {
|
||||||
class: visual::Effects::FadeOut(css::AQUA.into()),
|
class: visual::Effects::FadeOut(css::AQUA.into()),
|
||||||
duration: 5.1,
|
duration: 2.1,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
"drinkpizza" => {
|
"drinkpizza" => {
|
||||||
|
|
|
@ -76,21 +76,21 @@
|
||||||
Take me to Farview Station, please.:
|
Take me to Farview Station, please.:
|
||||||
- FASTravel wishes you a pleasant journey.
|
- FASTravel wishes you a pleasant journey.
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 2
|
||||||
- script: cryotrip farview
|
- script: cryotrip farview
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
- if: $busstop != metis
|
- if: $busstop != metis
|
||||||
Take me to Metis Prime Station, please.:
|
Take me to Metis Prime Station, please.:
|
||||||
- FASTravel wishes you a pleasant journey.
|
- FASTravel wishes you a pleasant journey.
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 2
|
||||||
- script: cryotrip metisprime
|
- script: cryotrip metisprime
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
- if: $busstop != serenity
|
- if: $busstop != serenity
|
||||||
Take me to Serenity Station, please.:
|
Take me to Serenity Station, please.:
|
||||||
- FASTravel wishes you a pleasant journey.
|
- FASTravel wishes you a pleasant journey.
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 2
|
||||||
- script: cryotrip serenity
|
- script: cryotrip serenity
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
- Can you please fill up my oxygen tank without taking me anywhere?:
|
- Can you please fill up my oxygen tank without taking me anywhere?:
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
# ▄████████▄ + ███ + ▄█████████ ███ +
|
||||||
|
# ███▀ ▀███ + + ███ ███▀ + ███ + +
|
||||||
|
# ███ + ███ ███ ███ █████████ ███ ███ ███ ███
|
||||||
|
# ███ +███ ███ ███ ███ ███▐██████ ███ ███ ███
|
||||||
|
# ███ + ███ ███+ ███ +███ ███ + ███ ███ + ███
|
||||||
|
# ███▄ ▄███ ███▄ ███ ███ + ███ + ███ ███▄ ███
|
||||||
|
# ▀████████▀ + ▀███████ ███▄ ███▄ ▀████ ▀███████
|
||||||
|
# + + + ███
|
||||||
|
# + ▀████████████████████████████████████████████████████▀
|
||||||
|
|
||||||
- chat: phone
|
- chat: phone
|
||||||
- if ~phone$any:
|
- if ~phone$any:
|
||||||
- "Error: Phonebook empty."
|
- "Error: Phonebook empty."
|
||||||
|
@ -19,7 +29,7 @@
|
||||||
- Ok! Activate cryofreeze and we'll be right there.
|
- Ok! Activate cryofreeze and we'll be right there.
|
||||||
- "[Activate Cryofreeze]":
|
- "[Activate Cryofreeze]":
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 2
|
||||||
- script: cryotrip serenity
|
- script: cryotrip serenity
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
- I changed my mind.:
|
- I changed my mind.:
|
||||||
|
@ -29,7 +39,7 @@
|
||||||
- Ok! Activate cryofreeze and we'll be right there.
|
- Ok! Activate cryofreeze and we'll be right there.
|
||||||
- "[Activate Cryofreeze]":
|
- "[Activate Cryofreeze]":
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 2
|
||||||
- script: cryotrip metisprime
|
- script: cryotrip metisprime
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
- I changed my mind.:
|
- I changed my mind.:
|
||||||
|
@ -39,7 +49,7 @@
|
||||||
- Ok! Activate cryofreeze and we'll be right there.
|
- Ok! Activate cryofreeze and we'll be right there.
|
||||||
- "[Activate Cryofreeze]":
|
- "[Activate Cryofreeze]":
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 2
|
||||||
- script: cryotrip farview
|
- script: cryotrip farview
|
||||||
- goto: EXIT
|
- goto: EXIT
|
||||||
- I changed my mind.:
|
- I changed my mind.:
|
||||||
|
|
39
src/menu.rs
39
src/menu.rs
|
@ -274,6 +274,16 @@ pub fn setup(
|
||||||
sections.extend(Vec::from_iter(
|
sections.extend(Vec::from_iter(
|
||||||
(0..achievement_count).map(|_| TextSection::new("", style_achievement.clone())),
|
(0..achievement_count).map(|_| TextSection::new("", style_achievement.clone())),
|
||||||
));
|
));
|
||||||
|
sections.push(TextSection::new(
|
||||||
|
"\nPhonebook\n",
|
||||||
|
style_achievement_header.clone(),
|
||||||
|
));
|
||||||
|
sections.extend(Vec::from_iter((0..chat::CONTACTS.len()).map(|_| {
|
||||||
|
TextSection::new(
|
||||||
|
chat::CONTACTS_UNKNOWN.to_string() + "\n",
|
||||||
|
style_achievement.clone(),
|
||||||
|
)
|
||||||
|
})));
|
||||||
builder.spawn((
|
builder.spawn((
|
||||||
MenuAchievements,
|
MenuAchievements,
|
||||||
TextBundle {
|
TextBundle {
|
||||||
|
@ -463,8 +473,7 @@ pub fn update_menu(
|
||||||
if boolean { "On" } else { "Off" }.to_string()
|
if boolean { "On" } else { "Off" }.to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
let bools = achievement_tracker.to_bool_vec();
|
// Footer
|
||||||
let rendered = achievement_tracker.to_textsections();
|
|
||||||
if let (Ok(mut text), Some(player_pos), Some(jupiter_pos)) = (
|
if let (Ok(mut text), Some(player_pos), Some(jupiter_pos)) = (
|
||||||
q_footer.get_single_mut(),
|
q_footer.get_single_mut(),
|
||||||
id2pos.0.get(cmd::ID_PLAYER),
|
id2pos.0.get(cmd::ID_PLAYER),
|
||||||
|
@ -480,16 +489,38 @@ pub fn update_menu(
|
||||||
settings.version.as_str()
|
settings.version.as_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Achievements
|
||||||
|
let achievement_bools = achievement_tracker.to_bool_vec();
|
||||||
|
let rendered = achievement_tracker.to_textsections();
|
||||||
if let Ok(mut text) = q_achievement_text.get_single_mut() {
|
if let Ok(mut text) = q_achievement_text.get_single_mut() {
|
||||||
for i in 0..text.sections.len() - 1 {
|
for i in 0..achievement_bools.len() - 1 {
|
||||||
text.sections[i + 1].style.color = if bools[i] {
|
text.sections[i + 1].style.color = if achievement_bools[i] {
|
||||||
settings.hud_color_achievement_accomplished
|
settings.hud_color_achievement_accomplished
|
||||||
} else {
|
} else {
|
||||||
settings.hud_color_achievement
|
settings.hud_color_achievement
|
||||||
};
|
};
|
||||||
text.sections[i + 1].value = rendered[i].clone();
|
text.sections[i + 1].value = rendered[i].clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Phonebook
|
||||||
|
for (i, contact) in chat::CONTACTS.iter().enumerate() {
|
||||||
|
let text_index = i + achievement_bools.len() + 2;
|
||||||
|
let registered = prefs.contacts.contains(&contact.to_string());
|
||||||
|
text.sections[text_index].style.color = if registered {
|
||||||
|
settings.hud_color_phonebook_unlocked
|
||||||
|
} else {
|
||||||
|
settings.hud_color_phonebook_locked
|
||||||
|
};
|
||||||
|
text.sections[text_index].value = if registered {
|
||||||
|
chat::CONTACTS_PRETTY[i].to_string() + "\n"
|
||||||
|
} else {
|
||||||
|
String::from(chat::CONTACTS_UNKNOWN.to_string() + "\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Menu
|
||||||
if let Ok(mut text) = q_text.get_single_mut() {
|
if let Ok(mut text) = q_text.get_single_mut() {
|
||||||
for i in 0..text.sections.len() {
|
for i in 0..text.sections.len() {
|
||||||
if menustate.cursor == i {
|
if menustate.cursor == i {
|
||||||
|
|
|
@ -80,6 +80,8 @@ pub struct Settings {
|
||||||
pub hud_color_achievement: Color,
|
pub hud_color_achievement: Color,
|
||||||
pub hud_color_achievement_header: Color,
|
pub hud_color_achievement_header: Color,
|
||||||
pub hud_color_achievement_accomplished: Color,
|
pub hud_color_achievement_accomplished: Color,
|
||||||
|
pub hud_color_phonebook_locked: Color,
|
||||||
|
pub hud_color_phonebook_unlocked: Color,
|
||||||
pub hud_color_death: Color,
|
pub hud_color_death: Color,
|
||||||
pub hud_color_death_achievements: Color,
|
pub hud_color_death_achievements: Color,
|
||||||
pub hud_color_keybindings: Color,
|
pub hud_color_keybindings: Color,
|
||||||
|
@ -222,6 +224,8 @@ impl Default for Settings {
|
||||||
hud_color_achievement: Srgba::hex(COLOR_DIM).unwrap().into(),
|
hud_color_achievement: Srgba::hex(COLOR_DIM).unwrap().into(),
|
||||||
hud_color_achievement_accomplished: Srgba::hex(COLOR_SUCCESS).unwrap().into(),
|
hud_color_achievement_accomplished: Srgba::hex(COLOR_SUCCESS).unwrap().into(),
|
||||||
hud_color_achievement_header: Srgba::hex(COLOR_PRIMARY).unwrap().into(),
|
hud_color_achievement_header: Srgba::hex(COLOR_PRIMARY).unwrap().into(),
|
||||||
|
hud_color_phonebook_locked: Srgba::hex(COLOR_DIM).unwrap().into(),
|
||||||
|
hud_color_phonebook_unlocked: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
||||||
hud_color_death: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
hud_color_death: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
||||||
hud_color_death_achievements: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
hud_color_death_achievements: Srgba::hex(COLOR_SECONDARY).unwrap().into(),
|
||||||
hud_color_keybindings: Srgba::hex(COLOR_DIM).unwrap().into(),
|
hud_color_keybindings: Srgba::hex(COLOR_DIM).unwrap().into(),
|
||||||
|
|
Loading…
Reference in a new issue