0.2.3: Clementia S2 releases a dead, hidden, uncarriable or pathless rider at once (slot and weight back before the same tick's boarding checks); same-browser match recovery never takes the seat of a window that is reloading or still starting (a tab keeps its own session token; seats are stamped at the server's welcome, the older welcome wins); golden: diy-135 moves (outcome unchanged)
This commit is contained in:
1 parent
821ab827bd
commit
ba5b998a72
19 files changed
+580
-60
No files matched your search
@@ -127,6 +127,7 @@ export const ANIM = Object.freeze({ IDLE: 0, MOVE: 1, ATTACK: 2, SKILL: 3, DIE:
|
||||
|
||||
export const ERR = Object.freeze({
|
||||
BAD_MSG: 'BAD_MSG', // malformed / unknown message
|
||||
SESSION_IN_USE: 'SESSION_IN_USE', // a local recovery candidate cannot replace the connected holder
|
||||
RATE: 'RATE', // rate limited
|
||||
NOT_IN_ROOM: 'NOT_IN_ROOM',
|
||||
ROOM_NOT_FOUND: 'ROOM_NOT_FOUND',
|
||||
@@ -151,6 +152,7 @@ export const ERR = Object.freeze({
|
||||
});
|
||||
|
||||
export const ERR_TEXT = {
|
||||
SESSION_IN_USE: N_('此对局仍在其他窗口中,或当前浏览器无法安全恢复。请关闭原窗口后重试。'),
|
||||
BAD_MSG: N_('无效的请求'), RATE: N_('操作过于频繁'), NOT_IN_ROOM: N_('你不在房间中'), ROOM_NOT_FOUND: N_('未找到该同盟密钥对应的房间'),
|
||||
ROOM_FULL: N_('房间已满'), ROOM_STARTED: N_('模拟已开始'), NOT_HOST: N_('只有房主可以操作'), NOT_READY: N_('仍有玩家未就绪'),
|
||||
WRONG_PHASE: N_('当前阶段无法进行该操作'), NO_FUNDS: N_('资金不足'), HAND_FULL: N_('整备区已满'), BOARD_FULL: N_('已达到部署上限'),
|
||||
|
||||
+2
-1
@@ -378,7 +378,8 @@ const target = (v) => {
|
||||
/** @type {Record<string, Record<string, (v:any)=>boolean> & { $optional?: string[] }>} */
|
||||
export const C2S = {
|
||||
// session & lobby
|
||||
hello: { name: (v) => isStr(v, NAME_MAX_LEN) && v.trim().length > 0, token: (v) => v == null || isStr(v, 64), version: (v) => v == null || isInt(v, 0, 1e6), $optional: ['token', 'version'] },
|
||||
hello: { name: (v) => isStr(v, NAME_MAX_LEN) && v.trim().length > 0, token: (v) => v == null || isStr(v, 64), version: (v) => v == null || isInt(v, 0, 1e6),
|
||||
noReplace: isBool, claimAt: (v) => isNum(v, 0, Number.MAX_SAFE_INTEGER), $optional: ['token', 'version', 'noReplace', 'claimAt'] },
|
||||
ping: { c: (v) => typeof v === 'number' && Number.isFinite(v) },
|
||||
'room.create': { mode: (v) => v === 'solo' || v === 'coop', difficulty: (v) => DIFFICULTIES.includes(v) },
|
||||
'room.join': { code: (v) => isStr(v, ROOM_CODE_LEN + 2) && /^[A-Za-z0-9]+$/.test(v) },
|
||||
|
||||
Reference in new issue
Block a user