diff --git a/CONTEXT.md b/CONTEXT.md index 8f5b331df..1dfa81d3a 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -200,6 +200,31 @@ the correct authority. Reaped on the shared event TTL, so it is a request, never `game_bot_invite_intent`, which kept its name through the change that gave it a second operation. _Avoid_: invite intent, group request, party order +**Bot Controller**: +The durable selector for Legacy, RecordOnly, Cohort, or Frozen behavior. RecordOnly records decisions +and authorizes no bot gameplay. Frozen cancels Foreground Actions and authorizes no new bot gameplay. + +**Bot Objective**: +A retained purpose with its destination, stage, deadline, catalog revision, and verified progress. +Tactical interruption does not replace the objective. + +**Foreground Action**: +The single movement or cast retained by one Bot Controller generation. + +**Candidate**: +A proposed action identified by its action, target, spell, reason, and Bot Objective identity. + +**Strategy**: +A composition of typed triggers, defaults, and integer priorities used to select Candidates. + +**Sessionless Action Consent**: +A Character-owned core projection of a Package's controller selection. An absent row permits legacy +behavior. Each selection updates consent and clears unclaimed Group Intents in one transaction, +including a same-value selection. Automatic group answers and Group Intent claims require admission +on the owning World Shard. Suppression leaves a pending invitation unanswered. An action admitted +before a later selection may still finish on Realm-core. Admission and membership are separate +transactions across Shards. Consent travels with the Character on Transfer and is deleted with it. + **Home Shard**: The shard that currently holds a Character's row. diff --git a/crates/lyracore-shared/src/group.rs b/crates/lyracore-shared/src/group.rs index 4c3ed0371..8e604c5b0 100644 --- a/crates/lyracore-shared/src/group.rs +++ b/crates/lyracore-shared/src/group.rs @@ -138,10 +138,12 @@ pub enum GroupRefusal { InvalidLootRules, /// Another Gateway already claimed this bot invite intent. IntentAlreadyClaimed, + /// The Package has suppressed session-less actions for this Character. + ActionSuppressed, } impl GroupRefusal { - pub const ALL: [Self; 14] = [ + pub const ALL: [Self; 15] = [ Self::ActorUnavailable, Self::InviteSelf, Self::NoSuchPlayer, @@ -156,6 +158,7 @@ impl GroupRefusal { Self::KickSelf, Self::InvalidLootRules, Self::IntentAlreadyClaimed, + Self::ActionSuppressed, ]; pub fn as_tag(self) -> &'static str { @@ -174,6 +177,7 @@ impl GroupRefusal { Self::KickSelf => "group:kick_self", Self::InvalidLootRules => "group:invalid_loot_rules", Self::IntentAlreadyClaimed => "group:intent_already_claimed", + Self::ActionSuppressed => "group:action_suppressed", } } diff --git a/docs/package-api.md b/docs/package-api.md index 85ea8080d..512f0de1a 100644 --- a/docs/package-api.md +++ b/docs/package-api.md @@ -72,6 +72,17 @@ authoritative; this list is the set of event names and their payload types. | `on_hp_threshold` | `crate::hooks::HpThresholdPayload` | | `on_go_used` | `crate::hooks::GoUsedPayload` | +### Session-less action consent + +`actor::set_sessionless_action_consent(ctx, character_guid, allowed)` records a core-owned consent +projection during bot setup or controller selection. Call it for repeated selection too: every call +removes that Character's unclaimed Group Intents. Do not call it on decision ticks. Absent consent +preserves Legacy behavior. Core Gates check consent when accepting an invite or claiming an Intent. + +The Gateway obtains acknowledged admission from the owning World Shard before it accepts at +Realm-core. Admission committed before a concurrent controller change can finish afterwards; this +ordering does not promise an atomic operation across Shards. + ### Encounter kernel `crate::encounter` holds the encounter state machine and the choreography verbs a Package drives it @@ -221,8 +232,16 @@ Gate evidence. `endpoint == from` means no movement was approved, even if a comp planned. A blocked search holds position. Creature callers retain `nav_step` and its existing collision-gated fallback. +`nav::coverage_generation(ctx, map_id)` returns the active complete coverage generation when its +Gate is enabled, or `None`. Include it with map and instance in deferred destination keys. A changed +generation invalidates a retained route decision; `None` preserves unknown coverage. + `coverage` is `Unknown` unless every consulted navigation cell matches the active complete manifest. `VerifiedCells` names that generation and the number of checked cells. It proves only those cells' derivation, not world coverage or the presence of imported terrain and client geometry. A Package must measure actual position on later observations to establish advancement or arrival; the proposed endpoint cannot establish either. + +`actor::sessionless_action_gate(ctx, character_guid)` checks current Account Claim and Fence ownership, Character availability, and World Session status before Package gameplay. It permits a missing live entity so Legacy can restore a body. Group admission also requires a live entity and current controller consent. + +`nav::LEG_MAX_EXPANSIONS` is the expansion cap used by `nav::route_step`. A Package can reserve that work before selecting movement. diff --git a/gateway/src/stdb/bindings/admit_sessionless_group_action_reducer.rs b/gateway/src/stdb/bindings/admit_sessionless_group_action_reducer.rs new file mode 100644 index 000000000..914b55ed8 --- /dev/null +++ b/gateway/src/stdb/bindings/admit_sessionless_group_action_reducer.rs @@ -0,0 +1,70 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct AdmitSessionlessGroupActionArgs { + pub character_guid: u64, +} + +impl From for super::Reducer { + fn from(args: AdmitSessionlessGroupActionArgs) -> Self { + Self::AdmitSessionlessGroupAction { + character_guid: args.character_guid, + } + } +} + +impl __sdk::InModule for AdmitSessionlessGroupActionArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `admit_sessionless_group_action`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait admit_sessionless_group_action { + /// Request that the remote module invoke the reducer `admit_sessionless_group_action` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`admit_sessionless_group_action:admit_sessionless_group_action_then`] to run a callback after the reducer completes. + fn admit_sessionless_group_action(&self, character_guid: u64) -> __sdk::Result<()> { + self.admit_sessionless_group_action_then(character_guid, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `admit_sessionless_group_action` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn admit_sessionless_group_action_then( + &self, + character_guid: u64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl admit_sessionless_group_action for super::RemoteReducers { + fn admit_sessionless_group_action_then( + &self, + character_guid: u64, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp.invoke_reducer_with_callback( + AdmitSessionlessGroupActionArgs { character_guid }, + callback, + ) + } +} diff --git a/gateway/src/stdb/bindings/bot_invite_intent_type.rs b/gateway/src/stdb/bindings/bot_invite_intent_type.rs index 49d1d82e9..7f8ee2692 100644 --- a/gateway/src/stdb/bindings/bot_invite_intent_type.rs +++ b/gateway/src/stdb/bindings/bot_invite_intent_type.rs @@ -47,6 +47,7 @@ impl __sdk::__query_builder::HasCols for BotInviteIntent { /// Provides typed access to indexed columns for query building. pub struct BotInviteIntentIxCols { pub id: __sdk::__query_builder::IxCol, + pub inviter_guid: __sdk::__query_builder::IxCol, } impl __sdk::__query_builder::HasIxCols for BotInviteIntent { @@ -54,6 +55,7 @@ impl __sdk::__query_builder::HasIxCols for BotInviteIntent { fn ix_cols(table_name: &'static str) -> Self::IxCols { BotInviteIntentIxCols { id: __sdk::__query_builder::IxCol::new(table_name, "id"), + inviter_guid: __sdk::__query_builder::IxCol::new(table_name, "inviter_guid"), } } } diff --git a/gateway/src/stdb/bindings/debug_emit_sessionless_group_intent_reducer.rs b/gateway/src/stdb/bindings/debug_emit_sessionless_group_intent_reducer.rs new file mode 100644 index 000000000..13f110c84 --- /dev/null +++ b/gateway/src/stdb/bindings/debug_emit_sessionless_group_intent_reducer.rs @@ -0,0 +1,87 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DebugEmitSessionlessGroupIntentArgs { + pub character_guid: u64, + pub target_guid: u64, + pub leave: bool, +} + +impl From for super::Reducer { + fn from(args: DebugEmitSessionlessGroupIntentArgs) -> Self { + Self::DebugEmitSessionlessGroupIntent { + character_guid: args.character_guid, + target_guid: args.target_guid, + leave: args.leave, + } + } +} + +impl __sdk::InModule for DebugEmitSessionlessGroupIntentArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `debug_emit_sessionless_group_intent`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait debug_emit_sessionless_group_intent { + /// Request that the remote module invoke the reducer `debug_emit_sessionless_group_intent` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`debug_emit_sessionless_group_intent:debug_emit_sessionless_group_intent_then`] to run a callback after the reducer completes. + fn debug_emit_sessionless_group_intent( + &self, + character_guid: u64, + target_guid: u64, + leave: bool, + ) -> __sdk::Result<()> { + self.debug_emit_sessionless_group_intent_then(character_guid, target_guid, leave, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `debug_emit_sessionless_group_intent` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn debug_emit_sessionless_group_intent_then( + &self, + character_guid: u64, + target_guid: u64, + leave: bool, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl debug_emit_sessionless_group_intent for super::RemoteReducers { + fn debug_emit_sessionless_group_intent_then( + &self, + character_guid: u64, + target_guid: u64, + leave: bool, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp.invoke_reducer_with_callback( + DebugEmitSessionlessGroupIntentArgs { + character_guid, + target_guid, + leave, + }, + callback, + ) + } +} diff --git a/gateway/src/stdb/bindings/debug_set_sessionless_action_consent_reducer.rs b/gateway/src/stdb/bindings/debug_set_sessionless_action_consent_reducer.rs new file mode 100644 index 000000000..e6e7cac1e --- /dev/null +++ b/gateway/src/stdb/bindings/debug_set_sessionless_action_consent_reducer.rs @@ -0,0 +1,81 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)] +#[sats(crate = __lib)] +pub(super) struct DebugSetSessionlessActionConsentArgs { + pub character_guid: u64, + pub allowed: bool, +} + +impl From for super::Reducer { + fn from(args: DebugSetSessionlessActionConsentArgs) -> Self { + Self::DebugSetSessionlessActionConsent { + character_guid: args.character_guid, + allowed: args.allowed, + } + } +} + +impl __sdk::InModule for DebugSetSessionlessActionConsentArgs { + type Module = super::RemoteModule; +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the reducer `debug_set_sessionless_action_consent`. +/// +/// Implemented for [`super::RemoteReducers`]. +pub trait debug_set_sessionless_action_consent { + /// Request that the remote module invoke the reducer `debug_set_sessionless_action_consent` to run as soon as possible. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and this method provides no way to listen for its completion status. + /// /// Use [`debug_set_sessionless_action_consent:debug_set_sessionless_action_consent_then`] to run a callback after the reducer completes. + fn debug_set_sessionless_action_consent( + &self, + character_guid: u64, + allowed: bool, + ) -> __sdk::Result<()> { + self.debug_set_sessionless_action_consent_then(character_guid, allowed, |_, _| {}) + } + + /// Request that the remote module invoke the reducer `debug_set_sessionless_action_consent` to run as soon as possible, + /// registering `callback` to run when we are notified that the reducer completed. + /// + /// This method returns immediately, and errors only if we are unable to send the request. + /// The reducer will run asynchronously in the future, + /// and its status can be observed with the `callback`. + fn debug_set_sessionless_action_consent_then( + &self, + character_guid: u64, + allowed: bool, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()>; +} + +impl debug_set_sessionless_action_consent for super::RemoteReducers { + fn debug_set_sessionless_action_consent_then( + &self, + character_guid: u64, + allowed: bool, + + callback: impl FnOnce(&super::ReducerEventContext, Result, __sdk::InternalError>) + + Send + + 'static, + ) -> __sdk::Result<()> { + self.imp.invoke_reducer_with_callback( + DebugSetSessionlessActionConsentArgs { + character_guid, + allowed, + }, + callback, + ) + } +} diff --git a/gateway/src/stdb/bindings/game_sessionless_action_consent_table.rs b/gateway/src/stdb/bindings/game_sessionless_action_consent_table.rs new file mode 100644 index 000000000..b5a69be45 --- /dev/null +++ b/gateway/src/stdb/bindings/game_sessionless_action_consent_table.rs @@ -0,0 +1,235 @@ +// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE +// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD. + +#![allow(unused, clippy::all)] +use super::sessionless_action_consent_type::SessionlessActionConsent; +use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws}; + +/// Table handle for the table `game_sessionless_action_consent`. +/// +/// Obtain a handle from the [`GameSessionlessActionConsentTableAccess::game_sessionless_action_consent`] method on [`super::RemoteTables`], +/// like `ctx.db.game_sessionless_action_consent()`. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.game_sessionless_action_consent().on_insert(...)`. +pub struct GameSessionlessActionConsentTableHandle<'ctx> { + imp: __sdk::TableHandle, + ctx: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +/// Lifetime-aware accessor marker for the table `game_sessionless_action_consent`. +pub struct GameSessionlessActionConsentTableAccessor; + +impl __sdk::TableAccessor for GameSessionlessActionConsentTableAccessor { + type Row = SessionlessActionConsent; + type Handle<'db> = GameSessionlessActionConsentTableHandle<'db>; + + fn get<'db>(db: &'db super::RemoteTables) -> Self::Handle<'db> { + db.game_sessionless_action_consent() + } +} + +#[allow(non_camel_case_types)] +/// Extension trait for access to the table `game_sessionless_action_consent`. +/// +/// Implemented for [`super::RemoteTables`]. +pub trait GameSessionlessActionConsentTableAccess { + #[allow(non_snake_case)] + /// Obtain a [`GameSessionlessActionConsentTableHandle`], which mediates access to the table `game_sessionless_action_consent`. + fn game_sessionless_action_consent(&self) -> GameSessionlessActionConsentTableHandle<'_>; +} + +impl GameSessionlessActionConsentTableAccess for super::RemoteTables { + fn game_sessionless_action_consent(&self) -> GameSessionlessActionConsentTableHandle<'_> { + GameSessionlessActionConsentTableHandle { + imp: self + .imp + .get_table::("game_sessionless_action_consent"), + ctx: std::marker::PhantomData, + } + } +} + +pub struct GameSessionlessActionConsentInsertCallbackId(__sdk::CallbackId); +pub struct GameSessionlessActionConsentDeleteCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::TableLike for GameSessionlessActionConsentTableHandle<'ctx> { + type Row = SessionlessActionConsent; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } +} + +impl<'ctx> __sdk::Table for GameSessionlessActionConsentTableHandle<'ctx> { + type Row = SessionlessActionConsent; + type EventContext = super::EventContext; + + fn count(&self) -> u64 { + self.imp.count() + } + fn iter(&self) -> impl Iterator + '_ { + self.imp.iter() + } + + type InsertCallbackId = GameSessionlessActionConsentInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> GameSessionlessActionConsentInsertCallbackId { + GameSessionlessActionConsentInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: GameSessionlessActionConsentInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } + + type DeleteCallbackId = GameSessionlessActionConsentDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> GameSessionlessActionConsentDeleteCallbackId { + GameSessionlessActionConsentDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: GameSessionlessActionConsentDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +impl<'ctx> __sdk::WithInsert for GameSessionlessActionConsentTableHandle<'ctx> { + type InsertCallbackId = GameSessionlessActionConsentInsertCallbackId; + + fn on_insert( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> GameSessionlessActionConsentInsertCallbackId { + GameSessionlessActionConsentInsertCallbackId(self.imp.on_insert(Box::new(callback))) + } + + fn remove_on_insert(&self, callback: GameSessionlessActionConsentInsertCallbackId) { + self.imp.remove_on_insert(callback.0) + } +} + +impl<'ctx> __sdk::WithDelete for GameSessionlessActionConsentTableHandle<'ctx> { + type DeleteCallbackId = GameSessionlessActionConsentDeleteCallbackId; + + fn on_delete( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static, + ) -> GameSessionlessActionConsentDeleteCallbackId { + GameSessionlessActionConsentDeleteCallbackId(self.imp.on_delete(Box::new(callback))) + } + + fn remove_on_delete(&self, callback: GameSessionlessActionConsentDeleteCallbackId) { + self.imp.remove_on_delete(callback.0) + } +} + +pub struct GameSessionlessActionConsentUpdateCallbackId(__sdk::CallbackId); + +impl<'ctx> __sdk::TableWithPrimaryKey for GameSessionlessActionConsentTableHandle<'ctx> { + type UpdateCallbackId = GameSessionlessActionConsentUpdateCallbackId; + + fn on_update( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, + ) -> GameSessionlessActionConsentUpdateCallbackId { + GameSessionlessActionConsentUpdateCallbackId(self.imp.on_update(Box::new(callback))) + } + + fn remove_on_update(&self, callback: GameSessionlessActionConsentUpdateCallbackId) { + self.imp.remove_on_update(callback.0) + } +} + +impl<'ctx> __sdk::WithUpdate for GameSessionlessActionConsentTableHandle<'ctx> { + type UpdateCallbackId = GameSessionlessActionConsentUpdateCallbackId; + + fn on_update( + &self, + callback: impl FnMut(&Self::EventContext, &Self::Row, &Self::Row) + Send + 'static, + ) -> GameSessionlessActionConsentUpdateCallbackId { + GameSessionlessActionConsentUpdateCallbackId(self.imp.on_update(Box::new(callback))) + } + + fn remove_on_update(&self, callback: GameSessionlessActionConsentUpdateCallbackId) { + self.imp.remove_on_update(callback.0) + } +} + +/// Access to the `character_guid` unique index on the table `game_sessionless_action_consent`, +/// which allows point queries on the field of the same name +/// via the [`GameSessionlessActionConsentCharacterGuidUnique::find`] method. +/// +/// Users are encouraged not to explicitly reference this type, +/// but to directly chain method calls, +/// like `ctx.db.game_sessionless_action_consent().character_guid().find(...)`. +pub struct GameSessionlessActionConsentCharacterGuidUnique<'ctx> { + imp: __sdk::UniqueConstraintHandle, + phantom: std::marker::PhantomData<&'ctx super::RemoteTables>, +} + +impl<'ctx> GameSessionlessActionConsentTableHandle<'ctx> { + /// Get a handle on the `character_guid` unique index on the table `game_sessionless_action_consent`. + pub fn character_guid(&self) -> GameSessionlessActionConsentCharacterGuidUnique<'ctx> { + GameSessionlessActionConsentCharacterGuidUnique { + imp: self.imp.get_unique_constraint::("character_guid"), + phantom: std::marker::PhantomData, + } + } +} + +impl<'ctx> GameSessionlessActionConsentCharacterGuidUnique<'ctx> { + /// Find the subscribed row whose `character_guid` column value is equal to `col_val`, + /// if such a row is present in the client cache. + pub fn find(&self, col_val: &u64) -> Option { + self.imp.find(col_val) + } +} + +#[doc(hidden)] +pub(super) fn register_table(client_cache: &mut __sdk::ClientCache) { + let _table = client_cache + .get_or_make_table::("game_sessionless_action_consent"); + _table.add_unique_constraint::("character_guid", |row| &row.character_guid); +} + +#[doc(hidden)] +pub(super) fn parse_table_update( + raw_updates: __ws::v2::TableUpdate, +) -> __sdk::Result<__sdk::TableUpdate> { + __sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| { + __sdk::InternalError::failed_parse("TableUpdate", "TableUpdate") + .with_cause(e) + .into() + }) +} + +#[allow(non_camel_case_types)] +/// Extension trait for query builder access to the table `SessionlessActionConsent`. +/// +/// Implemented for [`__sdk::QueryTableAccessor`]. +pub trait game_sessionless_action_consentQueryTableAccess { + #[allow(non_snake_case)] + /// Get a query builder for the table `SessionlessActionConsent`. + fn game_sessionless_action_consent( + &self, + ) -> __sdk::__query_builder::Table; +} + +impl game_sessionless_action_consentQueryTableAccess for __sdk::QueryTableAccessor { + fn game_sessionless_action_consent( + &self, + ) -> __sdk::__query_builder::Table { + __sdk::__query_builder::Table::new("game_sessionless_action_consent") + } +} diff --git a/gateway/src/stdb/bindings/mod.rs b/gateway/src/stdb/bindings/mod.rs index d3a076095..78ae5eed4 100644 --- a/gateway/src/stdb/bindings/mod.rs +++ b/gateway/src/stdb/bindings/mod.rs @@ -12,6 +12,7 @@ pub mod account_type; pub mod activate_vmap_generation_reducer; pub mod active_taxi_flight_type; pub mod addon_message_type; +pub mod admit_sessionless_group_action_reducer; pub mod advance_taxi_flight_reducer; pub mod ai_event_kind_type; pub mod alpha_test_tools_enrollment_type; @@ -146,6 +147,7 @@ pub mod debug_create_fixture_instance_reducer; pub mod debug_delete_character_reducer; pub mod debug_disarm_instance_tick_reducer; pub mod debug_disenchant_reducer; +pub mod debug_emit_sessionless_group_intent_reducer; pub mod debug_enchant_item_reducer; pub mod debug_encounter_equip_reducer; pub mod debug_encounter_move_reducer; @@ -224,6 +226,7 @@ pub mod debug_set_money_reducer; pub mod debug_set_nav_coverage_enabled_reducer; pub mod debug_set_nav_enabled_reducer; pub mod debug_set_power_reducer; +pub mod debug_set_sessionless_action_consent_reducer; pub mod debug_set_skill_reducer; pub mod debug_set_vmap_enabled_reducer; pub mod debug_set_xp_rate_reducer; @@ -521,6 +524,7 @@ pub mod game_school_lockout_table; pub mod game_script_table; pub mod game_session_reaper_schedule_table; pub mod game_session_table; +pub mod game_sessionless_action_consent_table; pub mod game_shard_load_table; pub mod game_shard_load_total_table; pub mod game_skill_ability_table; @@ -907,6 +911,7 @@ pub mod server_config_type; pub mod session_actor_type; pub mod session_reaper_schedule_type; pub mod session_type; +pub mod sessionless_action_consent_type; pub mod set_alpha_test_tools_enrollment_reducer; pub mod set_character_shard_reducer; pub mod set_gm_level_reducer; @@ -1007,6 +1012,7 @@ pub use account_type::Account; pub use activate_vmap_generation_reducer::activate_vmap_generation; pub use active_taxi_flight_type::ActiveTaxiFlight; pub use addon_message_type::AddonMessage; +pub use admit_sessionless_group_action_reducer::admit_sessionless_group_action; pub use advance_taxi_flight_reducer::advance_taxi_flight; pub use ai_event_kind_type::AiEventKind; pub use alpha_test_tools_enrollment_type::AlphaTestToolsEnrollment; @@ -1141,6 +1147,7 @@ pub use debug_create_fixture_instance_reducer::debug_create_fixture_instance; pub use debug_delete_character_reducer::debug_delete_character; pub use debug_disarm_instance_tick_reducer::debug_disarm_instance_tick; pub use debug_disenchant_reducer::debug_disenchant; +pub use debug_emit_sessionless_group_intent_reducer::debug_emit_sessionless_group_intent; pub use debug_enchant_item_reducer::debug_enchant_item; pub use debug_encounter_equip_reducer::debug_encounter_equip; pub use debug_encounter_move_reducer::debug_encounter_move; @@ -1219,6 +1226,7 @@ pub use debug_set_money_reducer::debug_set_money; pub use debug_set_nav_coverage_enabled_reducer::debug_set_nav_coverage_enabled; pub use debug_set_nav_enabled_reducer::debug_set_nav_enabled; pub use debug_set_power_reducer::debug_set_power; +pub use debug_set_sessionless_action_consent_reducer::debug_set_sessionless_action_consent; pub use debug_set_skill_reducer::debug_set_skill; pub use debug_set_vmap_enabled_reducer::debug_set_vmap_enabled; pub use debug_set_xp_rate_reducer::debug_set_xp_rate; @@ -1516,6 +1524,7 @@ pub use game_school_lockout_table::*; pub use game_script_table::*; pub use game_session_reaper_schedule_table::*; pub use game_session_table::*; +pub use game_sessionless_action_consent_table::*; pub use game_shard_load_table::*; pub use game_shard_load_total_table::*; pub use game_skill_ability_table::*; @@ -1902,6 +1911,7 @@ pub use server_config_type::ServerConfig; pub use session_actor_type::SessionActor; pub use session_reaper_schedule_type::SessionReaperSchedule; pub use session_type::Session; +pub use sessionless_action_consent_type::SessionlessActionConsent; pub use set_alpha_test_tools_enrollment_reducer::set_alpha_test_tools_enrollment; pub use set_character_shard_reducer::set_character_shard; pub use set_gm_level_reducer::set_gm_level; @@ -2007,6 +2017,9 @@ pub enum Reducer { ActivateVmapGeneration { generation_id: u64, }, + AdmitSessionlessGroupAction { + character_guid: u64, + }, AdvanceTaxiFlight { schedule: TaxiFlightSchedule, }, @@ -2217,6 +2230,11 @@ pub enum Reducer { character_guid: u64, slot: u8, }, + DebugEmitSessionlessGroupIntent { + character_guid: u64, + target_guid: u64, + leave: bool, + }, DebugEnchantItem { character_guid: u64, target_slot: u8, @@ -2549,6 +2567,10 @@ pub enum Reducer { guid: u64, power: u32, }, + DebugSetSessionlessActionConsent { + character_guid: u64, + allowed: bool, + }, DebugSetSkill { character_guid: u64, skill_line: u32, @@ -3664,6 +3686,7 @@ impl __sdk::Reducer for Reducer { fn reducer_name(&self) -> &'static str { match self { Reducer::ActivateVmapGeneration { .. } => "activate_vmap_generation", + Reducer::AdmitSessionlessGroupAction { .. } => "admit_sessionless_group_action", Reducer::AdvanceTaxiFlight { .. } => "advance_taxi_flight", Reducer::AppendVmapGenerationChunks { .. } => "append_vmap_generation_chunks", Reducer::ApplyPackageDeltas { .. } => "apply_package_deltas", @@ -3717,6 +3740,9 @@ impl __sdk::Reducer for Reducer { Reducer::DebugDeleteCharacter { .. } => "debug_delete_character", Reducer::DebugDisarmInstanceTick { .. } => "debug_disarm_instance_tick", Reducer::DebugDisenchant { .. } => "debug_disenchant", + Reducer::DebugEmitSessionlessGroupIntent { .. } => { + "debug_emit_sessionless_group_intent" + } Reducer::DebugEnchantItem { .. } => "debug_enchant_item", Reducer::DebugEncounterEquip { .. } => "debug_encounter_equip", Reducer::DebugEncounterMove { .. } => "debug_encounter_move", @@ -3806,6 +3832,9 @@ impl __sdk::Reducer for Reducer { Reducer::DebugSetNavCoverageEnabled { .. } => "debug_set_nav_coverage_enabled", Reducer::DebugSetNavEnabled { .. } => "debug_set_nav_enabled", Reducer::DebugSetPower { .. } => "debug_set_power", + Reducer::DebugSetSessionlessActionConsent { .. } => { + "debug_set_sessionless_action_consent" + } Reducer::DebugSetSkill { .. } => "debug_set_skill", Reducer::DebugSetVmapEnabled { .. } => "debug_set_vmap_enabled", Reducer::DebugSetXpRate { .. } => "debug_set_xp_rate", @@ -4081,6 +4110,11 @@ impl __sdk::Reducer for Reducer { generation_id, } => __sats::bsatn::to_vec(&activate_vmap_generation_reducer::ActivateVmapGenerationArgs { generation_id: generation_id.clone(), +}), + Reducer::AdmitSessionlessGroupAction{ + character_guid, +} => __sats::bsatn::to_vec(&admit_sessionless_group_action_reducer::AdmitSessionlessGroupActionArgs { + character_guid: character_guid.clone(), }), Reducer::AdvanceTaxiFlight{ schedule, @@ -4460,6 +4494,15 @@ Reducer::DebugCheckRestAt{ } => __sats::bsatn::to_vec(&debug_disenchant_reducer::DebugDisenchantArgs { character_guid: character_guid.clone(), slot: slot.clone(), +}), + Reducer::DebugEmitSessionlessGroupIntent{ + character_guid, + target_guid, + leave, +} => __sats::bsatn::to_vec(&debug_emit_sessionless_group_intent_reducer::DebugEmitSessionlessGroupIntentArgs { + character_guid: character_guid.clone(), + target_guid: target_guid.clone(), + leave: leave.clone(), }), Reducer::DebugEnchantItem{ character_guid, @@ -5052,6 +5095,13 @@ Reducer::DebugSellItem{ } => __sats::bsatn::to_vec(&debug_set_power_reducer::DebugSetPowerArgs { guid: guid.clone(), power: power.clone(), +}), + Reducer::DebugSetSessionlessActionConsent{ + character_guid, + allowed, +} => __sats::bsatn::to_vec(&debug_set_sessionless_action_consent_reducer::DebugSetSessionlessActionConsentArgs { + character_guid: character_guid.clone(), + allowed: allowed.clone(), }), Reducer::DebugSetSkill{ character_guid, @@ -7236,6 +7286,7 @@ pub struct DbUpdate { game_script: __sdk::TableUpdate