From bedb536f3e9deb71cbe1c60961cd9d5fbcac8ce9 Mon Sep 17 00:00:00 2001 From: JaonHax Date: Mon, 1 Feb 2021 16:38:45 -0600 Subject: [PATCH] Create input-modifier.js --- contributed/AIDECLib/input-modifier.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 contributed/AIDECLib/input-modifier.js diff --git a/contributed/AIDECLib/input-modifier.js b/contributed/AIDECLib/input-modifier.js new file mode 100644 index 0000000..ec4dbdb --- /dev/null +++ b/contributed/AIDECLib/input-modifier.js @@ -0,0 +1,20 @@ + +const modifier = (text) => { + // Define the persisting stop attribute of state upon starting the adventure + if (state.stopped == undefined) { + state.stopped = false; + } + + // Define the command array + state.commands = []; + + // Add addCommand calls here + + // Parse any commands present in text + modifiedText = parseCommand(text); + + return { text: modifiedText } +} + +// Don't modify this part +modifier(text)