From 41aef02a969d3bdf49630ea720ba0d94f2301e80 Mon Sep 17 00:00:00 2001 From: customcommander Date: Fri, 18 Oct 2024 22:50:38 +0100 Subject: [PATCH] refactor target states --- src/lib-task.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/lib-task.js b/src/lib-task.js index 102c8c3..d47e5de 100644 --- a/src/lib-task.js +++ b/src/lib-task.js @@ -132,18 +132,12 @@ export default function (definitions) { const target = (name, impl) => impl && ({ [name]: { - entry: { - type: 'game-update', - params: { - fn: impl, - reply_to: id - } - }, - on: { - 'game.updated': { - target: 'idle', - actions: 'task-ack' - } + always: { + target: 'idle', + actions: [ + {type: 'game-update', params: {fn: impl}}, + {type: 'task-ack'} + ] } } });