Disable map debug display, use phrase "sleep and save your game"

This commit is contained in:
Pyrex 2025-02-24 20:46:58 -08:00
parent 19b097a0bd
commit 8260bf8b21
2 changed files with 7 additions and 5 deletions

View File

@ -84,12 +84,12 @@ export class Hotbar {
#offerSleep() {
let bloodAmount = getPlayerProgress().getBlood();
let sleepText = "You're exhausted.";
let sleepText = "You're exhausted. Sleep and save your game?";
if (bloodAmount > 100) {
sleepText =
"You've got some energy left -- are you sure you want to sleep?";
"You've got some energy left -- are you sure you want to sleep and save your game?";
} else if (bloodAmount > 2000) {
sleepText = "Are you sure you want to sleep? You have so much energy.";
sleepText = "Are you sure you want to sleep and save your game? You have so much energy.";
}
getCheckModal().show(

View File

@ -30,6 +30,8 @@ const NUM_ROOMS_DESIRED = 1;
const EXTRA_CONNECTOR_CHANCE = 0.15;
const WINDING_PERCENT = 50;
const DEBUG = false;
// This is an implementation of Nystrom's algorithm:
// https://journal.stuffwithstuff.com/2014/12/21/rooms-and-mazes/
class Knife {
@ -98,7 +100,7 @@ class Knife {
}
showDebug(merged: Record<number, number>) {
if (true) {
if (DEBUG) {
let out = "";
let errors: string[] = [];
const size = this.#regions.size;
@ -110,7 +112,7 @@ class Knife {
return this.#sealedWalls.get(loc) ? "◘" : "█";
}
let r = this.#regions.get(loc);
if (typeof r === "number") {
if (r !== null) {
const resolved = merged[r];
if (typeof resolved === "number") {
r = resolved;