From 76f4db6f70579fcaee6c4ee14d40f0591989d1a7 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 28 Feb 2022 13:02:57 -0500 Subject: [PATCH] Tweaked positioning of adlet sites --- assets/world/dungeon/difficulty_distribution.ron | 1 - server/src/cmd.rs | 5 ++++- world/src/civ/mod.rs | 10 +++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/assets/world/dungeon/difficulty_distribution.ron b/assets/world/dungeon/difficulty_distribution.ron index 789a94c2a9..7ebec5c934 100644 --- a/assets/world/dungeon/difficulty_distribution.ron +++ b/assets/world/dungeon/difficulty_distribution.ron @@ -16,7 +16,6 @@ /// 1) Set every probability to 0.0 and left one with any other number /// and you will have map full of dungeons of same level ([ - (1, 0.20), (2, 0.20), (3, 0.15), (4, 0.10), diff --git a/server/src/cmd.rs b/server/src/cmd.rs index b8faaa8f64..963495615c 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -3133,6 +3133,7 @@ fn handle_debug_column( let river = &chunk.river; let flux = chunk.flux; let path = chunk.path; + let cliff_height = chunk.cliff_height; Some(format!( r#"wpos: {:?} @@ -3149,7 +3150,8 @@ humidity {:?} rockiness {:?} tree_density {:?} spawn_rate {:?} -path {:?} "#, +path {:?} +cliff_height {:?} "#, wpos, alt, col.alt, @@ -3167,6 +3169,7 @@ path {:?} "#, tree_density, spawn_rate, path, + cliff_height, )) }; if let Some(s) = msg_generator(&calendar) { diff --git a/world/src/civ/mod.rs b/world/src/civ/mod.rs index 8181c02b8f..7a29f3a3c4 100644 --- a/world/src/civ/mod.rs +++ b/world/src/civ/mod.rs @@ -249,7 +249,11 @@ impl Civs { SiteKind::ChapelSite, ), 44..=49 => ( - find_site_loc(&mut ctx, (&this.gnarling_enemies(), 40), SiteKind::Adlet)?, + find_site_loc( + &mut ctx, + &ProximityRequirements::new().avoid_all_of(this.gnarling_enemies(), 40), + SiteKind::Adlet, + )?, SiteKind::Adlet, ), _ => ( @@ -1270,7 +1274,7 @@ impl Civs { }) } - fn adlet_enemies(&self) -> Vec> { + fn adlet_enemies(&self) -> impl Iterator> + '_ { self.sites().filter_map(|s| match s.kind { SiteKind::Tree | SiteKind::GiantTree => None, _ => Some(s.center), @@ -1690,7 +1694,7 @@ impl SiteKind { && (-0.3..0.4).contains(&chunk.temp) && chunk.tree_density > 0.75 }, - SiteKind::Adlet => (-0.8..0.2).contains(&chunk.temp) && chunk.tree_density > 0.2, + SiteKind::Adlet => chunk.temp < -0.2 && chunk.cliff_height > 25.0, SiteKind::GiantTree | SiteKind::Tree => { on_land() && on_flat_terrain()