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 764d1e4892 - Show all commits

View File

@ -110,14 +110,17 @@ class Knife {
} else {
errors.push(`${loc} is region ${r}, not found in merged`)
}
if (r < 0) {
return "!";
}
// 0...9 and lowercase
if (r < 36) {
return r.toString(36)
return r.toString(36);
}
// uppercase
r -= 26;
if (r < 36) {
return r.toString(36).toUpperCase()
return r.toString(36).toUpperCase();
}
// Greek lowercase
r -= 36;
@ -134,12 +137,12 @@ class Knife {
return String.fromCodePoint(r + 0x3a3);
}
// Hebrew
r -= 7
r -= 7;
if (r < 27) {
return String.fromCodePoint(r+0x5d0);
}
// give up
return "?"
return "?";
}
return "."; // room without region
})();