diff --git a/tools/deck/cb/boot.mjs b/tools/deck/cb/boot.mjs index 7201167..540a16c 100644 --- a/tools/deck/cb/boot.mjs +++ b/tools/deck/cb/boot.mjs @@ -50,7 +50,7 @@ if v > self.AscensionUnlocked then v = self.AscensionUnlocked end self.AscensionLevel = v self:RenderAscension()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'delta' }]), method('RenderAscension', `self:SetText("/ui/DefaultGroup/MainMenu/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked)) -self:SetText("/ui/DefaultGroup/LobbyHud/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))`), +self:SetText("/ui/LobbyUIGroup/LobbyHud/AscLabel", "승천 " .. string.format("%d", self.AscensionLevel) .. " / 해금 " .. string.format("%d", self.AscensionUnlocked))`), method('AscHpMult', `local m = 1 if self.AscensionLevel >= 1 then m = m + 0.1 end if self.AscensionLevel >= 6 then m = m + 0.1 end diff --git a/tools/deck/cb/charselect.mjs b/tools/deck/cb/charselect.mjs index e47ae29..da07c2c 100644 --- a/tools/deck/cb/charselect.mjs +++ b/tools/deck/cb/charselect.mjs @@ -10,19 +10,19 @@ self:RenderCharacterSelect()`), self:RenderCharacterSelect()`, [ { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }, ]), - method('RenderCharacterSelect', `local warriorArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton/Art") + method('RenderCharacterSelect', `local warriorArt = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton/Art") if warriorArt ~= nil and warriorArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["warrior"] ~= nil then warriorArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["warrior"] end -local mageArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton/Art") +local mageArt = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton/Art") if mageArt ~= nil and mageArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["magician"] ~= nil then mageArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["magician"] end -local thiefArt = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton/Art") +local thiefArt = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/ThiefButton/Art") if thiefArt ~= nil and thiefArt.SpriteGUIRendererComponent ~= nil and self.ClassPortraits ~= nil and self.ClassPortraits["bandit"] ~= nil then thiefArt.SpriteGUIRendererComponent.ImageRUID = self.ClassPortraits["bandit"] end -local warrior = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton") +local warrior = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton") if warrior ~= nil and warrior.SpriteGUIRendererComponent ~= nil then if self.SelectedClass == "warrior" then warrior.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1) @@ -30,7 +30,7 @@ if warrior ~= nil and warrior.SpriteGUIRendererComponent ~= nil then warrior.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1) end end -local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton") +local mage = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton") if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then if self.SelectedClass == "magician" then mage.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1) @@ -38,7 +38,7 @@ if mage ~= nil and mage.SpriteGUIRendererComponent ~= nil then mage.SpriteGUIRendererComponent.Color = Color(0.16, 0.2, 0.26, 1) end end -local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton") +local thief = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/ThiefButton") if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then if self.SelectedClass == "bandit" then thief.SpriteGUIRendererComponent.Color = Color(1, 0.82, 0.3, 1) @@ -47,16 +47,16 @@ if thief ~= nil and thief.SpriteGUIRendererComponent ~= nil then end end if self.SelectedClass == "warrior" then - self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "전사 선택됨") + self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "전사 선택됨") elseif self.SelectedClass == "bandit" then - self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "도적 선택됨") + self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "도적 선택됨") elseif self.SelectedClass == "magician" then - self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "마법사 선택됨") + self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "마법사 선택됨") else - self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 선택하고 시작하세요") + self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "직업을 선택하고 시작하세요") end`), method('StartNewGame', `if self.SelectedClass ~= "warrior" and self.SelectedClass ~= "bandit" and self.SelectedClass ~= "magician" then - self:SetText("/ui/DefaultGroup/CharacterSelectHud/Status", "직업을 먼저 선택하세요") + self:SetText("/ui/SelectUIGroup/CharacterSelectHud/Status", "직업을 먼저 선택하세요") return end self:StartRun()`), diff --git a/tools/deck/cb/combat.mjs b/tools/deck/cb/combat.mjs index 56a58d3..321e290 100644 --- a/tools/deck/cb/combat.mjs +++ b/tools/deck/cb/combat.mjs @@ -75,9 +75,9 @@ for i = 1, #self.Monsters do local m = self.Monsters[i] local active = false if m ~= nil and m.alive == true and i == shownTarget then active = true end - self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetFrame", active) - self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetMarker", active and dragActive) - self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) .. "/TargetMarker/Label", active and dragActive) + self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetFrame", active) + self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetMarker", active and dragActive) + self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) .. "/TargetMarker/Label", active and dragActive) end`), method('OnCardDragBegin', `if self.CombatOver == true or self.FxBusy == true or self.TurnBusy == true then return @@ -90,7 +90,7 @@ if self.CardHoverTweenId ~= nil and self.CardHoverTweenId ~= 0 then self.CardHoverTweenId = 0 end for i = 1, 10 do - local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i)) + local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i)) if e ~= nil and e.UITransformComponent ~= nil then e.UITransformComponent.UIScale = Vector3(1, 1, 1) e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(i), 0) @@ -102,7 +102,7 @@ self:RenderTargetFrames()`, [{ Type: 'number', DefaultValue: null, SyncDirection method('OnCardDrag', `if self.DragSlot ~= slot then return end -local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot)) +local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot)) if e ~= nil and e.UITransformComponent ~= nil then local ui = _UILogic:ScreenToUIPosition(touchPoint) e.UITransformComponent.anchoredPosition = Vector2(ui.x, ui.y + 360) @@ -124,7 +124,7 @@ end`, [ return end self.DragSlot = 0 -local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot)) +local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot)) if e ~= nil and e.UITransformComponent ~= nil then e.UITransformComponent.anchoredPosition = Vector2(self:GetHandSlotX(slot), 0) e.UITransformComponent.UIScale = Vector3(1, 1, 1) @@ -207,7 +207,7 @@ if m == nil or m.alive ~= true or m.entity == nil or not isvalid(m.entity) then return end self.FxBusy = true -local fx = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/SkillFx") +local fx = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/SkillFx") if fx ~= nil then if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then fx.SpriteGUIRendererComponent.ImageRUID = image @@ -238,7 +238,7 @@ end, 0.35)`, [ { Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pierce' }, ]), method('PlayAoeFx', `self.FxBusy = true -local fx = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/SkillFx") +local fx = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/SkillFx") if fx ~= nil then if fx.SpriteGUIRendererComponent ~= nil and image ~= nil and image ~= "" then fx.SpriteGUIRendererComponent.ImageRUID = image @@ -287,7 +287,7 @@ if m.entity ~= nil and isvalid(m.entity) then local ent = m.entity _TimerService:SetTimerOnce(function() if isvalid(ent) then ent:SetVisible(false) end end, 0.4) end -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(slot), false) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(slot), false) for i = 1, #self.Monsters do if self.Monsters[i].alive == true then self.TargetIndex = i; break end end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]), @@ -341,7 +341,7 @@ if idx == 0 or self.PlayerHp <= 0 then return end local m = self.Monsters[idx] -local base = "/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(idx) +local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(idx) self:SetEntityEnabled(base .. "/ActFrame", true) _TimerService:SetTimerOnce(function() if m.poison ~= nil and m.poison > 0 then diff --git a/tools/deck/cb/deckturn.mjs b/tools/deck/cb/deckturn.mjs index 2323968..a101720 100644 --- a/tools/deck/cb/deckturn.mjs +++ b/tools/deck/cb/deckturn.mjs @@ -10,7 +10,7 @@ for i = #list, 2, -1 do \tlocal j = math.random(1, i) \tlist[i], list[j] = list[j], list[i] end`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'list' }]), - method('BindButtons', `local endTurn = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/EndTurnButton") + method('BindButtons', `local endTurn = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/EndTurnButton") if endTurn ~= nil and endTurn.ButtonComponent ~= nil then if self.EndTurnHandler ~= nil then endTurn:DisconnectEvent(ButtonClickEvent, self.EndTurnHandler) @@ -18,7 +18,7 @@ if endTurn ~= nil and endTurn.ButtonComponent ~= nil then end self.EndTurnHandler = endTurn:ConnectEvent(ButtonClickEvent, function() self:EndPlayerTurn() end) end -local drawPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/DrawPile") +local drawPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/DrawPile") if drawPile ~= nil and drawPile.ButtonComponent ~= nil then if self.DrawPileHandler ~= nil then drawPile:DisconnectEvent(ButtonClickEvent, self.DrawPileHandler) @@ -26,7 +26,7 @@ if drawPile ~= nil and drawPile.ButtonComponent ~= nil then end self.DrawPileHandler = drawPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("draw") end) end -local discardPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/DiscardPile") +local discardPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/DiscardPile") if discardPile ~= nil and discardPile.ButtonComponent ~= nil then if self.DiscardPileHandler ~= nil then discardPile:DisconnectEvent(ButtonClickEvent, self.DiscardPileHandler) @@ -34,7 +34,7 @@ if discardPile ~= nil and discardPile.ButtonComponent ~= nil then end self.DiscardPileHandler = discardPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("discard") end) end -local exhaustPile = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckHud/ExhaustPile") +local exhaustPile = _EntityService:GetEntityByPath("/ui/RunUIGroup/DeckHud/ExhaustPile") if exhaustPile ~= nil and exhaustPile.ButtonComponent ~= nil then if self.ExhaustPileHandler ~= nil then exhaustPile:DisconnectEvent(ButtonClickEvent, self.ExhaustPileHandler) @@ -42,7 +42,7 @@ if exhaustPile ~= nil and exhaustPile.ButtonComponent ~= nil then end self.ExhaustPileHandler = exhaustPile:ConnectEvent(ButtonClickEvent, function() self:OpenDeckInspect("exhaust") end) end -local inspectClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Close") +local inspectClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Close") if inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then if self.DeckInspectCloseHandler ~= nil then inspectClose:DisconnectEvent(ButtonClickEvent, self.DeckInspectCloseHandler) @@ -50,7 +50,7 @@ if inspectClose ~= nil and inspectClose.ButtonComponent ~= nil then end self.DeckInspectCloseHandler = inspectClose:ConnectEvent(ButtonClickEvent, function() self:CloseDeckInspect() end) end -local allDeckButton = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/AllDeckButton") +local allDeckButton = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/AllDeckButton") if allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then if self.AllDeckHandler ~= nil then allDeckButton:DisconnectEvent(ButtonClickEvent, self.AllDeckHandler) @@ -58,7 +58,7 @@ if allDeckButton ~= nil and allDeckButton.ButtonComponent ~= nil then end self.AllDeckHandler = allDeckButton:ConnectEvent(ButtonClickEvent, function() self:OpenAllDeck() end) end -local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close") +local allDeckClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close") if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then if self.AllDeckCloseHandler ~= nil then allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler) @@ -68,9 +68,9 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then end self:BindClassDeckTabs() for i = 1, 10 do - local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i)) + local cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i)) if cardEntity ~= nil and cardEntity.UITouchReceiveComponent ~= nil then - local cardPath = "/ui/DefaultGroup/CardHand/Card" .. tostring(i) + local cardPath = "/ui/RunUIGroup/CardHand/Card" .. tostring(i) cardEntity:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end) cardEntity:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end) cardEntity:ConnectEvent(UITouchBeginDragEvent, function(ev) self:OnCardDragBegin(i) end) @@ -84,17 +84,17 @@ for i = 1, 10 do end end for i = 1, 3 do - local rc = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud/Reward" .. tostring(i)) + local rc = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud/Reward" .. tostring(i)) if rc ~= nil and rc.ButtonComponent ~= nil then rc:ConnectEvent(ButtonClickEvent, function() self:PickReward(i) end) if rc.UITouchReceiveComponent ~= nil then - local cardPath = "/ui/DefaultGroup/RewardHud/Reward" .. tostring(i) + local cardPath = "/ui/RunUIGroup/RewardHud/Reward" .. tostring(i) rc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end) rc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end) end end end -local skip = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud/Skip") +local skip = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud/Skip") if skip ~= nil and skip.ButtonComponent ~= nil then skip:ConnectEvent(ButtonClickEvent, function() self:PickReward(0) end) end @@ -107,42 +107,42 @@ end table.insert(mapNodeIds, "boss") for i = 1, #mapNodeIds do local nid = mapNodeIds[i] - local mn = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud/Node_" .. nid) + local mn = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud/Node_" .. nid) if mn ~= nil and mn.ButtonComponent ~= nil then mn:ConnectEvent(ButtonClickEvent, function() self:PickNode(nid) end) end end for i = 1, 3 do - local sc = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Card" .. tostring(i)) + local sc = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Card" .. tostring(i)) if sc ~= nil and sc.ButtonComponent ~= nil then sc:ConnectEvent(ButtonClickEvent, function() self:BuyCard(i) end) if sc.UITouchReceiveComponent ~= nil then - local cardPath = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i) + local cardPath = "/ui/RunUIGroup/ShopHud/Card" .. tostring(i) sc:ConnectEvent(UITouchEnterEvent, function() self:SetCardHover(cardPath, true) end) sc:ConnectEvent(UITouchExitEvent, function() self:SetCardHover(cardPath, false) end) end end end -local shopLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Leave") +local shopLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Leave") if shopLeave ~= nil and shopLeave.ButtonComponent ~= nil then shopLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end) end -local shopRelic = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic") +local shopRelic = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic") if shopRelic ~= nil and shopRelic.ButtonComponent ~= nil then shopRelic:ConnectEvent(ButtonClickEvent, function() self:BuyRelic() end) end -local restLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud/Leave") +local restLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/RestHud/Leave") if restLeave ~= nil and restLeave.ButtonComponent ~= nil then restLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end) end for i = 1, ${MAX_MONSTERS} do - local ms = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i)) + local ms = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i)) if ms ~= nil and ms.ButtonComponent ~= nil then ms:ConnectEvent(ButtonClickEvent, function() self:SetTarget(i) end) end end for i = 1, 10 do - local rs = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/RelicSlot" .. tostring(i)) + local rs = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/RelicSlot" .. tostring(i)) if rs ~= nil and rs.UITouchReceiveComponent ~= nil then local idx = i rs:ConnectEvent(UITouchEnterEvent, function() @@ -156,7 +156,7 @@ for i = 1, 10 do end end for i = 1, 5 do - local ps = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TopBar/PotionSlot" .. tostring(i)) + local ps = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TopBar/PotionSlot" .. tostring(i)) if ps ~= nil and ps.UITouchReceiveComponent ~= nil then local idx = i ps:ConnectEvent(UITouchEnterEvent, function() @@ -170,41 +170,41 @@ for i = 1, 5 do ps:ConnectEvent(UITouchDownEvent, function() self:OpenPotionMenu(idx) end) end end -local pmUse = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Use") +local pmUse = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Use") if pmUse ~= nil and pmUse.ButtonComponent ~= nil then pmUse:ConnectEvent(ButtonClickEvent, function() self:UsePotion() end) end -local pmToss = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Toss") +local pmToss = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Toss") if pmToss ~= nil and pmToss.ButtonComponent ~= nil then pmToss:ConnectEvent(ButtonClickEvent, function() self:TossPotion() end) end -local pmClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/PotionMenu/Close") +local pmClose = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/PotionMenu/Close") if pmClose ~= nil and pmClose.ButtonComponent ~= nil then pmClose:ConnectEvent(ButtonClickEvent, function() self:ClosePotionMenu() end) end -local shopPotion = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion") +local shopPotion = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Potion") if shopPotion ~= nil and shopPotion.ButtonComponent ~= nil then shopPotion:ConnectEvent(ButtonClickEvent, function() self:BuyPotion() end) end -local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest") +local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest") if chest ~= nil and chest.ButtonComponent ~= nil then chest:ConnectEvent(ButtonClickEvent, function() self:OpenChest() end) end -local treasureLeave = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Leave") +local treasureLeave = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Leave") if treasureLeave ~= nil and treasureLeave.ButtonComponent ~= nil then treasureLeave:ConnectEvent(ButtonClickEvent, function() self:LeaveNode() end) end -local jcRelic = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobChoiceHud/RelicButton") +local jcRelic = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobChoiceHud/RelicButton") if jcRelic ~= nil and jcRelic.ButtonComponent ~= nil then jcRelic:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("relic") end) end -local jcJob = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobChoiceHud/JobButton") +local jcJob = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobChoiceHud/JobButton") if jcJob ~= nil and jcJob.ButtonComponent ~= nil then jcJob:ConnectEvent(ButtonClickEvent, function() self:PickJobReward("job") end) end for i = 1, 3 do local slotIdx = i - local jb = _EntityService:GetEntityByPath("/ui/DefaultGroup/JobSelectHud/Job_slot" .. tostring(i)) + local jb = _EntityService:GetEntityByPath("/ui/SelectUIGroup/JobSelectHud/Job_slot" .. tostring(i)) if jb ~= nil and jb.ButtonComponent ~= nil then jb:ConnectEvent(ButtonClickEvent, function() if self.JobOpts ~= nil and self.JobOpts[slotIdx] ~= nil then @@ -333,11 +333,11 @@ for i = 1, #self.DiscardPile do end self.DiscardPile = {} self:Shuffle(self.DrawPile)`), - method('RenderPiles', `self:SetText("/ui/DefaultGroup/DeckHud/DrawPile/Count", self:FormatNumber(#self.DrawPile)) -self:SetText("/ui/DefaultGroup/DeckHud/DiscardPile/Count", self:FormatNumber(#self.DiscardPile)) -self:SetText("/ui/DefaultGroup/DeckHud/ExhaustPile/Count", self:FormatNumber(#(self.ExhaustPile or {}))) -self:SetText("/ui/DefaultGroup/DeckHud/EnergyOrb/Value", string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy)) -local inspect = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud") + method('RenderPiles', `self:SetText("/ui/RunUIGroup/DeckHud/DrawPile/Count", self:FormatNumber(#self.DrawPile)) +self:SetText("/ui/RunUIGroup/DeckHud/DiscardPile/Count", self:FormatNumber(#self.DiscardPile)) +self:SetText("/ui/RunUIGroup/DeckHud/ExhaustPile/Count", self:FormatNumber(#(self.ExhaustPile or {}))) +self:SetText("/ui/RunUIGroup/DeckHud/EnergyOrb/Value", string.format("%d", self.Energy) .. "/" .. string.format("%d", self.MaxEnergy)) +local inspect = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud") if inspect ~= nil and inspect.Enable == true and self.DeckInspectKind ~= "" then self:OpenDeckInspect(self.DeckInspectKind) end`), diff --git a/tools/deck/cb/deckview.mjs b/tools/deck/cb/deckview.mjs index d47b463..6876bbc 100644 --- a/tools/deck/cb/deckview.mjs +++ b/tools/deck/cb/deckview.mjs @@ -6,7 +6,7 @@ export const deckViewMethods = [ method('OpenDeckInspect', `self.DeckInspectKind = kind if self.DeckAllOpen == true then self.DeckAllOpen = false - local allHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud") + local allHud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud") if allHud ~= nil then allHud.Enable = false end @@ -24,12 +24,12 @@ else title = "뽑을 덱" end self:RenderDeckInspect(pile, title) -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud") +local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud") if hud ~= nil then hud.Enable = true end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'kind' }]), method('CloseDeckInspect', `self.DeckInspectKind = "" -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud") +local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud") if hud ~= nil then hud.Enable = false end`), @@ -41,13 +41,13 @@ local suffix = " (" .. tostring(count) .. ")" if count > 60 then suffix = suffix .. " - 60장까지 표시" end -self:SetText("/ui/DefaultGroup/DeckInspectHud/Title", title .. suffix) -local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Empty") +self:SetText("/ui/DeckUIGroup/DeckInspectHud/Title", title .. suffix) +local empty = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Empty") if empty ~= nil then empty.Enable = count <= 0 end for i = 1, 60 do - local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud/Grid/Card" .. tostring(i)) + local e = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(i)) if e ~= nil then local cardId = nil if pile ~= nil then @@ -64,11 +64,11 @@ end`, [ { Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pile' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'title' }, ]), - method('ApplyInspectCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/DeckInspectHud/Grid/Card" .. tostring(slot), cardId)`, [ + method('ApplyInspectCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(slot), cardId)`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' }, ]), - method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/WarriorTab") + method('BindClassDeckTabs', `local warriorTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/WarriorTab") if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then if self.WarriorDeckTabHandler ~= nil then warriorTab:DisconnectEvent(ButtonClickEvent, self.WarriorDeckTabHandler) @@ -76,7 +76,7 @@ if warriorTab ~= nil and warriorTab.ButtonComponent ~= nil then end self.WarriorDeckTabHandler = warriorTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("warrior") end) end -local thiefTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/ThiefTab") +local thiefTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/ThiefTab") if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then if self.ThiefDeckTabHandler ~= nil then thiefTab:DisconnectEvent(ButtonClickEvent, self.ThiefDeckTabHandler) @@ -84,7 +84,7 @@ if thiefTab ~= nil and thiefTab.ButtonComponent ~= nil then end self.ThiefDeckTabHandler = thiefTab:ConnectEvent(ButtonClickEvent, function() self:SetClassDeckTab("bandit") end) end -local mageTab = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/MageTab") +local mageTab = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/MageTab") if mageTab ~= nil and mageTab.ButtonComponent ~= nil then if self.MageDeckTabHandler ~= nil then mageTab:DisconnectEvent(ButtonClickEvent, self.MageDeckTabHandler) @@ -96,7 +96,7 @@ end`), self.ClassDeckMode = true self.DeckAllOpen = true self:SetClassDeckTab(className) -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud") +local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud") if hud ~= nil then hud.Enable = true end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]), @@ -147,9 +147,9 @@ end) self:RenderAllDeck() self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'className' }]), method('RenderClassDeckTabs', `local tabs = { - { path = "/ui/DefaultGroup/DeckAllHud/WarriorTab", cls = "warrior" }, - { path = "/ui/DefaultGroup/DeckAllHud/ThiefTab", cls = "bandit" }, - { path = "/ui/DefaultGroup/DeckAllHud/MageTab", cls = "magician" }, + { path = "/ui/DeckUIGroup/DeckAllHud/WarriorTab", cls = "warrior" }, + { path = "/ui/DeckUIGroup/DeckAllHud/ThiefTab", cls = "bandit" }, + { path = "/ui/DeckUIGroup/DeckAllHud/MageTab", cls = "magician" }, } for i = 1, #tabs do local e = _EntityService:GetEntityByPath(tabs[i].path) @@ -164,7 +164,7 @@ for i = 1, #tabs do end end end`), - method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckInspectHud") + method('OpenAllDeck', `local inspectHud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud") if inspectHud ~= nil then inspectHud.Enable = false end @@ -174,12 +174,12 @@ self.ClassDeckClass = "" self:RenderClassDeckTabs() self.DeckAllOpen = true self:RenderAllDeck() -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud") +local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud") if hud ~= nil then hud.Enable = true end`), method('CloseAllDeck', `self.DeckAllOpen = false -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud") +local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud") if hud ~= nil then hud.Enable = false end @@ -204,14 +204,14 @@ elseif self.CodexMode == true then title = "카드 도감" end local count = #pile -self:SetText("/ui/DefaultGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")") +self:SetText("/ui/DeckUIGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")") self:RenderClassDeckTabs() -local empty = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Empty") +local empty = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Empty") if empty ~= nil then empty.Enable = count <= 0 end for i = 1, 120 do - local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Grid/Card" .. tostring(i)) + local e = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(i)) if e ~= nil then local cardId = pile[i] if cardId == nil then @@ -222,7 +222,7 @@ for i = 1, 120 do end end end`), - method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [ + method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' }, ]), diff --git a/tools/deck/cb/hand.mjs b/tools/deck/cb/hand.mjs index 7a1af3c..5b9a340 100644 --- a/tools/deck/cb/hand.mjs +++ b/tools/deck/cb/hand.mjs @@ -20,7 +20,7 @@ if n > 8 then spacing = math.floor(1400 / n) end local startX = -((n - 1) * spacing) / 2 local drawStart = Vector2(-590, 8) for i = 1, 10 do -\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(i)) +\tlocal cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(i)) \tif cardEntity ~= nil then \t\tlocal cardId = self.Hand[i] \t\tif cardId == nil then @@ -81,11 +81,11 @@ local xs = {} local baseY = 0 local hoverIndex = 0 local push = 110 -if string.find(path, "/ui/DefaultGroup/CardHand/Card") == 1 then +if string.find(path, "/ui/RunUIGroup/CardHand/Card") == 1 then if self.DragSlot ~= nil and self.DragSlot > 0 then return end - prefix = "/ui/DefaultGroup/CardHand/Card" + prefix = "/ui/RunUIGroup/CardHand/Card" count = 0 if self.Hand ~= nil then count = #self.Hand end for i = 1, count do @@ -93,14 +93,14 @@ if string.find(path, "/ui/DefaultGroup/CardHand/Card") == 1 then end baseY = 0 hoverIndex = tonumber(string.match(path, "Card(%d+)")) or 0 -elseif string.find(path, "/ui/DefaultGroup/RewardHud/Reward") == 1 then - prefix = "/ui/DefaultGroup/RewardHud/Reward" +elseif string.find(path, "/ui/RunUIGroup/RewardHud/Reward") == 1 then + prefix = "/ui/RunUIGroup/RewardHud/Reward" count = 3 xs = { -300, 0, 300 } baseY = 0 hoverIndex = tonumber(string.match(path, "Reward(%d+)")) or 0 -elseif string.find(path, "/ui/DefaultGroup/ShopHud/Card") == 1 then - prefix = "/ui/DefaultGroup/ShopHud/Card" +elseif string.find(path, "/ui/RunUIGroup/ShopHud/Card") == 1 then + prefix = "/ui/RunUIGroup/ShopHud/Card" count = 3 xs = { -300, 0, 300 } baseY = 20 @@ -159,7 +159,7 @@ self.CardHoverTweenId = eventId`, [ { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'path' }, { Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'hover' }, ]), - method('ApplyCardVisual', `self:ApplyCardFace("/ui/DefaultGroup/CardHand/Card" .. tostring(slot), cardId)`, [ + method('ApplyCardVisual', `self:ApplyCardFace("/ui/RunUIGroup/CardHand/Card" .. tostring(slot), cardId)`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' }, ]), @@ -181,7 +181,7 @@ if math.abs(n - math.floor(n)) < 0.00001 then return string.format("%d", math.floor(n)) end return tostring(n)`, [{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'value' }], 0, 'string'), - method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot)) + method('AnimateCardFrom', `local cardEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot)) if cardEntity == nil or cardEntity.UITransformComponent == nil then \treturn end @@ -328,13 +328,13 @@ end`, [ { Type: 'boolean', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'triggerSly' }, ]), method('IsDiscardSelecting', `return self.DiscardSelectRemaining ~= nil and self.DiscardSelectRemaining > 0`, [], 0, 'boolean'), - method('UpdateDiscardPrompt', `local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/DiscardPrompt") + method('UpdateDiscardPrompt', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/DiscardPrompt") if e == nil then return end if self:IsDiscardSelecting() == true then local picked = self.DiscardSelectTotal - self.DiscardSelectRemaining - self:SetText("/ui/DefaultGroup/CombatHud/DiscardPrompt", "버릴 카드 선택 " .. self:FormatNumber(picked + 1) .. "/" .. self:FormatNumber(self.DiscardSelectTotal)) + self:SetText("/ui/RunUIGroup/CombatHud/DiscardPrompt", "버릴 카드 선택 " .. self:FormatNumber(picked + 1) .. "/" .. self:FormatNumber(self.DiscardSelectTotal)) e.Enable = true else e.Enable = false diff --git a/tools/deck/cb/items.mjs b/tools/deck/cb/items.mjs index 4915adf..738ce50 100644 --- a/tools/deck/cb/items.mjs +++ b/tools/deck/cb/items.mjs @@ -95,7 +95,7 @@ if self:AddPotion(pid) == true then self:Toast("물약 획득: " .. p.name) end`), method('RenderPotions', `for i = 1, 5 do - local base = "/ui/DefaultGroup/CombatHud/TopBar/PotionSlot" .. tostring(i) + local base = "/ui/RunUIGroup/CombatHud/TopBar/PotionSlot" .. tostring(i) local e = _EntityService:GetEntityByPath(base) if e ~= nil and e.SpriteGUIRendererComponent ~= nil then local pid = nil @@ -121,11 +121,11 @@ self.PotionMenuSlot = slot local pid = self.RunPotions[slot] local p = self.Potions[pid] if p ~= nil then - self:SetText("/ui/DefaultGroup/CombatHud/PotionMenu/Title", p.name .. " — " .. p.desc) + self:SetText("/ui/RunUIGroup/CombatHud/PotionMenu/Title", p.name .. " — " .. p.desc) end -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", true)`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]), +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", true)`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]), method('ClosePotionMenu', `self.PotionMenuSlot = 0 -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false)`), +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", false)`), method('UsePotion', `if self.PotionMenuSlot <= 0 then return end @@ -133,8 +133,8 @@ if self.CombatOver == true or self.TurnBusy == true or self.FxBusy == true then self:Toast("지금은 사용할 수 없습니다") return end -local combat = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud") -local hand = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand") +local combat = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud") +local hand = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand") if combat == nil or combat.Enable ~= true or hand == nil or hand.Enable ~= true then self:Toast("전투 중에만 사용할 수 있습니다") return @@ -189,7 +189,7 @@ if self.RunRelics ~= nil then count = #self.RunRelics end for i = 1, 10 do - local base = "/ui/DefaultGroup/CombatHud/TopBar/RelicSlot" .. tostring(i) + local base = "/ui/RunUIGroup/CombatHud/TopBar/RelicSlot" .. tostring(i) local e = _EntityService:GetEntityByPath(base) if e ~= nil and e.SpriteGUIRendererComponent ~= nil then local rid = nil @@ -209,5 +209,5 @@ local of = "" if count > 10 then of = "+" .. tostring(count - 9) end -self:SetText("/ui/DefaultGroup/CombatHud/TopBar/RelicOverflow", of)`), +self:SetText("/ui/RunUIGroup/CombatHud/TopBar/RelicOverflow", of)`), ]; diff --git a/tools/deck/cb/jobs.mjs b/tools/deck/cb/jobs.mjs index 6030c5a..c4c50a2 100644 --- a/tools/deck/cb/jobs.mjs +++ b/tools/deck/cb/jobs.mjs @@ -3,10 +3,10 @@ import { CARDS, ENEMIES, CLASSES, JOBS, SOUL_UNLOCKS, CARDFRAMES, RARITIES, MAP_ import { UI_FILE, COMMON_FILE, UI_ROOT, GENERATED_UI_SECTIONS, UI_APPEND_ORDER, DISABLED_STOCK_CONTROLS, TRANSPARENT, DARK, GOLD, ATTACK, DEFEND, SKILL, DAMAGE_DIGIT_RUIDS, DAMAGE_POP_MAX_DIGITS, DAMAGE_POP_DIGIT_W, DAMAGE_POP_DIGIT_H, DAMAGE_POP_DIGIT_SPACING, MAX_MONSTERS, HEAD_OFFSET_Y, HP_BAR_W, WHITE, CARD_NAME_TEXT, CARD_DESC_TEXT, cardFaceLayout, CARD_W, CARD_H, CARD_SPACING, CARD_XS, ALIGN_CENTER, ALIGN_BOTTOM_CENTER, guid, transform, sprite, button, text, scrollLayoutGroup, popupLayerFor, uiOrderFor, displayOrderFor, applySortingOverride, entity, uiPath, sectionRoot, isGeneratedUiEntity, appendUiSection } from '../lib/ui-helpers.mjs'; export const jobMethods = [ - method('ShowJobChoice', `self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false) -self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", true)`), - method('PickJobReward', `self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", false) + method('ShowJobChoice', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false) +self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false) +self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", true)`), + method('PickJobReward', `self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false) if kind == "relic" then local bid = self:PickNewRelic() if bid ~= "" then @@ -26,7 +26,7 @@ if opts == nil then end self.JobOpts = opts for i = 1, 3 do - local base = "/ui/DefaultGroup/JobSelectHud/Job_slot" .. tostring(i) + local base = "/ui/SelectUIGroup/JobSelectHud/Job_slot" .. tostring(i) local o = opts[i] if o ~= nil then self:SetEntityEnabled(base, true) @@ -40,7 +40,7 @@ for i = 1, 3 do self:SetEntityEnabled(base, false) end end -self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", true)`), +self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", true)`), method('JobLabel', `if self.PlayerJob ~= "" and self.Jobs ~= nil then for cls, list in pairs(self.Jobs) do for i = 1, #list do @@ -73,7 +73,7 @@ if starter ~= "" then self:Toast("2차 전직: " .. self:JobLabel() .. "! 신규 카드 — " .. sc.name) end end -self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Name", self:JobLabel()) -self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", false) +self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel()) +self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", false) self:ContinueAfterBoss()`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'jobId' }]), ]; diff --git a/tools/deck/cb/map.mjs b/tools/deck/cb/map.mjs index 57a7d95..cb84a8a 100644 --- a/tools/deck/cb/map.mjs +++ b/tools/deck/cb/map.mjs @@ -115,7 +115,7 @@ for i = 1, #list do end end return false`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'id' }], 0, 'boolean'), - method('RenderMapNode', `local base = "/ui/DefaultGroup/MapHud/Node_" .. id + method('RenderMapNode', `local base = "/ui/RunUIGroup/MapHud/Node_" .. id local e = _EntityService:GetEntityByPath(base) if e == nil then return @@ -162,7 +162,7 @@ if node ~= nil then end end for k = 1, 3 do - local d = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud/Dot_" .. dotId .. "_" .. tostring(k)) + local d = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud/Dot_" .. dotId .. "_" .. tostring(k)) if d ~= nil then d.Enable = has if has == true and d.SpriteGUIRendererComponent ~= nil then @@ -210,7 +210,7 @@ if self.VisitedNodes == nil then self.VisitedNodes = {} end table.insert(self.VisitedNodes, id) -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/MapHud") +local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/MapHud") if hud ~= nil then hud.Enable = false end diff --git a/tools/deck/cb/render.mjs b/tools/deck/cb/render.mjs index 5d4cc10..cc4e644 100644 --- a/tools/deck/cb/render.mjs +++ b/tools/deck/cb/render.mjs @@ -15,7 +15,7 @@ return table.concat(parts, " ")`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'poison' }, ], 0, 'string'), method('RenderCombat', `for i = 1, ${MAX_MONSTERS} do - local base = "/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(i) + local base = "/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(i) local m = self.Monsters[i] if m ~= nil and m.alive == true then self:SetEntityEnabled(base, true) @@ -64,10 +64,10 @@ return table.concat(parts, " ")`, [ self:SetEntityEnabled(base, false) end end -self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/HpText", string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp)) -self:SetHpBar("/ui/DefaultGroup/CombatHud/PlayerPanel/HpBarFill", self.PlayerHp, self.PlayerMaxHp, 220) -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PlayerPanel/BlockBadge", self.PlayerBlock > 0) -self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/BlockBadge/Value", string.format("%d", self.PlayerBlock)) +self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/HpText", string.format("%d", self.PlayerHp) .. "/" .. string.format("%d", self.PlayerMaxHp)) +self:SetHpBar("/ui/RunUIGroup/CombatHud/PlayerPanel/HpBarFill", self.PlayerHp, self.PlayerMaxHp, 220) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PlayerPanel/BlockBadge", self.PlayerBlock > 0) +self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/BlockBadge/Value", string.format("%d", self.PlayerBlock)) local pb = self:BuffsLabel(self.PlayerStr, self.PlayerWeak, self.PlayerVuln, 0) if self.PlayerDex ~= nil and self.PlayerDex > 0 then if pb ~= "" then pb = pb .. " " end @@ -86,10 +86,10 @@ if self.PlayerPowers ~= nil and #self.PlayerPowers > 0 then if pb ~= "" then pb = pb .. " · " end pb = pb .. table.concat(names, " ") end -self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Buffs", pb) +self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Buffs", pb) self:RenderRun()`), method('ShowDmgPop', `local slotKey = string.format("%d", math.floor(slot or 0)) -local base = "/ui/DefaultGroup/CombatHud/DmgPop" .. slotKey +local base = "/ui/RunUIGroup/CombatHud/DmgPop" .. slotKey local pop = _EntityService:GetEntityByPath(base) if pop == nil then return @@ -134,7 +134,7 @@ if m ~= nil and m.entity ~= nil and isvalid(m.entity) and m.entity.TransformComp local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y + 0.45})) popPos = _UILogic:ScreenToUIPosition(screen) else - local slotEntity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. slotKey) + local slotEntity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. slotKey) if slotEntity ~= nil and slotEntity.UITransformComponent ~= nil then local sp = slotEntity.UITransformComponent.anchoredPosition popPos = Vector2(sp.x, sp.y + 76) @@ -169,7 +169,7 @@ end, 0.48)`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }, { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'amount' }, ]), - method('ShowPlayerDmgPop', `local base = "/ui/DefaultGroup/CombatHud/PlayerPanel/DmgPop" + method('ShowPlayerDmgPop', `local base = "/ui/RunUIGroup/CombatHud/PlayerPanel/DmgPop" if amount > 0 then self:SetText(base, "-" .. string.format("%d", amount)) else @@ -291,7 +291,7 @@ end local wp = tr.WorldPosition local screen = _UILogic:WorldToScreenPosition(Vector2(wp.x, wp.y + ${HEAD_OFFSET_Y})) local uipos = _UILogic:ScreenToUIPosition(screen) -local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/MonsterSlot" .. tostring(slot)) +local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/MonsterStatus" .. tostring(slot)) if e ~= nil and e.UITransformComponent ~= nil then e.UITransformComponent.anchoredPosition = uipos end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]), @@ -303,6 +303,6 @@ end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], N if self.AscensionLevel > 0 then floorText = floorText .. " · 승천" .. string.format("%d", self.AscensionLevel) end -self:SetText("/ui/DefaultGroup/CombatHud/TopBar/Floor", floorText) -self:SetText("/ui/DefaultGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`), +self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Floor", floorText) +self:SetText("/ui/RunUIGroup/CombatHud/TopBar/Gold", "메소 " .. string.format("%d", self.Gold))`), ]; diff --git a/tools/deck/cb/reward.mjs b/tools/deck/cb/reward.mjs index c85f1b5..4b4f6b9 100644 --- a/tools/deck/cb/reward.mjs +++ b/tools/deck/cb/reward.mjs @@ -11,8 +11,8 @@ for id, c in pairs(self.Cards) do end table.sort(pool) return pool`, [], 0, 'any'), - method('OfferReward', `self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false) -self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false) + method('OfferReward', `self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false) +self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false) local pool = self:CardPool() local byRarity = {} for _, id in ipairs(pool) do @@ -30,11 +30,11 @@ for i = 1, 3 do self.RewardChoices[i] = bucket[math.random(1, #bucket)] self:ApplyRewardVisual(i, self.RewardChoices[i]) end -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud") +local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud") if hud ~= nil then hud.Enable = true end`), - method('ApplyRewardVisual', `self:ApplyCardFace("/ui/DefaultGroup/RewardHud/Reward" .. tostring(slot), cardId)`, [ + method('ApplyRewardVisual', `self:ApplyCardFace("/ui/RunUIGroup/RewardHud/Reward" .. tostring(slot), cardId)`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }, { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'cardId' }, ]), @@ -47,7 +47,7 @@ if slot ~= 0 and self.RewardChoices ~= nil then table.insert(self.RunDeck, id) end end -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/RewardHud") +local hud = _EntityService:GetEntityByPath("/ui/RunUIGroup/RewardHud") if hud ~= nil then hud.Enable = false end diff --git a/tools/deck/cb/run.mjs b/tools/deck/cb/run.mjs index 19da17c..2d5afe1 100644 --- a/tools/deck/cb/run.mjs +++ b/tools/deck/cb/run.mjs @@ -59,11 +59,11 @@ _TimerService:SetTimerOnce(function() end, 0.2)`), method('StartCombat', `self:ShowState("combat") self:KickCombatCamera() -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/Result", false) -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/PotionMenu", false) -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false) -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/DiscardPrompt", false) -self:SetText("/ui/DefaultGroup/CombatHud/PlayerPanel/Name", self:JobLabel()) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/Result", false) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/PotionMenu", false) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/TooltipBox", false) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/DiscardPrompt", false) +self:SetText("/ui/RunUIGroup/CombatHud/PlayerPanel/Name", self:JobLabel()) self.MaxEnergy = 3 self.Turn = 0 self.PlayerBlock = 0 diff --git a/tools/deck/cb/runend.mjs b/tools/deck/cb/runend.mjs index 66bf74e..8749d3c 100644 --- a/tools/deck/cb/runend.mjs +++ b/tools/deck/cb/runend.mjs @@ -16,8 +16,8 @@ if lp.CurrentMapName == target then return end _TeleportService:TeleportToMapPosition(lp, Vector3(-6, 0.03, 0), target)`), - method('ShowResult', `self:SetText("/ui/DefaultGroup/CombatHud/Result", text) -local entity = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/Result") + method('ShowResult', `self:SetText("/ui/RunUIGroup/CombatHud/Result", text) +local entity = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/Result") if entity ~= nil then entity.Enable = true end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'text' }]), diff --git a/tools/deck/cb/shop.mjs b/tools/deck/cb/shop.mjs index 9556148..eb9056c 100644 --- a/tools/deck/cb/shop.mjs +++ b/tools/deck/cb/shop.mjs @@ -20,11 +20,11 @@ self.ShopPotion = pkeys[math.random(1, #pkeys)] self.ShopPotionBought = false self:RenderShop() self:ShowState("shop")`), - method('RenderShop', `self:SetText("/ui/DefaultGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold)) + method('RenderShop', `self:SetText("/ui/RunUIGroup/ShopHud/Gold", "메소 " .. string.format("%d", self.Gold)) for i = 1, 3 do local cid = self.ShopChoices[i] local c = self.Cards[cid] - local base = "/ui/DefaultGroup/ShopHud/Card" .. tostring(i) + local base = "/ui/RunUIGroup/ShopHud/Card" .. tostring(i) if c ~= nil then self:ApplyCardFace(base, cid) self:SetText(base .. "/Price", string.format("%d", ${CARD_PRICE}) .. " 메소") @@ -38,9 +38,9 @@ for i = 1, 3 do end local rr = self.Relics[self.ShopRelic] if rr ~= nil then - self:SetText("/ui/DefaultGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc) - self:SetText("/ui/DefaultGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소") - local re = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Relic") + self:SetText("/ui/RunUIGroup/ShopHud/Relic/Label", rr.name .. " — " .. rr.desc) + self:SetText("/ui/RunUIGroup/ShopHud/Relic/Price", string.format("%d", ${RELIC_PRICE}) .. " 메소") + local re = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Relic") if re ~= nil and re.SpriteGUIRendererComponent ~= nil then if self.ShopRelicBought == true then re.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6) @@ -51,9 +51,9 @@ if rr ~= nil then end local pp = self.Potions[self.ShopPotion] if pp ~= nil then - self:SetText("/ui/DefaultGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc) - self:SetText("/ui/DefaultGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소") - local pe = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud/Potion") + self:SetText("/ui/RunUIGroup/ShopHud/Potion/Label", pp.name .. " — " .. pp.desc) + self:SetText("/ui/RunUIGroup/ShopHud/Potion/Price", string.format("%d", ${POTIONS.shopPrice}) .. " 메소") + local pe = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud/Potion") if pe ~= nil and pe.SpriteGUIRendererComponent ~= nil then if self.ShopPotionBought == true then pe.SpriteGUIRendererComponent.Color = Color(0.2, 0.22, 0.26, 0.6) @@ -106,24 +106,24 @@ if self.PlayerHp > self.PlayerMaxHp then self.PlayerHp = self.PlayerMaxHp end local healed = self.PlayerHp - old -self:SetText("/ui/DefaultGroup/RestHud/Info", "HP " .. string.format("%d", old) .. " → " .. string.format("%d", self.PlayerHp) .. " (+" .. string.format("%d", healed) .. ")") +self:SetText("/ui/RunUIGroup/RestHud/Info", "HP " .. string.format("%d", old) .. " → " .. string.format("%d", self.PlayerHp) .. " (+" .. string.format("%d", healed) .. ")") self:RenderCombat() self:ShowState("rest")`), - method('LeaveNode', `local s = _EntityService:GetEntityByPath("/ui/DefaultGroup/ShopHud") + method('LeaveNode', `local s = _EntityService:GetEntityByPath("/ui/RunUIGroup/ShopHud") if s ~= nil then s.Enable = false end -local r = _EntityService:GetEntityByPath("/ui/DefaultGroup/RestHud") +local r = _EntityService:GetEntityByPath("/ui/RunUIGroup/RestHud") if r ~= nil then r.Enable = false end -local t = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud") +local t = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud") if t ~= nil then t.Enable = false end self:ShowMap()`), method('ShowTreasure', `self.ChestOpened = false -local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest") +local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest") if chest ~= nil then if chest.SpriteGUIRendererComponent ~= nil then chest.SpriteGUIRendererComponent.ImageRUID = "${CHEST_CLOSED_RUID}" @@ -132,15 +132,15 @@ if chest ~= nil then chest.UITransformComponent.anchoredPosition = Vector2(0, 40) end end -self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", false) -self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", true) +self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Reward", false) +self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Hint", true) self:ShowState("treasure")`), method('OpenChest', `if self.ChestOpened == true then return end self.ChestOpened = true -self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Hint", false) -local chest = _EntityService:GetEntityByPath("/ui/DefaultGroup/TreasureHud/Chest") +self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Hint", false) +local chest = _EntityService:GetEntityByPath("/ui/RunUIGroup/TreasureHud/Chest") local steps = { 10, -10, 8, -8, 5, 0 } for i = 1, #steps do local dx = steps[i] @@ -167,7 +167,7 @@ _TimerService:SetTimerOnce(function() end self.Gold = self.Gold + g self:RenderRun() - self:SetText("/ui/DefaultGroup/TreasureHud/Reward", msg) - self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud/Reward", true) + self:SetText("/ui/RunUIGroup/TreasureHud/Reward", msg) + self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud/Reward", true) end, 0.55)`), ]; diff --git a/tools/deck/cb/soul.mjs b/tools/deck/cb/soul.mjs index ff9cc70..68841dc 100644 --- a/tools/deck/cb/soul.mjs +++ b/tools/deck/cb/soul.mjs @@ -6,8 +6,8 @@ export const soulMethods = [ method('ShowSoulShop', `self:RenderSoulLabel() self:RenderSoulShop() self:BindSoulShopButtons() -self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", true)`), - method('CloseSoulShop', `self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)`), +self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", true)`), + method('CloseSoulShop', `self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`), method('ReqLoadSouls', `local ds = _DataStorageService:GetUserDataStorage(userId) local e1, pts = ds:GetAndWait("soulPoints") local e2, unl = ds:GetAndWait("soulUnlocks") @@ -63,7 +63,7 @@ self:RenderSoulLabel() self:RenderSoulShop()`, [{ Type: "number", DefaultValue: null, SyncDirection: 0, Attributes: [], Name: "slot" }]), method('RenderSoulShop', `local defs = self.SoulShopDef or {} for i = 1, 4 do - local base = "/ui/DefaultGroup/SoulShopHud/Item" .. tostring(i) + local base = "/ui/LobbyUIGroup/SoulShopHud/Item" .. tostring(i) local d = defs[i] if d == nil then self:SetEntityEnabled(base, false) @@ -87,7 +87,7 @@ end self.SoulShopBound = true for i = 1, 4 do local idx = i - local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/SoulShopHud/Item" .. tostring(i)) + local e = _EntityService:GetEntityByPath("/ui/LobbyUIGroup/SoulShopHud/Item" .. tostring(i)) if e ~= nil and e.ButtonComponent ~= nil then e:ConnectEvent(ButtonClickEvent, function() self:BuySoulUnlock(idx) end) end diff --git a/tools/deck/cb/state.mjs b/tools/deck/cb/state.mjs index a21f04c..684dcf5 100644 --- a/tools/deck/cb/state.mjs +++ b/tools/deck/cb/state.mjs @@ -6,37 +6,37 @@ export const stateMethods = [ method('HideGameHud', `self:SetEntityEnabled("/ui/DefaultGroup/Button_Attack", false) self:SetEntityEnabled("/ui/DefaultGroup/Button_Jump", false) self:SetEntityEnabled("/ui/DefaultGroup/UIJoystick", false) -self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/CardHand", false) -self:SetEntityEnabled("/ui/DefaultGroup/CombatHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/RewardHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/MapHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/RestHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/JobChoiceHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/JobSelectHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/DeckInspectHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/DeckAllHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false)`), +self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", false) +self:SetEntityEnabled("/ui/RunUIGroup/CardHand", false) +self:SetEntityEnabled("/ui/RunUIGroup/CombatHud", false) +self:SetEntityEnabled("/ui/RunUIGroup/RewardHud", false) +self:SetEntityEnabled("/ui/RunUIGroup/MapHud", false) +self:SetEntityEnabled("/ui/RunUIGroup/ShopHud", false) +self:SetEntityEnabled("/ui/RunUIGroup/RestHud", false) +self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud", false) +self:SetEntityEnabled("/ui/SelectUIGroup/JobChoiceHud", false) +self:SetEntityEnabled("/ui/SelectUIGroup/JobSelectHud", false) +self:SetEntityEnabled("/ui/DeckUIGroup/DeckInspectHud", false) +self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud", false) +self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false) +self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false) +self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false)`), method('ShowState', `self:HideGameHud() self:SetEntityEnabled("/ui/DefaultGroup/MainMenu", state == "menu") -self:SetEntityEnabled("/ui/DefaultGroup/CharacterSelectHud", state == "charselect") -self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", state == "lobby") +self:SetEntityEnabled("/ui/SelectUIGroup/CharacterSelectHud", state == "charselect") +self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", state == "lobby") if state == "map" then - self:SetEntityEnabled("/ui/DefaultGroup/MapHud", true) + self:SetEntityEnabled("/ui/RunUIGroup/MapHud", true) elseif state == "combat" then - self:SetEntityEnabled("/ui/DefaultGroup/CombatHud", true) - self:SetEntityEnabled("/ui/DefaultGroup/DeckHud", true) - self:SetEntityEnabled("/ui/DefaultGroup/CardHand", true) + self:SetEntityEnabled("/ui/RunUIGroup/CombatHud", true) + self:SetEntityEnabled("/ui/RunUIGroup/DeckHud", true) + self:SetEntityEnabled("/ui/RunUIGroup/CardHand", true) elseif state == "shop" then - self:SetEntityEnabled("/ui/DefaultGroup/ShopHud", true) + self:SetEntityEnabled("/ui/RunUIGroup/ShopHud", true) elseif state == "rest" then - self:SetEntityEnabled("/ui/DefaultGroup/RestHud", true) + self:SetEntityEnabled("/ui/RunUIGroup/RestHud", true) elseif state == "treasure" then - self:SetEntityEnabled("/ui/DefaultGroup/TreasureHud", true) + self:SetEntityEnabled("/ui/RunUIGroup/TreasureHud", true) end`, [{ Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'state' }]), method('ShowMainMenu', `self.SelectedClass = "" self:RenderAscension() @@ -53,7 +53,7 @@ if buttonEntity ~= nil and buttonEntity.ButtonComponent ~= nil then end self.NewGameHandler = buttonEntity:ConnectEvent(ButtonClickEvent, function() self:ShowCharacterSelect() end) end -local warrior = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/WarriorButton") +local warrior = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/WarriorButton") if warrior ~= nil and warrior.ButtonComponent ~= nil then if self.WarriorSelectHandler ~= nil then warrior:DisconnectEvent(ButtonClickEvent, self.WarriorSelectHandler) @@ -61,7 +61,7 @@ if warrior ~= nil and warrior.ButtonComponent ~= nil then end self.WarriorSelectHandler = warrior:ConnectEvent(ButtonClickEvent, function() self:SelectClass("warrior") end) end -local thief = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/ThiefButton") +local thief = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/ThiefButton") if thief ~= nil and thief.ButtonComponent ~= nil then if self.ThiefSelectHandler ~= nil then thief:DisconnectEvent(ButtonClickEvent, self.ThiefSelectHandler) @@ -69,7 +69,7 @@ if thief ~= nil and thief.ButtonComponent ~= nil then end self.ThiefSelectHandler = thief:ConnectEvent(ButtonClickEvent, function() self:SelectClass("bandit") end) end -local mage = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/MageButton") +local mage = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/MageButton") if mage ~= nil and mage.ButtonComponent ~= nil then if self.MageSelectHandler ~= nil then mage:DisconnectEvent(ButtonClickEvent, self.MageSelectHandler) @@ -77,7 +77,7 @@ if mage ~= nil and mage.ButtonComponent ~= nil then end self.MageSelectHandler = mage:ConnectEvent(ButtonClickEvent, function() self:SelectClass("magician") end) end -local allDeckClose = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close") +local allDeckClose = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close") if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then if self.AllDeckCloseHandler ~= nil then allDeckClose:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler) @@ -86,7 +86,7 @@ if allDeckClose ~= nil and allDeckClose.ButtonComponent ~= nil then self.AllDeckCloseHandler = allDeckClose:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end) end self:BindClassDeckTabs() -local start = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/StartButton") +local start = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/StartButton") if start ~= nil and start.ButtonComponent ~= nil then if self.StartGameHandler ~= nil then start:DisconnectEvent(ButtonClickEvent, self.StartGameHandler) @@ -94,7 +94,7 @@ if start ~= nil and start.ButtonComponent ~= nil then end self.StartGameHandler = start:ConnectEvent(ButtonClickEvent, function() self:StartNewGame() end) end -local charBack = _EntityService:GetEntityByPath("/ui/DefaultGroup/CharacterSelectHud/BackButton") +local charBack = _EntityService:GetEntityByPath("/ui/SelectUIGroup/CharacterSelectHud/BackButton") if charBack ~= nil and charBack.ButtonComponent ~= nil then if self.CharBackHandler ~= nil then charBack:DisconnectEvent(ButtonClickEvent, self.CharBackHandler) @@ -122,8 +122,8 @@ end`), self:RenderAscension() self:RenderSoulLabel() self:ShowState("lobby") -self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false) -self:SetEntityEnabled("/ui/DefaultGroup/SoulShopHud", false) +self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false) +self:SetEntityEnabled("/ui/LobbyUIGroup/SoulShopHud", false) self:BindLobbyButtons() self:BindMenuButtons() self:GoLobbyMap()`), @@ -155,8 +155,8 @@ elseif id == "board" then self:ShowBoard() end`, [{ Type: 'string', DefaultValue: '""', SyncDirection: 0, Attributes: [], Name: 'id' }]), method('RenderSoulLabel', `local s = self.SoulPoints or 0 -self:SetText("/ui/DefaultGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", s)) -self:SetText("/ui/DefaultGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", s))`), +self:SetText("/ui/LobbyUIGroup/LobbyHud/SoulLabel", "영혼 " .. string.format("%d", s)) +self:SetText("/ui/LobbyUIGroup/SoulShopHud/Souls", "영혼 " .. string.format("%d", s))`), method('BindLobbyButtons', `if self.LobbyBound == true then return end @@ -167,13 +167,13 @@ local function bindClick(path, fn) e:ConnectEvent(ButtonClickEvent, fn) end end -bindClick("/ui/DefaultGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end) -bindClick("/ui/DefaultGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end) -bindClick("/ui/DefaultGroup/BoardHud/Close", function() self:CloseBoard() end) -bindClick("/ui/DefaultGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`), +bindClick("/ui/LobbyUIGroup/LobbyHud/AscMinus", function() self:AdjustAscension(-1) end) +bindClick("/ui/LobbyUIGroup/LobbyHud/AscPlus", function() self:AdjustAscension(1) end) +bindClick("/ui/LobbyUIGroup/BoardHud/Close", function() self:CloseBoard() end) +bindClick("/ui/LobbyUIGroup/SoulShopHud/Close", function() self:CloseSoulShop() end)`), method('ShowCodex', `self.CodexMode = true self.ClassDeckMode = true -local close = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud/Close") +local close = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Close") if close ~= nil and close.ButtonComponent ~= nil then if self.AllDeckCloseHandler ~= nil then close:DisconnectEvent(ButtonClickEvent, self.AllDeckCloseHandler) @@ -181,13 +181,13 @@ if close ~= nil and close.ButtonComponent ~= nil then self.AllDeckCloseHandler = close:ConnectEvent(ButtonClickEvent, function() self:CloseAllDeck() end) end self:BindClassDeckTabs() -self:SetEntityEnabled("/ui/DefaultGroup/LobbyHud", false) +self:SetEntityEnabled("/ui/LobbyUIGroup/LobbyHud", false) self:SetClassDeckTab("warrior") -local hud = _EntityService:GetEntityByPath("/ui/DefaultGroup/DeckAllHud") +local hud = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud") if hud ~= nil then hud.Enable = true end self:RenderAllDeck()`), - method('ShowBoard', `self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", true)`), - method('CloseBoard', `self:SetEntityEnabled("/ui/DefaultGroup/BoardHud", false)`), + method('ShowBoard', `self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", true)`), + method('CloseBoard', `self:SetEntityEnabled("/ui/LobbyUIGroup/BoardHud", false)`), ]; diff --git a/tools/deck/cb/tooltip.mjs b/tools/deck/cb/tooltip.mjs index 237dbfb..26dc331 100644 --- a/tools/deck/cb/tooltip.mjs +++ b/tools/deck/cb/tooltip.mjs @@ -68,7 +68,7 @@ local cardId = self.Hand[slot] if cardId == nil then return end -local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot)) +local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot)) local tx = 0 if e ~= nil and e.UITransformComponent ~= nil then tx = e.UITransformComponent.anchoredPosition.x @@ -87,7 +87,7 @@ if c ~= nil then self:HideTooltip() end end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]), - method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CardHand/Card" .. tostring(slot)) + method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot)) if e ~= nil and e.UITransformComponent ~= nil then e.UITransformComponent.UIScale = Vector3(1, 1, 1) end @@ -97,9 +97,9 @@ self:HideTooltip()`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, At { Type: 'string', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'desc' }, { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' }, ]), - method('ShowTooltipAt', `self:SetText("/ui/DefaultGroup/CombatHud/TooltipBox/Name", name) -self:SetText("/ui/DefaultGroup/CombatHud/TooltipBox/Desc", desc) -local e = _EntityService:GetEntityByPath("/ui/DefaultGroup/CombatHud/TooltipBox") + method('ShowTooltipAt', `self:SetText("/ui/RunUIGroup/CombatHud/TooltipBox/Name", name) +self:SetText("/ui/RunUIGroup/CombatHud/TooltipBox/Desc", desc) +local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CombatHud/TooltipBox") if e ~= nil then if e.UITransformComponent ~= nil then e.UITransformComponent.anchoredPosition = Vector2(x, y) @@ -111,5 +111,5 @@ end`, [ { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'x' }, { Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'y' }, ]), - method('HideTooltip', `self:SetEntityEnabled("/ui/DefaultGroup/CombatHud/TooltipBox", false)`), + method('HideTooltip', `self:SetEntityEnabled("/ui/RunUIGroup/CombatHud/TooltipBox", false)`), ]; diff --git a/tools/deck/reconnect-ui-paths.mjs b/tools/deck/reconnect-ui-paths.mjs new file mode 100644 index 0000000..d9a8f9a --- /dev/null +++ b/tools/deck/reconnect-ui-paths.mjs @@ -0,0 +1,28 @@ +import { readFileSync, writeFileSync, readdirSync } from 'node:fs'; +import { join } from 'node:path'; + +// 일회성·멱등 마이그레이션: cb/*.mjs의 UI 경로 리터럴을 메이커 재편 UIGroup으로 재연결. +// 이미 이동된 경로는 매치 안 됨(멱등). MainMenu·Button_Attack/Jump·UIJoystick(=DefaultGroup 잔류)은 미변경. +// 섹션→UIGroup 매핑은 tools/verify/uimap.mjs 탐색으로 검증된 실제 .ui 분포 기준. +const MOVE = { + CharacterSelectHud: 'SelectUIGroup', JobChoiceHud: 'SelectUIGroup', JobSelectHud: 'SelectUIGroup', + LobbyHud: 'LobbyUIGroup', BoardHud: 'LobbyUIGroup', SoulShopHud: 'LobbyUIGroup', + CombatHud: 'RunUIGroup', DeckHud: 'RunUIGroup', CardHand: 'RunUIGroup', MapHud: 'RunUIGroup', + RewardHud: 'RunUIGroup', ShopHud: 'RunUIGroup', RestHud: 'RunUIGroup', TreasureHud: 'RunUIGroup', + DeckInspectHud: 'DeckUIGroup', DeckAllHud: 'DeckUIGroup', +}; +const CB_DIR = 'tools/deck/cb'; +let n = 0; +for (const f of readdirSync(CB_DIR).filter((x) => x.endsWith('.mjs'))) { + const p = join(CB_DIR, f); + const before = readFileSync(p, 'utf8'); + let s = before; + // 1) 몬스터 슬롯: 그룹+이름 동시 (CombatHud 일반 remap보다 먼저). 슬롯 5→4는 MAX_MONSTERS(=4)가 이미 반영. + s = s.split('/ui/DefaultGroup/CombatHud/MonsterSlot').join('/ui/RunUIGroup/CombatHud/MonsterStatus'); + // 2) 섹션별 그룹 접두사 remap + for (const [section, group] of Object.entries(MOVE)) { + s = s.split(`/ui/DefaultGroup/${section}`).join(`/ui/${group}/${section}`); + } + if (s !== before) { writeFileSync(p, s, 'utf8'); n++; console.log(' remapped', f); } +} +console.log(`reconnect-ui-paths: ${n} files updated`);