Clean up unused use statements
This commit is contained in:
parent
fc0843847e
commit
ee5e690180
@ -473,7 +473,7 @@ impl State {
|
||||
{
|
||||
let mut worldmap_resource = self.ecs.write_resource::<Map>();
|
||||
*worldmap_resource = builder.get_map();
|
||||
player_start = builder.get_starting_position().as_mut().unwrap().clone();
|
||||
player_start = *builder.get_starting_position().as_mut().unwrap();
|
||||
}
|
||||
|
||||
// Spawn bad guys
|
||||
|
@ -22,7 +22,6 @@ use area_starting_points::{AreaStartingPosition, XStart, YStart};
|
||||
use bsp_dungeon::BspDungeonBuilder;
|
||||
use bsp_interior::BspInteriorBuilder;
|
||||
use cellular_automata::CellularAutomataBuilder;
|
||||
use common::*;
|
||||
use cull_unreachable::CullUnreachable;
|
||||
use distant_exit::DistantExit;
|
||||
use dla::DLABuilder;
|
||||
|
@ -1,9 +1,8 @@
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use crate::components::Position;
|
||||
use crate::map_builders::common::{apply_room_to_map, draw_corridor};
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, Rect, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::{Map, Rect, TileType};
|
||||
|
||||
pub struct BspDungeonBuilder {
|
||||
rects: Vec<Rect>,
|
||||
|
@ -1,10 +1,8 @@
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use super::MapBuilder;
|
||||
use crate::components::Position;
|
||||
use crate::map_builders::common::draw_corridor;
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, Rect, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::{Rect, TileType};
|
||||
|
||||
const MIN_ROOM_SIZE: i32 = 8;
|
||||
|
||||
|
@ -1,13 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use crate::components::Position;
|
||||
use crate::map_builders::common::{
|
||||
generate_voronoi_spawn_regions, remove_unreachable_areas_returning_most_distant,
|
||||
};
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::TileType;
|
||||
|
||||
pub struct CellularAutomataBuilder {}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
use std::cmp::{max, min};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use crate::{Map, Rect, TileType};
|
||||
|
||||
|
@ -18,7 +18,7 @@ impl CullUnreachable {
|
||||
}
|
||||
|
||||
fn build(&mut self, _rng: &mut RandomNumberGenerator, build_data: &mut BuilderMap) {
|
||||
let starting_pos = build_data.starting_position.as_ref().unwrap().clone();
|
||||
let starting_pos = *build_data.starting_position.as_ref().unwrap();
|
||||
let start_idx = build_data.map.xy_idx(starting_pos.x, starting_pos.y);
|
||||
|
||||
build_data.map.populate_blocked();
|
||||
|
@ -18,7 +18,7 @@ impl DistantExit {
|
||||
}
|
||||
|
||||
fn build(&mut self, _rng: &mut RandomNumberGenerator, build_data: &mut BuilderMap) {
|
||||
let starting_pos = build_data.starting_position.as_ref().unwrap().clone();
|
||||
let starting_pos = *build_data.starting_position.as_ref().unwrap();
|
||||
let start_idx = build_data.map.xy_idx(starting_pos.x, starting_pos.y);
|
||||
|
||||
build_data.map.populate_blocked();
|
||||
|
@ -1,15 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use super::common::{
|
||||
generate_voronoi_spawn_regions, paint, remove_unreachable_areas_returning_most_distant,
|
||||
Symmetry,
|
||||
};
|
||||
use super::MapBuilder;
|
||||
use super::common::{paint, Symmetry};
|
||||
use crate::components::Position;
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::TileType;
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
pub enum DLAAlgorithm {
|
||||
|
@ -1,15 +1,9 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use super::common::{
|
||||
generate_voronoi_spawn_regions, paint, remove_unreachable_areas_returning_most_distant,
|
||||
Symmetry,
|
||||
};
|
||||
use super::MapBuilder;
|
||||
use super::common::{paint, Symmetry};
|
||||
use crate::components::Position;
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::TileType;
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
pub enum DrunkSpawnMode {
|
||||
|
@ -1,13 +1,9 @@
|
||||
use std::cmp::{max, min};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use super::{
|
||||
generate_voronoi_spawn_regions, remove_unreachable_areas_returning_most_distant, MapBuilder,
|
||||
};
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, Position, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::{Map, TileType};
|
||||
|
||||
pub struct MazeBuilder {}
|
||||
|
||||
|
@ -7,7 +7,7 @@ use std::collections::HashSet;
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder, MetaMapBuilder};
|
||||
use crate::{Map, Position, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::{Position, TileType};
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
#[allow(dead_code)]
|
||||
|
@ -4,7 +4,7 @@ use crate::map_builders::common::{
|
||||
apply_horizontal_tunnel, apply_room_to_map, apply_vertical_tunnel,
|
||||
};
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, Position, Rect, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::Rect;
|
||||
|
||||
pub struct SimpleMapBuilder {}
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
use crate::components::Position;
|
||||
use crate::map_builders::{BuilderMap, InitialMapBuilder};
|
||||
use crate::{spawner, Map, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::TileType;
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
#[allow(dead_code)]
|
||||
|
@ -19,6 +19,7 @@ impl VoronoiSpawning {
|
||||
Box::new(VoronoiSpawning {})
|
||||
}
|
||||
|
||||
#[allow(clippy::map_entry)]
|
||||
fn build(&mut self, rng: &mut RandomNumberGenerator, build_data: &mut BuilderMap) {
|
||||
let mut noise_areas: HashMap<i32, Vec<usize>> = HashMap::new();
|
||||
let mut noise = rltk::FastNoise::seeded(rng.roll_dice(1, 65536) as u64);
|
||||
|
@ -2,19 +2,13 @@ mod common;
|
||||
mod constraints;
|
||||
mod solver;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use common::*;
|
||||
use constraints::*;
|
||||
use rltk::RandomNumberGenerator;
|
||||
use solver::*;
|
||||
|
||||
use super::common::{
|
||||
generate_voronoi_spawn_regions, remove_unreachable_areas_returning_most_distant,
|
||||
};
|
||||
use super::MapBuilder;
|
||||
use crate::map_builders::{BuilderMap, MetaMapBuilder};
|
||||
use crate::{spawner, Map, Position, TileType, SHOW_MAPGEN_VISUALIZER};
|
||||
use crate::Map;
|
||||
|
||||
pub struct WaveformCollapseBuilder {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user