Refactor item purchase logic into core, implement promo codes #70

This commit is contained in:
NG (Graham) committed 2026-01-03 11:19:24 -05:00
1 parent 2c6ef3edbe
commit 2f826835dc
10 files changed
+298 -68

No files matched your search

+11
View File
@@ -37,6 +37,7 @@ pub trait ConfigProvider<C: Clone> {
fn pit_settings(&self) -> PitSettings;
fn tdm_settings(&self) -> TeamDeathMatchSettings;
fn shop_entries(&self) -> ShopEntriesResolver;
fn promo_codes(&self) -> std::collections::HashMap<String, PromoCode>;
}
pub struct DevMessageProvider<C: Clone> {
@@ -486,3 +487,13 @@ pub enum ShopGain {
PaidCurrency(i64),
TechPoints(i32)
}
#[derive(Debug)]
pub struct PromoCode {
pub message: Option<String>,
pub bundle_id: String,
pub promo_id: String,
pub is_serial: bool,
pub value: f32,
pub transaction: ShopAction,
}