Name box in the New world panel (t10)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -15,13 +15,13 @@ function enterGame() {
|
||||
GAME.drag = null; GAME.lmb = GAME.rmb = false; lastBagKey = '';
|
||||
hudDirty = true; renderHotbar();
|
||||
}
|
||||
function startNewWorld(seed, w, h) {
|
||||
function startNewWorld(seed, w, h, name = '') {
|
||||
auInit();
|
||||
showLoading(true, 0);
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
const worlds = await listWorlds();
|
||||
GAME.worldId = newWorldId(); GAME.worldName = `World ${worlds.length + 1}`;
|
||||
GAME.worldId = newWorldId(); GAME.worldName = cleanWorldName(name, `World ${worlds.length + 1}`);
|
||||
await putWorldEntry({ id: GAME.worldId, name: GAME.worldName, seed, w, h, createdAt: Date.now(), savedAt: 0, playTime: 0 });
|
||||
generateWorld(seed, w, h, null);
|
||||
GAME.playTime = 0; GAME.clip = null; GAME.paste = false; GAME.selDrag = null; GAME.tool = 0; GAME.dropMat = 0; GAME.matChosen = false; GAME.wallMat = RSTONE; GAME.filterCfg = { m: [], inv: 0 }; GAME.pieceIdx = 0;
|
||||
|
||||
Reference in New Issue
Block a user