Create input-modifier.js
This commit is contained in:
parent
2dd928b0db
commit
bedb536f3e
1 changed files with 20 additions and 0 deletions
20
contributed/AIDECLib/input-modifier.js
Normal file
20
contributed/AIDECLib/input-modifier.js
Normal file
|
@ -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)
|
Reference in a new issue