Merge branch 'zesterer/tweaks' into 'master'

Stop dullahan spawning in the overworld

See merge request veloren/veloren!4148
This commit is contained in:
Joshua Barretto 2023-10-19 19:25:20 +00:00
commit 7c4ac6492e
2 changed files with 5 additions and 8 deletions

View File

@ -34,7 +34,8 @@ SpawnEntry (
(5, (1, 3, "common.entity.wild.peaceful.squirrel")),
(5, (1, 1, "common.entity.wild.peaceful.forest_fox")),
(5, (1, 3, "common.entity.wild.peaceful.raccoon")),
(2, (1, 1, "common.entity.wild.aggressive.dullahan")),
// TODO: Maybe reenable once the dullahan design is more carefully considered, or move it elsewhere (i.e: such as a haunted/ruins site)
//(2, (1, 1, "common.entity.wild.aggressive.dullahan")),
],
spawn_mode: Land,
day_period: [Night],

View File

@ -531,7 +531,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) {
// (count_range, spec)
// count_range = number of entities, chosen randomly within this range
// spec = Manifest spec for the entity kind
entities: &'a [(Range<u32>, &'a str)],
entities: &'a [(Range<i32>, &'a str)],
}
let spot_config = match spot {
@ -576,11 +576,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) {
Spot::RockCircle => SpotConfig {
base_structures: Some("spots.rock-circle"),
entity_radius: 20.0,
entities: &[
(0..2, "common.entity.wild.aggressive.archaeos"),
(0..2, "common.entity.wild.aggressive.ntouka"),
(0..2, "common.entity.wild.aggressive.dreadhorn"),
],
entities: &[(-8..1, "common.entity.wild.aggressive.dullahan")],
},
Spot::MyrmidonTemple => SpotConfig {
base_structures: Some("spots.myrmidon-temple"),
@ -751,7 +747,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) {
// Spawn entities
const PHI: f32 = 1.618;
for (spawn_count, spec) in spot_config.entities {
let spawn_count = rng.gen_range(spawn_count.clone());
let spawn_count = rng.gen_range(spawn_count.clone()).max(0);
let dir_offset = rng.gen::<f32>();
for i in 0..spawn_count {