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

Method revert

src/actions/HideParticles.ts:30–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 override async revert(): Promise<void> {
31 const history = this.engine.history('particle') as string[];
32 if (history.length > 0) {
33 const last = history[history.length - 1];
34
35 const action = this.engine.prepareAction(last, { cycle: 'Application' }) as ActionInstance | null;
36 if (action !== null) {
37 await action.willApply();
38 await action.apply();
39 await action.didApply({ updateHistory: false, updateState: true });
40 }
41 }
42 }
43
44 override async didRevert(): Promise<ActionRevertResult> {
45 return { advance: true, step: true };

Callers

nothing calls this directly

Calls 5

historyMethod · 0.80
prepareActionMethod · 0.80
willApplyMethod · 0.45
applyMethod · 0.45
didApplyMethod · 0.45

Tested by

no test coverage detected