From f5a6ae1e9bd362f93a740536c8567e86c85946f6 Mon Sep 17 00:00:00 2001 From: asquared31415 <34665709+asquared31415@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:19:03 -0500 Subject: [PATCH] add seasonal store types --- CHANGELOG.md | 1 + src/enums.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c3812f..e0107575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ Unreleased - Add function `StoreObject::resource_types` to get the types of resources that a store can hold - This can be used with a `StructureObject` as `StoreObject::try_from(structure_object).map(|store| store.resource_types())` which returns a `Result<&'static [ResourceType], StoreObjectConversionError>` +- Add missing `StoreObject::Reactor` to the `seasonal-season-5` feature. 0.20.1 (2024-01-09) =================== diff --git a/src/enums.rs b/src/enums.rs index 9d974688..165016af 100644 --- a/src/enums.rs +++ b/src/enums.rs @@ -165,6 +165,8 @@ pub enum ObjectWithPosition { pub enum StoreObject { Creep, PowerCreep, + #[cfg(feature = "seasonal-season-5")] + Reactor, Ruin, #[cfg(feature = "seasonal-season-1")] ScoreCollector, @@ -214,7 +216,13 @@ impl StoreObject { match self { StoreObject::Creep(_) => RESOURCES_ALL, StoreObject::PowerCreep(_) => RESOURCES_ALL, + #[cfg(feature = "seasonal-season-5")] + StoreObject::Reactor(_) => &[ResourceType::Thorium], StoreObject::Ruin(_) => RESOURCES_ALL, + #[cfg(feature = "seasonal-season-1")] + StoreObject::ScoreCollector(_) => &[ResourceType::Score], + #[cfg(feature = "seasonal-season-1")] + StoreObject::ScoreContainer(_) => &[ResourceType::Score], StoreObject::StructureContainer(_) => RESOURCES_ALL, StoreObject::StructureExtension(_) => &[ResourceType::Energy], StoreObject::StructureFactory(_) => RESOURCES_ALL, @@ -226,6 +234,8 @@ impl StoreObject { StoreObject::StructureStorage(_) => RESOURCES_ALL, StoreObject::StructureTerminal(_) => RESOURCES_ALL, StoreObject::StructureTower(_) => &[ResourceType::Energy], + #[cfg(feature = "seasonal-season-2")] + StoreObject::SymbolContainer(_) => &crate::constants::seasonal::season_2::SYMBOLS, StoreObject::Tombstone(_) => RESOURCES_ALL, } }