Merge branch 'adjust_large_bird_routes' into 'master'

adjust_large_bird_routes

See merge request veloren/veloren!4492
This commit is contained in:
flo 2024-06-11 22:02:37 +00:00
commit e4cd939eb8
3 changed files with 37 additions and 10 deletions

View File

@ -29,7 +29,7 @@ use std::{
/// Note that this number does *not* need incrementing on every change: most
/// field removals/additions are fine. This number should only be incremented
/// when we wish to perform a *hard purge* of rtsim data.
pub const CURRENT_VERSION: u32 = 5;
pub const CURRENT_VERSION: u32 = 6;
#[derive(Clone, Serialize, Deserialize)]
pub struct Data {

View File

@ -229,15 +229,15 @@ impl Data {
let site_kind = site.world_site.map(|ws| &index.sites.get(ws).kind);
let Some(species) = [
Some(comp::body::bird_large::Species::Phoenix)
.filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))),
.filter(|_| matches!(site_kind, Some(SiteKind::DwarvenMine(_)))),
Some(comp::body::bird_large::Species::Cockatrice)
.filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))),
Some(comp::body::bird_large::Species::Roc)
.filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))),
.filter(|_| matches!(site_kind, Some(SiteKind::Haniwa(_)))),
Some(comp::body::bird_large::Species::FlameWyvern)
.filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))),
.filter(|_| matches!(site_kind, Some(SiteKind::Terracotta(_)))),
Some(comp::body::bird_large::Species::CloudWyvern)
.filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))),
.filter(|_| matches!(site_kind, Some(SiteKind::Sahagin(_)))),
Some(comp::body::bird_large::Species::FrostWyvern)
.filter(|_| matches!(site_kind, Some(SiteKind::Adlet(_)))),
Some(comp::body::bird_large::Species::SeaWyvern)

View File

@ -1432,12 +1432,39 @@ fn bird_large() -> impl Action<DefaultState> {
&& site.world_site.map_or(false, |site| {
match ctx.npc.body {
common::comp::Body::BirdLarge(b) => match b.species {
bird_large::Species::SeaWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::ChapelSite(_)),
bird_large::Species::FrostWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::Adlet(_)),
bird_large::Species::WealdWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::GiantTree(_)),
_ => matches!(&ctx.index.sites.get(site).kind, SiteKind::Dungeon(_)),
bird_large::Species::Phoenix => matches!(&ctx.index.sites.get(site).kind,
SiteKind::Terracotta(_)
| SiteKind::Haniwa(_)
| SiteKind::Dungeon(_)
| SiteKind::Adlet(_)
| SiteKind::DwarvenMine(_)
| SiteKind::ChapelSite(_)
| SiteKind::Cultist(_)
| SiteKind::Gnarling(_)
| SiteKind::Sahagin(_)),
bird_large::Species::Cockatrice => matches!(&ctx.index.sites.get(site).kind,
SiteKind::Dungeon(_)
| SiteKind::GiantTree(_)),
bird_large::Species::Roc => matches!(&ctx.index.sites.get(site).kind,
SiteKind::Haniwa(_)
| SiteKind::Cultist(_)),
bird_large::Species::FlameWyvern => matches!(&ctx.index.sites.get(site).kind,
SiteKind::DwarvenMine(_)
| SiteKind::Terracotta(_)),
bird_large::Species::CloudWyvern => matches!(&ctx.index.sites.get(site).kind,
SiteKind::ChapelSite(_)
| SiteKind::Sahagin(_)),
bird_large::Species::FrostWyvern => matches!(&ctx.index.sites.get(site).kind,
SiteKind::Adlet(_)
| SiteKind::Dungeon(_)),
bird_large::Species::SeaWyvern => matches!(&ctx.index.sites.get(site).kind,
SiteKind::ChapelSite(_)
| SiteKind::Sahagin(_)),
bird_large::Species::WealdWyvern => matches!(&ctx.index.sites.get(site).kind,
SiteKind::GiantTree(_)
| SiteKind::Gnarling(_)),
},
_ => matches!(&ctx.index.sites.get(site).kind, SiteKind::Dungeon(_)),
_ => matches!(&ctx.index.sites.get(site).kind, SiteKind::GiantTree(_)),
}
})
})