Compare commits

..

No commits in common. "6b82b39e1c638fad784298655e46abbdf52c49da" and "74ec6cf2c386f37386fa47555cc6059bc523b5f9" have entirely different histories.

5 changed files with 6 additions and 44 deletions

View file

@ -2,7 +2,6 @@
- Implement fast travel (must be unlocked by getting phone number of FASTravel)
- Implement phone calls
- Implement factory reset
- Chats don't automatically advance now, the player has to press "Continue"
- Add sparkles to Jupiter's ring ✨😍✨ best visible from Farview Station
- Add setting to change pointer

View file

@ -894,7 +894,7 @@ pub fn handle_chat_scripts(
),
With<actor::Player>,
>,
mut q_playercam: Query<(&mut Position, &mut Rotation, &mut LinearVelocity), With<actor::PlayerCamera>>,
mut q_playercam: Query<(&mut Position, &mut LinearVelocity), With<actor::PlayerCamera>>,
mut q_chats: Query<&mut Chat>,
mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
mut ew_effect: EventWriter<visual::SpawnEffectEvent>,
@ -960,23 +960,16 @@ pub fn handle_chat_scripts(
if param1.is_empty() {
error!("Chat script cryotrip needs a parameter");
} else {
if let Ok((mut pos, mut rot, mut v)) = q_playercam.get_single_mut() {
if let Ok((mut pos, mut v)) = q_playercam.get_single_mut() {
let busstop = match param1 {
"serenity" => Some("busstopclippy"),
"farview" => Some("busstopclippy2"),
"metisprime" => Some("busstopclippy3"),
_ => None,
};
let looktarget = match param1 {
"serenity" => Some("pizzeria"),
"farview" => Some("jupiter"),
"metisprime" => Some("busstopclippy3"),
_ => None,
};
if let Some(station) = busstop {
if let Some(target_pos) = id2pos.0.get(&station.to_string()) {
pos.0 = *target_pos + DVec3::new(0.0, 9000.0, 0.0);
pos.0 = *target_pos + DVec3::new(0.0, -1000.0, 0.0);
} else {
error!(
"Could not determine position of actor with ID: '{}'",
@ -994,12 +987,6 @@ pub fn handle_chat_scripts(
} else {
error!("Invalid destination for cryotrip chat script: '{}'", param1);
}
if let Some(looktarget) = looktarget {
if let Some(target_pos) = id2pos.0.get(&looktarget.to_string()) {
rot.0 = look_at_quat(**pos, *target_pos, Dir3::X.as_dvec3());
}
}
}
if let Ok((_, mut suit, mut gforce)) = q_player.get_single_mut() {
suit.oxygen = suit.oxygen_max;

View file

@ -613,7 +613,7 @@ actor -300 0 40 suitv2
oxygen 0.08
pronoun she
actor 100 -12000 2000 clippy
actor 100 -18000 2000 clippy
template clippy
relativeto "player"
id "busstopclippy"

View file

@ -105,7 +105,6 @@ pub enum Turn {
On,
Off,
Toggle,
Unchanged,
}
impl Turn {
@ -114,7 +113,6 @@ impl Turn {
Turn::On => true,
Turn::Off => false,
Turn::Toggle => !current_state,
Turn::Unchanged => current_state,
}
}
}
@ -124,7 +122,6 @@ pub enum Cycle {
Last,
Next,
Previous,
Unchanged,
}
impl Cycle {
@ -150,9 +147,6 @@ impl Cycle {
Some(current_index - 1)
}
}
Cycle::Unchanged => {
Some(current_index)
}
}
}
}
@ -176,7 +170,7 @@ pub fn handle_game_event(
mut ew_togglemusic: EventWriter<audio::ToggleMusicEvent>,
mut q_window: Query<&mut Window, With<PrimaryWindow>>,
mut q_light: Query<&mut DirectionalLight>,
mut q_flashlight: Query<(&mut Visibility, &mut SpotLight), With<actor::PlayersFlashLight>>,
mut q_flashlight: Query<&mut SpotLight, With<actor::PlayersFlashLight>>,
mut mapcam: ResMut<camera::MapCam>,
mut log: ResMut<hud::Log>,
opt: Res<var::CommandLineOptions>,
@ -274,9 +268,8 @@ pub fn handle_game_event(
);
}
GameEvent::UpdateFlashlight => {
for (mut visibility, mut spotlight) in &mut q_flashlight {
for mut spotlight in &mut q_flashlight {
spotlight.intensity = actor::FLASHLIGHT_INTENSITY[prefs.flashlight_power];
*visibility = bool2vis(settings.flashlight_active);
}
}
GameEvent::PhoneCall => {

View file

@ -79,7 +79,6 @@ pub const MENUDEF: &[(&str, MenuAction)] = &[
("", MenuAction::ToggleCamera),
("", MenuAction::ToggleShadows),
("Fullscreen [F11]", MenuAction::ToggleFullscreen),
("FACTORY RESET", MenuAction::ResetSettings),
("Take Off Helmet", MenuAction::Restart),
("Quit", MenuAction::Quit),
];
@ -100,7 +99,6 @@ pub enum MenuAction {
ToggleCamera,
ToggleFullscreen,
ToggleShadows,
ResetSettings,
Restart,
Quit,
}
@ -782,21 +780,6 @@ pub fn handle_input(
ew_game.send(GameEvent::SetMenu(Turn::Off));
ew_updatemenu.send(UpdateMenuEvent);
}
MenuAction::ResetSettings => {
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::PowerDown));
*settings = Settings::default();
*prefs = Preferences::default();
prefs.save();
ew_game.send(GameEvent::SetShadows(Turn::Unchanged));
ew_game.send(GameEvent::SetFullscreen(Turn::Unchanged));
ew_game.send(GameEvent::SetSound(game::Cycle::Unchanged));
ew_game.send(GameEvent::SetMusic(game::Cycle::Unchanged));
ew_game.send(GameEvent::SetAR(Turn::Unchanged));
ew_game.send(GameEvent::UpdateFlashlight);
ew_updatepointer.send(hud::UpdatePointerEvent);
ew_updateavatar.send(hud::UpdateAvatarEvent);
ew_updatemenu.send(UpdateMenuEvent);
}
MenuAction::Restart => {
settings.god_mode = false;
ew_playerdies.send(game::PlayerDiesEvent(actor::DamageType::Depressurization));