Compare commits
43 commits
73410efc09
...
330da6c7fc
Author | SHA1 | Date | |
---|---|---|---|
yuni | 330da6c7fc | ||
yuni | 1cf4d28609 | ||
yuni | 2b07ef67d1 | ||
yuni | 0dda705db2 | ||
yuni | 48b1b7b72b | ||
yuni | 5b38b78c70 | ||
yuni | 2e81a059fa | ||
yuni | 9a2516aa60 | ||
yuni | d1dc3da34f | ||
yuni | e3de0d56f7 | ||
yuni | 6d8341ba56 | ||
yuni | 9c9d92bb8e | ||
yuni | 7ec5b3e493 | ||
yuni | b80cc9387f | ||
yuni | b5878802a3 | ||
yuni | 4c26f2ef4f | ||
yuni | f0df596ea1 | ||
yuni | 579a354f50 | ||
yuni | b0407135a1 | ||
yuni | ae4a6b1f82 | ||
yuni | 4ea35f8a67 | ||
yuni | 4c316e36a6 | ||
yuni | 656d7f02f0 | ||
yuni | 343bba314c | ||
yuni | 3ded8103d5 | ||
yuni | bf62689fe2 | ||
yuni | 2522367026 | ||
yuni | 90372afaef | ||
yuni | 366500e928 | ||
yuni | fe89308a94 | ||
yuni | c57a4a13f8 | ||
yuni | 5be2c78173 | ||
yuni | 03b755b2f0 | ||
yuni | 623c675489 | ||
yuni | ed2d2bde07 | ||
yuni | be9f439d6e | ||
yuni | 69008bb91a | ||
yuni | d38bf45a9c | ||
yuni | 3a230dd3f0 | ||
yuni | 00a23eb0b0 | ||
yuni | 88037b3b74 | ||
yuni | 8d5cbf7e73 | ||
yuni | 1d743a9326 |
23
Cargo.lock
generated
23
Cargo.lock
generated
|
@ -304,6 +304,25 @@ 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"
|
||||||
|
@ -550,6 +569,7 @@ 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",
|
||||||
|
@ -608,6 +628,7 @@ 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",
|
||||||
|
@ -2737,7 +2758,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "outfly"
|
name = "outfly"
|
||||||
version = "0.7.3"
|
version = "0.8.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
"bevy_embedded_assets",
|
"bevy_embedded_assets",
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "outfly"
|
name = "outfly"
|
||||||
version = "0.7.3"
|
version = "0.8.0"
|
||||||
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 = ["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 = { 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_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"
|
||||||
|
|
17
README.md
17
README.md
|
@ -16,7 +16,7 @@ Links: [Code](https://codeberg.org/hut/outfly) • [itch.io](https://yunicode.it
|
||||||
|
|
||||||
# OutFly
|
# OutFly
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
- Open source forever
|
- A beautiful, serene atmosphere with gorgeous views
|
||||||
- Open world, realistic hard sci-fi, atmospheric, deadly
|
- Racing vehicles, unique NPCs, cozy places, deadly environment
|
||||||
- Accurate star chart. Can you spot the constellations?
|
- Accurate, clickable star chart. Can you spot the constellations?
|
||||||
- Cross platform (verified on Linux & Windows)
|
- Cross platform, free & open source forever!
|
||||||
- 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,6 +50,7 @@ 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
|
||||||
|
@ -174,6 +175,12 @@ 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.
BIN
assets/models/suit_v2/suit_v2.glb
Normal file
BIN
assets/models/suit_v2/suit_v2.glb
Normal file
Binary file not shown.
|
@ -10,7 +10,8 @@
|
||||||
# + ▀████████████████████████████████████████████████████▀
|
# + ▀████████████████████████████████████████████████████▀
|
||||||
#
|
#
|
||||||
# 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
|
# Usage: cd outfly; build/pack.sh [-b]
|
||||||
|
# Options: -b: cross-compile targets before packing
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
|
@ -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(&"busstop2".to_string()) {
|
if let Some(target) = id2pos.0.get(&"busstopclippy2".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(&"busstop3".to_string()) {
|
if let Some(target) = id2pos.0.get(&"busstopclippy3".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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
use bevy::pbr::{CascadeShadowConfigBuilder, DirectionalLightShadowMap};
|
||||||
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,6 +80,7 @@ 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((
|
||||||
|
@ -102,19 +103,23 @@ 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: 1000.0,
|
illuminance: 3000.0,
|
||||||
shadows_enabled: false,
|
shadows_enabled: settings.shadows_sun,
|
||||||
..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 {
|
||||||
first_cascade_far_bound: 7.0,
|
num_cascades: 4,
|
||||||
maximum_distance: 25.0,
|
minimum_distance: 0.1,
|
||||||
|
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(
|
||||||
|
@ -269,6 +274,7 @@ 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>,
|
||||||
|
@ -277,6 +283,12 @@ 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();
|
||||||
|
@ -610,7 +622,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.001, PI) {
|
if angle <= angular_diameter.clamp(0.01, 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;
|
||||||
|
|
|
@ -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("busstop"),
|
"serenity" => Some("busstopclippy"),
|
||||||
"oscillation" => Some("busstop2"),
|
"farview" => Some("busstopclippy2"),
|
||||||
"metisprime" => Some("busstop3"),
|
"metisprime" => Some("busstopclippy3"),
|
||||||
_ => None
|
_ => None
|
||||||
};
|
};
|
||||||
if let Some(station) = busstop {
|
if let Some(station) = busstop {
|
||||||
|
|
|
@ -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: Oscillation Station, Metis Prime Station"
|
- "Ready for a trip? Available bus stops: Farview 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: Oscillation Station, Serenity Station"
|
- "Ready for a trip? Available bus stops: Farview Station, Serenity Station"
|
||||||
- label: startransbusstop
|
- label: startransbusstop
|
||||||
- include: BusStops
|
- include: BusStops
|
||||||
- label: interesting
|
- label: interesting
|
||||||
|
@ -45,9 +45,9 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
- chat: ClippyTransOscillation
|
- chat: ClippyTransFarview
|
||||||
- set: $busstop oscillation
|
- set: $busstop farview
|
||||||
- Welcome at StarTrans Cargo Services! You have reached Oscillation Station.
|
- Welcome at StarTrans Cargo Services! You have reached Farview 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,6 +59,11 @@
|
||||||
|
|
||||||
|
|
||||||
- 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.
|
||||||
|
@ -67,12 +72,12 @@
|
||||||
- Can I take a spacecraft with me?:
|
- Can I take a spacecraft with me?:
|
||||||
- Absolutely.
|
- Absolutely.
|
||||||
- goto: startransbusstop
|
- goto: startransbusstop
|
||||||
- if: $busstop != oscillation
|
- if: $busstop != farview
|
||||||
Take me to Oscillation Station, please.:
|
Take me to Farview Station, please.:
|
||||||
- StarTrans wishes you a pleasant journey.
|
- StarTrans wishes you a pleasant journey.
|
||||||
- script: cryofadeout
|
- script: cryofadeout
|
||||||
- sleep: 5
|
- sleep: 5
|
||||||
- script: cryotrip oscillation
|
- 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.:
|
||||||
|
|
|
@ -14,7 +14,8 @@ 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 crate::{actor, camera, chat, hud, nature, shading, skeleton, world};
|
use bevy::pbr::{NotShadowCaster, NotShadowReceiver};
|
||||||
|
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;
|
||||||
|
@ -484,6 +485,7 @@ 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;
|
||||||
|
@ -591,6 +593,10 @@ 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);
|
||||||
|
@ -629,16 +635,17 @@ 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(PointLightBundle {
|
actor.insert((
|
||||||
point_light: PointLight {
|
PointLight {
|
||||||
intensity: state.light_brightness,
|
intensity: state.light_brightness,
|
||||||
color,
|
color,
|
||||||
range: 100.0,
|
range: 2000.0,
|
||||||
radius: 100.0,
|
shadows_enabled: settings.shadows_pointlights,
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
..default()
|
bevy::pbr::CubemapVisibleEntities::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()));
|
||||||
|
@ -688,6 +695,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -701,6 +710,8 @@ 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);
|
||||||
}
|
}
|
||||||
|
@ -721,6 +732,8 @@ 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,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,7 @@ actor 0 0 0 jupiter
|
||||||
clickable no
|
clickable no
|
||||||
physics off
|
physics off
|
||||||
|
|
||||||
actor 0 593051 0 suitv1
|
actor 0 593051 0 suitv2
|
||||||
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 -48e3 20e3 0 suitv1
|
actor -55e3 44e3 0 suitv2
|
||||||
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 0 moonlet
|
actor 3000 0 -300 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 0.3
|
scale 3
|
||||||
light FF8F4A 500000
|
light FF8F4A 500000000
|
||||||
|
|
||||||
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 capsule 7.5 1
|
collider mesh
|
||||||
rotationy 0.5
|
rotationy 0.5
|
||||||
angularmomentum 0 0 0
|
angularmomentum 0 0 0
|
||||||
density 0.01
|
density 0.01
|
||||||
|
@ -290,6 +290,7 @@ 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"
|
||||||
|
@ -300,6 +301,7 @@ 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"
|
||||||
|
@ -310,6 +312,7 @@ 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"
|
||||||
|
@ -332,23 +335,25 @@ actor -3300 10 0 pizzeria
|
||||||
density 500
|
density 500
|
||||||
angularmomentum 0 0 0.2
|
angularmomentum 0 0 0.2
|
||||||
pointofinterest yes
|
pointofinterest yes
|
||||||
actor -100 63 -13 pizzasign
|
actor 60 60 -23 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
|
||||||
actor -36 -10 0 lightorb
|
light "FF00B3" 30000000
|
||||||
|
actor -52 -10 0 lightorb
|
||||||
name "Light Orb"
|
name "Light Orb"
|
||||||
relativeto pizzeria
|
relativeto pizzeria
|
||||||
scale 0.5
|
scale 0.25
|
||||||
light FF8F4A 1000000
|
light FF8F4A 5000000
|
||||||
actor -34 -3 -2 lightorb
|
actor -50 -3 -2 lightorb
|
||||||
name "Light Orb"
|
name "Light Orb"
|
||||||
relativeto pizzeria
|
relativeto pizzeria
|
||||||
scale 0.5
|
scale 0.25
|
||||||
light FF8F4A 1000000
|
light FF8F4A 5000000
|
||||||
actor -33 0 4 clippy
|
actor -33 0 4 clippy
|
||||||
name "Clippy™ Convenience Companion"
|
name "Clippy™ Convenience Companion"
|
||||||
relativeto pizzeria
|
relativeto pizzeria
|
||||||
|
@ -362,7 +367,7 @@ actor -3300 10 0 pizzeria
|
||||||
chatid SubduedClippy
|
chatid SubduedClippy
|
||||||
pronoun it
|
pronoun it
|
||||||
|
|
||||||
actor -45 -4 -4 suitv1
|
actor -45 -4 -4 suitv2
|
||||||
relativeto pizzeria
|
relativeto pizzeria
|
||||||
name "Nox"
|
name "Nox"
|
||||||
chatid PizzaChef
|
chatid PizzaChef
|
||||||
|
@ -377,7 +382,7 @@ actor -3300 10 0 pizzeria
|
||||||
angularmomentum 0 0 0
|
angularmomentum 0 0 0
|
||||||
pronoun he
|
pronoun he
|
||||||
|
|
||||||
actor 60 -15 -40 suitv1
|
actor 30 -12 -20 suitv2
|
||||||
relativeto player
|
relativeto player
|
||||||
name Icarus
|
name Icarus
|
||||||
id Icarus
|
id Icarus
|
||||||
|
@ -393,8 +398,28 @@ actor 60 -15 -40 suitv1
|
||||||
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 suitv1
|
actor -300 0 40 suitv2
|
||||||
relativeto player
|
relativeto player
|
||||||
id Drifter
|
id Drifter
|
||||||
name "梓涵"
|
name "梓涵"
|
||||||
|
@ -405,16 +430,8 @@ actor -300 0 40 suitv1
|
||||||
collider handcrafted
|
collider handcrafted
|
||||||
pronoun she
|
pronoun she
|
||||||
|
|
||||||
actor 100 -18000 2000 "orb_busstop"
|
actor 100 -18000 2000 clippy
|
||||||
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
|
||||||
|
@ -422,27 +439,169 @@ actor 100 -18000 2000 "orb_busstop"
|
||||||
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"
|
|
||||||
name "Light Orb"
|
actor 60 0 0 "orb_busstop"
|
||||||
|
name "StarTrans Bus Stop: Serenity Station"
|
||||||
relativeto busstopclippy
|
relativeto busstopclippy
|
||||||
light "47FF00" 1000000
|
scale 5
|
||||||
actor 30 60 -10 "orb_busstop"
|
light "47FF00" 100000000
|
||||||
name "Light Orb"
|
actor 80 0 0 "orb_busstop"
|
||||||
|
name "StarTrans Bus Stop: Serenity Station"
|
||||||
relativeto busstopclippy
|
relativeto busstopclippy
|
||||||
light "47FF00" 1000000
|
scale 5
|
||||||
actor -10 -60 20 "orb_busstop"
|
light "47FF00" 100000000
|
||||||
name "Light Orb"
|
actor 100 0 0 "orb_busstop"
|
||||||
|
name "StarTrans Bus Stop: Serenity Station"
|
||||||
relativeto busstopclippy
|
relativeto busstopclippy
|
||||||
light "47FF00" 1000000
|
scale 5
|
||||||
actor -40 20 30 "orb_busstop"
|
light "47FF00" 100000000
|
||||||
name "Light Orb"
|
actor 120 0 0 "orb_busstop"
|
||||||
|
name "StarTrans Bus Stop: Serenity Station"
|
||||||
relativeto busstopclippy
|
relativeto busstopclippy
|
||||||
light "47FF00" 1000000
|
scale 5
|
||||||
actor 8 2 0 suitv1
|
light "47FF00" 100000000
|
||||||
|
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
|
||||||
|
@ -453,16 +612,8 @@ actor 100 -18000 2000 "orb_busstop"
|
||||||
chatid NPCinCryoStasis
|
chatid NPCinCryoStasis
|
||||||
pronoun he
|
pronoun he
|
||||||
|
|
||||||
actor -184971e3 149410e3 -134273e3 "orb_busstop"
|
actor -184971e3 149410e3 -134273e3 clippy
|
||||||
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
|
||||||
|
@ -470,37 +621,171 @@ actor -184971e3 149410e3 -134273e3 "orb_busstop"
|
||||||
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 ClippyTransOscillation
|
chatid ClippyTransFarview
|
||||||
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 27643e3 -44e3 -124434e3 "orb_busstop"
|
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 -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
|
||||||
|
@ -508,29 +793,170 @@ actor 27643e3 -44e3 -124434e3 "orb_busstop"
|
||||||
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 110 -2000 0 whale
|
actor 60 0 0 "orb_busstop"
|
||||||
relativeto busstop3
|
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 -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
|
||||||
|
|
54
src/hud.rs
54
src/hud.rs
|
@ -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 = 15.0;
|
pub const AMBIENT_LIGHT_AR: f32 = 30.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,7 +76,6 @@ 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);
|
||||||
|
@ -194,7 +193,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 ambient_light: ResMut<AmbientLight>,
|
mut ew_updateoverlays: EventWriter<UpdateOverlayVisibility>,
|
||||||
) {
|
) {
|
||||||
let visibility = if settings.hud_active {
|
let visibility = if settings.hud_active {
|
||||||
Visibility::Inherited
|
Visibility::Inherited
|
||||||
|
@ -360,8 +359,6 @@ 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()
|
||||||
|
@ -369,12 +366,7 @@ fn setup(
|
||||||
));
|
));
|
||||||
skeleton::load("selectagon", &mut entitycmd, &*asset_server);
|
skeleton::load("selectagon", &mut entitycmd, &*asset_server);
|
||||||
|
|
||||||
// AR-related things
|
ew_updateoverlays.send(UpdateOverlayVisibility);
|
||||||
ambient_light.brightness = if settings.hud_active {
|
|
||||||
AMBIENT_LIGHT_AR
|
|
||||||
} else {
|
|
||||||
AMBIENT_LIGHT
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn update_hud(
|
fn update_hud(
|
||||||
|
@ -477,14 +469,15 @@ 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);
|
||||||
|
@ -650,7 +643,6 @@ 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>>,
|
||||||
) {
|
) {
|
||||||
|
@ -660,15 +652,10 @@ 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() {
|
||||||
|
@ -727,7 +714,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, Vec3::X);
|
selectagon_trans.look_at(camera_trans.translation, target_trans.up().into());
|
||||||
|
|
||||||
// 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(
|
||||||
|
@ -811,6 +798,9 @@ 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>,
|
||||||
) {
|
) {
|
||||||
|
@ -822,10 +812,20 @@ 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
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,14 @@ 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 {
|
||||||
"suit_ar_chefhat" => "models/suit_v1/ar_chefhat.glb#Scene0",
|
"suitv2" => "models/suit_v2/suit_v2.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",
|
||||||
|
@ -229,13 +231,6 @@ 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,
|
||||||
|
@ -327,3 +322,34 @@ 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();
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
|
@ -58,6 +58,9 @@ 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,
|
||||||
|
@ -81,6 +84,7 @@ 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,
|
||||||
|
@ -168,6 +172,9 @@ 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,
|
||||||
|
@ -191,6 +198,7 @@ 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,
|
||||||
|
|
12
src/world.rs
12
src/world.rs
|
@ -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>,
|
||||||
mut q_asteroid: Query<(Entity, &SceneInstance), With<Asteroid>>,
|
q_asteroid: Query<(&Position, &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,19 +216,15 @@ 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
|
||||||
{
|
{
|
||||||
let mut despawning_worked = false;
|
if let Ok((pos, sceneinstance)) = q_asteroid.get(asteroid.entity) {
|
||||||
for (ent, sceneinstance) in &mut q_asteroid {
|
if pos.0.distance(player.0) > 1000.0 {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue