Skip to content

Commit

Permalink
Implement DiceSystem.clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Kruptein committed Aug 10, 2024
1 parent 65ee170 commit 72ba367
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/src/game/systems/dice/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@ import type { DeepReadonly } from "vue";

import { registerSystem } from "..";
import type { System } from "..";
import type { SystemClearReason } from "../models";

import { loadDiceEnv } from "./environment";
import { diceState } from "./state";

const { mutableReactive: $ } = diceState;

class DiceSystem implements System {
clear(): void {}
clear(reason: SystemClearReason): void {
$.result = undefined;
if (reason !== "full-loading") {
$.history = [];
$.loaded3d = false;
}
}

addToHistory(roll: RollResult<Part>, player: string, name?: string): string {
let rollString = "";
Expand Down

0 comments on commit 72ba367

Please sign in to comment.