adjust_large_bird_routes

This commit is contained in:
flo 2024-06-11 22:02:37 +00:00
parent 1f0e014daa
commit 998a8a8273
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 /// Note that this number does *not* need incrementing on every change: most
/// field removals/additions are fine. This number should only be incremented /// field removals/additions are fine. This number should only be incremented
/// when we wish to perform a *hard purge* of rtsim data. /// 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)] #[derive(Clone, Serialize, Deserialize)]
pub struct Data { 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 site_kind = site.world_site.map(|ws| &index.sites.get(ws).kind);
let Some(species) = [ let Some(species) = [
Some(comp::body::bird_large::Species::Phoenix) 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) Some(comp::body::bird_large::Species::Cockatrice)
.filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))), .filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))),
Some(comp::body::bird_large::Species::Roc) 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) 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) 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) Some(comp::body::bird_large::Species::FrostWyvern)
.filter(|_| matches!(site_kind, Some(SiteKind::Adlet(_)))), .filter(|_| matches!(site_kind, Some(SiteKind::Adlet(_)))),
Some(comp::body::bird_large::Species::SeaWyvern) 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| { && site.world_site.map_or(false, |site| {
match ctx.npc.body { match ctx.npc.body {
common::comp::Body::BirdLarge(b) => match b.species { common::comp::Body::BirdLarge(b) => match b.species {
bird_large::Species::SeaWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::ChapelSite(_)), bird_large::Species::Phoenix => matches!(&ctx.index.sites.get(site).kind,
bird_large::Species::FrostWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::Adlet(_)), SiteKind::Terracotta(_)
bird_large::Species::WealdWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::GiantTree(_)), | SiteKind::Haniwa(_)
_ => matches!(&ctx.index.sites.get(site).kind, SiteKind::Dungeon(_)), | 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(_)),
} }
}) })
}) })