mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Refactor item purchase logic into core, implement promo codes #70
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user