This commit is contained in:
2024-11-06 22:42:01 -05:00
parent 7a30ebc19a
commit c315c206f4
10 changed files with 17 additions and 18 deletions

17
.vscode/launch.json vendored
View File

@@ -14,12 +14,17 @@
"args": [], "args": [],
"cwd": "${workspaceRoot}/game/main", "cwd": "${workspaceRoot}/game/main",
"preLaunchTask": "Build", "preLaunchTask": "Build",
// "environment": [ "environment": [
// { // {
// "name": "RUST_BACKTRACE", // "name": "RUST_BACKTRACE",
// "value": "1" // "value": "1"
// } // },
// ] {
//Set Asset Folder
"name": "CARGO_MANIFEST_DIR",
"value": "${workspaceRoot}\\game\\main"
}
]
} }
] ]
} }

View File

@@ -1,8 +1,7 @@
use crate::hex_utils::{HexCoord, INNER_RADIUS}; use crate::hex_utils::HexCoord;
use crate::{hex_utils::offset3d_to_world, prelude::*}; use crate::{hex_utils::offset3d_to_world, prelude::*};
#[cfg(feature = "tracing")] #[cfg(feature = "tracing")]
use bevy::log::*; use bevy::log::*;
use bevy::math::VectorSpace;
use bevy::{ use bevy::{
prelude::*, prelude::*,
render::{ render::{

View File

@@ -1,5 +1,5 @@
use crate::hex_utils::HexCoord; use crate::hex_utils::HexCoord;
use crate::map::biome_map::{self, BiomeChunk, BiomeMap}; use crate::map::biome_map::BiomeChunk;
use crate::prelude::*; use crate::prelude::*;
use crate::tile_manager::TileAsset; use crate::tile_manager::TileAsset;
use crate::tile_mapper::TileMapperAsset; use crate::tile_mapper::TileMapperAsset;

View File

@@ -8,7 +8,7 @@ use rayon::iter::{IntoParallelIterator, ParallelIterator};
use crate::biome_painter::BiomePainter; use crate::biome_painter::BiomePainter;
use crate::map::biome_map::{BiomeChunk, BiomeData, BiomeMap}; use crate::map::biome_map::{BiomeChunk, BiomeData, BiomeMap};
use crate::{map, prelude::*}; use crate::prelude::*;
pub fn generate_heightmap(cfg: &GenerationConfig, seed: u32, painter: &BiomePainter) -> (Map, BiomeMap) { pub fn generate_heightmap(cfg: &GenerationConfig, seed: u32, painter: &BiomePainter) -> (Map, BiomeMap) {
let biomes = generate_biomes(cfg, seed, painter); let biomes = generate_biomes(cfg, seed, painter);

View File

@@ -1,4 +1,3 @@
use num::{PrimInt, Saturating};
use std::fmt::Display; use std::fmt::Display;
use crate::prelude::Chunk; use crate::prelude::Chunk;

View File

@@ -1,7 +1,6 @@
use crate::hex_utils::SHORT_DIAGONAL; use crate::hex_utils::SHORT_DIAGONAL;
use bevy::prelude::*; use bevy::prelude::*;
use super::biome_map::BiomeData;
#[derive(Clone)] #[derive(Clone)]
pub struct Chunk { pub struct Chunk {

View File

@@ -1,5 +1,4 @@
use bevy::prelude::*; use bevy::prelude::*;
use bevy_asset_loader::asset_collection::AssetCollection;
use bevy_inspector_egui::InspectorOptions; use bevy_inspector_egui::InspectorOptions;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};

View File

@@ -3,7 +3,6 @@ use bevy::prelude::*;
use crate::hex_utils::*; use crate::hex_utils::*;
use super::{ use super::{
biome_map::{BiomeData, BiomeMap},
chunk::Chunk, chunk::Chunk,
mesh_chunk::MeshChunkData, mesh_chunk::MeshChunkData,
}; };

View File

@@ -4,10 +4,10 @@ use bevy::{math::VectorSpace, prelude::*};
use image::ImageBuffer; use image::ImageBuffer;
use rayon::prelude::*; use rayon::prelude::*;
use crate::{biome_painter::BiomePainter, hex_utils::HexCoord}; use crate::hex_utils::HexCoord;
use super::{ use super::{
biome_map::{self, BiomeMap}, biome_map::BiomeMap,
chunk::Chunk, chunk::Chunk,
map::Map, map::Map,
}; };

View File

@@ -1,4 +1,3 @@
use std::path::Display;
use bevy::prelude::Resource; use bevy::prelude::Resource;
use shared::building::BuildingIdentifier; use shared::building::BuildingIdentifier;