Merge branch 'zesterer/civsim' into 'master'

fmt

See merge request veloren/veloren!939
This commit is contained in:
Joshua Barretto 2020-04-23 21:10:00 +00:00
commit 1831c0e20c
2 changed files with 6 additions and 6 deletions

View File

@ -169,9 +169,11 @@ impl MapConfig {
sample.downhill,
sample.river.river_kind,
sample.path.is_path(),
sample.sites
.iter()
.any(|site| site.get_origin().distance_squared(pos * TerrainChunkSize::RECT_SIZE.x as i32) < 64i32.pow(2)),
sample.sites.iter().any(|site| {
site.get_origin()
.distance_squared(pos * TerrainChunkSize::RECT_SIZE.x as i32)
< 64i32.pow(2)
}),
)
})
.unwrap_or((

View File

@ -147,9 +147,7 @@ impl Settlement {
this
}
pub fn get_origin(&self) -> Vec2<i32> {
self.origin
}
pub fn get_origin(&self) -> Vec2<i32> { self.origin }
/// Designate hazardous terrain based on world data
pub fn designate_from_world(&mut self, sim: &WorldSim, rng: &mut impl Rng) {