Add variant tokens ready for battle pass rewards
This commit is contained in:
parent
c71b41235d
commit
0e6788e775
|
@ -92,6 +92,19 @@ type FAPI_Cosmetic struct {
|
||||||
BattlePass bool `json:"battlePass"`
|
BattlePass bool `json:"battlePass"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SnowVariantGrant struct {
|
||||||
|
Channel string `json:"channel"`
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SnowVariant struct {
|
||||||
|
Grants []SnowVariantGrant `json:"grants"`
|
||||||
|
Name string `json:"name"`
|
||||||
|
Gift bool `json:"gift"`
|
||||||
|
Equip bool `json:"equip"`
|
||||||
|
Unseen bool `json:"unseen"`
|
||||||
|
}
|
||||||
|
|
||||||
type Set struct {
|
type Set struct {
|
||||||
Items map[string]FAPI_Cosmetic `json:"items"`
|
Items map[string]FAPI_Cosmetic `json:"items"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
@ -101,6 +114,7 @@ type Set struct {
|
||||||
type CosmeticData struct {
|
type CosmeticData struct {
|
||||||
Items map[string]FAPI_Cosmetic `json:"items"`
|
Items map[string]FAPI_Cosmetic `json:"items"`
|
||||||
Sets map[string]Set `json:"sets"`
|
Sets map[string]Set `json:"sets"`
|
||||||
|
VariantTokens map[string]SnowVariant `json:"variantTokens"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CosmeticData) GetRandomItem() FAPI_Cosmetic {
|
func (c *CosmeticData) GetRandomItem() FAPI_Cosmetic {
|
||||||
|
@ -227,6 +241,7 @@ var (
|
||||||
Cosmetics = CosmeticData{
|
Cosmetics = CosmeticData{
|
||||||
Items: make(map[string]FAPI_Cosmetic),
|
Items: make(map[string]FAPI_Cosmetic),
|
||||||
Sets: make(map[string]Set),
|
Sets: make(map[string]Set),
|
||||||
|
VariantTokens: make(map[string]SnowVariant),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -365,8 +380,18 @@ func PreloadCosmetics(max int) error {
|
||||||
|
|
||||||
withDisplayAssets++
|
withDisplayAssets++
|
||||||
}
|
}
|
||||||
aid.Print("(snow) preloaded", len(Cosmetics.Items), "cosmetics")
|
|
||||||
|
|
||||||
|
variants := storage.HttpAsset("QF3nHCFt1vhELoU4q1VKTmpxnk20c2iAiBEBzlbzQAY.json")
|
||||||
|
if variants == nil {
|
||||||
|
panic("Failed to load variants")
|
||||||
|
}
|
||||||
|
|
||||||
|
err = json.Unmarshal(*variants, &Cosmetics.VariantTokens)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
aid.Print("(snow) preloaded", len(Cosmetics.Items), "cosmetics")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,13 @@
|
||||||
## What's up next?
|
## What's up next?
|
||||||
|
|
||||||
- **Party System V2** Currently it relies on the automatic XMPP solution which is very hard to keep track of.
|
- **Party System V2** Currently it relies on the automatic XMPP solution which is very hard to keep track of.
|
||||||
- Purchasing the **Battle Pass**. This will require the Battle Pass Storefront ID for every build. I am yet to think of a solution for this.
|
|
||||||
- Seeded randomization for the **Item Shop** instead of a random number generator. This will ensure that even if the backend is restarted, the same random items will be in the shop during that day.
|
- Seeded randomization for the **Item Shop** instead of a random number generator. This will ensure that even if the backend is restarted, the same random items will be in the shop during that day.
|
||||||
|
- Purchasing the **Battle Pass**. This will require the Battle Pass Storefront ID for every build. I am yet to think of a solution for this.
|
||||||
- Interaction with a Game Server to handle **Event Tracking** for player statistics and challenges. This will be a very large task as a new specialised game server will need to be created.
|
- Interaction with a Game Server to handle **Event Tracking** for player statistics and challenges. This will be a very large task as a new specialised game server will need to be created.
|
||||||
- After the game server addition, a **Matchmaking System** will be added to match players together for a game. It will use a bin packing algorithm to ensure that games are filled as much as possible.
|
- After the game server addition, a **Matchmaking System** will be added to match players together for a game. It will use a bin packing algorithm to ensure that games are filled as much as possible.
|
||||||
|
|
||||||
|
And finally, the biggest task of all...
|
||||||
|
|
||||||
- **Save The World**. This is a very large task and will require a lot of work. It is not a priority at the moment and might be done after the Battle Royale experience is complete.
|
- **Save The World**. This is a very large task and will require a lot of work. It is not a priority at the moment and might be done after the Battle Royale experience is complete.
|
||||||
|
|
||||||
## Supported MCP Actions
|
## Supported MCP Actions
|
||||||
|
|
Loading…
Reference in New Issue
Block a user