pub struct PlinkoLevelSlotLayout {
pub chest_level: i64,
pub slot_groups: NonEmptyVec<PlinkoSlotGroup>,
}Expand description
Раскладка доски для одного уровня сундука.
Набор выпадающих редкостей зависит от уровня сундука и ползёт вверх, а
слотов на доске всего rows + 1, поэтому одна общая раскладка неизбежно
оставляла бы часть выдач без своего слота. Раскладка задаётся на КАЖДЫЙ
уровень сундука и обязана покрывать ровно те редкости, которые на этом
уровне выпадают с весом > 0 (GameConfig::validate это требует).
Fields§
§chest_level: i64§slot_groups: NonEmptyVec<PlinkoSlotGroup>Implementations§
Source§impl PlinkoLevelSlotLayout
impl PlinkoLevelSlotLayout
Sourcepub fn rarity_for_slot(&self, slot: i64) -> Option<ItemRarityId>
pub fn rarity_for_slot(&self, slot: i64) -> Option<ItemRarityId>
Редкость, которой подписан физический слот.
Sourcepub fn slots_for_rarity(&self, rarity_id: ItemRarityId) -> Vec<i64>
pub fn slots_for_rarity(&self, rarity_id: ItemRarityId) -> Vec<i64>
Все физические слоты, подписанные этой редкостью.
Trait Implementations§
Source§impl Clone for PlinkoLevelSlotLayout
impl Clone for PlinkoLevelSlotLayout
Source§fn clone(&self) -> PlinkoLevelSlotLayout
fn clone(&self) -> PlinkoLevelSlotLayout
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlinkoLevelSlotLayout
impl Debug for PlinkoLevelSlotLayout
Source§impl<'de> Deserialize<'de> for PlinkoLevelSlotLayout
impl<'de> Deserialize<'de> for PlinkoLevelSlotLayout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for PlinkoLevelSlotLayout
impl JsonSchema for PlinkoLevelSlotLayout
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for PlinkoLevelSlotLayout
impl Serialize for PlinkoLevelSlotLayout
Source§impl Tsify for PlinkoLevelSlotLayout
impl Tsify for PlinkoLevelSlotLayout
const DECL: &'static str = "/**\n * \u{420}\u{430}\u{441}\u{43a}\u{43b}\u{430}\u{434}\u{43a}\u{430} \u{434}\u{43e}\u{441}\u{43a}\u{438} \u{434}\u{43b}\u{44f} \u{43e}\u{434}\u{43d}\u{43e}\u{433}\u{43e} \u{443}\u{440}\u{43e}\u{432}\u{43d}\u{44f} \u{441}\u{443}\u{43d}\u{434}\u{443}\u{43a}\u{430}.\n *\n * \u{41d}\u{430}\u{431}\u{43e}\u{440} \u{432}\u{44b}\u{43f}\u{430}\u{434}\u{430}\u{44e}\u{449}\u{438}\u{445} \u{440}\u{435}\u{434}\u{43a}\u{43e}\u{441}\u{442}\u{435}\u{439} \u{437}\u{430}\u{432}\u{438}\u{441}\u{438}\u{442} \u{43e}\u{442} \u{443}\u{440}\u{43e}\u{432}\u{43d}\u{44f} \u{441}\u{443}\u{43d}\u{434}\u{443}\u{43a}\u{430} \u{438} \u{43f}\u{43e}\u{43b}\u{437}\u{451}\u{442} \u{432}\u{432}\u{435}\u{440}\u{445}, \u{430}\n * \u{441}\u{43b}\u{43e}\u{442}\u{43e}\u{432} \u{43d}\u{430} \u{434}\u{43e}\u{441}\u{43a}\u{435} \u{432}\u{441}\u{435}\u{433}\u{43e} `rows + 1`, \u{43f}\u{43e}\u{44d}\u{442}\u{43e}\u{43c}\u{443} \u{43e}\u{434}\u{43d}\u{430} \u{43e}\u{431}\u{449}\u{430}\u{44f} \u{440}\u{430}\u{441}\u{43a}\u{43b}\u{430}\u{434}\u{43a}\u{430} \u{43d}\u{435}\u{438}\u{437}\u{431}\u{435}\u{436}\u{43d}\u{43e}\n * \u{43e}\u{441}\u{442}\u{430}\u{432}\u{43b}\u{44f}\u{43b}\u{430} \u{431}\u{44b} \u{447}\u{430}\u{441}\u{442}\u{44c} \u{432}\u{44b}\u{434}\u{430}\u{447} \u{431}\u{435}\u{437} \u{441}\u{432}\u{43e}\u{435}\u{433}\u{43e} \u{441}\u{43b}\u{43e}\u{442}\u{430}. \u{420}\u{430}\u{441}\u{43a}\u{43b}\u{430}\u{434}\u{43a}\u{430} \u{437}\u{430}\u{434}\u{430}\u{451}\u{442}\u{441}\u{44f} \u{43d}\u{430} \u{41a}\u{410}\u{416}\u{414}\u{42b}\u{419}\n * \u{443}\u{440}\u{43e}\u{432}\u{435}\u{43d}\u{44c} \u{441}\u{443}\u{43d}\u{434}\u{443}\u{43a}\u{430} \u{438} \u{43e}\u{431}\u{44f}\u{437}\u{430}\u{43d}\u{430} \u{43f}\u{43e}\u{43a}\u{440}\u{44b}\u{432}\u{430}\u{442}\u{44c} \u{440}\u{43e}\u{432}\u{43d}\u{43e} \u{442}\u{435} \u{440}\u{435}\u{434}\u{43a}\u{43e}\u{441}\u{442}\u{438}, \u{43a}\u{43e}\u{442}\u{43e}\u{440}\u{44b}\u{435} \u{43d}\u{430} \u{44d}\u{442}\u{43e}\u{43c}\n * \u{443}\u{440}\u{43e}\u{432}\u{43d}\u{435} \u{432}\u{44b}\u{43f}\u{430}\u{434}\u{430}\u{44e}\u{442} \u{441} \u{432}\u{435}\u{441}\u{43e}\u{43c} > 0 (`GameConfig::validate` \u{44d}\u{442}\u{43e} \u{442}\u{440}\u{435}\u{431}\u{443}\u{435}\u{442}).\n */\nexport interface PlinkoLevelSlotLayout {\n chest_level: number;\n slot_groups: NonEmptyVec<PlinkoSlotGroup>;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Auto Trait Implementations§
impl Freeze for PlinkoLevelSlotLayout
impl RefUnwindSafe for PlinkoLevelSlotLayout
impl Send for PlinkoLevelSlotLayout
impl Sync for PlinkoLevelSlotLayout
impl Unpin for PlinkoLevelSlotLayout
impl UnwindSafe for PlinkoLevelSlotLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more