20 lines
439 B
TypeScript
20 lines
439 B
TypeScript
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import { platform } from "./platform.ts";
|
|
|
|
let stopped = false;
|
|
|
|
// replaces the game with a message, for when it can't go on (no server, lost connection)
|
|
export function show_fatal_error(message: string) {
|
|
if (stopped) {
|
|
return;
|
|
}
|
|
stopped = true;
|
|
platform.show_fatal_error(message);
|
|
}
|
|
|
|
export function is_stopped() {
|
|
return stopped;
|
|
}
|