refactor(cb): 분리 모듈 단일문자 지역변수 의미명으로 개명

손댄 모듈(screens·navigation·layout)의 단일문자 Lua 지역변수를
의미가 드러나는 이름으로 변경(규칙 시연):
- ActivateUIGroups: grp/n/g → enableGroup/name/group
- RenderSoulLabel: s → soulPoints
- BindLobbyButtons: e/fn → entity/handler
- GoLobbyMap: lp/go → localPlayer/tryTeleport
- TeleportToActMap: lp → localPlayer
- PositionMonsterSlot: m/tr/wp/e → monster/transform/worldPos/slotEntity

검증: cbset = 위 6개 메서드만 본문 변경(추가/삭제 0), cbgap GAP 0, 테스트 93/93.
산출물 재생성(SlayDeckController.codeblock) 포함.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-26 18:39:39 +09:00
parent 8d2e320d60
commit 0c1dfd3162
4 changed files with 200 additions and 200 deletions

View File

@@ -1268,7 +1268,7 @@
"Name": null
},
"Arguments": [],
"Code": "local function grp(n)\n\tlocal g = _EntityService:GetEntityByPath(\"/ui/\" .. n)\n\tif g ~= nil then g:SetEnable(true) end\nend\ngrp(\"SelectUIGroup\")\ngrp(\"LobbyUIGroup\")\ngrp(\"RunUIGroup\")\ngrp(\"DeckUIGroup\")",
"Code": "local function enableGroup(name)\n\tlocal group = _EntityService:GetEntityByPath(\"/ui/\" .. name)\n\tif group ~= nil then group:SetEnable(true) end\nend\nenableGroup(\"SelectUIGroup\")\nenableGroup(\"LobbyUIGroup\")\nenableGroup(\"RunUIGroup\")\nenableGroup(\"DeckUIGroup\")",
"Scope": 2,
"ExecSpace": 2,
"Attributes": [],
@@ -1351,7 +1351,7 @@
"Name": null
},
"Arguments": [],
"Code": "local s = self.SoulPoints or 0\nself:SetText(\"/ui/LobbyUIGroup/LobbyHud/SoulLabel\", \"영혼 \" .. string.format(\"%d\", s))\nself:SetText(\"/ui/LobbyUIGroup/SoulShopHud/Souls\", \"영혼 \" .. string.format(\"%d\", s))",
"Code": "local soulPoints = self.SoulPoints or 0\nself:SetText(\"/ui/LobbyUIGroup/LobbyHud/SoulLabel\", \"영혼 \" .. string.format(\"%d\", soulPoints))\nself:SetText(\"/ui/LobbyUIGroup/SoulShopHud/Souls\", \"영혼 \" .. string.format(\"%d\", soulPoints))",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
@@ -1366,7 +1366,7 @@
"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 or e:AddComponent(\"ButtonComponent\") ~= nil) then\n\t\te:ConnectEvent(ButtonClickEvent, fn)\n\tend\nend\nbindClick(\"/ui/LobbyUIGroup/LobbyHud/AscMinus\", function() self:AdjustAscension(-1) end)\nbindClick(\"/ui/LobbyUIGroup/LobbyHud/AscPlus\", function() self:AdjustAscension(1) end)\nbindClick(\"/ui/LobbyUIGroup/BoardHud/Close\", function() self:CloseBoard() end)\nbindClick(\"/ui/LobbyUIGroup/SoulShopHud/Close\", function() self:CloseSoulShop() end)",
"Code": "if self.LobbyBound == true then\n\treturn\nend\nself.LobbyBound = true\nlocal function bindClick(path, handler)\n\tlocal entity = _EntityService:GetEntityByPath(path)\n\tif entity ~= nil and (entity.ButtonComponent ~= nil or entity:AddComponent(\"ButtonComponent\") ~= nil) then\n\t\tentity:ConnectEvent(ButtonClickEvent, handler)\n\tend\nend\nbindClick(\"/ui/LobbyUIGroup/LobbyHud/AscMinus\", function() self:AdjustAscension(-1) end)\nbindClick(\"/ui/LobbyUIGroup/LobbyHud/AscPlus\", function() self:AdjustAscension(1) end)\nbindClick(\"/ui/LobbyUIGroup/BoardHud/Close\", function() self:CloseBoard() end)\nbindClick(\"/ui/LobbyUIGroup/SoulShopHud/Close\", function() self:CloseSoulShop() end)",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
@@ -1449,7 +1449,7 @@
"Name": null
},
"Arguments": [],
"Code": "self.LobbyTpTries = 0\nlocal eventId = 0\nlocal function go()\n\tself.LobbyTpTries = self.LobbyTpTries + 1\n\tlocal lp = _UserService.LocalPlayer\n\tif lp ~= nil then\n\t\tif lp.CurrentMapName ~= \"lobby\" then\n\t\t\t_TeleportService:TeleportToMapPosition(lp, Vector3(-5, 0.03, 0), \"lobby\")\n\t\tend\n\t\t_TimerService:ClearTimer(eventId)\n\telseif self.LobbyTpTries > 50 then\n\t\t_TimerService:ClearTimer(eventId)\n\tend\nend\neventId = _TimerService:SetTimerRepeat(go, 0.1)",
"Code": "self.LobbyTpTries = 0\nlocal eventId = 0\nlocal function tryTeleport()\n\tself.LobbyTpTries = self.LobbyTpTries + 1\n\tlocal localPlayer = _UserService.LocalPlayer\n\tif localPlayer ~= nil then\n\t\tif localPlayer.CurrentMapName ~= \"lobby\" then\n\t\t\t_TeleportService:TeleportToMapPosition(localPlayer, Vector3(-5, 0.03, 0), \"lobby\")\n\t\tend\n\t\t_TimerService:ClearTimer(eventId)\n\telseif self.LobbyTpTries > 50 then\n\t\t_TimerService:ClearTimer(eventId)\n\tend\nend\neventId = _TimerService:SetTimerRepeat(tryTeleport, 0.1)",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
@@ -1464,7 +1464,7 @@
"Name": null
},
"Arguments": [],
"Code": "local maps = { \"map01\", \"map02\", \"map03\", \"map04\", \"map05\" }\nlocal target = maps[self.Floor]\nif target == nil then\n\treturn\nend\nlocal lp = _UserService.LocalPlayer\nif lp == nil then\n\treturn\nend\nif lp.CurrentMapName == target then\n\treturn\nend\n_TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)",
"Code": "local maps = { \"map01\", \"map02\", \"map03\", \"map04\", \"map05\" }\nlocal target = maps[self.Floor]\nif target == nil then\n\treturn\nend\nlocal localPlayer = _UserService.LocalPlayer\nif localPlayer == nil then\n\treturn\nend\nif localPlayer.CurrentMapName == target then\n\treturn\nend\n_TeleportService:TeleportToMapPosition(localPlayer, Vector3(-6, 0.03, 0), target)",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],
@@ -4285,7 +4285,7 @@
"Name": "slot"
}
],
"Code": "local m = self.Monsters[slot]\nif m == nil or m.entity == nil or not isvalid(m.entity) then\n\treturn\nend\nlocal tr = m.entity.TransformComponent\nif tr == nil then\n\treturn\nend\nlocal wp = tr.WorldPosition\nlocal screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + 1.4))\nlocal uipos = _UILogic:ScreenToUIPosition(screen)\nlocal e = _EntityService:GetEntityByPath(\"/ui/RunUIGroup/CombatHud/MonsterStatus\" .. tostring(slot))\nif e ~= nil and e.UITransformComponent ~= nil then\n\te.UITransformComponent.anchoredPosition = uipos\nend",
"Code": "local monster = self.Monsters[slot]\nif monster == nil or monster.entity == nil or not isvalid(monster.entity) then\n\treturn\nend\nlocal transform = monster.entity.TransformComponent\nif transform == nil then\n\treturn\nend\nlocal worldPos = transform.WorldPosition\nlocal screen = _UILogic:WorldToScreenPosition(Vector2(worldPos.x, worldPos.y + 1.4))\nlocal uipos = _UILogic:ScreenToUIPosition(screen)\nlocal slotEntity = _EntityService:GetEntityByPath(\"/ui/RunUIGroup/CombatHud/MonsterStatus\" .. tostring(slot))\nif slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then\n\tslotEntity.UITransformComponent.anchoredPosition = uipos\nend",
"Scope": 2,
"ExecSpace": 6,
"Attributes": [],