From 9989a6167516478e4ebb93951568ce7f177791c4 Mon Sep 17 00:00:00 2001 From: gahusb Date: Fri, 12 Jun 2026 14:20:05 +0900 Subject: [PATCH] =?UTF-8?q?fix(ascension):=20RPC=20ExecSpace=20=EC=8B=A4?= =?UTF-8?q?=EC=B8=A1=20=EB=B3=B4=EC=A0=95=20=E2=80=94=20Server=3D5=C2=B7Cl?= =?UTF-8?q?ient=3D6=20(=ED=94=84=EB=A1=9C=EB=B8=8C=20=EA=B2=80=EC=A6=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 1은 ServerOnly(클라 호출 무시)라 저장/로드 RPC 미동작 → 5로 수정 - RecvAscension 6(Client): 서버→특정 클라 userId 라우팅 실측 확인 - 설계 문서 ExecSpace 표 갱신, 프로브 메서드 제거 Co-Authored-By: Claude Opus 4.8 (1M context) --- RootDesk/MyDesk/SlayDeckController.codeblock | 6 +++--- docs/superpowers/specs/2026-06-12-ascension-design.md | 8 ++++---- tools/deck/gen-slaydeck.mjs | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/RootDesk/MyDesk/SlayDeckController.codeblock b/RootDesk/MyDesk/SlayDeckController.codeblock index 82f3aa0..6b3b506 100644 --- a/RootDesk/MyDesk/SlayDeckController.codeblock +++ b/RootDesk/MyDesk/SlayDeckController.codeblock @@ -569,7 +569,7 @@ ], "Code": "local ds = _DataStorageService:GetUserDataStorage(userId)\nlocal errCode, value = ds:GetAndWait(\"ascensionUnlocked\")\nlocal n = 0\nif errCode == 0 and value ~= nil and value ~= \"\" then\n\tn = tonumber(value) or 0\nend\nself:RecvAscension(n, userId)", "Scope": 2, - "ExecSpace": 1, + "ExecSpace": 5, "Attributes": [], "Name": "ReqLoadAscension" }, @@ -599,7 +599,7 @@ ], "Code": "self.AscensionUnlocked = n\nif self.AscensionLevel > self.AscensionUnlocked then\n\tself.AscensionLevel = self.AscensionUnlocked\nend\nself:RenderAscension()", "Scope": 2, - "ExecSpace": 2, + "ExecSpace": 6, "Attributes": [], "Name": "RecvAscension" }, @@ -629,7 +629,7 @@ ], "Code": "local ds = _DataStorageService:GetUserDataStorage(userId)\nds:SetAndWait(\"ascensionUnlocked\", tostring(n))", "Scope": 2, - "ExecSpace": 1, + "ExecSpace": 5, "Attributes": [], "Name": "SaveAscension" }, diff --git a/docs/superpowers/specs/2026-06-12-ascension-design.md b/docs/superpowers/specs/2026-06-12-ascension-design.md index 33d900a..95ab769 100644 --- a/docs/superpowers/specs/2026-06-12-ascension-design.md +++ b/docs/superpowers/specs/2026-06-12-ascension-design.md @@ -21,11 +21,11 @@ ## 서버-클라 구조 (ExecSpace) -codeblock JSON ExecSpace는 플래그 (실측: Server=1·Client=2·ClientOnly=6 — Monster(1)·UIToast/MapCamera(6) 부합): +codeblock JSON ExecSpace 실측(프로브): **Server=5**(클라→서버), **Client=6**(서버→클라·마지막 인자 userId로 특정 유저 라우팅), 1=ServerOnly(클라 호출 무시), 2=ClientOnly(서버 호출 무시). 기존 메서드의 6은 Client라 클라 호출 시 제자리 실행으로 동작 동일: -- `ReqLoadAscension(userId)` **[Server=1]** — 클라 OnBeginPlay에서 호출 → 서버에서 `GetAndWait("ascensionUnlocked")` → `RecvAscension(n, userId)` 호출 -- `RecvAscension(n, userId)` **[Client=2]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더 -- `SaveAscension(n, userId)` **[Server=1]** — `SetAndWait` +- `ReqLoadAscension(userId)` **[Server=5]** — 클라 OnBeginPlay에서 호출 → 서버에서 `GetAndWait("ascensionUnlocked")` → `RecvAscension(n, userId)` 호출 +- `RecvAscension(n, userId)` **[Client=6]** — 마지막 파라미터 userId로 **요청한 클라이언트에만** 응답 (MSW 공식 패턴) → `AscensionUnlocked` 갱신·메뉴 렌더 +- `SaveAscension(n, userId)` **[Server=5]** — `SetAndWait` - 생성기의 `m.ExecSpace = 6` 일괄 적용을 "명시값(≠0)은 보존"으로 수정 ## 적용 지점 diff --git a/tools/deck/gen-slaydeck.mjs b/tools/deck/gen-slaydeck.mjs index b6490f1..18bc5d9 100644 --- a/tools/deck/gen-slaydeck.mjs +++ b/tools/deck/gen-slaydeck.mjs @@ -2475,7 +2475,7 @@ local n = 0 if errCode == 0 and value ~= nil and value ~= "" then n = tonumber(value) or 0 end -self:RecvAscension(n, userId)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' }], 1), +self:RecvAscension(n, userId)`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' }], 5), method('RecvAscension', `self.AscensionUnlocked = n if self.AscensionLevel > self.AscensionUnlocked then self.AscensionLevel = self.AscensionUnlocked @@ -2483,12 +2483,12 @@ end self:RenderAscension()`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' }, - ], 2), + ], 6), method('SaveAscension', `local ds = _DataStorageService:GetUserDataStorage(userId) ds:SetAndWait("ascensionUnlocked", tostring(n))`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'n' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'userId' }, - ], 1), + ], 5), method('AdjustAscension', `local v = self.AscensionLevel + delta if v < 0 then v = 0 end if v > self.AscensionUnlocked then v = self.AscensionUnlocked end