mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Prevent trees being placed in barren regions.
This commit is contained in:
parent
a2d24521ee
commit
609b26ce20
@ -1157,6 +1157,7 @@ impl SiteKind {
|
||||
pub fn is_suitable_loc(&self, loc: Vec2<i32>, sim: &WorldSim) -> bool {
|
||||
sim.get(loc).map_or(false, |chunk| match self {
|
||||
SiteKind::Gnarling => (-0.3..0.4).contains(&chunk.temp) && chunk.tree_density > 0.75,
|
||||
SiteKind::GiantTree | SiteKind::Tree => chunk.tree_density > 0.4,
|
||||
SiteKind::Refactor | SiteKind::Settlement => {
|
||||
const RESOURCE_RADIUS: i32 = 1;
|
||||
let mut river_chunks = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user