mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Tweaked positioning of adlet sites
This commit is contained in:
parent
da3c2369e5
commit
76f4db6f70
@ -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),
|
||||
|
@ -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) {
|
||||
|
@ -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<Vec2<i32>> {
|
||||
fn adlet_enemies(&self) -> impl Iterator<Item = Vec2<i32>> + '_ {
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user