MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / shouldRollback

Method shouldRollback

src/lib/Component.ts:184–192  ·  view source on GitHub ↗

* @static shouldRollback - Similarly to the shouldProceed () function, this one takes * action when the player tries to go back in the game.Monogatari will first * check with all actions if it's ok to go back. Every action should implement * its own logic for it according to its requirements.

()

Source from the content-addressed store, hash-verified

182 * @return {Promise} - Resolved if going back is alright or rejected if its not
183 */
184 static async shouldRollback (): Promise<void[]> {
185 const promises: Promise<void>[] = [];
186
187 this.instances((instance: any) => {
188 promises.push(instance.shouldRollback());
189 });
190
191 return Promise.all(promises);
192 }
193
194 /**
195 * @static willRollback - Once the shouldRollback check is passed, each action

Callers

nothing calls this directly

Calls 2

instancesMethod · 0.95
allMethod · 0.45

Tested by

no test coverage detected