update allflow

This commit is contained in:
2026-06-16 13:40:15 +00:00
parent eb8c67740c
commit be38ba481d
9 changed files with 78 additions and 10 deletions
+16 -4
View File
@@ -38,9 +38,9 @@
"providerUserId": "p_1775109142385_wq7wfy1p32j",
"notes": "auto: player-coins",
"blocked": false,
"coins": 230,
"coins": 250,
"createdAt": "2026-04-02T05:52:21+00:00",
"updatedAt": "2026-06-15T13:38:26+00:00",
"updatedAt": "2026-06-16T04:02:56+00:00",
"daily": {
"anchorMs": 1781197200000,
"claimedDays": [
@@ -54,11 +54,11 @@
],
"lockUntilMs": 0
},
"score": 200,
"score": 210,
"scoreByCase": {
"1": 10,
"10": 70,
"8": 100,
"8": 110,
"11": 20
},
"lbName": "Q"
@@ -155,6 +155,18 @@
"coins": 0,
"createdAt": "2026-06-02T11:46:46+00:00",
"updatedAt": "2026-06-02T11:46:46+00:00"
},
{
"id": "9404ea306bffed187b43a490",
"email": "",
"displayName": "Guest",
"loginType": "guest",
"providerUserId": "p_1781588567562_aytbtw0mxxn",
"notes": "auto: player-coins",
"blocked": false,
"coins": 0,
"createdAt": "2026-06-16T05:42:47+00:00",
"updatedAt": "2026-06-16T05:42:47+00:00"
}
]
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -105,6 +105,7 @@
<option value="customizeSpot">จุดห้องแต่งตัว (เดินไปกด F — คลิกซ้ายวาง / ขวาลบ)</option>
<option value="hostConsoleSpot" id="draw-mode-option-host-console">จุดตั้งค่าโฮสต์ (Host กด F — คลิกซ้ายวาง / ขวาลบ)</option>
<option value="spawnArea" id="draw-mode-option-spawn-area">พื้นที่สุ่มจุดเกิด (ฟ้า — ผู้เล่นใหม่สุ่มในช่องนี้)</option>
<option value="specialQuizSpawn" id="draw-mode-option-special-quiz-spawn">จุดเกิดไอคอนคำถามพิเศษ (ชมพู — ยกเว้น MG2/MG3)</option>
<option value="lobbyPlayerSpawn" id="draw-mode-option-lobby-spawn" hidden>จุดเกิดผู้เล่น 1–6 (ลำดับเข้า P1…P6)</option>
<option value="startGame" id="draw-mode-option-start-game">พื้นที่เริ่มเกม (host ยืนแล้วกดเริ่มได้)</option>
<option value="color">สีช่อง (ทาสีบนกริด)</option>
@@ -427,7 +428,7 @@
</div>
</div>
<script src="js/version.js?v=0.0258"></script>
<script src="js/editor.js?v=0.006131500"></script>
<script src="js/editor.js?v=0.006131501"></script>
<div class="version-tag">v —</div>
<!-- ===== QB overlay layout: map เต็มจอ + แถบเครื่องมือลอย ดัก/พับ/ปิดเปิดได้ (เพิ่มทับ ไม่แตะ editor.js) ===== -->
+33
View File
@@ -101,6 +101,8 @@
let gameType = 'zep';
let lanes = [];
let ground = [], objects = [], blockPlayer = [], interactive = [], startGameArea = [], spawnArea = [], spawn = { x: 1, y: 1 };
/** พื้นที่กำหนดเองสำหรับ "ไอคอนคำถามพิเศษ" — server สุ่มเกิดในช่องนี้ (ยกเว้น gauntlet/stack ที่ใช้ logic เฉพาะ) */
let specialQuizSpawnArea = [];
let quizTrueArea = [], quizFalseArea = [], quizQuestionArea = [], quizGhostArea = [];
let quizCarryHubArea = [], quizCarryOptionArea = [];
/** quiz_carry embed: ช่อง = 1 วางกล่องนับ 3-2-1 บนแมปเมื่อเลือก anchor = grid */
@@ -1873,6 +1875,21 @@
}
}
function ensureSpecialQuizSpawnArea() {
if (!specialQuizSpawnArea.length || specialQuizSpawnArea.length !== height) {
const existing = specialQuizSpawnArea.slice().map(r => r && r.slice());
specialQuizSpawnArea = [];
for (let y = 0; y < height; y++) {
const row = existing[y] && existing[y].length === width ? existing[y].slice() : Array(width).fill(0);
specialQuizSpawnArea.push(row);
}
} else {
for (let y = 0; y < height; y++) {
if (!specialQuizSpawnArea[y] || specialQuizSpawnArea[y].length !== width) specialQuizSpawnArea[y] = Array(width).fill(0);
}
}
}
function syncGridImageBrushInputCaps() {
const wEl = document.getElementById('grid-image-brush-w');
const hEl = document.getElementById('grid-image-brush-h');
@@ -2540,6 +2557,7 @@
interactive = Array(height).fill(0).map(() => Array(width).fill(0));
startGameArea = Array(height).fill(0).map(() => Array(width).fill(0));
spawnArea = Array(height).fill(0).map(() => Array(width).fill(0));
specialQuizSpawnArea = Array(height).fill(0).map(() => Array(width).fill(0));
quizTrueArea = Array(height).fill(0).map(() => Array(width).fill(0));
quizFalseArea = Array(height).fill(0).map(() => Array(width).fill(0));
quizQuestionArea = Array(height).fill(0).map(() => Array(width).fill(0));
@@ -2674,6 +2692,7 @@
ensureInteractive();
ensureStartGameArea();
ensureSpawnArea();
ensureSpecialQuizSpawnArea();
if (gtDraw === 'quiz') ensureQuizAreas();
if (gtDraw === 'quiz_carry') ensureQuizCarryAreas();
if (gtDraw === 'quiz_battle') {
@@ -2811,6 +2830,14 @@
ctx.strokeRect(tx + 2, ty + 2, tileSize - 4, tileSize - 4);
ctx.lineWidth = 1;
}
if (specialQuizSpawnArea[y] && specialQuizSpawnArea[y][x] === 1) {
ctx.fillStyle = 'rgba(236, 72, 200, 0.40)';
ctx.fillRect(tx + 2, ty + 2, tileSize - 4, tileSize - 4);
ctx.strokeStyle = 'rgba(236, 72, 200, 0.95)';
ctx.lineWidth = 2;
ctx.strokeRect(tx + 2, ty + 2, tileSize - 4, tileSize - 4);
ctx.lineWidth = 1;
}
if (gtDraw === 'quiz') {
if (quizQuestionArea[y] && quizQuestionArea[y][x] === 1) {
ctx.fillStyle = 'rgba(255, 214, 102, 0.42)';
@@ -3451,6 +3478,9 @@
if (gt === 'frogger') return;
ensureSpawnArea();
spawnArea[y][x] = left ? 1 : 0;
} else if (drawModeEl.value === 'specialQuizSpawn') {
ensureSpecialQuizSpawnArea();
specialQuizSpawnArea[y][x] = left ? 1 : 0;
} else if (drawModeEl.value === 'startGame') {
const gt = gameTypeEl ? gameTypeEl.value : gameType;
if (gt !== 'lobby') return;
@@ -4269,6 +4299,7 @@
ensureShooterSpawnSlots();
ensureBalloonBossPlayerSlots();
ensureStackAreas();
ensureSpecialQuizSpawnArea();
const fpSave = readCharacterFootprintInputs();
applyCharacterFootprintInputs(fpSave.cw, fpSave.ch);
const bpSepSave = readBlockPlayerSeparationWHForSave();
@@ -4284,6 +4315,7 @@
blockPlayerSeparationW: bpSepSave.w,
blockPlayerSeparationH: bpSepSave.h,
ground, objects, blockPlayer, interactive, startGameArea, spawnArea, spawn, cellColors, showMapInGame,
specialQuizSpawnArea: specialQuizSpawnArea.map(r => r.slice()),
lobbySpawnMode: (() => {
ensureLobbyPlayerSpawnsLength();
sanitizeLobbyPlayerSpawnsInEditor();
@@ -4651,6 +4683,7 @@
interactive = m.interactive && m.interactive.length ? m.interactive.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
startGameArea = m.startGameArea && m.startGameArea.length ? m.startGameArea.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
spawnArea = m.spawnArea && m.spawnArea.length ? m.spawnArea.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
specialQuizSpawnArea = m.specialQuizSpawnArea && m.specialQuizSpawnArea.length ? m.specialQuizSpawnArea.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
quizTrueArea = m.quizTrueArea && m.quizTrueArea.length ? m.quizTrueArea.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
quizFalseArea = m.quizFalseArea && m.quizFalseArea.length ? m.quizFalseArea.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
quizQuestionArea = m.quizQuestionArea && m.quizQuestionArea.length ? m.quizQuestionArea.map(r => r && r.slice()) : Array(height).fill(0).map(() => Array(width).fill(0));
+22
View File
@@ -680,6 +680,26 @@ function pickSpecialQuizSpawnTile(md) {
return { x: cx2 + 0.5, y: cy2 + 0.5 };
}
}
/* " editor" (specialQuizSpawnArea) gauntlet/stack
(สองเกมน return ไปแลวดานบน) 1 องท paint ไว (เลอกชองเดนไดอน) */
if (Array.isArray(md.specialQuizSpawnArea) && md.specialQuizSpawnArea.length) {
const painted = [];
const paintedWalkable = [];
for (let yy = 0; yy < h; yy++) {
const row = md.specialQuizSpawnArea[yy];
if (!row) continue;
for (let xx = 0; xx < w; xx++) {
if (!row[xx]) continue;
painted.push({ x: xx, y: yy });
if (specialQuizTileWalkable(md, xx, yy)) paintedWalkable.push({ x: xx, y: yy });
}
}
const pickFrom = paintedWalkable.length ? paintedWalkable : painted;
if (pickFrom.length) {
const p = pickFrom[Math.floor(Math.random() * pickFrom.length)];
return { x: p.x + 0.5, y: p.y + 0.5 };
}
}
/* seed BFS (spawnArea)
fallback: md.spawn (าเดนได) แลวคอยสแกนหา walkable tile แรก */
let sx = -1;
@@ -4845,6 +4865,7 @@ const server = http.createServer((req, res) => {
if (!m.interactive) m.interactive = [];
if (!m.startGameArea) m.startGameArea = [];
if (!m.spawnArea) m.spawnArea = [];
if (!m.specialQuizSpawnArea) m.specialQuizSpawnArea = [];
if (!m.quizTrueArea) m.quizTrueArea = [];
if (!m.quizFalseArea) m.quizFalseArea = [];
if (!m.quizQuestionArea) m.quizQuestionArea = [];
@@ -4888,6 +4909,7 @@ const server = http.createServer((req, res) => {
if (!m.interactive) m.interactive = [];
if (!m.startGameArea) m.startGameArea = [];
if (!m.spawnArea) m.spawnArea = [];
if (!m.specialQuizSpawnArea) m.specialQuizSpawnArea = [];
if (!m.quizTrueArea) m.quizTrueArea = [];
if (!m.quizFalseArea) m.quizFalseArea = [];
if (!m.quizQuestionArea) m.quizQuestionArea = [];