Merge Eve invocation and presentation authority
This commit is contained in:
commit
bfdaff2d68
23 changed files with 444 additions and 31 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue