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:
@@ -5,30 +5,30 @@ import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER,
|
||||
export const navigationMethods = [
|
||||
method('GoLobbyMap', `self.LobbyTpTries = 0
|
||||
local eventId = 0
|
||||
local function go()
|
||||
local function tryTeleport()
|
||||
self.LobbyTpTries = self.LobbyTpTries + 1
|
||||
local lp = _UserService.LocalPlayer
|
||||
if lp ~= nil then
|
||||
if lp.CurrentMapName ~= "${LOBBY_MAP}" then
|
||||
_TeleportService:TeleportToMapPosition(lp, ${LOBBY_SPAWN}, "${LOBBY_MAP}")
|
||||
local localPlayer = _UserService.LocalPlayer
|
||||
if localPlayer ~= nil then
|
||||
if localPlayer.CurrentMapName ~= "${LOBBY_MAP}" then
|
||||
_TeleportService:TeleportToMapPosition(localPlayer, ${LOBBY_SPAWN}, "${LOBBY_MAP}")
|
||||
end
|
||||
_TimerService:ClearTimer(eventId)
|
||||
elseif self.LobbyTpTries > 50 then
|
||||
_TimerService:ClearTimer(eventId)
|
||||
end
|
||||
end
|
||||
eventId = _TimerService:SetTimerRepeat(go, 0.1)`),
|
||||
method('TeleportToActMap', `local maps = { ${ACT_MAPS.map((m) => `"${m}"`).join(', ')} }
|
||||
eventId = _TimerService:SetTimerRepeat(tryTeleport, 0.1)`),
|
||||
method('TeleportToActMap', `local maps = { ${ACT_MAPS.map((mapName) => `"${mapName}"`).join(', ')} }
|
||||
local target = maps[self.Floor]
|
||||
if target == nil then
|
||||
return
|
||||
end
|
||||
local lp = _UserService.LocalPlayer
|
||||
if lp == nil then
|
||||
local localPlayer = _UserService.LocalPlayer
|
||||
if localPlayer == nil then
|
||||
return
|
||||
end
|
||||
if lp.CurrentMapName == target then
|
||||
if localPlayer.CurrentMapName == target then
|
||||
return
|
||||
end
|
||||
_TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)`),
|
||||
_TeleportService:TeleportToMapPosition(localPlayer, Vector3(-6, 0.03, 0), target)`),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user