pub struct GameStateV2 {Show 17 fields
pub version: u32,
pub cuques: f64,
pub total_clicks: u64,
pub lifetime_cuques: f64,
pub best_fps: f64,
pub golden_caught: u64,
pub lucky_caught: u64,
pub frenzy_caught: u64,
pub buff_caught: u64,
pub green_coin_caught: u64,
pub fingerers_state: HashMap<String, FingererStateV2>,
pub achievements_earned: HashSet<String>,
pub upgrades_earned: HashSet<String>,
pub prestige: u64,
pub total_play_ticks: u64,
pub buffs: Vec<BuffV2>,
pub goldens_since_green_coin: u32,
}Fields§
§version: u32§cuques: f64§total_clicks: u64§lifetime_cuques: f64§best_fps: f64§golden_caught: u64Lifetime grand total across every powerup variant. Strict rollup; existing achievements (Golden Touch, Golden Hoarder) gate on this, so it stays accurate even when migrating from a V1 that only had the rollup.
lucky_caught: u64Per-variant catch counters introduced with V2. V1 saves had no
breakdown to recover, so these zero-init on V1→V2 — the total
stays accurate via golden_caught; only the breakdown is
post-V2.
frenzy_caught: u64§buff_caught: u64§green_coin_caught: u64§fingerers_state: HashMap<String, FingererStateV2>§achievements_earned: HashSet<String>§upgrades_earned: HashSet<String>§prestige: u64§total_play_ticks: u64§buffs: Vec<BuffV2>§goldens_since_green_coin: u32Pity counter for the Green Coin spawn roll. Persisted so the timer survives quit/restart. Pre-V2 saves default this to 0 — they had no Green Coin mechanic, so starting fresh is correct.
Implementations§
Source§impl GameStateV2
impl GameStateV2
Sourcepub fn into_current(self) -> GameState
pub fn into_current(self) -> GameState
Convert a V2 snapshot into the live GameState. Every persisted
field is copied verbatim; ephemeral state (#[serde(skip)] fields)
stays at its Default and gets seeded by migrate_runtime after
the chain finishes.
Trait Implementations§
Source§impl Clone for GameStateV2
impl Clone for GameStateV2
Source§fn clone(&self) -> GameStateV2
fn clone(&self) -> GameStateV2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de> Deserialize<'de> for GameStateV2
impl<'de> Deserialize<'de> for GameStateV2
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>,
Source§impl From<GameStateV1> for GameStateV2
V1 → V2 conversion. Shape changes:
impl From<GameStateV1> for GameStateV2
V1 → V2 conversion. Shape changes:
fingerers_owned: HashMap<String, u32>→fingerers_state: HashMap<String, FingererStateV2 { count, modifiers }>BuffV1::FingererBoostis absorbed into per-fingerer modifiers withsource: PurpleCoin,effects: [MulFactor(mult)], andduration: Ticks(ticks_remaining). Thecreated_at_tickfield is reconstructed astotal_play_ticks - elapsed, where elapsed isinitial_ticks - ticks_remaining(saturating).BuffV1::ClickFrenzypasses through asBuffV2::ClickFrenzy.- Adds
version: 2.
Source§fn from(v1: GameStateV1) -> Self
fn from(v1: GameStateV1) -> Self
Auto Trait Implementations§
impl Freeze for GameStateV2
impl RefUnwindSafe for GameStateV2
impl Send for GameStateV2
impl Sync for GameStateV2
impl Unpin for GameStateV2
impl UnsafeUnpin for GameStateV2
impl UnwindSafe for GameStateV2
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more