diff --git a/common/src/skillset_builder.rs b/common/src/skillset_builder.rs index 8fddd2b7b1..4f5726b1d2 100644 --- a/common/src/skillset_builder.rs +++ b/common/src/skillset_builder.rs @@ -6,10 +6,11 @@ use crate::assets::{self, AssetExt}; use serde::{Deserialize, Serialize}; use tracing::warn; +/// `SkillSetBuilder` preset. Consider using loading from assets, when possible. +/// When you're adding new enum variant, +/// handle it in [`with_preset`](SkillSetBuilder::with_preset) method #[derive(Copy, Clone, PartialEq, Serialize, Deserialize, Debug)] -pub enum Preset { - Empty, -} +pub enum Preset {} #[derive(Debug, Deserialize, Clone)] struct SkillSetTree(Vec); @@ -89,12 +90,7 @@ impl SkillSetBuilder { /// Applies preset #[must_use] - pub const fn with_preset(self, preset: Preset) -> Self { - match preset { - Preset::Empty => {}, - } - self - } + pub const fn with_preset(self, _preset: Preset) -> Self { self } #[must_use] /// # Panics diff --git a/common/src/states/basic_summon.rs b/common/src/states/basic_summon.rs index 1c094b8883..6a49e33c60 100644 --- a/common/src/states/basic_summon.rs +++ b/common/src/states/basic_summon.rs @@ -84,10 +84,11 @@ impl CharacterBehavior for Data { let loadout = { let loadout_builder = LoadoutBuilder::new().with_default_maintool(&body); + // If preset is none, use default equipment if let Some(preset) = loadout_config { loadout_builder.with_preset(preset).build() } else { - loadout_builder.build() + loadout_builder.with_default_equipment(&body).build() } };