We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I had some issues making a custom action. When you use the code from the example in the documentation there's a promise error after the apply.
There should be return Promise.resolve (); in the apply in order to make the example work.
return Promise.resolve ();
The text was updated successfully, but these errors were encountered:
Well, the engine seems to be long dead. I've managed to make my custom actions work, though.
In case someone finds this issue, the real custom action example should be more like:
class MyAction extends Monogatari.Action { static matchString ([action]) { return action === 'myaction'; } constructor ([myaction, ...args]) { super (); } async apply() { } async revert() { } async didApply() { return { advance: true }; } async didRevert() { return { advance: true, step: true }; } } MyAction.id = 'MyAction';
Yes, you do need the didApply and didRevert boilerplate, or rewind won't work.
didApply
didRevert
Sorry, something went wrong.
No branches or pull requests
I had some issues making a custom action.
When you use the code from the example in the documentation there's a promise error after the apply.
There should be
return Promise.resolve ();
in the apply in order to make the example work.The text was updated successfully, but these errors were encountered: