Tested and fixed triggers in new action engine

This commit is contained in:
Thaum Rystra
2024-05-14 10:02:54 +02:00
parent 4a52c3af19
commit 195704ed7a
8 changed files with 154 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
import { EngineAction } from '/imports/api/engine/action/EngineActions';
import InputProvider from '/imports/api/engine/action/functions/userInput/InputProvider';
import { PropTask } from '/imports/api/engine/action/tasks/Task';
import TaskResult from '/imports/api/engine/action/tasks/TaskResult';
import action from './applyActionProperty';
import adjustment from './applyAdjustmentProperty';
import branch from './applyBranchProperty';
@@ -9,8 +14,11 @@ import note from './applyNoteProperty';
import roll from './applyRollProperty';
import savingThrow from './applySavingThrowProperty';
import toggle from './applyToggleProperty';
import trigger from './applyTriggerProperty';
export default {
const applyPropertyByType: {
[key: string]: (task: PropTask, action: EngineAction, result: TaskResult, input: InputProvider) => Promise<void>
} = {
action,
adjustment,
branch,
@@ -23,4 +31,7 @@ export default {
savingThrow,
propertySlot: folder,
toggle,
trigger,
}
export default applyPropertyByType;