Update - 2.1.0.147

EN: 2.1.0.147
CN: 2.1.0.147
JP: 2.1.0.149
KR: 2.1.0.154
This commit is contained in:
SL1900
2026-11-13 12:00:00 +09:00
parent c84dd6f891
commit da1d2be9fc
822 changed files with 1752348 additions and 1554 deletions
@@ -18,6 +18,19 @@ StarTowerBuildDetailCtrl._mapNodeConfig = {
sComponentName = "TMP_Text",
sLanguageId = "StarTower_Build_Like"
},
btn_Discard = {
sComponentName = "UIButton",
callback = "OnBtnClick_Dislike"
},
btn_DiscardIcon = {sComponentName = "Button"},
img_DiscardIcon = {
sNodeName = "btn_DiscardIcon",
sComponentName = "Image"
},
txtDiscard = {
sComponentName = "TMP_Text",
sLanguageId = "BuildDetail_Dislike1"
},
txtBuildLock = {sComponentName = "TMP_Text"},
btn_Lock = {
sComponentName = "UIButton",
@@ -63,6 +76,7 @@ function StarTowerBuildDetailCtrl:InitPanel()
end
local bEditable = PlayerData.Build:IsBuildEditable(self.mapBuild.nBuildId)
self._mapNode.btn_Preference.gameObject:SetActive(bEditable)
self._mapNode.btn_Discard.gameObject:SetActive(bEditable)
self._mapNode.btn_Lock.gameObject:SetActive(bEditable)
self._mapNode.TMPBuildSaveTime.gameObject:SetActive(bEditable)
self._mapNode.btnDelete.gameObject:SetActive(bEditable)
@@ -72,6 +86,7 @@ function StarTowerBuildDetailCtrl:InitPanel()
self._mapNode.btn_PreferenceIcon.interactable = self.mapBuild.bPreference
NovaAPI.SetTMPColor(self._mapNode.txtLike, self.mapBuild.bPreference and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
end
self:SetDisLikeBtn()
if self.mapBuild.bLock ~= nil then
self._mapNode.btn_LockIcon.interactable = self.mapBuild.bLock
NovaAPI.SetTMPText(self._mapNode.txtBuildLock, self.mapBuild.bLock and ConfigTable.GetUIText("RoguelikeBuild_Save_Lock") or ConfigTable.GetUIText("RoguelikeBuild_Save_Unlock"))
@@ -85,6 +100,17 @@ function StarTowerBuildDetailCtrl:InitPanel()
self._mapNode.BuildDetail:Refresh(self.mapBuild)
self._mapNode.ContentList:Refresh(self.mapBuild, self._panel.nCachedIdx)
end
function StarTowerBuildDetailCtrl:SetDisLikeBtn()
self._mapNode.btn_DiscardIcon.interactable = self.mapBuild.bDislike
if self.mapBuild.bDislike then
NovaAPI.SetTMPText(self._mapNode.txtDiscard, ConfigTable.GetUIText("BuildDetail_Dislike2"))
NovaAPI.SetImageColor(self._mapNode.img_DiscardIcon, Color(1, 1, 1, 1))
else
NovaAPI.SetTMPText(self._mapNode.txtDiscard, ConfigTable.GetUIText("BuildDetail_Dislike1"))
NovaAPI.SetImageColor(self._mapNode.img_DiscardIcon, (self.mapBuild.bLock or self.mapBuild.bPreference) and Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882) or Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764))
end
NovaAPI.SetTMPColor(self._mapNode.txtDiscard, self.mapBuild.bDislike and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
end
function StarTowerBuildDetailCtrl:OpenConfirmHint()
local nCoin = math.floor(math.min(math.max(self.mapBuild.nScore / tonumber(self.tbCoinRate[1]), tonumber(self.tbCoinRate[2])), tonumber(self.tbCoinRate[3])))
local CheckCallback = function()
@@ -151,6 +177,10 @@ function StarTowerBuildDetailCtrl:OnBtnClick_Preference(btn)
local callback = function()
self._mapNode.btn_PreferenceIcon.interactable = self.mapBuild.bPreference
NovaAPI.SetTMPColor(self._mapNode.txtLike, self.mapBuild.bPreference and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
self._mapNode.btn_LockIcon.interactable = self.mapBuild.bLock
NovaAPI.SetTMPText(self._mapNode.txtBuildLock, self.mapBuild.bLock and ConfigTable.GetUIText("RoguelikeBuild_Save_Lock") or ConfigTable.GetUIText("RoguelikeBuild_Save_Unlock"))
NovaAPI.SetTMPColor(self._mapNode.txtBuildLock, self.mapBuild.bLock and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
self:SetDisLikeBtn()
end
if self.mapBuild.bPreference then
table.insert(tbPreferenceCheckOut, self.mapBuild.nBuildId)
@@ -159,6 +189,20 @@ function StarTowerBuildDetailCtrl:OnBtnClick_Preference(btn)
end
PlayerData.Build:SetBuildPreference(tbPreferenceCheckIn, tbPreferenceCheckOut, callback)
end
function StarTowerBuildDetailCtrl:OnBtnClick_Dislike(btn)
if not PlayerData.Build:IsBuildEditable(self.mapBuild.nBuildId) then
return
end
if self.mapBuild.bPreference or self.mapBuild.bLock then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("Build_UnableDislike"))
return
end
local callback = function()
self:SetDisLikeBtn()
end
local bDislike = not self.mapBuild.bDislike
PlayerData.Build:SetBuildDislike(self.mapBuild.nBuildId, bDislike, callback)
end
function StarTowerBuildDetailCtrl:OnBtnClick_Lock(btn)
if not PlayerData.Build:IsBuildEditable(self.mapBuild.nBuildId) then
return
@@ -167,6 +211,7 @@ function StarTowerBuildDetailCtrl:OnBtnClick_Lock(btn)
self._mapNode.btn_LockIcon.interactable = self.mapBuild.bLock
NovaAPI.SetTMPText(self._mapNode.txtBuildLock, self.mapBuild.bLock and ConfigTable.GetUIText("RoguelikeBuild_Save_Lock") or ConfigTable.GetUIText("RoguelikeBuild_Save_Unlock"))
NovaAPI.SetTMPColor(self._mapNode.txtBuildLock, self.mapBuild.bLock and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
self:SetDisLikeBtn()
end
PlayerData.Build:ChangeBuildLock(self.mapBuild.nBuildId, not self.mapBuild.bLock, callback)
end
@@ -202,15 +247,6 @@ function StarTowerBuildDetailCtrl:OnBtnClick_EditBuild()
if PlayerData.Build:IsLimitedTrialBuild(self.mapBuild.nBuildId) then
return
end
if self.mapBuild.bLock then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("BuildModifier_ValidTips5"))
return
end
local nScoreFixedable = ConfigTable.GetConfigNumber("BuildModifierScoreMin")
if nScoreFixedable > self.mapBuild.nScore then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("BuildModifier_ValidTips2"))
return
end
local nIdx = self._mapNode.ContentList.nCurTab
if nIdx == 1 then
local nModifierState = self.mapBuild and self.mapBuild.nModifierState
@@ -220,7 +256,6 @@ function StarTowerBuildDetailCtrl:OnBtnClick_EditBuild()
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("BuildModifier_ValidTips3"))
return
end
EventManager.Hit(EventId.OpenPanel, PanelId.BuildModifierPotentialPanel, self.mapBuild.nBuildId)
else
local nModifierState = self.mapBuild and self.mapBuild.nModifierState
local bNoteModifiable = nModifierState == AllEnum.BuildModifierState.NotModified or nModifierState == AllEnum.BuildModifierState.PotentialModified
@@ -229,7 +264,38 @@ function StarTowerBuildDetailCtrl:OnBtnClick_EditBuild()
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("BuildModifier_ValidTips4"))
return
end
EventManager.Hit(EventId.OpenPanel, PanelId.BuildModifierMusicPanel, self.mapBuild.nBuildId)
end
if self.mapBuild.bLock then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("BuildModifier_ValidTips5"))
return
end
local nScoreFixedable = ConfigTable.GetConfigNumber("BuildModifierScoreMin")
if nScoreFixedable > self.mapBuild.nScore then
EventManager.Hit(EventId.OpenMessageBox, ConfigTable.GetUIText("BuildModifier_ValidTips2"))
return
end
local callback = function()
local nIdx = self._mapNode.ContentList.nCurTab
if nIdx == 1 then
EventManager.Hit(EventId.OpenPanel, PanelId.BuildModifierPotentialPanel, self.mapBuild.nBuildId)
else
EventManager.Hit(EventId.OpenPanel, PanelId.BuildModifierMusicPanel, self.mapBuild.nBuildId)
end
end
local confirmCallback = function()
PlayerData.Build:SetBuildDislike(self.mapBuild.nBuildId, false, callback)
end
local sHint = orderedFormat(ConfigTable.GetUIText("BuildModifier_DislikeHint") or "")
local msg = {
nType = AllEnum.MessageBox.Confirm,
sContent = sHint,
callbackConfirm = confirmCallback,
bDisableSnap = false
}
if self.mapBuild.bDislike then
EventManager.Hit(EventId.OpenMessageBox, msg)
else
callback()
end
end
function StarTowerBuildDetailCtrl:OnEvent_ContentChangeTab(nIdx)