Prevented towns destroying trees, rocks, other towns, etc.

This commit is contained in:
Joshua Barretto 2020-12-11 14:03:14 +00:00 committed by Marcel Märtens
parent fcdace7236
commit 316bddbf30

View File

@ -747,7 +747,16 @@ impl Settlement {
},
);
} else if z >= 0 {
if block.kind() != BlockKind::Water {
if [
BlockKind::Air,
BlockKind::Grass,
BlockKind::Earth,
BlockKind::Sand,
BlockKind::Snow,
BlockKind::Rock,
]
.contains(&block.kind())
{
let _ = vol.set(pos, Block::air(SpriteKind::Empty));
}
} else {