Compare commits
8 commits
5ae8c7dc25
...
877e664df9
Author | SHA1 | Date | |
---|---|---|---|
yuni | 877e664df9 | ||
yuni | c8825fb99b | ||
yuni | c5d744b280 | ||
yuni | 20e17e8faa | ||
yuni | 377c2a4f0b | ||
yuni | 548386ef54 | ||
yuni | 1bd1525eb8 | ||
yuni | 3b82ed22a3 |
|
@ -217,7 +217,17 @@ apart from the other characters. Let's outline the personalities/backstories:
|
|||
- Good for some small talk
|
||||
- Nerd about engineering, propulsion, rocket science
|
||||
- Rides a MeteorAceGT
|
||||
4. ??? @ pizzeria or workshop:
|
||||
4. Sus @ pizzeria:
|
||||
- A pig. ("Sus" is the genus of wild and domesticated pigs)
|
||||
- Can communicate via neural implants and space suit
|
||||
- Can manipulate the world through arms controlled by brain implants
|
||||
- Grew up on earth. Misses the mud.
|
||||
- Trained geologist (sparked by a love for mud and dirt)
|
||||
- Came to space to study space rocks but is now way more excited about just flying around
|
||||
- Some people still haven't quite accepted non-human animals among them
|
||||
- Sus is easily annoyed/offended/angry if he suspects that you view him as a non-person
|
||||
- Is not connected to the game Among Us, despite his appearance :D
|
||||
5. ??? @ pizzeria or workshop:
|
||||
- Engineer
|
||||
- ADHD
|
||||
- Deploys communications infrastructure across the rings
|
||||
|
@ -226,24 +236,24 @@ apart from the other characters. Let's outline the personalities/backstories:
|
|||
- Totally a furry
|
||||
- Has big plans for this area, but not enough time to implement everything
|
||||
- Nerd about high energy communications technology
|
||||
5. ??? @ workshop:
|
||||
6. ??? @ workshop:
|
||||
- Mechanic
|
||||
- Operates a workshop to craft and mod space vehicles
|
||||
- Nerd about space suits and vehicles
|
||||
6. Ash @ hideout:
|
||||
7. Ash @ hideout:
|
||||
- Monk master of a cult of Buddhist origins
|
||||
- Uptight, self-disciplined, driven, wise
|
||||
- Not very agreeable
|
||||
- Operates a construction site for a meditation retreat in a hollowed-out asteroid
|
||||
- Deep distrust of AIs, wants to construct the hideout by hand
|
||||
- Not interested in small talk, but up for deep philosophical debates
|
||||
7. River @ hideout:
|
||||
8. River @ hideout:
|
||||
- Monk apprentice
|
||||
- Open-minded
|
||||
- Had everything in her life on one of the planets
|
||||
- But ached for profoundness, desperate for a meaning of life
|
||||
- Frustrated by the rigidity of Ash, she thinks she knows better how to run the place
|
||||
8. Rain @ hideout:
|
||||
9. Rain @ hideout:
|
||||
- Engineer, tinkerer
|
||||
- Very shy, unsocial
|
||||
- Helps the monks to construct the hideout
|
||||
|
@ -271,6 +281,7 @@ Minor characters:
|
|||
- Nox [he]
|
||||
- Rudy [he]
|
||||
- Yuni [no pronoun]
|
||||
- Sus [he]
|
||||
- Ash [they]
|
||||
- River [she]
|
||||
- Rain [she]
|
||||
|
|
|
@ -271,7 +271,7 @@ pub fn update_power(
|
|||
let d = time.delta_seconds();
|
||||
for (mut battery, player) in &mut q_battery {
|
||||
if player.is_some() && settings.flashlight_active {
|
||||
battery.power -= 4000000.0 * d;
|
||||
battery.power -= 2400000.0 * d;
|
||||
if battery.power <= 0.0 {
|
||||
settings.flashlight_active = false;
|
||||
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
|
||||
|
@ -474,6 +474,7 @@ pub fn handle_vehicle_enter_exit(
|
|||
commands.entity(driver).remove::<PlayerCamera>();
|
||||
commands.entity(driver).remove::<Collider>();
|
||||
commands.entity(driver).insert(JustNowEnteredVehicle);
|
||||
commands.entity(vehicle).remove::<hud::IsTargeted>();
|
||||
commands.entity(vehicle).insert(PlayerCamera);
|
||||
commands.entity(vehicle).insert(PlayerDrivesThis);
|
||||
if let Ok(mut flashlight_vis) = q_playerflashlight.get_single_mut() {
|
||||
|
|
|
@ -147,6 +147,7 @@ pub fn setup(mut settings: ResMut<Settings>, prefs: Res<var::Preferences>) {
|
|||
settings.set_noise_cancellation_mode(prefs.noise_cancellation_mode);
|
||||
settings.third_person = prefs.third_person;
|
||||
settings.shadows_sun = prefs.shadows_sun;
|
||||
settings.ar_avatar = prefs.avatar;
|
||||
}
|
||||
|
||||
pub fn handle_game_event(
|
||||
|
@ -184,7 +185,10 @@ pub fn handle_game_event(
|
|||
prefs.save();
|
||||
}
|
||||
GameEvent::SetSound(cycle) => {
|
||||
match cycle.to_index(settings.noise_cancellation_mode, &settings.noise_cancellation_modes) {
|
||||
match cycle.to_index(
|
||||
settings.noise_cancellation_mode,
|
||||
&settings.noise_cancellation_modes,
|
||||
) {
|
||||
Some(mode) => {
|
||||
settings.set_noise_cancellation_mode(mode);
|
||||
}
|
||||
|
|
47
src/hud.rs
47
src/hud.rs
|
@ -442,6 +442,7 @@ pub fn setup(
|
|||
},
|
||||
gauge.clone(),
|
||||
GaugeLength(bar_length),
|
||||
ToggleableHudElement,
|
||||
));
|
||||
});
|
||||
|
||||
|
@ -465,29 +466,35 @@ pub fn setup(
|
|||
))
|
||||
.with_children(|builder| {
|
||||
// The gauge symbol
|
||||
builder.spawn((ImageBundle {
|
||||
image: UiImage::new(asset_server.load(sprite.to_string())),
|
||||
style: Style {
|
||||
width: Val::Px(icon_size),
|
||||
height: Val::Px(icon_size),
|
||||
builder.spawn((
|
||||
ImageBundle {
|
||||
image: UiImage::new(asset_server.load(sprite.to_string())),
|
||||
style: Style {
|
||||
width: Val::Px(icon_size),
|
||||
height: Val::Px(icon_size),
|
||||
..Default::default()
|
||||
},
|
||||
visibility,
|
||||
..Default::default()
|
||||
},
|
||||
visibility,
|
||||
..Default::default()
|
||||
},));
|
||||
ToggleableHudElement,
|
||||
));
|
||||
// The gauge bar border
|
||||
builder.spawn((ImageBundle {
|
||||
image: UiImage::new(gauges_handle.clone()),
|
||||
style: Style {
|
||||
width: Val::Px(bar_length),
|
||||
height: Val::Px(10.0),
|
||||
bottom: Val::Px(8.0),
|
||||
left: Val::Px(gauge_bar_padding_left),
|
||||
builder.spawn((
|
||||
ImageBundle {
|
||||
image: UiImage::new(gauges_handle.clone()),
|
||||
style: Style {
|
||||
width: Val::Px(bar_length),
|
||||
height: Val::Px(10.0),
|
||||
bottom: Val::Px(8.0),
|
||||
left: Val::Px(gauge_bar_padding_left),
|
||||
..Default::default()
|
||||
},
|
||||
visibility,
|
||||
..Default::default()
|
||||
},
|
||||
visibility,
|
||||
..Default::default()
|
||||
},));
|
||||
ToggleableHudElement,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1281,6 +1288,7 @@ fn update_overlay_visibility(
|
|||
fn update_avatar(
|
||||
mut commands: Commands,
|
||||
mut settings: ResMut<Settings>,
|
||||
mut prefs: ResMut<var::Preferences>,
|
||||
asset_server: Res<AssetServer>,
|
||||
q_avatar: Query<(Entity, &SceneInstance), With<PlayerAvatar>>,
|
||||
q_player: Query<Entity, With<actor::Player>>,
|
||||
|
@ -1289,6 +1297,9 @@ fn update_avatar(
|
|||
if settings.ar_avatar >= PLAYER_AR_AVATARS.len() {
|
||||
settings.ar_avatar = settings.ar_avatar % PLAYER_AR_AVATARS.len();
|
||||
}
|
||||
prefs.avatar = settings.ar_avatar;
|
||||
prefs.save();
|
||||
|
||||
let ava = if let Some(ava) = PLAYER_AR_AVATARS.get(settings.ar_avatar) {
|
||||
ava
|
||||
} else {
|
||||
|
|
|
@ -34,8 +34,8 @@ pub mod prelude {
|
|||
pub use crate::{
|
||||
actor, audio, camera, chat, cmd, common, game, hud, load, menu, nature, var, visual, world,
|
||||
};
|
||||
pub use game::Turn::Toggle;
|
||||
pub use game::Cycle::Next;
|
||||
pub use game::Turn::Toggle;
|
||||
pub use game::{GameEvent, Turn};
|
||||
}
|
||||
|
||||
|
|
16
src/menu.rs
16
src/menu.rs
|
@ -458,14 +458,14 @@ pub fn update_menu(
|
|||
|
||||
match MENUDEF[i].1 {
|
||||
MenuAction::ToggleSound => {
|
||||
let noisecancel =
|
||||
if let Some(noisecancel) =
|
||||
settings.noise_cancellation_modes.get(settings.noise_cancellation_mode)
|
||||
{
|
||||
noisecancel
|
||||
} else {
|
||||
&settings.noise_cancellation_modes[0]
|
||||
};
|
||||
let noisecancel = if let Some(noisecancel) = settings
|
||||
.noise_cancellation_modes
|
||||
.get(settings.noise_cancellation_mode)
|
||||
{
|
||||
noisecancel
|
||||
} else {
|
||||
&settings.noise_cancellation_modes[0]
|
||||
};
|
||||
text.sections[i].value = format!("Noise Cancellation: {noisecancel}\n");
|
||||
}
|
||||
MenuAction::ToggleMusic => {
|
||||
|
|
18
src/var.rs
18
src/var.rs
|
@ -456,6 +456,7 @@ pub struct Preferences {
|
|||
pub noise_cancellation_mode: usize,
|
||||
pub third_person: bool,
|
||||
pub shadows_sun: bool,
|
||||
pub avatar: usize,
|
||||
|
||||
#[serde(skip)]
|
||||
pub source_file: Option<String>,
|
||||
|
@ -482,17 +483,14 @@ impl Preferences {
|
|||
pub fn save(&self) {
|
||||
if let Some(path) = get_prefs_path() {
|
||||
match toml_edit::ser::to_document::<Preferences>(self) {
|
||||
Ok(doc) => {
|
||||
dbg!(&doc);
|
||||
match fs::write(path.clone(), doc.to_string()) {
|
||||
Ok(_) => {
|
||||
info!("Saved preferences to {path}.");
|
||||
}
|
||||
Err(error) => {
|
||||
error!("Error while writing preferences: {:?}", error);
|
||||
}
|
||||
Ok(doc) => match fs::write(path.clone(), doc.to_string()) {
|
||||
Ok(_) => {
|
||||
info!("Saved preferences to {path}.");
|
||||
}
|
||||
}
|
||||
Err(error) => {
|
||||
error!("Error while writing preferences: {:?}", error);
|
||||
}
|
||||
},
|
||||
Err(error) => {
|
||||
error!("Error while writing preferences: {:?}", error);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue