fix: lint warnings

This commit is contained in:
Kristofers Solo 2025-01-05 13:55:36 +02:00
parent 4145abda19
commit e15c055f06
4 changed files with 1 additions and 24 deletions

View File

@ -1,18 +0,0 @@
use bevy::prelude::*;
use crate::theme::{palette::rose_pine::RosePineDawn, prelude::ColorScheme};
pub fn setup_camera_fog(mut commands: Commands) {
commands.spawn((
Name::new("Fog"),
DistanceFog {
color: RosePineDawn::Overlay.to_color(),
directional_light_color: RosePineDawn::Overlay.to_color(),
falloff: FogFalloff::Linear {
start: 1.,
end: 20.,
},
..default()
},
));
}

View File

@ -1,17 +1,14 @@
mod despawn;
mod fog;
mod movement;
mod spawn;
use crate::maze::MazePluginLoaded;
use bevy::prelude::*;
use despawn::despawn_floor;
use fog::setup_camera_fog;
use movement::{handle_floor_transition_events, move_floors};
use spawn::spawn_floor;
pub(super) fn plugin(app: &mut App) {
app.add_systems(Startup, setup_camera_fog);
app.add_systems(
Update,
(

View File

@ -44,8 +44,6 @@ pub(super) fn spawn_maze(
_ => FLOOR_Y_OFFSET,
} as f32;
// (floor - 1) * FLOOR_Y_OFFSET
let entity = commands
.spawn((
Name::new(format!("Floor {}", floor)),

View File

@ -106,7 +106,7 @@ macro_rules! create_color_scheme {
impl $name {
fn hex_to_rgb(hex: &str) -> (u8, u8, u8) {
let hex = if hex.starts_with('#') { &hex[1..] } else { hex };
let hex = hex.strip_prefix('#').unwrap_or(hex);
let r = u8::from_str_radix(&hex[0..2], 16).unwrap_or(0);
let g = u8::from_str_radix(&hex[2..4], 16).unwrap_or(0);
let b = u8::from_str_radix(&hex[4..6], 16).unwrap_or(0);