Skip to content

Commit

Permalink
Configuration to allow fake receipt purchases. (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyro authored Jul 28, 2024
1 parent 9d52412 commit b596c08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion definitions/09-Hiro-Economy.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,6 @@
"key1": "value1"
}
}
}
},
"allow_fake_receipts": false
}
9 changes: 5 additions & 4 deletions economy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ var (

// EconomyConfig is the data definition for the EconomySystem type.
type EconomyConfig struct {
InitializeUser *EconomyConfigInitializeUser `json:"initialize_user,omitempty"`
Donations map[string]*EconomyConfigDonation `json:"donations,omitempty"`
StoreItems map[string]*EconomyConfigStoreItem `json:"store_items,omitempty"`
Placements map[string]*EconomyConfigPlacement `json:"placements,omitempty"`
InitializeUser *EconomyConfigInitializeUser `json:"initialize_user,omitempty"`
Donations map[string]*EconomyConfigDonation `json:"donations,omitempty"`
StoreItems map[string]*EconomyConfigStoreItem `json:"store_items,omitempty"`
Placements map[string]*EconomyConfigPlacement `json:"placements,omitempty"`
AllowFakeReceipts bool `json:"allow_fake_receipts,omitempty"`
}

type EconomyConfigDonation struct {
Expand Down
3 changes: 3 additions & 0 deletions schemas/09-Hiro-Economy.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@
}
},
"type": "object"
},
"allow_fake_receipts": {
"type": "boolean"
}
},
"type": "object"
Expand Down

0 comments on commit b596c08

Please sign in to comment.