Ceremonial PR: fix map gen #39

Merged
pyrex merged 14 commits from fix-mapgen into main 2025-02-23 05:41:20 +00:00
Showing only changes of commit b4aa9329ad - Show all commits

View File

@ -6,6 +6,8 @@ import { addButton } from "./button.ts";
import { getPlayerProgress } from "./playerprogress.ts";
import { getStateManager } from "./statemanager.ts";
import { getCheckModal } from "./checkmodal.ts";
//import { LadderPickup } from "./pickups.ts";
// import { generateMap } from "./mapgen.ts";
type Button = {
label: string;
@ -53,6 +55,32 @@ export class Hotbar {
enabled: true,
endorse: getPlayerProgress().getBlood() < 100,
});
/*
buttons.push({
label:"Cheat",
cbClick: () => {
new LadderPickup().onClick();
},
enabled: true,
endorse: false,
})
buttons.push({
label:"Dig for bad maps",
cbClick: () => {
let i = 0;
try {
for(; i < 10000; i++) {
generateMap();
}
} catch(e) {
console.log(`Map gen failed after ${i} tries.`);
}
console.log("Ten thousand maps generated successfully.");
},
enabled: true,
endorse: true,
})
*/
return buttons;
}