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