From c26d17ef9e8ddc3eaf6571fe99c5c3f2a9bb8ce9 Mon Sep 17 00:00:00 2001 From: Arcidayne <9382522b@opayq.com> Date: Sat, 13 Jun 2015 18:49:22 -0700 Subject: [PATCH] Plugin --- Aardwolf_Clock/Aardwolf_Clock.xml | 239 ++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 Aardwolf_Clock/Aardwolf_Clock.xml diff --git a/Aardwolf_Clock/Aardwolf_Clock.xml b/Aardwolf_Clock/Aardwolf_Clock.xml new file mode 100644 index 0000000..0c941e6 --- /dev/null +++ b/Aardwolf_Clock/Aardwolf_Clock.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + imagecount = 1 + clock_current = {Season = "%4", day = tonumber("%3"), order = clock_seasons["%4"][4]} + local sunrise, sunset = clock_seasons[clock_current.Season][2], clock_seasons[clock_current.Season][3] +if "%1" == "Noon" then +winimg = "im12" +imgcount = 12 +bgcolour = bgday +elseif "%1" == "Midnight" then +winimg = "im12" +imgcount = 24 +bgcolour = bgnight +else +winimg = "im%1" +if "%2" == "a" then +imgcount = tonumber("%1") +else +imgcount = tonumber("%1") + 12 +end +if imgcount >= sunrise and imgcount < sunset then +bgcolour = bgday +elseif imgcount >= sunset or imgcount < sunrise then +bgcolour = bgnight +end +end +update_image(winimg) + + + + + + + tprint(clock_current) + tprint(clock_seasons[clock_current.Season]) + + + + + + + + +