diff --git a/scripts/default_auth.sh b/scripts/default_auth.sh index 697a1a0f..ddd01cfa 100755 --- a/scripts/default_auth.sh +++ b/scripts/default_auth.sh @@ -40,6 +40,8 @@ sozo -P $PROFILE auth grant --world $WORLD_ADDRESS --wait writer\ DrugConfig,$CONFIG_ADDRESS \ LocationConfig,$CONFIG_ADDRESS \ HustlerItemBaseConfig,$CONFIG_ADDRESS \ + HustlerItemTiersConfig,$CONFIG_ADDRESS \ + EncounterConfig,$CONFIG_ADDRESS \ Game,$GAME_ADDRESS \ GameStorePacked,$GAME_ADDRESS \ RyoConfig,$GAME_ADDRESS \ diff --git a/src/config/config.cairo b/src/config/config.cairo index 4f9c6b60..dd7ea668 100644 --- a/src/config/config.cairo +++ b/src/config/config.cairo @@ -19,7 +19,7 @@ trait IConfig { struct Config { layouts: LayoutsConfig, hustlers: Array, - game_config: GameConfig, + game_config: GameConfig, // TODO: query torii instead } #[derive(Drop, Serde)] @@ -50,7 +50,8 @@ mod config { initialize_feet_config, initialize_transport_config, initialize_weapons_tiers_config, initialize_clothes_tiers_config, initialize_feet_tiers_config, initialize_transport_tiers_config, - } + }, + encounters::{initialize_encounter_config, EncounterConfig, Encounters}, }, packing::{ game_store_layout::{ @@ -91,6 +92,9 @@ mod config { initialize_feet_tiers_config(world); initialize_transport_tiers_config(world); + // encounters + initialize_encounter_config(world); + // game initialize_game_config(world); } @@ -144,13 +148,13 @@ mod config { Option::None => { break; } }; }; - + // let game_config = GameConfigImpl::get(world); // - Config { game_config, layouts: LayoutsConfig { game_store, player }, hustlers } + Config { game_config, hustlers, layouts: LayoutsConfig { game_store, player } } } fn update_game_config(self: @ContractState, game_config: GameConfig) { diff --git a/src/config/drugs.cairo b/src/config/drugs.cairo index fb86b653..bc753fdf 100644 --- a/src/config/drugs.cairo +++ b/src/config/drugs.cairo @@ -1,9 +1,14 @@ use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; -use rollyourown::utils::bytes16::{Bytes16, Bytes16Impl, Bytes16Trait}; -use rollyourown::utils::introspect::Bytes16IntrospectionImpl; +use rollyourown::{ + traits::{Enumerable}, utils::introspect::{Bytes31IntrospectionImpl}, + utils::{ + bytes16::{Bytes16, Bytes16Impl, Bytes16Trait}, + introspect::Bytes16IntrospectionImpl + } +}; + -use rollyourown::{traits::{Enumerable}, utils::introspect::{Bytes31IntrospectionImpl}}; #[derive(Copy, Drop, Serde, PartialEq, Introspect)] diff --git a/src/config/encounters.cairo b/src/config/encounters.cairo new file mode 100644 index 00000000..f7bb2a8d --- /dev/null +++ b/src/config/encounters.cairo @@ -0,0 +1,243 @@ +use starknet::ContractAddress; +use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; +use rollyourown::{ + utils::{ + random::{Random, RandomImpl}, math::{MathTrait, MathImplU8}, + bits::{Bits, BitsImpl, BitsTrait, BitsMathImpl}, + bytes16::{Bytes16, Bytes16Impl, Bytes16Trait} + } +}; + + +// +// +// + + +#[derive(Model, Copy, Drop, Serde)] +struct EncounterConfig { + // name: Bytes16, + #[key] + id: u8, + encounter: Encounters, + // + level: u8, + health: u8, + attack: u8, + defense: u8, + // 32 + payout: u32, + // 32 + demand_pct: u8, + rep_pay: u8, // reputation modifier for paying NEGATIVE + rep_run: u8, // reputation modifier for running + rep_fight: u8, // reputation modifier for fighting + // 16 + min_rep: u8, + max_rep: u8, + // + // crit_rate:u8, + // incorruptible: bool, + // challenger: bool, + // challenger: bool, +} + +// +// +// + +#[generate_trait] +impl EncounterConfigImpl of EncounterConfigTrait { + #[inline(always)] + fn get(world: IWorldDispatcher, id: u8) -> EncounterConfig { + get!(world, (id), EncounterConfig) + } +} + +// +// +// + +#[derive(Copy, Drop, Serde, PartialEq, Introspect)] +enum Encounters { + Cops, + Gang, +} + +impl EncountersIntoFelt252 of Into { + fn into(self: Encounters) -> felt252 { + match self { + Encounters::Cops => 'Cops', + Encounters::Gang => 'Gang', + } + } +} + +impl EncountersIntoU8 of Into { + fn into(self: Encounters) -> u8 { + match self { + Encounters::Cops => 0, + Encounters::Gang => 1, + } + } +} + + +// +// +// + + + +fn initialize_encounter_config(world: IWorldDispatcher) { + + //////// COPS //////// + + set!( + world, + EncounterConfig { + // name: Bytes16Impl::from('Cops LVL 1'), + id:0, + encounter: Encounters::Cops, + // + level: 1, + health: 16, + attack: 8, + defense: 5, + // + payout: 420, + demand_pct: 20, + // + rep_pay: 10, + rep_run: 0, + rep_fight: 2, + // + min_rep: 0, + max_rep: 40, + } + ); + + set!( + world, + EncounterConfig { + // name: Bytes16Impl::from('Cops LVL 2'), + id:1, + encounter: Encounters::Cops, + // + level: 2, + health: 26, + attack: 16, + defense: 11, + // + payout: 2500, + demand_pct: 30, + // + rep_pay: 6, + rep_run: 2, + rep_fight: 4, + // + min_rep: 20, + max_rep: 60, + } + ); + + set!( + world, + EncounterConfig { + // name: Bytes16Impl::from('Cops LVL 3'), + id:2, + encounter: Encounters::Cops, + // + level: 3, + health: 42, + attack: 25, + defense: 15, + // + payout: 20000, + demand_pct: 30, + // + rep_pay: 5, + rep_run: 3, + rep_fight: 6, + // + min_rep: 40, + max_rep: 100, + } + ); + + + //////// GANGS //////// + + set!( + world, + EncounterConfig { + // name: Bytes16Impl::from('GANG LVL 1'), + id:7, + encounter: Encounters::Gang, + // + level: 1, + health: 16, + attack: 8, + defense: 5, + // + payout: 420, + demand_pct: 20, + // + rep_pay: 10, + rep_run: 0, + rep_fight: 2, + // + min_rep: 0, + max_rep: 40, + } + ); + + set!( + world, + EncounterConfig { + // name: Bytes16Impl::from('GANG LVL 2'), + id:8, + encounter: Encounters::Gang, + // + level: 2, + health: 26, + attack: 16, + defense: 11, + // + payout: 2500, + demand_pct: 30, + // + rep_pay: 6, + rep_run: 2, + rep_fight: 4, + // + min_rep: 20, + max_rep: 60, + } + ); + + set!( + world, + EncounterConfig { + // name: Bytes16Impl::from('GANG LVL 3'), + id:9, + encounter: Encounters::Gang, + // + level: 3, + health: 42, + attack: 25, + defense: 15, + // + payout: 20000, + demand_pct: 30, + // + rep_pay: 5, + rep_run: 3, + rep_fight: 6, + // + min_rep: 40, + max_rep: 100, + } + ); + +} \ No newline at end of file diff --git a/src/lib.cairo b/src/lib.cairo index cbdd0a8f..6f90514b 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,9 +1,10 @@ mod config { mod config; mod drugs; - mod locations; + mod encounters; mod game; mod hustlers; + mod locations; mod ryo; mod ryo_address; } diff --git a/src/packing/game_store.cairo b/src/packing/game_store.cairo index a891042c..6d78c2b4 100644 --- a/src/packing/game_store.cairo +++ b/src/packing/game_store.cairo @@ -11,7 +11,6 @@ use rollyourown::{ wanted_packed::{WantedPacked, WantedPackedImpl}, markets_packed::{MarketsPacked, MarketsPackedImpl}, items_packed::{ItemsPacked, ItemsPackedImpl}, - encounters_packed::{EncountersPacked, EncountersPackedImpl}, player::{Player, PlayerImpl, PlayerPackerImpl, PlayerUnpackerImpl}, }, utils::bits::{Bits, BitsImpl, BitsTrait, BitsDefaultImpl}, traits::{Packable, Packer, Unpacker} diff --git a/src/packing/player.cairo b/src/packing/player.cairo index e78331b7..e42a0332 100644 --- a/src/packing/player.cairo +++ b/src/packing/player.cairo @@ -13,7 +13,6 @@ use rollyourown::{ game_store::{GameStore}, player_layout::{PlayerLayout, PlayerLayoutEnumerableImpl, PlayerLayoutPackableImpl}, drugs_packed::{DrugsPacked, DrugsPackedImpl}, - encounters_packed::{EncountersPacked, EncountersPackedImpl, Encounters}, markets_packed::{MarketsPacked, MarketsPackedImpl, MarketsPackedTrait} }, }; diff --git a/src/systems/game.cairo b/src/systems/game.cairo index 90cfc03e..e60a1915 100644 --- a/src/systems/game.cairo +++ b/src/systems/game.cairo @@ -44,7 +44,7 @@ mod game { }, packing::{ game_store::{GameStore, GameStoreImpl, GameStorePackerImpl, GameMode}, - encounters_packed::{Encounters}, player::{Player, PlayerImpl}, + player::{Player, PlayerImpl}, }, systems::{ trading, shopping, traveling, traveling::EncounterOutcomes, game_loop, diff --git a/src/systems/traveling.cairo b/src/systems/traveling.cairo index f1398702..d9d17d46 100644 --- a/src/systems/traveling.cairo +++ b/src/systems/traveling.cairo @@ -8,17 +8,18 @@ use rollyourown::{ }, config::{ hustlers::{HustlerItemConfig,HustlerItemTiersConfig, ItemSlot}, locations::{Locations, LocationsRandomizableImpl}, - game::{GameConfig, GameConfigImpl} + encounters::{Encounters}, + game::{GameConfig, GameConfigImpl}, }, packing::{ game_store::{GameStore}, player::{PlayerImpl, PlayerStatus}, wanted_packed::{WantedPacked, WantedPackedImpl}, items_packed::{ItemsPackedImpl, ItemsPackedTrait}, - encounters_packed::{Encounters, EncountersPackedImpl, EncountersPackedTrait}, drugs_packed::{DrugsPacked, DrugsPackedImpl, DrugsUnpacked, DrugsPackedTrait} }, systems::game::{EncounterActions, game::TravelEncounterResult, game::Event} }; + #[derive(Copy, Drop, Serde, PartialEq)] enum EncounterOutcomes { Died, diff --git a/web/manifest.json b/web/manifest.json index d9939012..3d6c5fa4 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1551,7 +1551,7 @@ { "name": "rollyourown::config::config::config", "address": "0x73e5a7b0f2ff860ae67f9edc7709d3dbbee30f84afcccf1f8e3963e128e1bc5", - "class_hash": "0x52518ade8db331d80706e5a99faa43a82c88a8eeaf6e845f9c80ff2fb60f397", + "class_hash": "0x7178e03a3bac58987047fe1bbc84dff004fb8c67e26749efe9b167d88e6633f", "abi": [ { "type": "impl", @@ -2196,7 +2196,7 @@ { "name": "rollyourown::systems::game::game", "address": "0x52d79bdb709ee84fbf0199f427d058977a04c5403f149796ad9d76927a162ec", - "class_hash": "0x21a379c1cd0e4e9e53224a1a619962a3e38ddb1886490269c5a70d49b986a8e", + "class_hash": "0x7d9c7e2b7b3756d0cd9a9a57c27735f9244cb3df3d49c25f52a691cea8c05cc", "abi": [ { "type": "impl", @@ -3644,6 +3644,348 @@ } ] }, + { + "name": "rollyourown::config::encounters::encounter_config", + "members": [ + { + "name": "id", + "type": "u8", + "key": true + }, + { + "name": "encounter", + "type": "Encounters", + "key": false + }, + { + "name": "level", + "type": "u8", + "key": false + }, + { + "name": "health", + "type": "u8", + "key": false + }, + { + "name": "attack", + "type": "u8", + "key": false + }, + { + "name": "defense", + "type": "u8", + "key": false + }, + { + "name": "payout", + "type": "u32", + "key": false + }, + { + "name": "demand_pct", + "type": "u8", + "key": false + }, + { + "name": "rep_pay", + "type": "u8", + "key": false + }, + { + "name": "rep_run", + "type": "u8", + "key": false + }, + { + "name": "rep_fight", + "type": "u8", + "key": false + }, + { + "name": "min_rep", + "type": "u8", + "key": false + }, + { + "name": "max_rep", + "type": "u8", + "key": false + } + ], + "class_hash": "0x77edf2bc33d4b0321fbbd50a8eef3a446e818b9f33ee8f26d08c883e92935ed", + "abi": [ + { + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::>" + } + ] + }, + { + "type": "struct", + "name": "dojo::database::introspect::Struct", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::<(core::felt252, core::array::Span::)>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, core::array::Span::)>" + } + ] + }, + { + "type": "struct", + "name": "dojo::database::introspect::Enum", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, core::array::Span::)>" + } + ] + }, + { + "type": "enum", + "name": "dojo::database::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::database::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::database::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::>" + }, + { + "name": "Array", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "encounter_configImpl", + "interface_name": "rollyourown::config::encounters::Iencounter_config" + }, + { + "type": "enum", + "name": "rollyourown::config::encounters::Encounters", + "variants": [ + { + "name": "Cops", + "type": "()" + }, + { + "name": "Gang", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "rollyourown::config::encounters::EncounterConfig", + "members": [ + { + "name": "id", + "type": "core::integer::u8" + }, + { + "name": "encounter", + "type": "rollyourown::config::encounters::Encounters" + }, + { + "name": "level", + "type": "core::integer::u8" + }, + { + "name": "health", + "type": "core::integer::u8" + }, + { + "name": "attack", + "type": "core::integer::u8" + }, + { + "name": "defense", + "type": "core::integer::u8" + }, + { + "name": "payout", + "type": "core::integer::u32" + }, + { + "name": "demand_pct", + "type": "core::integer::u8" + }, + { + "name": "rep_pay", + "type": "core::integer::u8" + }, + { + "name": "rep_run", + "type": "core::integer::u8" + }, + { + "name": "rep_fight", + "type": "core::integer::u8" + }, + { + "name": "min_rep", + "type": "core::integer::u8" + }, + { + "name": "max_rep", + "type": "core::integer::u8" + } + ] + }, + { + "type": "interface", + "name": "rollyourown::config::encounters::Iencounter_config", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::config::encounters::EncounterConfig" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "rollyourown::config::encounters::encounter_config::Event", + "kind": "enum", + "variants": [] + } + ] + }, { "name": "rollyourown::config::game::game_config", "members": [ diff --git a/web/src/generated/graphql.ts b/web/src/generated/graphql.ts index 933b46df..3b9f96a4 100644 --- a/web/src/generated/graphql.ts +++ b/web/src/generated/graphql.ts @@ -298,6 +298,146 @@ export type Erc20MetadataModelWhereInput = { total_supplyNEQ?: InputMaybe; }; +export type EncounterConfig = { + __typename?: 'EncounterConfig'; + attack?: Maybe; + defense?: Maybe; + demand_pct?: Maybe; + encounter?: Maybe; + entity?: Maybe; + health?: Maybe; + id?: Maybe; + level?: Maybe; + max_rep?: Maybe; + min_rep?: Maybe; + payout?: Maybe; + rep_fight?: Maybe; + rep_pay?: Maybe; + rep_run?: Maybe; +}; + +export type EncounterConfigConnection = { + __typename?: 'EncounterConfigConnection'; + edges?: Maybe>>; + pageInfo: World__PageInfo; + totalCount: Scalars['Int']; +}; + +export type EncounterConfigEdge = { + __typename?: 'EncounterConfigEdge'; + cursor?: Maybe; + node?: Maybe; +}; + +export type EncounterConfigOrder = { + direction: OrderDirection; + field: EncounterConfigOrderField; +}; + +export enum EncounterConfigOrderField { + Attack = 'ATTACK', + Defense = 'DEFENSE', + DemandPct = 'DEMAND_PCT', + Encounter = 'ENCOUNTER', + Health = 'HEALTH', + Id = 'ID', + Level = 'LEVEL', + MaxRep = 'MAX_REP', + MinRep = 'MIN_REP', + Payout = 'PAYOUT', + RepFight = 'REP_FIGHT', + RepPay = 'REP_PAY', + RepRun = 'REP_RUN' +} + +export type EncounterConfigWhereInput = { + attack?: InputMaybe; + attackEQ?: InputMaybe; + attackGT?: InputMaybe; + attackGTE?: InputMaybe; + attackLT?: InputMaybe; + attackLTE?: InputMaybe; + attackNEQ?: InputMaybe; + defense?: InputMaybe; + defenseEQ?: InputMaybe; + defenseGT?: InputMaybe; + defenseGTE?: InputMaybe; + defenseLT?: InputMaybe; + defenseLTE?: InputMaybe; + defenseNEQ?: InputMaybe; + demand_pct?: InputMaybe; + demand_pctEQ?: InputMaybe; + demand_pctGT?: InputMaybe; + demand_pctGTE?: InputMaybe; + demand_pctLT?: InputMaybe; + demand_pctLTE?: InputMaybe; + demand_pctNEQ?: InputMaybe; + encounter?: InputMaybe; + health?: InputMaybe; + healthEQ?: InputMaybe; + healthGT?: InputMaybe; + healthGTE?: InputMaybe; + healthLT?: InputMaybe; + healthLTE?: InputMaybe; + healthNEQ?: InputMaybe; + id?: InputMaybe; + idEQ?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + level?: InputMaybe; + levelEQ?: InputMaybe; + levelGT?: InputMaybe; + levelGTE?: InputMaybe; + levelLT?: InputMaybe; + levelLTE?: InputMaybe; + levelNEQ?: InputMaybe; + max_rep?: InputMaybe; + max_repEQ?: InputMaybe; + max_repGT?: InputMaybe; + max_repGTE?: InputMaybe; + max_repLT?: InputMaybe; + max_repLTE?: InputMaybe; + max_repNEQ?: InputMaybe; + min_rep?: InputMaybe; + min_repEQ?: InputMaybe; + min_repGT?: InputMaybe; + min_repGTE?: InputMaybe; + min_repLT?: InputMaybe; + min_repLTE?: InputMaybe; + min_repNEQ?: InputMaybe; + payout?: InputMaybe; + payoutEQ?: InputMaybe; + payoutGT?: InputMaybe; + payoutGTE?: InputMaybe; + payoutLT?: InputMaybe; + payoutLTE?: InputMaybe; + payoutNEQ?: InputMaybe; + rep_fight?: InputMaybe; + rep_fightEQ?: InputMaybe; + rep_fightGT?: InputMaybe; + rep_fightGTE?: InputMaybe; + rep_fightLT?: InputMaybe; + rep_fightLTE?: InputMaybe; + rep_fightNEQ?: InputMaybe; + rep_pay?: InputMaybe; + rep_payEQ?: InputMaybe; + rep_payGT?: InputMaybe; + rep_payGTE?: InputMaybe; + rep_payLT?: InputMaybe; + rep_payLTE?: InputMaybe; + rep_payNEQ?: InputMaybe; + rep_run?: InputMaybe; + rep_runEQ?: InputMaybe; + rep_runGT?: InputMaybe; + rep_runGTE?: InputMaybe; + rep_runLT?: InputMaybe; + rep_runLTE?: InputMaybe; + rep_runNEQ?: InputMaybe; +}; + export type Game = { __typename?: 'Game'; entity?: Maybe; @@ -938,7 +1078,7 @@ export type LocationConfigWhereInput = { nameNEQ?: InputMaybe; }; -export type ModelUnion = DrugConfig | Erc20AllowanceModel | Erc20BalanceModel | Erc20MetadataModel | Game | GameConfig | GameStorePacked | HustlerItemBaseConfig | HustlerItemTiersConfig | InitializableModel | Leaderboard | LocationConfig | RyoAddress | RyoConfig; +export type ModelUnion = DrugConfig | Erc20AllowanceModel | Erc20BalanceModel | Erc20MetadataModel | EncounterConfig | Game | GameConfig | GameStorePacked | HustlerItemBaseConfig | HustlerItemTiersConfig | InitializableModel | Leaderboard | LocationConfig | RyoAddress | RyoConfig; export enum OrderDirection { Asc = 'ASC', @@ -1214,6 +1354,7 @@ export type World__PageInfo = { export type World__Query = { __typename?: 'World__Query'; drugConfigModels?: Maybe; + encounterConfigModels?: Maybe; entities?: Maybe; entity: World__Entity; erc20AllowanceModelModels?: Maybe; @@ -1250,6 +1391,18 @@ export type World__QueryDrugConfigModelsArgs = { }; +export type World__QueryEncounterConfigModelsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + limit?: InputMaybe; + offset?: InputMaybe; + order?: InputMaybe; + where?: InputMaybe; +}; + + export type World__QueryEntitiesArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1558,14 +1711,14 @@ export type GameStorePackedQueryVariables = Exact<{ }>; -export type GameStorePackedQuery = { __typename?: 'World__Query', entities?: { __typename?: 'World__EntityConnection', totalCount: number, edges?: Array<{ __typename?: 'World__EntityEdge', node?: { __typename?: 'World__Entity', id?: string | null, models?: Array<{ __typename: 'DrugConfig' } | { __typename: 'ERC20AllowanceModel' } | { __typename: 'ERC20BalanceModel' } | { __typename: 'ERC20MetadataModel' } | { __typename: 'Game' } | { __typename: 'GameConfig' } | { __typename: 'GameStorePacked', game_id?: any | null, player_id?: any | null, packed?: any | null } | { __typename: 'HustlerItemBaseConfig' } | { __typename: 'HustlerItemTiersConfig' } | { __typename: 'InitializableModel' } | { __typename: 'Leaderboard' } | { __typename: 'LocationConfig' } | { __typename: 'RyoAddress' } | { __typename: 'RyoConfig' } | null> | null } | null } | null> | null } | null }; +export type GameStorePackedQuery = { __typename?: 'World__Query', entities?: { __typename?: 'World__EntityConnection', totalCount: number, edges?: Array<{ __typename?: 'World__EntityEdge', node?: { __typename?: 'World__Entity', id?: string | null, models?: Array<{ __typename: 'DrugConfig' } | { __typename: 'ERC20AllowanceModel' } | { __typename: 'ERC20BalanceModel' } | { __typename: 'ERC20MetadataModel' } | { __typename: 'EncounterConfig' } | { __typename: 'Game' } | { __typename: 'GameConfig' } | { __typename: 'GameStorePacked', game_id?: any | null, player_id?: any | null, packed?: any | null } | { __typename: 'HustlerItemBaseConfig' } | { __typename: 'HustlerItemTiersConfig' } | { __typename: 'InitializableModel' } | { __typename: 'Leaderboard' } | { __typename: 'LocationConfig' } | { __typename: 'RyoAddress' } | { __typename: 'RyoConfig' } | null> | null } | null } | null> | null } | null }; export type GameStorePackedSubscriptionSubscriptionVariables = Exact<{ id?: InputMaybe; }>; -export type GameStorePackedSubscriptionSubscription = { __typename?: 'World__Subscription', entityUpdated: { __typename?: 'World__Entity', id?: string | null, keys?: Array | null, models?: Array<{ __typename: 'DrugConfig' } | { __typename: 'ERC20AllowanceModel' } | { __typename: 'ERC20BalanceModel' } | { __typename: 'ERC20MetadataModel' } | { __typename: 'Game' } | { __typename: 'GameConfig' } | { __typename: 'GameStorePacked', game_id?: any | null, player_id?: any | null, packed?: any | null } | { __typename: 'HustlerItemBaseConfig' } | { __typename: 'HustlerItemTiersConfig' } | { __typename: 'InitializableModel' } | { __typename: 'Leaderboard' } | { __typename: 'LocationConfig' } | { __typename: 'RyoAddress' } | { __typename: 'RyoConfig' } | null> | null } }; +export type GameStorePackedSubscriptionSubscription = { __typename?: 'World__Subscription', entityUpdated: { __typename?: 'World__Entity', id?: string | null, keys?: Array | null, models?: Array<{ __typename: 'DrugConfig' } | { __typename: 'ERC20AllowanceModel' } | { __typename: 'ERC20BalanceModel' } | { __typename: 'ERC20MetadataModel' } | { __typename: 'EncounterConfig' } | { __typename: 'Game' } | { __typename: 'GameConfig' } | { __typename: 'GameStorePacked', game_id?: any | null, player_id?: any | null, packed?: any | null } | { __typename: 'HustlerItemBaseConfig' } | { __typename: 'HustlerItemTiersConfig' } | { __typename: 'InitializableModel' } | { __typename: 'Leaderboard' } | { __typename: 'LocationConfig' } | { __typename: 'RyoAddress' } | { __typename: 'RyoConfig' } | null> | null } }; export type LeaderboardByVersionQueryVariables = Exact<{ version?: InputMaybe; diff --git a/web/src/generated/introspection.ts b/web/src/generated/introspection.ts index 7dc983d2..6143b61d 100644 --- a/web/src/generated/introspection.ts +++ b/web/src/generated/introspection.ts @@ -11,6 +11,7 @@ "ERC20AllowanceModel", "ERC20BalanceModel", "ERC20MetadataModel", + "EncounterConfig", "Game", "GameConfig", "GameStorePacked",