From c7bd0e0e0368db79d9146e1a9dd72a78e6ee4ea3 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Fri, 25 Dec 2020 18:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A3=E8=AF=9E=E8=8A=82=E5=BD=A9=E8=9B=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/widget.lua | 7 +++++++ main.lua | 4 +++- parts/scenes/load.lua | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Zframework/widget.lua b/Zframework/widget.lua index 95b7d15d..5adf2e1a 100644 --- a/Zframework/widget.lua +++ b/Zframework/widget.lua @@ -822,6 +822,13 @@ function WIDGET.set(list) list[i]:reset() end end + if FESTIVAL=="Xmas"and SCN.cur~="custom_field"then + for _,W in next,list do + if W.color then + W.color=math.random()<.5 and COLOR.red or COLOR.white + end + end + end end function WIDGET.setLang(widgetText) for S,L in next,SCN.scenes do diff --git a/main.lua b/main.lua index 9bff7b1f..24cdae5a 100644 --- a/main.lua +++ b/main.lua @@ -25,6 +25,8 @@ NOGAME=false LOGIN=false EDITING="" WSCONN=false +FESTIVAL= + os.date"%m"=="12"and math.abs(os.date"%d"-25)<2 and"Xmas" math.randomseed(os.time()*626) love.keyboard.setKeyRepeat(true) @@ -365,7 +367,7 @@ do if S.version<1208 then SETTING.skinSet=1 end - if S.version<1210 then + if S.version<1225 then SETTING.skin={1,7,11,3,14,4,9,1,7,2,6,10,2,13,5,9,15,10,11,3,12,2,16,8,4,10,13,2,8} end newVersionLaunch=true diff --git a/parts/scenes/load.lua b/parts/scenes/load.lua index 6f0c9c55..46160c24 100644 --- a/parts/scenes/load.lua +++ b/parts/scenes/load.lua @@ -209,6 +209,11 @@ function scene.update() } ) end + if FESTIVAL=="Xmas"then + LOG.print("==============",COLOR.red) + LOG.print("Merry Christmas!",COLOR.white) + LOG.print("==============",COLOR.red) + end end if loadTar then loadCur=loadCur+1