Compare commits

..

No commits in common. "330da6c7fc989c86ded3bd8d3179796469c1b227" and "73410efc09dbf867f6479dc50c13969f35302001" have entirely different histories.

23 changed files with 198 additions and 713 deletions

23
Cargo.lock generated
View file

@ -304,25 +304,6 @@ dependencies = [
"bevy_ecs", "bevy_ecs",
] ]
[[package]]
name = "bevy_animation"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e553d68bc937586010ed2194ac66b751bc6238cf622b3ed5a86f4e1581e94509"
dependencies = [
"bevy_app",
"bevy_asset",
"bevy_core",
"bevy_ecs",
"bevy_hierarchy",
"bevy_math",
"bevy_reflect",
"bevy_render",
"bevy_time",
"bevy_transform",
"bevy_utils",
]
[[package]] [[package]]
name = "bevy_app" name = "bevy_app"
version = "0.13.2" version = "0.13.2"
@ -569,7 +550,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21ecf404295055deb7fe037495891bc135ca10d46bc5b6c55f9ab7b7ebc61d31" checksum = "21ecf404295055deb7fe037495891bc135ca10d46bc5b6c55f9ab7b7ebc61d31"
dependencies = [ dependencies = [
"base64", "base64",
"bevy_animation",
"bevy_app", "bevy_app",
"bevy_asset", "bevy_asset",
"bevy_core", "bevy_core",
@ -628,7 +608,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f58ec0ce77603df9474cde61f429126bfe06eb79094440e9141afb4217751c79" checksum = "f58ec0ce77603df9474cde61f429126bfe06eb79094440e9141afb4217751c79"
dependencies = [ dependencies = [
"bevy_a11y", "bevy_a11y",
"bevy_animation",
"bevy_app", "bevy_app",
"bevy_asset", "bevy_asset",
"bevy_audio", "bevy_audio",
@ -2758,7 +2737,7 @@ dependencies = [
[[package]] [[package]]
name = "outfly" name = "outfly"
version = "0.8.0" version = "0.7.3"
dependencies = [ dependencies = [
"bevy", "bevy",
"bevy_embedded_assets", "bevy_embedded_assets",

View file

@ -10,7 +10,7 @@
[package] [package]
name = "outfly" name = "outfly"
version = "0.8.0" version = "0.7.3"
edition = "2021" edition = "2021"
homepage = "https://codeberg.org/hut/outfly" homepage = "https://codeberg.org/hut/outfly"
repository = "https://codeberg.org/hut/outfly" repository = "https://codeberg.org/hut/outfly"
@ -22,7 +22,7 @@ build = "build/build.rs"
[dependencies] [dependencies]
regex = "1" regex = "1"
bevy = { version = "0.13.2", default-features = false, features = ["animation", "bevy_asset", "bevy_audio", "bevy_scene", "bevy_winit", "bevy_core_pipeline", "bevy_pbr", "bevy_gltf", "bevy_render", "bevy_text", "bevy_ui", "jpeg", "multi-threaded", "tonemapping_luts", "vorbis"]} bevy = { version = "0.13.2", default-features = false, features = ["jpeg", "bevy_asset", "bevy_audio", "bevy_scene", "bevy_winit", "bevy_core_pipeline", "bevy_pbr", "bevy_gltf", "bevy_render", "bevy_text", "bevy_ui", "multi-threaded", "tonemapping_luts", "vorbis"]}
bevy_xpbd_3d = { version = "0.4.2", default-features = false, features = ["3d", "f64", "parry-f64", "parallel", "async-collider"] } bevy_xpbd_3d = { version = "0.4.2", default-features = false, features = ["3d", "f64", "parry-f64", "parallel", "async-collider"] }
bevy_embedded_assets = { version = "0.10.2", optional = true } bevy_embedded_assets = { version = "0.10.2", optional = true }
fastrand = "2.0" fastrand = "2.0"

View file

@ -16,7 +16,7 @@ Links: [Code](https://codeberg.org/hut/outfly) • [itch.io](https://yunicode.it
# OutFly # OutFly
OutFly is an atmospheric, open world, realistic 3D space game that throws you into the [Rings of Jupiter](https://en.wikipedia.org/wiki/Rings_of_Jupiter) with a self-sufficient sportswear space suit that will take you anywhere. OutFly is an atmospheric, open world, 100% hard sci-fi 3D game that throws you into the [Rings of Jupiter](https://en.wikipedia.org/wiki/Rings_of_Jupiter) with a self-sufficient sportswear space suit that will take you anywhere.
Imagine a blend of [Fallout](https://en.wikipedia.org/wiki/Fallout_%28series%29) and [Outer Wilds](https://en.wikipedia.org/wiki/Outer_Wilds) with a splash of [Firefly](https://en.wikipedia.org/wiki/Firefly_%28TV_series%29), where you are free to explore the breathtaking expanse of the Jupiter system and discover what life could be like after hundreds of years of space colonization. Imagine a blend of [Fallout](https://en.wikipedia.org/wiki/Fallout_%28series%29) and [Outer Wilds](https://en.wikipedia.org/wiki/Outer_Wilds) with a splash of [Firefly](https://en.wikipedia.org/wiki/Firefly_%28TV_series%29), where you are free to explore the breathtaking expanse of the Jupiter system and discover what life could be like after hundreds of years of space colonization.
@ -26,10 +26,10 @@ This game aims to respect the player as much as possible. It doesn't waste your
# Features # Features
- A beautiful, serene atmosphere with gorgeous views - Open source forever
- Racing vehicles, unique NPCs, cozy places, deadly environment - Open world, realistic hard sci-fi, atmospheric, deadly
- Accurate, clickable star chart. Can you spot the constellations? - Accurate star chart. Can you spot the constellations?
- Cross platform, free & open source forever! - Cross platform (verified on Linux & Windows)
- Written in [Rust](https://www.rust-lang.org) with the [Bevy game engine](https://bevyengine.org) - Written in [Rust](https://www.rust-lang.org) with the [Bevy game engine](https://bevyengine.org)
- Status: Early access, not much content - Status: Early access, not much content
@ -50,7 +50,6 @@ This game aims to respect the player as much as possible. It doesn't waste your
- M: Toggle map - M: Toggle map
- F: Toggle 3rd person view - F: Toggle 3rd person view
- Y: Toggle rotation stabilizer - Y: Toggle rotation stabilizer
- F2: Toggle shadows
- F3: Toggle sound effects - F3: Toggle sound effects
- F4: Toggle music - F4: Toggle music
- F7: Restart game - F7: Restart game
@ -175,12 +174,6 @@ python -m http.server -d wasm
# Changelog # Changelog
- v0.8.0:
- Implement animations
- Implement shadows
- Implement markers for points of interest in the map
- Add new animated high-poly player mesh
- Add new secret character
- v0.7.3: Implement map. You can now zoom out ALL THE WAY - v0.7.3: Implement map. You can now zoom out ALL THE WAY
- v0.7.2: - v0.7.2:
- Implement colliders based on object shape - Implement colliders based on object shape

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -10,8 +10,7 @@
# + ▀████████████████████████████████████████████████████▀ # + ▀████████████████████████████████████████████████████▀
# #
# A script to package release binaries + README.md into zip files. # A script to package release binaries + README.md into zip files.
# Usage: cd outfly; build/pack.sh [-b] # Usage: cd outfly; build/pack.sh
# Options: -b: cross-compile targets before packing
set -e set -e

View file

@ -631,13 +631,13 @@ fn handle_cheats(
} }
} }
if key_input.just_pressed(settings.key_cheat_farview1) { if key_input.just_pressed(settings.key_cheat_farview1) {
if let Some(target) = id2pos.0.get(&"busstopclippy2".to_string()) { if let Some(target) = id2pos.0.get(&"busstop2".to_string()) {
pos.0 = *target + DVec3::new(0.0, -1000.0, 0.0); pos.0 = *target + DVec3::new(0.0, -1000.0, 0.0);
gforce.ignore_gforce_seconds = 1.0; gforce.ignore_gforce_seconds = 1.0;
} }
} }
if key_input.just_pressed(settings.key_cheat_farview2) { if key_input.just_pressed(settings.key_cheat_farview2) {
if let Some(target) = id2pos.0.get(&"busstopclippy3".to_string()) { if let Some(target) = id2pos.0.get(&"busstop3".to_string()) {
pos.0 = *target + DVec3::new(0.0, -1000.0, 0.0); pos.0 = *target + DVec3::new(0.0, -1000.0, 0.0);
gforce.ignore_gforce_seconds = 1.0; gforce.ignore_gforce_seconds = 1.0;
} }

View file

@ -17,7 +17,7 @@ use bevy::input::mouse::{MouseMotion, MouseWheel};
use bevy::window::PrimaryWindow; use bevy::window::PrimaryWindow;
use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings}; use bevy::core_pipeline::bloom::{BloomCompositeMode, BloomSettings};
use bevy::core_pipeline::tonemapping::Tonemapping; use bevy::core_pipeline::tonemapping::Tonemapping;
use bevy::pbr::{CascadeShadowConfigBuilder, DirectionalLightShadowMap}; use bevy::pbr::CascadeShadowConfigBuilder;
use bevy::transform::TransformSystem; use bevy::transform::TransformSystem;
use bevy::math::{DVec3, DQuat}; use bevy::math::{DVec3, DQuat};
use bevy_xpbd_3d::prelude::*; use bevy_xpbd_3d::prelude::*;
@ -80,7 +80,6 @@ impl Default for MapCam {
pub fn setup_camera( pub fn setup_camera(
mut commands: Commands, mut commands: Commands,
settings: Res<var::Settings>,
) { ) {
// Add player // Add player
commands.spawn(( commands.spawn((
@ -103,23 +102,19 @@ pub fn setup_camera(
// Add Light from the Sun // Add Light from the Sun
commands.spawn(DirectionalLightBundle { commands.spawn(DirectionalLightBundle {
directional_light: DirectionalLight { directional_light: DirectionalLight {
illuminance: 3000.0, illuminance: 1000.0,
shadows_enabled: settings.shadows_sun, shadows_enabled: false,
..default() ..default()
}, },
transform: Transform::from_rotation(Quat::from_rotation_y(PI/2.0)), transform: Transform::from_rotation(Quat::from_rotation_y(PI/2.0)),
cascade_shadow_config: CascadeShadowConfigBuilder { cascade_shadow_config: CascadeShadowConfigBuilder {
num_cascades: 4, first_cascade_far_bound: 7.0,
minimum_distance: 0.1, maximum_distance: 25.0,
maximum_distance: 5000.0,
..default() ..default()
}.into(), }
.into(),
..default() ..default()
}); });
commands.insert_resource(DirectionalLightShadowMap {
size: settings.shadowmap_resolution,
});
} }
pub fn sync_camera_to_player( pub fn sync_camera_to_player(
@ -274,7 +269,6 @@ pub fn update_fov(
pub fn handle_input( pub fn handle_input(
keyboard_input: Res<ButtonInput<KeyCode>>, keyboard_input: Res<ButtonInput<KeyCode>>,
mut q_light: Query<&mut DirectionalLight>,
mut settings: ResMut<var::Settings>, mut settings: ResMut<var::Settings>,
mut mapcam: ResMut<MapCam>, mut mapcam: ResMut<MapCam>,
mut ew_sfx: EventWriter<audio::PlaySfxEvent>, mut ew_sfx: EventWriter<audio::PlaySfxEvent>,
@ -283,12 +277,6 @@ pub fn handle_input(
if keyboard_input.just_pressed(settings.key_camera) { if keyboard_input.just_pressed(settings.key_camera) {
settings.third_person ^= true; settings.third_person ^= true;
} }
if keyboard_input.just_pressed(settings.key_shadows) {
settings.shadows_sun ^= true;
for mut light in &mut q_light {
light.shadows_enabled = settings.shadows_sun;
}
}
if keyboard_input.just_pressed(settings.key_map) { if keyboard_input.just_pressed(settings.key_map) {
settings.map_active ^= true; settings.map_active ^= true;
*mapcam = MapCam::default(); *mapcam = MapCam::default();
@ -622,7 +610,7 @@ pub fn find_closest_target<TargetSpecifier>(
// not on the player mesh but on the camera, which doesn't have a position. // not on the player mesh but on the camera, which doesn't have a position.
let (angular_diameter, angle, distance) = calc_angular_diameter_known_target_vector( let (angular_diameter, angle, distance) = calc_angular_diameter_known_target_vector(
trans, camera_transform, &target_vector); trans, camera_transform, &target_vector);
if angle <= angular_diameter.clamp(0.01, PI) { if angle <= angular_diameter.clamp(0.001, PI) {
// It's in the field of view! // It's in the field of view!
//commands.entity(entity).insert(IsTargeted); //commands.entity(entity).insert(IsTargeted);
let distance_to_surface = distance - trans.scale.x; let distance_to_surface = distance - trans.scale.x;

View file

@ -850,9 +850,9 @@ pub fn handle_chat_scripts(
else { else {
if let Ok((mut pos, mut v)) = q_playercam.get_single_mut() { if let Ok((mut pos, mut v)) = q_playercam.get_single_mut() {
let busstop = match param1 { let busstop = match param1 {
"serenity" => Some("busstopclippy"), "serenity" => Some("busstop"),
"farview" => Some("busstopclippy2"), "oscillation" => Some("busstop2"),
"metisprime" => Some("busstopclippy3"), "metisprime" => Some("busstop3"),
_ => None _ => None
}; };
if let Some(station) = busstop { if let Some(station) = busstop {

View file

@ -19,7 +19,7 @@
- chat: ClippyTransSerenity - chat: ClippyTransSerenity
- set: $busstop serenity - set: $busstop serenity
- Welcome at StarTrans Cargo Services! You have reached Serenity Station. - Welcome at StarTrans Cargo Services! You have reached Serenity Station.
- "Ready for a trip? Available bus stops: Farview Station, Metis Prime Station" - "Ready for a trip? Available bus stops: Oscillation Station, Metis Prime Station"
- label: startransbusstop - label: startransbusstop
- include: BusStops - include: BusStops
- label: interesting - label: interesting
@ -33,7 +33,7 @@
- chat: ClippyTransMetis - chat: ClippyTransMetis
- set: $busstop metis - set: $busstop metis
- Welcome at StarTrans Cargo Services! You have reached Metis Prime Station. - Welcome at StarTrans Cargo Services! You have reached Metis Prime Station.
- "Ready for a trip? Available bus stops: Farview Station, Serenity Station" - "Ready for a trip? Available bus stops: Oscillation Station, Serenity Station"
- label: startransbusstop - label: startransbusstop
- include: BusStops - include: BusStops
- label: interesting - label: interesting
@ -45,9 +45,9 @@
--- ---
- chat: ClippyTransFarview - chat: ClippyTransOscillation
- set: $busstop farview - set: $busstop oscillation
- Welcome at StarTrans Cargo Services! You have reached Farview Station. - Welcome at StarTrans Cargo Services! You have reached Oscillation Station.
- "Ready for a trip? Available bus stops: Serenity Station, Metis Prime Station" - "Ready for a trip? Available bus stops: Serenity Station, Metis Prime Station"
- label: startransbusstop - label: startransbusstop
- include: BusStops - include: BusStops
@ -59,11 +59,6 @@
- chat: BusStops - chat: BusStops
- WHY IS EVERYTHING SO GREEN???:
- StarTrans Cargo Services advertises their services with the signature green illumination.
- Thanks to this, you will find us even when your radio systems are damaged.
- StarTrans provides a beacon in the dark, creating a safer place for everybody.
- goto: startransbusstop
- Bus stop?! How does this work?: - Bus stop?! How does this work?:
- StarTrans Cargo Services is the most convenient way to travel the vast distances of space. - StarTrans Cargo Services is the most convenient way to travel the vast distances of space.
- Just activate your suit's built-in cryostasis. A StarTrans carrier will pick you up and you will wake up at your destination in the blink of an eye. - Just activate your suit's built-in cryostasis. A StarTrans carrier will pick you up and you will wake up at your destination in the blink of an eye.
@ -72,12 +67,12 @@
- Can I take a spacecraft with me?: - Can I take a spacecraft with me?:
- Absolutely. - Absolutely.
- goto: startransbusstop - goto: startransbusstop
- if: $busstop != farview - if: $busstop != oscillation
Take me to Farview Station, please.: Take me to Oscillation Station, please.:
- StarTrans wishes you a pleasant journey. - StarTrans wishes you a pleasant journey.
- script: cryofadeout - script: cryofadeout
- sleep: 5 - sleep: 5
- script: cryotrip farview - script: cryotrip oscillation
- goto: EXIT - goto: EXIT
- if: $busstop != metis - if: $busstop != metis
Take me to Metis Prime Station, please.: Take me to Metis Prime Station, please.:

View file

@ -14,8 +14,7 @@ extern crate regex;
use bevy::prelude::*; use bevy::prelude::*;
use bevy_xpbd_3d::prelude::*; use bevy_xpbd_3d::prelude::*;
use bevy::math::DVec3; use bevy::math::DVec3;
use bevy::pbr::{NotShadowCaster, NotShadowReceiver}; use crate::{actor, camera, chat, hud, nature, shading, skeleton, world};
use crate::{actor, camera, chat, hud, nature, shading, skeleton, var, world};
use regex::Regex; use regex::Regex;
use std::f32::consts::PI; use std::f32::consts::PI;
use std::f64::consts::PI as PI64; use std::f64::consts::PI as PI64;
@ -485,7 +484,6 @@ fn spawn_entities(
mut materials: ResMut<Assets<StandardMaterial>>, mut materials: ResMut<Assets<StandardMaterial>>,
mut materials_jupiter: ResMut<Assets<shading::JupitersRing>>, mut materials_jupiter: ResMut<Assets<shading::JupitersRing>>,
mut id2pos: ResMut<actor::Id2Pos>, mut id2pos: ResMut<actor::Id2Pos>,
settings: Res<var::Settings>,
) { ) {
for state_wrapper in er_spawn.read() { for state_wrapper in er_spawn.read() {
let state = &state_wrapper.0; let state = &state_wrapper.0;
@ -593,10 +591,6 @@ fn spawn_entities(
unlit: true, unlit: true,
..default() ..default()
})); }));
actor.insert((
NotShadowCaster,
NotShadowReceiver,
));
} }
if state.is_targeted_on_startup { if state.is_targeted_on_startup {
actor.insert(hud::IsTargeted); actor.insert(hud::IsTargeted);
@ -635,17 +629,16 @@ fn spawn_entities(
actor.insert(actor::WantsMaxVelocity(value)); actor.insert(actor::WantsMaxVelocity(value));
} }
if let Some(color) = state.light_color { if let Some(color) = state.light_color {
actor.insert(( actor.insert(PointLightBundle {
PointLight { point_light: PointLight {
intensity: state.light_brightness, intensity: state.light_brightness,
color, color,
range: 2000.0, range: 100.0,
shadows_enabled: settings.shadows_pointlights, radius: 100.0,
..default() ..default()
}, },
bevy::pbr::CubemapVisibleEntities::default(), ..default()
bevy::render::primitives::CubemapFrusta::default(), });
));
} }
if !state.id.is_empty() { if !state.id.is_empty() {
actor.insert(actor::Identifier(state.id.clone())); actor.insert(actor::Identifier(state.id.clone()));
@ -695,8 +688,6 @@ fn spawn_entities(
visibility: Visibility::Hidden, visibility: Visibility::Hidden,
..default() ..default()
}, },
NotShadowCaster,
NotShadowReceiver,
)); ));
skeleton::load(ar_asset_name, &mut entitycmd, &*asset_server); skeleton::load(ar_asset_name, &mut entitycmd, &*asset_server);
} }
@ -710,8 +701,6 @@ fn spawn_entities(
visibility: Visibility::Hidden, visibility: Visibility::Hidden,
..default() ..default()
}, },
NotShadowCaster,
NotShadowReceiver,
)); ));
skeleton::load("point_of_interest", &mut entitycmd, &*asset_server); skeleton::load("point_of_interest", &mut entitycmd, &*asset_server);
} }
@ -732,8 +721,6 @@ fn spawn_entities(
Position::new(relative_pos), Position::new(relative_pos),
Rotation::from(Quat::IDENTITY), Rotation::from(Quat::IDENTITY),
//Rotation::from(Quat::from_rotation_x(-0.3f32.to_radians())), //Rotation::from(Quat::from_rotation_x(-0.3f32.to_radians())),
NotShadowCaster,
NotShadowReceiver,
)); ));
} }
} }

View file

@ -120,7 +120,7 @@ actor 0 0 0 jupiter
clickable no clickable no
physics off physics off
actor 0 593051 0 suitv2 actor 0 593051 0 suitv1
relativeto jupiter relativeto jupiter
orbit 224000e3 0.66 orbit 224000e3 0.66
player yes player yes
@ -207,7 +207,7 @@ actor 0 0 0 moonlet
orbit 221900e3 0.66 orbit 221900e3 0.66
scale 50e3 scale 50e3
angularmomentum 0 0.025 0 angularmomentum 0 0.025 0
actor -55e3 44e3 0 suitv2 actor -48e3 20e3 0 suitv1
relativeto thebe relativeto thebe
id yuni id yuni
name "Yuni" name "Yuni"
@ -246,7 +246,7 @@ actor 0 0 0 moonlet
scale 83.5e3 scale 83.5e3
angularmomentum 0 0.025 0 angularmomentum 0 0.025 0
actor 3000 0 -300 moonlet actor 3000 0 0 moonlet
name Moonlet name Moonlet
collider mesh collider mesh
relativeto player relativeto player
@ -266,8 +266,8 @@ actor -8200 -4400 -8100 asteroid_lum
actor 70 30 30 lightorb actor 70 30 30 lightorb
relativeto Lum relativeto Lum
name "Light Orb" name "Light Orb"
scale 3 scale 0.3
light FF8F4A 500000000 light FF8F4A 500000
actor -200 -110 1000 satellite actor -200 -110 1000 satellite
name "Communications Satellite" name "Communications Satellite"
@ -276,7 +276,7 @@ actor -200 -110 1000 satellite
wants maxrotation 0 wants maxrotation 0
wants maxvelocity 0 wants maxvelocity 0
thrust 0.05 0.05 0.05 30 1 thrust 0.05 0.05 0.05 30 1
collider mesh collider capsule 7.5 1
rotationy 0.5 rotationy 0.5
angularmomentum 0 0 0 angularmomentum 0 0 0
density 0.01 density 0.01
@ -290,7 +290,6 @@ actor 1000 20 300 monolith
wants maxrotation 0.01 wants maxrotation 0.01
angularmomentum 0.0 0.0 0.01 angularmomentum 0.0 0.0 0.01
thrust 0 0 0 30 1 thrust 0 0 0 30 1
collider mesh
actor 10000 2000 -3500 monolith actor 10000 2000 -3500 monolith
name "Mysterious Monolith 2" name "Mysterious Monolith 2"
@ -301,7 +300,6 @@ actor 10000 2000 -3500 monolith
wants maxrotation 0.01 wants maxrotation 0.01
angularmomentum 0.0 0.0 0.01 angularmomentum 0.0 0.0 0.01
thrust 0 0 0 30 1 thrust 0 0 0 30 1
collider mesh
actor -8000 -1000 -100 monolith actor -8000 -1000 -100 monolith
name "Mysterious Monolith 3" name "Mysterious Monolith 3"
@ -312,7 +310,6 @@ actor -8000 -1000 -100 monolith
wants maxrotation 0.01 wants maxrotation 0.01
angularmomentum 0.0 0.0 0.01 angularmomentum 0.0 0.0 0.01
thrust 0 0 0 30 1 thrust 0 0 0 30 1
collider mesh
actor -3300 10 0 pizzeria actor -3300 10 0 pizzeria
name "Pizzeria Asteroid" name "Pizzeria Asteroid"
@ -335,25 +332,23 @@ actor -3300 10 0 pizzeria
density 500 density 500
angularmomentum 0 0 0.2 angularmomentum 0 0 0.2
pointofinterest yes pointofinterest yes
actor 60 60 -23 pizzasign actor -100 63 -13 pizzasign
name "Pizzeria Sign" name "Pizzeria Sign"
relativeto pizzeria relativeto pizzeria
scale 20 scale 20
collider mesh
density 200 density 200
rotationy 0.45 rotationy 0.45
angularmomentum 0 0 0 angularmomentum 0 0 0
light "FF00B3" 30000000 actor -36 -10 0 lightorb
actor -52 -10 0 lightorb
name "Light Orb" name "Light Orb"
relativeto pizzeria relativeto pizzeria
scale 0.25 scale 0.5
light FF8F4A 5000000 light FF8F4A 1000000
actor -50 -3 -2 lightorb actor -34 -3 -2 lightorb
name "Light Orb" name "Light Orb"
relativeto pizzeria relativeto pizzeria
scale 0.25 scale 0.5
light FF8F4A 5000000 light FF8F4A 1000000
actor -33 0 4 clippy actor -33 0 4 clippy
name "Clippy™ Convenience Companion" name "Clippy™ Convenience Companion"
relativeto pizzeria relativeto pizzeria
@ -367,7 +362,7 @@ actor -3300 10 0 pizzeria
chatid SubduedClippy chatid SubduedClippy
pronoun it pronoun it
actor -45 -4 -4 suitv2 actor -45 -4 -4 suitv1
relativeto pizzeria relativeto pizzeria
name "Nox" name "Nox"
chatid PizzaChef chatid PizzaChef
@ -382,7 +377,7 @@ actor -3300 10 0 pizzeria
angularmomentum 0 0 0 angularmomentum 0 0 0
pronoun he pronoun he
actor 30 -12 -20 suitv2 actor 60 -15 -40 suitv1
relativeto player relativeto player
name Icarus name Icarus
id Icarus id Icarus
@ -398,28 +393,8 @@ actor 30 -12 -20 suitv2
wants maxrotation 0.5 wants maxrotation 0.5
wants maxvelocity 0 wants maxvelocity 0
pronoun it pronoun it
actor 12 -35 -27 lightorb
name "Light Orb"
relativeto Icarus
scale 0.25
light FF8F4A 5000000
actor -2 -11 -9 lightorb
name "Light Orb"
relativeto Icarus
scale 0.25
light FF8F4A 5000000
actor 26 -39 4 lightorb
name "Light Orb"
relativeto Icarus
scale 0.25
light FF8F4A 5000000
actor 1.8 -15.5 16 lightorb
name "Light Orb"
relativeto Icarus
scale 0.25
light FF8F4A 5000000
actor -300 0 40 suitv2 actor -300 0 40 suitv1
relativeto player relativeto player
id Drifter id Drifter
name "梓涵" name "梓涵"
@ -430,8 +405,16 @@ actor -300 0 40 suitv2
collider handcrafted collider handcrafted
pronoun she pronoun she
actor 100 -18000 2000 clippy actor 100 -18000 2000 "orb_busstop"
relativeto "player" relativeto player
id "busstop"
name "StarTrans Bus Stop: Serenity Station"
scale 100
pointofinterest yes
wants maxrotation 0
wants maxvelocity 0
actor 120 864 150 clippy
relativeto "busstop"
id "busstopclippy" id "busstopclippy"
name "StarTrans Clippy™" name "StarTrans Clippy™"
armodel clippy_ar armodel clippy_ar
@ -439,169 +422,27 @@ actor 100 -18000 2000 clippy
wants maxrotation 0 wants maxrotation 0
wants maxvelocity 0 wants maxvelocity 0
thrust 15 6 3 400 0.5 thrust 15 6 3 400 0.5
pointofinterest yes
rotationy -0.5 rotationy -0.5
scale 3 scale 3
chatid ClippyTransSerenity chatid ClippyTransSerenity
pronoun it pronoun it
actor 40 10 40 "orb_busstop"
actor 60 0 0 "orb_busstop" name "Light Orb"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy relativeto busstopclippy
scale 5 light "47FF00" 1000000
light "47FF00" 100000000 actor 30 60 -10 "orb_busstop"
actor 80 0 0 "orb_busstop" name "Light Orb"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy relativeto busstopclippy
scale 5 light "47FF00" 1000000
light "47FF00" 100000000 actor -10 -60 20 "orb_busstop"
actor 100 0 0 "orb_busstop" name "Light Orb"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy relativeto busstopclippy
scale 5 light "47FF00" 1000000
light "47FF00" 100000000 actor -40 20 30 "orb_busstop"
actor 120 0 0 "orb_busstop" name "Light Orb"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy relativeto busstopclippy
scale 5 light "47FF00" 1000000
light "47FF00" 100000000 actor 8 2 0 suitv1
actor 140 0 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor -60 0 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor -80 0 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor -100 0 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor -120 0 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor -140 0 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 60 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 80 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 100 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 120 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 140 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 -60 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 -80 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 -100 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 -120 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 -140 0 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 60 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 80 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 100 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 120 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 140 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 -60 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 -80 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 -100 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 -120 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 0 0 -140 "orb_busstop"
name "StarTrans Bus Stop: Serenity Station"
relativeto busstopclippy
scale 5
light "47FF00" 100000000
actor 8 2 0 suitv2
relativeto "busstopclippy" relativeto "busstopclippy"
name "Rudy" name "Rudy"
wants maxrotation 0.2 wants maxrotation 0.2
@ -612,8 +453,16 @@ actor 100 -18000 2000 clippy
chatid NPCinCryoStasis chatid NPCinCryoStasis
pronoun he pronoun he
actor -184971e3 149410e3 -134273e3 clippy actor -184971e3 149410e3 -134273e3 "orb_busstop"
relativeto jupiter relativeto jupiter
id "busstop2"
name "StarTrans Bus Station 'Oscillation Station'"
scale 100
pointofinterest yes
wants maxrotation 0
wants maxvelocity 0
actor 120 864 150 clippy
relativeto "busstop2"
id "busstopclippy2" id "busstopclippy2"
name "StarTrans Clippy™" name "StarTrans Clippy™"
armodel clippy_ar armodel clippy_ar
@ -621,171 +470,37 @@ actor -184971e3 149410e3 -134273e3 clippy
wants maxrotation 0 wants maxrotation 0
wants maxvelocity 0 wants maxvelocity 0
thrust 15 6 3 400 0.5 thrust 15 6 3 400 0.5
pointofinterest yes
rotationy -0.5 rotationy -0.5
scale 3 scale 3
chatid ClippyTransFarview chatid ClippyTransOscillation
pronoun it pronoun it
actor 40 10 40 "orb_busstop"
name "Light Orb"
relativeto busstopclippy2
light "47FF00" 1000000
actor 30 60 -10 "orb_busstop"
name "Light Orb"
relativeto busstopclippy2
light "47FF00" 1000000
actor -10 -60 20 "orb_busstop"
name "Light Orb"
relativeto busstopclippy2
light "47FF00" 1000000
actor -40 20 30 "orb_busstop"
name "Light Orb"
relativeto busstopclippy2
light "47FF00" 1000000
actor 60 0 0 "orb_busstop" actor 27643e3 -44e3 -124434e3 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 80 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 100 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 120 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 140 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor -60 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor -80 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor -100 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor -120 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor -140 0 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 60 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 80 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 100 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 120 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 140 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 -60 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 -80 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 -100 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 -120 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 -140 0 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 60 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 80 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 100 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 120 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 140 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 -60 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 -80 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 -100 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 -120 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 0 0 -140 "orb_busstop"
name "StarTrans Bus Stop: Farview Station"
relativeto busstopclippy2
scale 5
light "47FF00" 100000000
actor 27643e3 -44e3 -124434e3 clippy
relativeto jupiter relativeto jupiter
id "busstop3"
name "StarTrans Bus Station 'Metis Prime'"
scale 100
pointofinterest yes
wants maxrotation 0
wants maxvelocity 0
actor 120 864 150 clippy
relativeto "busstop3"
id "busstopclippy3" id "busstopclippy3"
name "StarTrans Clippy™" name "StarTrans Clippy™"
armodel clippy_ar armodel clippy_ar
@ -793,170 +508,29 @@ actor 27643e3 -44e3 -124434e3 clippy
wants maxrotation 0 wants maxrotation 0
wants maxvelocity 0 wants maxvelocity 0
thrust 15 6 3 400 0.5 thrust 15 6 3 400 0.5
pointofinterest yes
rotationy -0.5 rotationy -0.5
scale 3 scale 3
chatid ClippyTransMetis chatid ClippyTransMetis
pronoun it pronoun it
actor 40 10 40 "orb_busstop"
name "Light Orb"
relativeto busstopclippy3
light "47FF00" 1000000
actor 30 60 -10 "orb_busstop"
name "Light Orb"
relativeto busstopclippy3
light "47FF00" 1000000
actor -10 -60 20 "orb_busstop"
name "Light Orb"
relativeto busstopclippy3
light "47FF00" 1000000
actor -40 20 30 "orb_busstop"
name "Light Orb"
relativeto busstopclippy3
light "47FF00" 1000000
actor 60 0 0 "orb_busstop" actor 110 -2000 0 whale
name "StarTrans Bus Stop: Metis Prime Station" relativeto busstop3
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 80 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 100 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 120 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 140 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor -60 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor -80 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor -100 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor -120 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor -140 0 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 60 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 80 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 100 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 120 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 140 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 -60 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 -80 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 -100 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 -120 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 -140 0 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 60 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 80 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 100 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 120 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 140 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 -60 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 -80 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 -100 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 -120 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 0 0 -140 "orb_busstop"
name "StarTrans Bus Stop: Metis Prime Station"
relativeto busstopclippy3
scale 5
light "47FF00" 100000000
actor 110 0 2000 whale
relativeto busstopclippy3
name "The Whale" name "The Whale"
vehicle yes vehicle yes
collider mesh collider mesh

View file

@ -26,7 +26,7 @@ pub const LOG_MAX_ROWS: usize = 30;
pub const LOG_MAX: usize = LOG_MAX_ROWS; pub const LOG_MAX: usize = LOG_MAX_ROWS;
pub const MAX_CHOICES: usize = 10; pub const MAX_CHOICES: usize = 10;
pub const AMBIENT_LIGHT: f32 = 0.0; // Space is DARK pub const AMBIENT_LIGHT: f32 = 0.0; // Space is DARK
pub const AMBIENT_LIGHT_AR: f32 = 30.0; pub const AMBIENT_LIGHT_AR: f32 = 15.0;
//pub const REPLY_NUMBERS: [char; 10] = ['❶', '❷', '❸', '❹', '❺', '❻', '❼', '❽', '❾', '⓿']; //pub const REPLY_NUMBERS: [char; 10] = ['❶', '❷', '❸', '❹', '❺', '❻', '❼', '❽', '❾', '⓿'];
//pub const REPLY_NUMBERS: [char; 10] = ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩']; //pub const REPLY_NUMBERS: [char; 10] = ['①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩'];
pub const REPLY_NUMBERS: [char; 10] = ['➀', '➁', '➂', '➃', '➄', '➅', '➆', '➇', '➈', '➉']; pub const REPLY_NUMBERS: [char; 10] = ['➀', '➁', '➂', '➃', '➄', '➅', '➆', '➇', '➈', '➉'];
@ -76,6 +76,7 @@ impl Plugin for HudPlugin {
#[derive(Component)] struct Reticule; #[derive(Component)] struct Reticule;
#[derive(Component)] pub struct ToggleableHudElement; #[derive(Component)] pub struct ToggleableHudElement;
#[derive(Component)] pub struct ToggleableHudMapElement; #[derive(Component)] pub struct ToggleableHudMapElement;
#[derive(Component)] struct OnlyHideWhenTogglingHud;
#[derive(Component)] struct Selectagon; #[derive(Component)] struct Selectagon;
#[derive(Component)] pub struct IsTargeted; #[derive(Component)] pub struct IsTargeted;
#[derive(Component)] pub struct PointOfInterestMarker(pub Entity); #[derive(Component)] pub struct PointOfInterestMarker(pub Entity);
@ -193,7 +194,7 @@ fn setup(
mut commands: Commands, mut commands: Commands,
settings: Res<var::Settings>, settings: Res<var::Settings>,
asset_server: Res<AssetServer>, asset_server: Res<AssetServer>,
mut ew_updateoverlays: EventWriter<UpdateOverlayVisibility>, mut ambient_light: ResMut<AmbientLight>,
) { ) {
let visibility = if settings.hud_active { let visibility = if settings.hud_active {
Visibility::Inherited Visibility::Inherited
@ -359,6 +360,8 @@ fn setup(
// Selectagon // Selectagon
let mut entitycmd = commands.spawn(( let mut entitycmd = commands.spawn((
Selectagon, Selectagon,
ToggleableHudElement,
OnlyHideWhenTogglingHud,
SpatialBundle { SpatialBundle {
visibility: Visibility::Hidden, visibility: Visibility::Hidden,
..default() ..default()
@ -366,7 +369,12 @@ fn setup(
)); ));
skeleton::load("selectagon", &mut entitycmd, &*asset_server); skeleton::load("selectagon", &mut entitycmd, &*asset_server);
ew_updateoverlays.send(UpdateOverlayVisibility); // AR-related things
ambient_light.brightness = if settings.hud_active {
AMBIENT_LIGHT_AR
} else {
AMBIENT_LIGHT
};
} }
fn update_hud( fn update_hud(
@ -469,15 +477,14 @@ fn update_hud(
} }
} }
// let dev_speed = if settings.dev_mode { let dev_speed = if settings.dev_mode {
// let x = pos.x; let x = pos.x;
// let y = pos.y; let y = pos.y;
// let z = pos.z; let z = pos.z;
// format!("\n{x:.0}\n{y:.0}\n{z:.0}") format!("\n{x:.0}\n{y:.0}\n{z:.0}")
// } else { } else {
// "".to_string() "".to_string()
// }; };
let dev_speed = "";
let gforce = gforce.gforce; let gforce = gforce.gforce;
let speed = cam_v.length(); let speed = cam_v.length();
let speed_readable = nature::readable_distance(speed); let speed_readable = nature::readable_distance(speed);
@ -643,6 +650,7 @@ fn handle_input(
mut ew_togglemusic: EventWriter<audio::ToggleMusicEvent>, mut ew_togglemusic: EventWriter<audio::ToggleMusicEvent>,
mut ew_target: EventWriter<TargetEvent>, mut ew_target: EventWriter<TargetEvent>,
mut ew_updateoverlays: EventWriter<UpdateOverlayVisibility>, mut ew_updateoverlays: EventWriter<UpdateOverlayVisibility>,
mut ambient_light: ResMut<AmbientLight>,
q_objects: Query<(Entity, &Transform), (With<IsClickable>, Without<IsTargeted>, Without<actor::PlayerDrivesThis>, Without<actor::Player>)>, q_objects: Query<(Entity, &Transform), (With<IsClickable>, Without<IsTargeted>, Without<actor::PlayerDrivesThis>, Without<actor::Player>)>,
q_camera: Query<&Transform, With<Camera>>, q_camera: Query<&Transform, With<Camera>>,
) { ) {
@ -652,10 +660,15 @@ fn handle_input(
} }
} }
if keyboard_input.just_pressed(settings.key_togglehud) { if keyboard_input.just_pressed(settings.key_togglehud) {
ew_updateoverlays.send(UpdateOverlayVisibility);
settings.hud_active ^= true; settings.hud_active ^= true;
if settings.hud_active {
ambient_light.brightness = AMBIENT_LIGHT_AR;
} else {
ambient_light.brightness = AMBIENT_LIGHT;
}
ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch)); ew_sfx.send(audio::PlaySfxEvent(audio::Sfx::Switch));
ew_togglemusic.send(audio::ToggleMusicEvent()); ew_togglemusic.send(audio::ToggleMusicEvent());
ew_updateoverlays.send(UpdateOverlayVisibility);
} }
if settings.hud_active && mouse_input.just_pressed(settings.key_selectobject) { if settings.hud_active && mouse_input.just_pressed(settings.key_selectobject) {
if let Ok(camtrans) = q_camera.get_single() { if let Ok(camtrans) = q_camera.get_single() {
@ -714,7 +727,7 @@ fn update_target_selectagon(
} }
selectagon_trans.translation = target_trans.translation; selectagon_trans.translation = target_trans.translation;
selectagon_trans.scale = target_trans.scale; selectagon_trans.scale = target_trans.scale;
selectagon_trans.look_at(camera_trans.translation, target_trans.up().into()); selectagon_trans.look_at(camera_trans.translation, Vec3::X);
// Enlarge Selectagon to a minimum angular diameter // Enlarge Selectagon to a minimum angular diameter
let (angular_diameter, _, _) = camera::calc_angular_diameter( let (angular_diameter, _, _) = camera::calc_angular_diameter(
@ -798,9 +811,6 @@ fn update_poi_overlays (
fn update_overlay_visibility( fn update_overlay_visibility(
mut q_marker: Query<&mut Visibility, With<PointOfInterestMarker>>, mut q_marker: Query<&mut Visibility, With<PointOfInterestMarker>>,
mut q_hudelement: Query<&mut Visibility, (With<ToggleableHudElement>, Without<PointOfInterestMarker>)>, mut q_hudelement: Query<&mut Visibility, (With<ToggleableHudElement>, Without<PointOfInterestMarker>)>,
mut q_selectagon: Query<&mut Visibility, (With<Selectagon>, Without<ToggleableHudElement>, Without<PointOfInterestMarker>)>,
q_target: Query<&IsTargeted, (Without<Camera>, Without<Selectagon>, Without<PointOfInterestMarker>, Without<ToggleableHudElement>)>,
mut ambient_light: ResMut<AmbientLight>,
er_target: EventReader<UpdateOverlayVisibility>, er_target: EventReader<UpdateOverlayVisibility>,
settings: Res<var::Settings>, settings: Res<var::Settings>,
) { ) {
@ -812,20 +822,10 @@ fn update_overlay_visibility(
}; };
let show_poi = check(settings.hud_active && settings.map_active); let show_poi = check(settings.hud_active && settings.map_active);
let show_hud = check(settings.hud_active); let show_hud = check(settings.hud_active);
let show_selectagon = check(settings.hud_active && !q_target.is_empty());
for mut vis in &mut q_marker { for mut vis in &mut q_marker {
*vis = show_poi; *vis = show_poi;
} }
for mut vis in &mut q_hudelement { for mut vis in &mut q_hudelement {
*vis = show_hud; *vis = show_hud;
} }
for mut vis in &mut q_selectagon {
*vis = show_selectagon;
}
ambient_light.brightness = if settings.hud_active {
AMBIENT_LIGHT_AR
} else {
AMBIENT_LIGHT
};
} }

View file

@ -18,14 +18,12 @@ pub struct SkeletonPlugin;
impl Plugin for SkeletonPlugin { impl Plugin for SkeletonPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.add_systems(Update, animate_skeleton_parts); app.add_systems(Update, animate_skeleton_parts);
app.add_systems(Update, play_animations);
} }
} }
pub fn asset_name_to_path(name: &str) -> &'static str { pub fn asset_name_to_path(name: &str) -> &'static str {
match name { match name {
"suitv2" => "models/suit_v2/suit_v2.glb#Scene0", "suit_ar_chefhat" => "models/suit_v1/ar_chefhat.glb#Scene0",
"suit_ar_chefhat" => "models/suit_v2/ar_chefhat.glb#Scene0",
"asteroid1" => "models/asteroid.glb#Scene0", "asteroid1" => "models/asteroid.glb#Scene0",
"asteroid2" => "models/asteroid2.glb#Scene0", "asteroid2" => "models/asteroid2.glb#Scene0",
"asteroid_lum" => "models/asteroid_lum.glb#Scene0", "asteroid_lum" => "models/asteroid_lum.glb#Scene0",
@ -231,6 +229,13 @@ pub fn load(
} }
} }
//pub fn load_scene(
// path: &str,
// asset_server: &AssetServer
//) -> Handle<Scene> {
// load_scene_by_path(asset_name_to_path(path), asset_server)
//}
#[inline] #[inline]
pub fn load_scene_by_path( pub fn load_scene_by_path(
path: &str, path: &str,
@ -322,34 +327,3 @@ pub fn animate_human_float(mut trans: &mut Transform, limb: &Limb, mirror: bool,
_ => {}, _ => {},
} }
} }
fn play_animations(
mut players: Query<&mut AnimationPlayer, Added<AnimationPlayer>>,
asset_server: Res<AssetServer>,
) {
for mut player in &mut players {
let animation = asset_server.load("models/suit_v2/suit_v2.glb#Animation0");
player.play(animation.clone()).repeat();
}
}
//fn play_animations(
// players: Query<(Entity, &Parent, &AnimationPlayer), Added<AnimationPlayer>>,
// q_parents: Query<(Entity, &Parent)>,
// world: &World,
//) {
// for (entity, parent, player) in &players {
// info!("Got player!");
//// dbg!(world.inspect_entity(entity));
//// let parent_entity = q_parents.get(parent.get());
//// if let Ok((parent_entity, parent_parents)) = parent_entity {
//// //dbg!(world.inspect_entity(parent_entity));
//// let parent_entity = q_parents.get(parent_parents.get());
//// if let Ok((parent_entity, parent_parents)) = parent_entity {
//// dbg!(world.inspect_entity(parent_entity));
//// }
//// }
// //dbg!(player);
// //player.play(animations.0[0].clone_weak()).repeat();
// }
//}

View file

@ -58,9 +58,6 @@ pub struct Settings {
pub is_zooming: bool, pub is_zooming: bool,
pub third_person: bool, pub third_person: bool,
pub rotation_stabilizer_active: bool, pub rotation_stabilizer_active: bool,
pub shadows_sun: bool,
pub shadows_pointlights: bool,
pub shadowmap_resolution: usize,
pub key_selectobject: MouseButton, pub key_selectobject: MouseButton,
pub key_zoom: MouseButton, pub key_zoom: MouseButton,
pub key_map: KeyCode, pub key_map: KeyCode,
@ -84,7 +81,6 @@ pub struct Settings {
pub key_interact: KeyCode, pub key_interact: KeyCode,
pub key_vehicle: KeyCode, pub key_vehicle: KeyCode,
pub key_camera: KeyCode, pub key_camera: KeyCode,
pub key_shadows: KeyCode,
pub key_rotate: KeyCode, pub key_rotate: KeyCode,
pub key_rotation_stabilizer: KeyCode, pub key_rotation_stabilizer: KeyCode,
pub key_mouseup: KeyCode, pub key_mouseup: KeyCode,
@ -172,9 +168,6 @@ impl Default for Settings {
is_zooming: false, is_zooming: false,
third_person: false, third_person: false,
rotation_stabilizer_active: true, rotation_stabilizer_active: true,
shadows_sun: true,
shadows_pointlights: false,
shadowmap_resolution: 2048,
key_selectobject: MouseButton::Left, key_selectobject: MouseButton::Left,
key_zoom: MouseButton::Right, key_zoom: MouseButton::Right,
key_map: KeyCode::KeyM, key_map: KeyCode::KeyM,
@ -198,7 +191,6 @@ impl Default for Settings {
key_interact: KeyCode::KeyE, key_interact: KeyCode::KeyE,
key_vehicle: KeyCode::KeyQ, key_vehicle: KeyCode::KeyQ,
key_camera: KeyCode::KeyF, key_camera: KeyCode::KeyF,
key_shadows: KeyCode::F2,
key_rotate: KeyCode::KeyR, key_rotate: KeyCode::KeyR,
key_rotation_stabilizer: KeyCode::KeyY, key_rotation_stabilizer: KeyCode::KeyY,
key_mouseup: KeyCode::KeyI, key_mouseup: KeyCode::KeyI,

View file

@ -172,7 +172,7 @@ fn spawn_despawn_asteroids(
q_player: Query<&Position, With<actor::PlayerCamera>>, q_player: Query<&Position, With<actor::PlayerCamera>>,
mut ew_despawn: EventWriter<DespawnEvent>, mut ew_despawn: EventWriter<DespawnEvent>,
mut db: ResMut<ActiveAsteroids>, mut db: ResMut<ActiveAsteroids>,
q_asteroid: Query<(&Position, &SceneInstance), With<Asteroid>>, mut q_asteroid: Query<(Entity, &SceneInstance), With<Asteroid>>,
mut last_player_cell: Local<I64Vec3>, mut last_player_cell: Local<I64Vec3>,
id2pos: Res<actor::Id2Pos>, id2pos: Res<actor::Id2Pos>,
asset_server: Res<AssetServer>, asset_server: Res<AssetServer>,
@ -216,15 +216,19 @@ fn spawn_despawn_asteroids(
|| origin.y < y_min || origin.y > y_max || origin.y < y_min || origin.y > y_max
|| origin.z < z_min || origin.z > z_max || origin.z < z_min || origin.z > z_max
{ {
if let Ok((pos, sceneinstance)) = q_asteroid.get(asteroid.entity) { let mut despawning_worked = false;
if pos.0.distance(player.0) > 1000.0 { for (ent, sceneinstance) in &mut q_asteroid {
if ent == asteroid.entity {
ew_despawn.send(DespawnEvent { ew_despawn.send(DespawnEvent {
entity: asteroid.entity, entity: asteroid.entity,
sceneinstance: **sceneinstance, sceneinstance: **sceneinstance,
origin: origin.clone(), origin: origin.clone(),
}); });
despawning_worked = true;
break;
} }
} else { }
if !despawning_worked {
error!("Couldn't despawn asteroid:"); error!("Couldn't despawn asteroid:");
dbg!(origin); dbg!(origin);
} }