This commit is contained in:
2024-03-28 09:41:25 -04:00
parent c4da9ab87a
commit 402b8eb93c
2 changed files with 37 additions and 4 deletions

View File

@@ -139,12 +139,12 @@ impl HexCoord {
return (hex * -1).zxy();
}
pub fn scale(&self, dir: i32, radius: i32)-> HexCoord{
let s = Self::DIRECTIONS[dir % 6] * radius;
pub fn scale(&self, dir: i32, radius: usize)-> HexCoord{
let s = Self::DIRECTIONS[(dir % 6) as usize] * radius as i32;
return Self::from_offset(self.hex.xy() + s.xy());
}
pub fn get_neighbor(&self, dir: i32)-> HexCoord{
pub fn get_neighbor(&self, dir: usize)-> HexCoord{
let d = Self::DIRECTIONS[dir % 6];
return Self::from_offset(self.hex.xy() + d.xy());
}

View File

@@ -62,8 +62,41 @@ fn create_map(
weight_multi: 0.,
layers: 4,
first_layer_mask: false,
},GeneratorLayer {
base_roughness: 2.85,
roughness: 2.,
strength: -0.23,
min_value: -0.,
persistence: 1.,
is_rigid: false,
weight: 0.,
weight_multi: 0.,
layers: 4,
first_layer_mask: false,
},GeneratorLayer {
base_roughness: 2.6,
roughness: 4.,
strength: 10.44,
min_value: 0.,
persistence: 1.57,
is_rigid: true,
weight: 1.,
weight_multi: 0.35,
layers: 4,
first_layer_mask: true,
},GeneratorLayer {
base_roughness: 3.87,
roughness: 5.8,
strength: -1.,
min_value: 0.,
persistence: 0.,
is_rigid: true,
weight: 1.,
weight_multi: 4.57,
layers: 3,
first_layer_mask: true,
}],
noise_scale: 250.,
noise_scale: 350.,
sea_level: 4.,
},
1,