feat(lobby): 로비 허브 + NPC 4종 + 반복 런 루프 (P14-8)
- LobbyHud: 메이플 로비 화면. NPC 4종 클릭 — 모험가(런 시작)·사서(카드 도감)· 상인(영혼 상점)·안내원(게시판) + 승천 +/- + 영혼 수치 표시 - ShowState "lobby" 추가, OnBeginPlay·EndRun → ShowLobby (첫 실행/패배/클리어 모두 로비 기점, 반복 런 루프). ShowLobby가 BindMenuButtons도 호출(전직 버튼 바인딩 보존) - 카드 도감: DeckAllHud 재사용(CodexMode) — 저주 제외 전 카드 표시, 닫으면 로비 복귀 - 게시판(BoardHud): 게임 규칙/팁 패널. 영혼 상점(SoulShopHud): 셸(P9에서 해금 채움) - guid 네임스페이스 lob/brd/soul 추가(id 충돌 방지). 산출물 재생성(id 유일성 검증 통과) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -204,6 +204,34 @@
|
||||
"Attributes": [],
|
||||
"Name": "AllDeckCloseHandler"
|
||||
},
|
||||
{
|
||||
"Type": "number",
|
||||
"DefaultValue": "0",
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": "SoulPoints"
|
||||
},
|
||||
{
|
||||
"Type": "boolean",
|
||||
"DefaultValue": "false",
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": "LobbyBound"
|
||||
},
|
||||
{
|
||||
"Type": "boolean",
|
||||
"DefaultValue": "false",
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": "CodexMode"
|
||||
},
|
||||
{
|
||||
"Type": "any",
|
||||
"DefaultValue": "nil",
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": "CodexCards"
|
||||
},
|
||||
{
|
||||
"Type": "string",
|
||||
"DefaultValue": "\"\"",
|
||||
@@ -565,7 +593,7 @@
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:ShowMainMenu()\nlocal lp = _UserService.LocalPlayer\nif lp ~= nil then\n\tself:ReqLoadAscension(lp.PlayerComponent.UserId)\nend",
|
||||
"Code": "self:ShowLobby()\nlocal lp = _UserService.LocalPlayer\nif lp ~= nil then\n\tself:ReqLoadAscension(lp.PlayerComponent.UserId)\nend",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
@@ -686,7 +714,7 @@
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:SetText(\"/ui/DefaultGroup/MainMenu/AscLabel\", \"승천 \" .. string.format(\"%d\", self.AscensionLevel) .. \" / 해금 \" .. string.format(\"%d\", self.AscensionUnlocked))",
|
||||
"Code": "self:SetText(\"/ui/DefaultGroup/MainMenu/AscLabel\", \"승천 \" .. string.format(\"%d\", self.AscensionLevel) .. \" / 해금 \" .. string.format(\"%d\", self.AscensionUnlocked))\nself:SetText(\"/ui/DefaultGroup/LobbyHud/AscLabel\", \"승천 \" .. string.format(\"%d\", self.AscensionLevel) .. \" / 해금 \" .. string.format(\"%d\", self.AscensionUnlocked))",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
@@ -776,7 +804,7 @@
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/Button_Attack\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/Button_Jump\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/UIJoystick\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RewardHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/JobChoiceHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/JobSelectHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckInspectHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckAllHud\", false)",
|
||||
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/Button_Attack\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/Button_Jump\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/UIJoystick\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RewardHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/JobChoiceHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/JobSelectHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckInspectHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/DeckAllHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/LobbyHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/BoardHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/SoulShopHud\", false)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
@@ -799,7 +827,7 @@
|
||||
"Name": "state"
|
||||
}
|
||||
],
|
||||
"Code": "self:HideGameHud()\nself:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", state == \"menu\")\nself:SetEntityEnabled(\"/ui/DefaultGroup/CharacterSelectHud\", state == \"charselect\")\nif state == \"map\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", true)\nelseif state == \"combat\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nelseif state == \"shop\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", true)\nelseif state == \"rest\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", true)\nelseif state == \"treasure\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud\", true)\nend",
|
||||
"Code": "self:HideGameHud()\nself:SetEntityEnabled(\"/ui/DefaultGroup/MainMenu\", state == \"menu\")\nself:SetEntityEnabled(\"/ui/DefaultGroup/CharacterSelectHud\", state == \"charselect\")\nself:SetEntityEnabled(\"/ui/DefaultGroup/LobbyHud\", state == \"lobby\")\nif state == \"map\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/MapHud\", true)\nelseif state == \"combat\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CombatHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/DeckHud\", true)\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/CardHand\", true)\nelseif state == \"shop\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/ShopHud\", true)\nelseif state == \"rest\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/RestHud\", true)\nelseif state == \"treasure\" then\n\tself:SetEntityEnabled(\"/ui/DefaultGroup/TreasureHud\", true)\nend",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
@@ -835,6 +863,126 @@
|
||||
"Attributes": [],
|
||||
"Name": "BindMenuButtons"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self.SelectedClass = \"\"\nself:RenderAscension()\nself:RenderSoulLabel()\nself:ShowState(\"lobby\")\nself:SetEntityEnabled(\"/ui/DefaultGroup/BoardHud\", false)\nself:SetEntityEnabled(\"/ui/DefaultGroup/SoulShopHud\", false)\nself:BindLobbyButtons()\nself:BindMenuButtons()",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "ShowLobby"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "local s = self.SoulPoints or 0\nself:SetText(\"/ui/DefaultGroup/LobbyHud/SoulLabel\", \"영혼 \" .. string.format(\"%d\", s))\nself:SetText(\"/ui/DefaultGroup/SoulShopHud/Souls\", \"영혼 \" .. string.format(\"%d\", s))",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "RenderSoulLabel"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "if self.LobbyBound == true then\n\treturn\nend\nself.LobbyBound = true\nlocal function bindClick(path, fn)\n\tlocal e = _EntityService:GetEntityByPath(path)\n\tif e ~= nil and e.ButtonComponent ~= nil then\n\t\te:ConnectEvent(ButtonClickEvent, fn)\n\tend\nend\nbindClick(\"/ui/DefaultGroup/LobbyHud/NpcRun\", function() self:ShowCharacterSelect() end)\nbindClick(\"/ui/DefaultGroup/LobbyHud/NpcCodex\", function() self:ShowCodex() end)\nbindClick(\"/ui/DefaultGroup/LobbyHud/NpcShop\", function() self:ShowSoulShop() end)\nbindClick(\"/ui/DefaultGroup/LobbyHud/NpcBoard\", function() self:ShowBoard() end)\nbindClick(\"/ui/DefaultGroup/LobbyHud/AscMinus\", function() self:AdjustAscension(-1) end)\nbindClick(\"/ui/DefaultGroup/LobbyHud/AscPlus\", function() self:AdjustAscension(1) end)\nbindClick(\"/ui/DefaultGroup/BoardHud/Close\", function() self:CloseBoard() end)\nbindClick(\"/ui/DefaultGroup/SoulShopHud/Close\", function() self:CloseSoulShop() end)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "BindLobbyButtons"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self.CodexMode = true\nlocal list = {}\nfor id, c in pairs(self.Cards) do\n\tif c.curse ~= true then\n\t\ttable.insert(list, id)\n\tend\nend\ntable.sort(list)\nself.CodexCards = list\nlocal close = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Close\")\nif close ~= nil and close.ButtonComponent ~= nil then\n\tif self.AllDeckCloseHandler ~= nil then\n\t\tclose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler)\n\tend\n\tself.AllDeckCloseHandler = close:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end)\nend\nself:SetEntityEnabled(\"/ui/DefaultGroup/LobbyHud\", false)\nlocal hud = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud\")\nif hud ~= nil then\n\thud.Enable = true\nend\nself:RenderAllDeck()",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "ShowCodex"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/BoardHud\", true)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "ShowBoard"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/BoardHud\", false)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "CloseBoard"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:RenderSoulLabel()\nself:SetEntityEnabled(\"/ui/DefaultGroup/SoulShopHud\", true)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "ShowSoulShop"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
"DefaultValue": null,
|
||||
"SyncDirection": 0,
|
||||
"Attributes": [],
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self:SetEntityEnabled(\"/ui/DefaultGroup/SoulShopHud\", false)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
"Name": "CloseSoulShop"
|
||||
},
|
||||
{
|
||||
"Return": {
|
||||
"Type": "void",
|
||||
@@ -1288,7 +1436,7 @@
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "self.DeckAllOpen = false\nlocal hud = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud\")\nif hud ~= nil then\n\thud.Enable = false\nend",
|
||||
"Code": "self.DeckAllOpen = false\nlocal hud = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud\")\nif hud ~= nil then\n\thud.Enable = false\nend\nif self.CodexMode == true then\n\tself.CodexMode = false\n\tself:ShowLobby()\nend",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
@@ -1303,7 +1451,7 @@
|
||||
"Name": null
|
||||
},
|
||||
"Arguments": [],
|
||||
"Code": "local pile = self.RunDeck or {}\nlocal count = #pile\nself:SetText(\"/ui/DefaultGroup/DeckAllHud/Title\", \"모든 덱 (\" .. tostring(count) .. \")\")\nlocal empty = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Empty\")\nif empty ~= nil then\n\tempty.Enable = count <= 0\nend\nfor i = 1, 120 do\n\tlocal e = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Grid/Card\" .. tostring(i))\n\tif e ~= nil then\n\t\tlocal cardId = pile[i]\n\t\tif cardId == nil then\n\t\t\te.Enable = false\n\t\telse\n\t\t\te.Enable = true\n\t\t\tself:ApplyAllDeckCardVisual(i, cardId)\n\t\tend\n\tend\nend",
|
||||
"Code": "local pile = self.RunDeck or {}\nlocal title = \"모든 덱\"\nif self.CodexMode == true then\n\tpile = self.CodexCards or {}\n\ttitle = \"카드 도감\"\nend\nlocal count = #pile\nself:SetText(\"/ui/DefaultGroup/DeckAllHud/Title\", title .. \" (\" .. tostring(count) .. \")\")\nlocal empty = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Empty\")\nif empty ~= nil then\n\tempty.Enable = count <= 0\nend\nfor i = 1, 120 do\n\tlocal e = _EntityService:GetEntityByPath(\"/ui/DefaultGroup/DeckAllHud/Grid/Card\" .. tostring(i))\n\tif e ~= nil then\n\t\tlocal cardId = pile[i]\n\t\tif cardId == nil then\n\t\t\te.Enable = false\n\t\telse\n\t\t\te.Enable = true\n\t\t\tself:ApplyAllDeckCardVisual(i, cardId)\n\t\tend\n\tend\nend",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
@@ -2064,7 +2212,7 @@
|
||||
"Name": "text"
|
||||
}
|
||||
],
|
||||
"Code": "local msg = text\nif text == \"런 클리어!\" and self.AscensionLevel >= self.AscensionUnlocked and self.AscensionUnlocked < 10 then\n\tself.AscensionUnlocked = self.AscensionUnlocked + 1\n\tlocal lp = _UserService.LocalPlayer\n\tif lp ~= nil then\n\t\tself:SaveAscension(self.AscensionUnlocked, lp.PlayerComponent.UserId)\n\tend\n\tself:RenderAscension()\n\tmsg = \"런 클리어! 승천 \" .. string.format(\"%d\", self.AscensionUnlocked) .. \" 해금!\"\nend\nself:ShowResult(msg)\nself.RunActive = false\n_TimerService:SetTimerOnce(function() self:ShowMainMenu() end, 4)",
|
||||
"Code": "local msg = text\nif text == \"런 클리어!\" and self.AscensionLevel >= self.AscensionUnlocked and self.AscensionUnlocked < 10 then\n\tself.AscensionUnlocked = self.AscensionUnlocked + 1\n\tlocal lp = _UserService.LocalPlayer\n\tif lp ~= nil then\n\t\tself:SaveAscension(self.AscensionUnlocked, lp.PlayerComponent.UserId)\n\tend\n\tself:RenderAscension()\n\tmsg = \"런 클리어! 승천 \" .. string.format(\"%d\", self.AscensionUnlocked) .. \" 해금!\"\nend\nself:ShowResult(msg)\nself.RunActive = false\n_TimerService:SetTimerOnce(function() self:ShowLobby() end, 4)",
|
||||
"Scope": 2,
|
||||
"ExecSpace": 6,
|
||||
"Attributes": [],
|
||||
|
||||
Reference in New Issue
Block a user