Skip to content

Commit

Permalink
account for new rdm instance types
Browse files Browse the repository at this point in the history
- auto pokemon
- auto tth
  • Loading branch information
TurtIeSocks committed Jan 1, 2023
1 parent 538b560 commit cc9328e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/app/src/queries/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub async fn save(
Type::Leveling => {
RdmInstanceArea::Leveling(feat.clone().to_single_vec().to_struct())
}
Type::AutoQuest | Type::PokemonIv => {
Type::AutoQuest | Type::PokemonIv | Type::AutoPokemon | Type::AutoTth => {
RdmInstanceArea::Multi(feat.clone().to_multi_vec().to_multi_struct())
}
};
Expand Down
4 changes: 4 additions & 0 deletions server/entity/src/sea_orm_active_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ pub enum Type {
PokemonIv,
#[sea_orm(string_value = "leveling")]
Leveling,
#[sea_orm(string_value = "auto_pokemon")]
AutoPokemon,
#[sea_orm(string_value = "auto_tth")]
AutoTth,
}
4 changes: 3 additions & 1 deletion server/model/src/multi_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ pub type MultiVec<T = Precision> = Vec<Vec<point_array::PointArray<T>>>;
impl ValueHelpers for MultiVec {
fn get_geojson_value(self, enum_type: &Type) -> Value {
match enum_type {
Type::AutoQuest | Type::PokemonIv => self.multi_polygon(),
Type::AutoQuest | Type::PokemonIv | Type::AutoPokemon | Type::AutoTth => {
self.multi_polygon()
}
Type::CirclePokemon
| Type::CircleSmartPokemon
| Type::CircleRaid
Expand Down

0 comments on commit cc9328e

Please sign in to comment.