mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'tormod/castles-avoid-trees' into 'master'
Make castles avoid trees. See merge request veloren/veloren!3799
This commit is contained in:
commit
9b6dd6198b
@ -1180,10 +1180,12 @@ impl Civs {
|
||||
|
||||
fn castle_enemies(&self) -> Vec<Vec2<i32>> {
|
||||
self.sites()
|
||||
.filter_map(|s| match s.kind {
|
||||
SiteKind::Tree | SiteKind::GiantTree => None,
|
||||
_ if s.is_settlement() => None,
|
||||
_ => Some(s.center),
|
||||
.filter_map(|s| {
|
||||
if s.is_settlement() {
|
||||
None
|
||||
} else {
|
||||
Some(s.center)
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user