From 5984d2065bef54dba3b8b3696600b9fa979213c7 Mon Sep 17 00:00:00 2001 From: AardCrowley Date: Tue, 6 Aug 2024 21:26:37 -0400 Subject: [PATCH] Update Aardwolf_Clock.xml Added Ice age trigger, fixed new times for days/nights --- Aardwolf_Clock V2/Aardwolf_Clock.xml | 81 +++++++++++++++++++--------- 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/Aardwolf_Clock V2/Aardwolf_Clock.xml b/Aardwolf_Clock V2/Aardwolf_Clock.xml index 8d01ce1..551bcbe 100644 --- a/Aardwolf_Clock V2/Aardwolf_Clock.xml +++ b/Aardwolf_Clock V2/Aardwolf_Clock.xml @@ -6,7 +6,7 @@ - + @@ -15,8 +15,17 @@ + + Execute("aardclock time") + + @@ -49,28 +58,51 @@ require 'themed_miniwindows' async_ok, async = pcall (require, "async") local s = 0 - +--[[ + the Sun (Light) : 138 days, sunrise at 6am, sunset at 6pm + the Scourge (Disease) : 162 days, sunrise at 9am, sunset at 5pm + the River (Water) : 138 days, sunrise at 7am, sunset at 5pm + Song (Sonic) : 150 days, sunrise at 6am, sunset at 6pm + Energy (Energy) : 148 days, sunrise at 6am, sunset at 7pm + Nature (Earth) : 140 days, sunrise at 5am, sunset at 6pm + the Snake (Poison) : 142 days, sunrise at 5am, sunset at 7pm + the Sword (Slash) : 140 days, sunrise at 7am, sunset at 5pm + the Freeze (Cold) : 148 days, sunrise at 9am, sunset at 6pm + Thought (Mental) : 148 days, sunrise at 8am, sunset at 7pm + Darkness (Shadow) : 134 days, sunrise at 10am, sunset at 6pm + Corrosion (Acid) : 136 days, sunrise at 8am, sunset at 7pm + the Dagger (Pierce) : 120 days, sunrise at 9am, sunset at 5pm + the Storm (Electric) : 140 days, sunrise at 8am, sunset at 6pm + Piety (Holy) : 143 days, sunrise at 7am, sunset at 5pm + Suffering (Negative) : 135 days, sunrise at 6am, sunset at 6pm + Burning (Fire) : 144 days, sunrise at 7am, sunset at 7pm + the Tornado (Air) : 142 days, sunrise at 7am, sunset at 8pm + the Stone (Bash) : 120 days, sunrise at 7am, sunset at 8pm + the Magi (Magic) : 138 days, sunrise at 6am, sunset at 6pm + + +]]-- clock_seasons = { - Sun = {138, 3, 19, 1, "Light"}, - Scourge = {162, 9, 18, 2, "Disease"}, - River = {138, 7, 18, 3, "Water"}, - Song = {150, 6, 19, 4, "Sonic"}, - Energy = {148, 6, 20, 5, "Energy"}, - Nature = {140, 5, 19, 6, "Earth"}, - Snake = {142, 5, 20, 7, "Poison"}, - Sword = {140, 7, 18, 8, "Slash"}, - Freeze = {148, 9, 19, 9, "Cold"}, - Thought = {148, 8, 20, 10, "Mental"}, + Sun = {138, 6, 18, 1, "Light"}, + Scourge = {162, 9, 17, 2, "Disease"}, + River = {138, 7, 17, 3, "Water"}, + Song = {150, 6, 18, 4, "Sonic"}, + Energy = {148, 6, 19, 5, "Energy"}, + Nature = {140, 5, 18, 6, "Earth"}, + Snake = {142, 5, 19, 7, "Poison"}, + Sword = {140, 7, 17, 8, "Slash"}, + Freeze = {148, 9, 18, 9, "Cold"}, + Thought = {148, 8, 19, 10, "Mental"}, Darkness = {134, 10, 18, 11, "Shadow"}, - Corrosion = {136, 8, 20, 12, "Acid"}, - Dagger = {120, 9, 18, 13, "Pierce"}, - Storm = {140, 8, 19, 14, "Electric"}, - Piety = {143, 7, 18, 15, "Holy"}, - Suffering = {135, 6, 19, 16, "Negative"}, - Burning = {144, 7, 20, 17, "Fire"}, - Tornado = {142, 7, 21, 18, "Air"}, - Stone = {120, 7, 21, 19, "Bash"}, - Magi = {138, 6, 19, 20, "Magic"}, + Corrosion = {136, 8, 19, 12, "Acid"}, + Dagger = {120, 9, 17, 13, "Pierce"}, + Storm = {140, 8, 18, 14, "Electric"}, + Piety = {143, 7, 17, 15, "Holy"}, + Suffering = {135, 6, 18, 16, "Negative"}, + Burning = {144, 7, 19, 17, "Fire"}, + Tornado = {142, 7, 20, 18, "Air"}, + Stone = {120, 7, 20, 19, "Bash"}, + Magi = {138, 6, 18, 20, "Magic"} } clock_season_order = { @@ -373,7 +405,7 @@ function drawFace() WindowText(win, font, (dTime or ""), center((dTime or "")), y, 0, 0, ColourNameToRGB(textColour)) y = y + font_height - WindowText(win, font, string.format("[ Day %d of %d ]", footer_text.Day, footer_text.Cycle), center(string.format("[ Day %d of %d ]", footer_text.Day, footer_text.Cycle)), y, 0, 0, ColourNameToRGB(textColour)) + WindowText(win, font, string.format("[ Day %3d of %3d ]", footer_text.Day, footer_text.Cycle), center(string.format("[ Day %3d of %3d ]", footer_text.Day, footer_text.Cycle)), y, 0, 0, ColourNameToRGB(textColour)) y = y + font_height WindowText(win, font, string.format("Season of %s", footer_text.Season), center(string.format("Season of %s", footer_text.Season)), y, 0, 0, ColourNameToRGB(textColour)) y = y + font_height @@ -381,7 +413,7 @@ function drawFace() if GetVariable("showDigital") == "true" then y = y + font_height - WindowText(win, font, "[ Next tick: " .. 30 - math.floor(s) .. " ]", center("[ Next tick: " .. 30 - math.floor(s) .. " ]"), y, 0, 0, ColourNameToRGB(textColour)) + WindowText(win, font, "[ Next tick: " .. string.format("%2d", 30 - math.floor(s)) .. " ]", center("[ Next tick: " .. string.format("%2d", 30 - math.floor(s)) .. " ]"), y, 0, 0, ColourNameToRGB(textColour)) --clockWin:resize(window_width, y+font_height) end @@ -579,9 +611,8 @@ end -- end Update code function onHelp() ColourNote("orange", "", "AardClock Help (Generic until I make it better)") ColourNote("orange", "", "aardclock time -- force an update of time, useful for disconnections and reboots") - ColourNote("orange", "", "aardclock (show|on|hide|off) -- Shows or hides the clock") ColourNote("orange", "", "aardclock update -- automatically update the plugin when new versions come out") - ColourNote("orange", "", "aardclock help -- what you're reading now...") + ColourNote("orange", "", "aardlock help -- what you're reading now...") end function winShow(name, line, wildcards)