Merge Eve invocation and presentation authority

This commit is contained in:
Meta Vens 2026-08-26 20:14:12 +02:00
commit bfdaff2d68
23 changed files with 444 additions and 31 deletions

View file

@ -1520,8 +1520,8 @@ export function createInventoryDropIntent(
const targetIndex = numberProp(target.targetIndex, -1);
const targetKind = firstString(target.targetKind, "");
const payload: Record<string, unknown> = {};
copyInventoryPayloadProps(source, payload);
copyInventoryPayloadProps(target, payload);
copyPayloadProps(source, payload);
copyPayloadProps(target, payload);
Object.assign(payload, {
sourceKind,
originEntityKey: firstString(source.sourceEntityKey, source.entityKey, ""),
@ -1610,7 +1610,7 @@ function parseInventoryCells(value: unknown): InventoryPlacementCell[] {
});
}
function copyInventoryPayloadProps(source: Record<string, unknown>, payload: Record<string, unknown>): void {
function copyPayloadProps(source: Record<string, unknown>, payload: Record<string, unknown>): void {
for (const [key, value] of Object.entries(source)) {
if (key.startsWith("payload.") && key.length > "payload.".length)
payload[key.slice("payload.".length)] = value;
@ -2007,7 +2007,9 @@ export function createEveCommandIntent(
captureBindings,
options.draftStore,
);
const payload = commandPayload(action);
const payload: Record<string, unknown> = {};
copyPayloadProps(props, payload);
Object.assign(payload, commandPayload(action));
if (captureBindings.length) payload.bindings = bindings;
const intent: EveCommandIntent = {
schema: "gamecult.eve.command_invocation.v1",