Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/lyracore-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,12 +676,12 @@ mod tests {
#[test]
fn text_rows_preserve_the_addon_reply_separator() {
let rows = parse_text_rows(
"id | cmd | payload\n---+-----+--------\n1 | \"playerbots.order.result\" | \"1|Applied\"\n",
"id | cmd | payload\n---+-----+--------\n1 | \"example.order.result\" | \"1|Applied\"\n",
);
assert_eq!(rows.len(), 1);
assert_eq!(rows[0].len(), 3);
assert_eq!(rows[0]["id"], "1");
assert_eq!(rows[0]["cmd"], "playerbots.order.result");
assert_eq!(rows[0]["cmd"], "example.order.result");
assert_eq!(rows[0]["payload"], "1|Applied");
}

Expand Down
2 changes: 1 addition & 1 deletion docs/package-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ which must be written literally.
|---|---|
| `crate::game_hook!(EVENT, fn NAME(ctx, payload) { .. })` | a notify handler for one hook event |
| `crate::game_tick_pass!(fn NAME(ctx) { .. })` | a periodic pass, run at the end of every `tick_creatures` tick (0.5s), after every core pass |
| `crate::game_client_command!(PARSE, APPLY)` | the single Package parser and admitted apply operation for authenticated addon commands |
| `crate::game_client_command!(PARSE, APPLY, REPLY)` | the single Package parser, admitted apply operation and reply command name for authenticated addon commands |
| `crate::character_owned!(delete \| restamp \| transfer \| not_transported, ..)` | a Package table's character-keyed sweeps and its cross-shard transport arm |
| `crate::encounter_package!(BINDING, fn NAME(ctx, instance_id, signal) { .. })` | encounter authority for one Encounter Binding |

Expand Down
4 changes: 2 additions & 2 deletions gateway/src/codec/addon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ mod tests {
#[test]
fn escaped_envelope_decodes_payload_pipes_once() {
assert_eq!(
parse_bridge_envelope("STC\tv1||playerbots.order||21||1/1||follow||2126"),
Some(("playerbots.order".into(), "follow|2126".into()))
parse_bridge_envelope("STC\tv1||example.order||21||1/1||follow||2126"),
Some(("example.order".into(), "follow|2126".into()))
);
assert_eq!(
parse_bridge_envelope("STC\tv1||ping||22||1/1||a||||b"),
Expand Down
90 changes: 45 additions & 45 deletions gateway/src/stdb/bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,13 @@ pub mod package_config_type;
pub mod package_import_type;
pub mod parsed_client_command_type;
pub mod party_command_dispatch_lane_type;
pub mod party_command_fixture_apply_after_gate_change_reducer;
pub mod party_command_fixture_apply_reducer;
pub mod party_command_fixture_drive_reducer;
pub mod party_command_fixture_expire_after_receipt_window_reducer;
pub mod party_command_fixture_expire_reducer;
pub mod party_command_fixture_finish_reducer;
pub mod party_command_fixture_release_receipt_reducer;
pub mod party_command_intent_type;
pub mod party_command_issuer_type;
pub mod party_command_receipt_type;
Expand All @@ -932,13 +939,6 @@ pub mod player_action_type;
pub mod player_reputation_type;
pub mod player_skill_type;
pub mod player_spell_type;
pub mod playerbots_fixture_command_apply_after_gate_change_reducer;
pub mod playerbots_fixture_command_apply_reducer;
pub mod playerbots_fixture_command_drive_reducer;
pub mod playerbots_fixture_command_expire_after_receipt_window_reducer;
pub mod playerbots_fixture_command_expire_reducer;
pub mod playerbots_fixture_command_finish_reducer;
pub mod playerbots_fixture_command_release_receipt_reducer;
pub mod posture_admission_type;
pub mod prepare_vmap_nav_coverage_reducer;
pub mod provision_account_reducer;
Expand Down Expand Up @@ -2088,6 +2088,13 @@ pub use package_config_type::PackageConfig;
pub use package_import_type::PackageImport;
pub use parsed_client_command_type::ParsedClientCommand;
pub use party_command_dispatch_lane_type::PartyCommandDispatchLane;
pub use party_command_fixture_apply_after_gate_change_reducer::party_command_fixture_apply_after_gate_change;
pub use party_command_fixture_apply_reducer::party_command_fixture_apply;
pub use party_command_fixture_drive_reducer::party_command_fixture_drive;
pub use party_command_fixture_expire_after_receipt_window_reducer::party_command_fixture_expire_after_receipt_window;
pub use party_command_fixture_expire_reducer::party_command_fixture_expire;
pub use party_command_fixture_finish_reducer::party_command_fixture_finish;
pub use party_command_fixture_release_receipt_reducer::party_command_fixture_release_receipt;
pub use party_command_intent_type::PartyCommandIntent;
pub use party_command_issuer_type::PartyCommandIssuer;
pub use party_command_receipt_type::PartyCommandReceipt;
Expand All @@ -2105,13 +2112,6 @@ pub use player_action_type::PlayerAction;
pub use player_reputation_type::PlayerReputation;
pub use player_skill_type::PlayerSkill;
pub use player_spell_type::PlayerSpell;
pub use playerbots_fixture_command_apply_after_gate_change_reducer::playerbots_fixture_command_apply_after_gate_change;
pub use playerbots_fixture_command_apply_reducer::playerbots_fixture_command_apply;
pub use playerbots_fixture_command_drive_reducer::playerbots_fixture_command_drive;
pub use playerbots_fixture_command_expire_after_receipt_window_reducer::playerbots_fixture_command_expire_after_receipt_window;
pub use playerbots_fixture_command_expire_reducer::playerbots_fixture_command_expire;
pub use playerbots_fixture_command_finish_reducer::playerbots_fixture_command_finish;
pub use playerbots_fixture_command_release_receipt_reducer::playerbots_fixture_command_release_receipt;
pub use posture_admission_type::PostureAdmission;
pub use prepare_vmap_nav_coverage_reducer::prepare_vmap_nav_coverage;
pub use provision_account_reducer::provision_account;
Expand Down Expand Up @@ -3937,30 +3937,30 @@ pub enum Reducer {
claim_token: u64,
},
OnDisconnect,
PlayerbotsFixtureCommandApply {
PartyCommandFixtureApply {
intent_id: u64,
claim_token: u64,
},
PlayerbotsFixtureCommandApplyAfterGateChange {
PartyCommandFixtureApplyAfterGateChange {
intent_id: u64,
claim_token: u64,
mode: u8,
},
PlayerbotsFixtureCommandDrive {
PartyCommandFixtureDrive {
intent_id: u64,
claim_token: u64,
},
PlayerbotsFixtureCommandExpire {
PartyCommandFixtureExpire {
intent_id: u64,
},
PlayerbotsFixtureCommandExpireAfterReceiptWindow {
PartyCommandFixtureExpireAfterReceiptWindow {
intent_id: u64,
},
PlayerbotsFixtureCommandFinish {
PartyCommandFixtureFinish {
intent_id: u64,
claim_token: u64,
},
PlayerbotsFixtureCommandReleaseReceipt {
PartyCommandFixtureReleaseReceipt {
bot_guid: u64,
},
PrepareVmapNavCoverage {
Expand Down Expand Up @@ -4806,18 +4806,18 @@ impl __sdk::Reducer for Reducer {
Reducer::InstallGuidRange { .. } => "install_guid_range",
Reducer::MarkBotTransferArrivalReady { .. } => "mark_bot_transfer_arrival_ready",
Reducer::OnDisconnect => "on_disconnect",
Reducer::PlayerbotsFixtureCommandApply { .. } => "playerbots_fixture_command_apply",
Reducer::PlayerbotsFixtureCommandApplyAfterGateChange { .. } => {
"playerbots_fixture_command_apply_after_gate_change"
Reducer::PartyCommandFixtureApply { .. } => "party_command_fixture_apply",
Reducer::PartyCommandFixtureApplyAfterGateChange { .. } => {
"party_command_fixture_apply_after_gate_change"
}
Reducer::PlayerbotsFixtureCommandDrive { .. } => "playerbots_fixture_command_drive",
Reducer::PlayerbotsFixtureCommandExpire { .. } => "playerbots_fixture_command_expire",
Reducer::PlayerbotsFixtureCommandExpireAfterReceiptWindow { .. } => {
"playerbots_fixture_command_expire_after_receipt_window"
Reducer::PartyCommandFixtureDrive { .. } => "party_command_fixture_drive",
Reducer::PartyCommandFixtureExpire { .. } => "party_command_fixture_expire",
Reducer::PartyCommandFixtureExpireAfterReceiptWindow { .. } => {
"party_command_fixture_expire_after_receipt_window"
}
Reducer::PlayerbotsFixtureCommandFinish { .. } => "playerbots_fixture_command_finish",
Reducer::PlayerbotsFixtureCommandReleaseReceipt { .. } => {
"playerbots_fixture_command_release_receipt"
Reducer::PartyCommandFixtureFinish { .. } => "party_command_fixture_finish",
Reducer::PartyCommandFixtureReleaseReceipt { .. } => {
"party_command_fixture_release_receipt"
}
Reducer::PrepareVmapNavCoverage { .. } => "prepare_vmap_nav_coverage",
Reducer::ProvisionAccount { .. } => "provision_account",
Expand Down Expand Up @@ -7732,49 +7732,49 @@ Reducer::GwIgnoreTrade{
}),
Reducer::OnDisconnect => __sats::bsatn::to_vec(&on_disconnect_reducer::OnDisconnectArgs {
}),
Reducer::PlayerbotsFixtureCommandApply{
Reducer::PartyCommandFixtureApply{
intent_id,
claim_token,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_apply_reducer::PlayerbotsFixtureCommandApplyArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_apply_reducer::PartyCommandFixtureApplyArgs {
intent_id: intent_id.clone(),
claim_token: claim_token.clone(),
}),
Reducer::PlayerbotsFixtureCommandApplyAfterGateChange{
Reducer::PartyCommandFixtureApplyAfterGateChange{
intent_id,
claim_token,
mode,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_apply_after_gate_change_reducer::PlayerbotsFixtureCommandApplyAfterGateChangeArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_apply_after_gate_change_reducer::PartyCommandFixtureApplyAfterGateChangeArgs {
intent_id: intent_id.clone(),
claim_token: claim_token.clone(),
mode: mode.clone(),
}),
Reducer::PlayerbotsFixtureCommandDrive{
Reducer::PartyCommandFixtureDrive{
intent_id,
claim_token,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_drive_reducer::PlayerbotsFixtureCommandDriveArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_drive_reducer::PartyCommandFixtureDriveArgs {
intent_id: intent_id.clone(),
claim_token: claim_token.clone(),
}),
Reducer::PlayerbotsFixtureCommandExpire{
Reducer::PartyCommandFixtureExpire{
intent_id,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_expire_reducer::PlayerbotsFixtureCommandExpireArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_expire_reducer::PartyCommandFixtureExpireArgs {
intent_id: intent_id.clone(),
}),
Reducer::PlayerbotsFixtureCommandExpireAfterReceiptWindow{
Reducer::PartyCommandFixtureExpireAfterReceiptWindow{
intent_id,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_expire_after_receipt_window_reducer::PlayerbotsFixtureCommandExpireAfterReceiptWindowArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_expire_after_receipt_window_reducer::PartyCommandFixtureExpireAfterReceiptWindowArgs {
intent_id: intent_id.clone(),
}),
Reducer::PlayerbotsFixtureCommandFinish{
Reducer::PartyCommandFixtureFinish{
intent_id,
claim_token,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_finish_reducer::PlayerbotsFixtureCommandFinishArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_finish_reducer::PartyCommandFixtureFinishArgs {
intent_id: intent_id.clone(),
claim_token: claim_token.clone(),
}),
Reducer::PlayerbotsFixtureCommandReleaseReceipt{
Reducer::PartyCommandFixtureReleaseReceipt{
bot_guid,
} => __sats::bsatn::to_vec(&playerbots_fixture_command_release_receipt_reducer::PlayerbotsFixtureCommandReleaseReceiptArgs {
} => __sats::bsatn::to_vec(&party_command_fixture_release_receipt_reducer::PartyCommandFixtureReleaseReceiptArgs {
bot_guid: bot_guid.clone(),
}),
Reducer::PrepareVmapNavCoverage{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,58 @@ 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 PlayerbotsFixtureCommandApplyAfterGateChangeArgs {
pub(super) struct PartyCommandFixtureApplyAfterGateChangeArgs {
pub intent_id: u64,
pub claim_token: u64,
pub mode: u8,
}

impl From<PlayerbotsFixtureCommandApplyAfterGateChangeArgs> for super::Reducer {
fn from(args: PlayerbotsFixtureCommandApplyAfterGateChangeArgs) -> Self {
Self::PlayerbotsFixtureCommandApplyAfterGateChange {
impl From<PartyCommandFixtureApplyAfterGateChangeArgs> for super::Reducer {
fn from(args: PartyCommandFixtureApplyAfterGateChangeArgs) -> Self {
Self::PartyCommandFixtureApplyAfterGateChange {
intent_id: args.intent_id,
claim_token: args.claim_token,
mode: args.mode,
}
}
}

impl __sdk::InModule for PlayerbotsFixtureCommandApplyAfterGateChangeArgs {
impl __sdk::InModule for PartyCommandFixtureApplyAfterGateChangeArgs {
type Module = super::RemoteModule;
}

#[allow(non_camel_case_types)]
/// Extension trait for access to the reducer `playerbots_fixture_command_apply_after_gate_change`.
/// Extension trait for access to the reducer `party_command_fixture_apply_after_gate_change`.
///
/// Implemented for [`super::RemoteReducers`].
pub trait playerbots_fixture_command_apply_after_gate_change {
/// Request that the remote module invoke the reducer `playerbots_fixture_command_apply_after_gate_change` to run as soon as possible.
pub trait party_command_fixture_apply_after_gate_change {
/// Request that the remote module invoke the reducer `party_command_fixture_apply_after_gate_change` 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 [`playerbots_fixture_command_apply_after_gate_change:playerbots_fixture_command_apply_after_gate_change_then`] to run a callback after the reducer completes.
fn playerbots_fixture_command_apply_after_gate_change(
/// /// Use [`party_command_fixture_apply_after_gate_change:party_command_fixture_apply_after_gate_change_then`] to run a callback after the reducer completes.
fn party_command_fixture_apply_after_gate_change(
&self,
intent_id: u64,
claim_token: u64,
mode: u8,
) -> __sdk::Result<()> {
self.playerbots_fixture_command_apply_after_gate_change_then(
self.party_command_fixture_apply_after_gate_change_then(
intent_id,
claim_token,
mode,
|_, _| {},
)
}

/// Request that the remote module invoke the reducer `playerbots_fixture_command_apply_after_gate_change` to run as soon as possible,
/// Request that the remote module invoke the reducer `party_command_fixture_apply_after_gate_change` 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 playerbots_fixture_command_apply_after_gate_change_then(
fn party_command_fixture_apply_after_gate_change_then(
&self,
intent_id: u64,
claim_token: u64,
Expand All @@ -69,8 +69,8 @@ pub trait playerbots_fixture_command_apply_after_gate_change {
) -> __sdk::Result<()>;
}

impl playerbots_fixture_command_apply_after_gate_change for super::RemoteReducers {
fn playerbots_fixture_command_apply_after_gate_change_then(
impl party_command_fixture_apply_after_gate_change for super::RemoteReducers {
fn party_command_fixture_apply_after_gate_change_then(
&self,
intent_id: u64,
claim_token: u64,
Expand All @@ -81,7 +81,7 @@ impl playerbots_fixture_command_apply_after_gate_change for super::RemoteReducer
+ 'static,
) -> __sdk::Result<()> {
self.imp.invoke_reducer_with_callback(
PlayerbotsFixtureCommandApplyAfterGateChangeArgs {
PartyCommandFixtureApplyAfterGateChangeArgs {
intent_id,
claim_token,
mode,
Expand Down
Loading
Loading