From 5f21819e8510e567ca2dd3bc122e0c017bebe21c Mon Sep 17 00:00:00 2001 From: ws3917 Date: Sat, 19 Apr 2025 20:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E4=B8=89=E9=B2=9C=20vs=20=E8=8C=84?= =?UTF-8?q?=E7=9B=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/systems/atlas.lua | 99 +++++++++++++++++++++------------- translate/text/en_US/atlas.lua | 99 +++++++++++++++++++++------------- translate/text/zh_CN/atlas.lua | 99 +++++++++++++++++++++------------- 3 files changed, 186 insertions(+), 111 deletions(-) diff --git a/code/systems/atlas.lua b/code/systems/atlas.lua index ee01154..8dc06ae 100644 --- a/code/systems/atlas.lua +++ b/code/systems/atlas.lua @@ -259,17 +259,19 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi self.color.red = 255 self.color.green = 255 self.color.blue = 255 - self.z = 999 + local parent = self.parent + if parent and parent.remove and parent.attach then + parent:remove(self) + parent:attach(self) + end elseif i == 0 and #inventory == 0 then self.color.red = 63 self.color.green = 63 self.color.blue = 63 - self.z = 0 else self.color.red = 127 self.color.green = 127 self.color.blue = 127 - self.z = i end end) end @@ -407,43 +409,61 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi if ____cond60 then return { __TS__New(STText, - { anchor = { y = 0.5 }, position = { x = 10 }, font = - assets["f$helloplayer"], content = text - .generic_disabled }):addTicker(index == 1 and - (function(self) - self.alpha.value = accessor["$option_music_enabled"] and - 0 or 1 - end) or (function(self) - self.alpha.value = accessor["$option_sound_enabled"] and - 0 or 1 - end)), + { + anchor = { y = 0.5 }, + position = { x = 10 }, + font = + assets["f$helloplayer"], + content = text + .generic_disabled + }):addTicker(index == 1 and + (function(self) + self.alpha.value = accessor + ["$option_music_enabled"] and + 0 or 1 + end) or (function(self) + self.alpha.value = accessor + ["$option_sound_enabled"] and + 0 or 1 + end)), __TS__New(STAnimation, - { anchor = { y = 0.5 }, position = { x = 10, y = -2 }, scale = { x = 2 }, frames = - assets["im$volume"] }):addTicker(index == 1 and - (function(self) - self.alpha.value = accessor["$option_music_enabled"] and - 1 or 0 - self.frame = accessor["$option_music"] - end) or (function(self) - self.alpha.value = accessor["$option_sound_enabled"] and - 1 or 0 - self.frame = accessor["$option_sound"] - end)) + { + anchor = { y = 0.5 }, + position = { x = 10, y = -2 }, + scale = { x = 2 }, + frames = + assets["im$volume"] + }):addTicker(index == 1 and + (function(self) + self.alpha.value = accessor + ["$option_music_enabled"] and + 1 or 0 + self.frame = accessor["$option_music"] + end) or (function(self) + self.alpha.value = accessor + ["$option_sound_enabled"] and + 1 or 0 + self.frame = accessor["$option_sound"] + end)) } end ____cond60 = ____cond60 or - (____switch60 == 4 or ____switch60 == 5) + (____switch60 == 4 or ____switch60 == 5) if ____cond60 then return { __TS__New(STText, - { anchor = { y = 0.5 }, position = { x = 10 }, font = - assets["f$helloplayer"] }):addTicker(index == 4 and - (function(self) - self.content = ({ text.shaders1, text.shaders2, text.shaders3 }) - [accessor["$option_shaders"] + 1] - end) or (function(self) - self.content = accessor["$option_debug"] and - text.generic_enabled or text.generic_disabled - end)) } + { + anchor = { y = 0.5 }, + position = { x = 10 }, + font = + assets["f$helloplayer"] + }):addTicker(index == 4 and + (function(self) + self.content = ({ text.shaders1, text.shaders2, text.shaders3 }) + [accessor["$option_shaders"] + 1] + end) or (function(self) + self.content = accessor["$option_debug"] and + text.generic_enabled or text.generic_disabled + end)) } end do return {} @@ -536,7 +556,7 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi justify = 0.5, font = assets["f$helloplayer"], content = atlas.navigators.menu.position.y == (#inventory == 0 and 0 or 1) and - text.confirm_ponder or text.confirm_debug + text.confirm_ponder or text.confirm_debug }), __TS__New(STText, { position = { x = -25, y = 24 }, anchor = 0.5, font = assets["f$helloplayer"] }) @@ -670,8 +690,13 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi children = { __TS__New(STSprite, { image = assets["im$ov_toast"], anchor = 0.5 }), __TS__New(STText, - { position = { y = -14 }, anchor = { x = 0.5 }, justify = 0.5, font = assets - ["f$helloplayer"] }):addTicker(function(self) + { + position = { y = -14 }, + anchor = { x = 0.5 }, + justify = 0.5, + font = assets + ["f$helloplayer"] + }):addTicker(function(self) if atlas.target == "save" then self.content = text.save1 else diff --git a/translate/text/en_US/atlas.lua b/translate/text/en_US/atlas.lua index 7de7c9b..841687b 100644 --- a/translate/text/en_US/atlas.lua +++ b/translate/text/en_US/atlas.lua @@ -259,17 +259,19 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi self.color.red = 255 self.color.green = 255 self.color.blue = 255 - self.z = 999 + local parent = self.parent + if parent and parent.remove and parent.attach then + parent:remove(self) + parent:attach(self) + end elseif i == 0 and #inventory == 0 then self.color.red = 63 self.color.green = 63 self.color.blue = 63 - self.z = 0 else self.color.red = 127 self.color.green = 127 self.color.blue = 127 - self.z = i end end) end @@ -407,43 +409,61 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi if ____cond60 then return { __TS__New(STText, - { anchor = { y = 0.5 }, position = { x = 10 }, font = - assets["f$helloplayer"], content = text - .generic_disabled }):addTicker(index == 1 and - (function(self) - self.alpha.value = accessor["$option_music_enabled"] and - 0 or 1 - end) or (function(self) - self.alpha.value = accessor["$option_sound_enabled"] and - 0 or 1 - end)), + { + anchor = { y = 0.5 }, + position = { x = 10 }, + font = + assets["f$helloplayer"], + content = text + .generic_disabled + }):addTicker(index == 1 and + (function(self) + self.alpha.value = accessor + ["$option_music_enabled"] and + 0 or 1 + end) or (function(self) + self.alpha.value = accessor + ["$option_sound_enabled"] and + 0 or 1 + end)), __TS__New(STAnimation, - { anchor = { y = 0.5 }, position = { x = 10, y = -2 }, scale = { x = 2 }, frames = - assets["im$volume"] }):addTicker(index == 1 and - (function(self) - self.alpha.value = accessor["$option_music_enabled"] and - 1 or 0 - self.frame = accessor["$option_music"] - end) or (function(self) - self.alpha.value = accessor["$option_sound_enabled"] and - 1 or 0 - self.frame = accessor["$option_sound"] - end)) + { + anchor = { y = 0.5 }, + position = { x = 10, y = -2 }, + scale = { x = 2 }, + frames = + assets["im$volume"] + }):addTicker(index == 1 and + (function(self) + self.alpha.value = accessor + ["$option_music_enabled"] and + 1 or 0 + self.frame = accessor["$option_music"] + end) or (function(self) + self.alpha.value = accessor + ["$option_sound_enabled"] and + 1 or 0 + self.frame = accessor["$option_sound"] + end)) } end ____cond60 = ____cond60 or - (____switch60 == 4 or ____switch60 == 5) + (____switch60 == 4 or ____switch60 == 5) if ____cond60 then return { __TS__New(STText, - { anchor = { y = 0.5 }, position = { x = 10 }, font = - assets["f$helloplayer"] }):addTicker(index == 4 and - (function(self) - self.content = ({ text.shaders1, text.shaders2, text.shaders3 }) - [accessor["$option_shaders"] + 1] - end) or (function(self) - self.content = accessor["$option_debug"] and - text.generic_enabled or text.generic_disabled - end)) } + { + anchor = { y = 0.5 }, + position = { x = 10 }, + font = + assets["f$helloplayer"] + }):addTicker(index == 4 and + (function(self) + self.content = ({ text.shaders1, text.shaders2, text.shaders3 }) + [accessor["$option_shaders"] + 1] + end) or (function(self) + self.content = accessor["$option_debug"] and + text.generic_enabled or text.generic_disabled + end)) } end do return {} @@ -536,7 +556,7 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi justify = 0.5, font = assets["f$helloplayer"], content = atlas.navigators.menu.position.y == (#inventory == 0 and 0 or 1) and - text.confirm_ponder or text.confirm_debug + text.confirm_ponder or text.confirm_debug }), __TS__New(STText, { position = { x = -25, y = 24 }, anchor = 0.5, font = assets["f$helloplayer"] }) @@ -670,8 +690,13 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi children = { __TS__New(STSprite, { image = assets["im$ov_toast"], anchor = 0.5 }), __TS__New(STText, - { position = { y = -14 }, anchor = { x = 0.5 }, justify = 0.5, font = assets - ["f$helloplayer"] }):addTicker(function(self) + { + position = { y = -14 }, + anchor = { x = 0.5 }, + justify = 0.5, + font = assets + ["f$helloplayer"] + }):addTicker(function(self) if atlas.target == "save" then self.content = text.save1 else diff --git a/translate/text/zh_CN/atlas.lua b/translate/text/zh_CN/atlas.lua index ee01154..8dc06ae 100644 --- a/translate/text/zh_CN/atlas.lua +++ b/translate/text/zh_CN/atlas.lua @@ -259,17 +259,19 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi self.color.red = 255 self.color.green = 255 self.color.blue = 255 - self.z = 999 + local parent = self.parent + if parent and parent.remove and parent.attach then + parent:remove(self) + parent:attach(self) + end elseif i == 0 and #inventory == 0 then self.color.red = 63 self.color.green = 63 self.color.blue = 63 - self.z = 0 else self.color.red = 127 self.color.green = 127 self.color.blue = 127 - self.z = i end end) end @@ -407,43 +409,61 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi if ____cond60 then return { __TS__New(STText, - { anchor = { y = 0.5 }, position = { x = 10 }, font = - assets["f$helloplayer"], content = text - .generic_disabled }):addTicker(index == 1 and - (function(self) - self.alpha.value = accessor["$option_music_enabled"] and - 0 or 1 - end) or (function(self) - self.alpha.value = accessor["$option_sound_enabled"] and - 0 or 1 - end)), + { + anchor = { y = 0.5 }, + position = { x = 10 }, + font = + assets["f$helloplayer"], + content = text + .generic_disabled + }):addTicker(index == 1 and + (function(self) + self.alpha.value = accessor + ["$option_music_enabled"] and + 0 or 1 + end) or (function(self) + self.alpha.value = accessor + ["$option_sound_enabled"] and + 0 or 1 + end)), __TS__New(STAnimation, - { anchor = { y = 0.5 }, position = { x = 10, y = -2 }, scale = { x = 2 }, frames = - assets["im$volume"] }):addTicker(index == 1 and - (function(self) - self.alpha.value = accessor["$option_music_enabled"] and - 1 or 0 - self.frame = accessor["$option_music"] - end) or (function(self) - self.alpha.value = accessor["$option_sound_enabled"] and - 1 or 0 - self.frame = accessor["$option_sound"] - end)) + { + anchor = { y = 0.5 }, + position = { x = 10, y = -2 }, + scale = { x = 2 }, + frames = + assets["im$volume"] + }):addTicker(index == 1 and + (function(self) + self.alpha.value = accessor + ["$option_music_enabled"] and + 1 or 0 + self.frame = accessor["$option_music"] + end) or (function(self) + self.alpha.value = accessor + ["$option_sound_enabled"] and + 1 or 0 + self.frame = accessor["$option_sound"] + end)) } end ____cond60 = ____cond60 or - (____switch60 == 4 or ____switch60 == 5) + (____switch60 == 4 or ____switch60 == 5) if ____cond60 then return { __TS__New(STText, - { anchor = { y = 0.5 }, position = { x = 10 }, font = - assets["f$helloplayer"] }):addTicker(index == 4 and - (function(self) - self.content = ({ text.shaders1, text.shaders2, text.shaders3 }) - [accessor["$option_shaders"] + 1] - end) or (function(self) - self.content = accessor["$option_debug"] and - text.generic_enabled or text.generic_disabled - end)) } + { + anchor = { y = 0.5 }, + position = { x = 10 }, + font = + assets["f$helloplayer"] + }):addTicker(index == 4 and + (function(self) + self.content = ({ text.shaders1, text.shaders2, text.shaders3 }) + [accessor["$option_shaders"] + 1] + end) or (function(self) + self.content = accessor["$option_debug"] and + text.generic_enabled or text.generic_disabled + end)) } end do return {} @@ -536,7 +556,7 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi justify = 0.5, font = assets["f$helloplayer"], content = atlas.navigators.menu.position.y == (#inventory == 0 and 0 or 1) and - text.confirm_ponder or text.confirm_debug + text.confirm_ponder or text.confirm_debug }), __TS__New(STText, { position = { x = -25, y = 24 }, anchor = 0.5, font = assets["f$helloplayer"] }) @@ -670,8 +690,13 @@ local function atlas(assets, batch, ____debug, game, ____bindingPattern0, ____bi children = { __TS__New(STSprite, { image = assets["im$ov_toast"], anchor = 0.5 }), __TS__New(STText, - { position = { y = -14 }, anchor = { x = 0.5 }, justify = 0.5, font = assets - ["f$helloplayer"] }):addTicker(function(self) + { + position = { y = -14 }, + anchor = { x = 0.5 }, + justify = 0.5, + font = assets + ["f$helloplayer"] + }):addTicker(function(self) if atlas.target == "save" then self.content = text.save1 else