Update Aardwolf_Clock.xml

Added Ice age trigger, fixed new times for days/nights
master
AardCrowley 4 months ago committed by GitHub
parent 54fd00053d
commit 5984d2065b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -6,7 +6,7 @@
<!-- Plugin "Aardwolf_Clock" generated by Plugin Wizard --> <!-- Plugin "Aardwolf_Clock" generated by Plugin Wizard -->
<muclient> <muclient>
<plugin name="Aardwolf_Clock" author="Crowley, with help from Fiendish" id="28a36788fa20aa062e760ee2" language="Lua" purpose="Displays a realtime clock based on Aardwolf game time" save_state="y" date_written="2018-05-15 11:43:22" requires="4.90" version="5.03"> <plugin name="Aardwolf_Clock" author="Crowley, with help from Fiendish" id="28a36788fa20aa062e760ee2" language="Lua" purpose="Displays a realtime clock based on Aardwolf game time" save_state="y" date_written="2018-05-15 11:43:22" requires="4.90" version="5.04">
</plugin> </plugin>
@ -15,8 +15,17 @@
<triggers> <triggers>
<trigger enabled="n" match="^\s+\*\s+It is ((?:\d+|Noon|Midnight))((?:p|a))?m? (?:in the daytime|in the evening|during the night) of the (\d+)(?:rd|th|nd|st) day of the Season of (?:the )?(\w+).*$" script="getTime" regexp="y" sequence="100" omit_from_output="n" name="GetTime"> <trigger enabled="n" match="^\s+\*\s+It is ((?:\d+|Noon|Midnight))((?:p|a))?m? (?:in the daytime|in the evening|during the night) of the (\d+)(?:rd|th|nd|st) day of the Season of (?:the )?(\w+).*$" script="getTime" regexp="y" sequence="100" omit_from_output="n" name="GetTime">
</trigger> </trigger>
<trigger
enabled="y"
match="*As the ice age passes, life starts to return to normal.*"
send_to="12"
sequence="100"
>
<send>Execute("aardclock time")</send>
</trigger>
</triggers> </triggers>
<!-- Timers --> <!-- Timers -->
<timers> <timers>
@ -49,28 +58,51 @@ require 'themed_miniwindows'
async_ok, async = pcall (require, "async") async_ok, async = pcall (require, "async")
local s = 0 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 = { clock_seasons = {
Sun = {138, 3, 19, 1, "Light"}, Sun = {138, 6, 18, 1, "Light"},
Scourge = {162, 9, 18, 2, "Disease"}, Scourge = {162, 9, 17, 2, "Disease"},
River = {138, 7, 18, 3, "Water"}, River = {138, 7, 17, 3, "Water"},
Song = {150, 6, 19, 4, "Sonic"}, Song = {150, 6, 18, 4, "Sonic"},
Energy = {148, 6, 20, 5, "Energy"}, Energy = {148, 6, 19, 5, "Energy"},
Nature = {140, 5, 19, 6, "Earth"}, Nature = {140, 5, 18, 6, "Earth"},
Snake = {142, 5, 20, 7, "Poison"}, Snake = {142, 5, 19, 7, "Poison"},
Sword = {140, 7, 18, 8, "Slash"}, Sword = {140, 7, 17, 8, "Slash"},
Freeze = {148, 9, 19, 9, "Cold"}, Freeze = {148, 9, 18, 9, "Cold"},
Thought = {148, 8, 20, 10, "Mental"}, Thought = {148, 8, 19, 10, "Mental"},
Darkness = {134, 10, 18, 11, "Shadow"}, Darkness = {134, 10, 18, 11, "Shadow"},
Corrosion = {136, 8, 20, 12, "Acid"}, Corrosion = {136, 8, 19, 12, "Acid"},
Dagger = {120, 9, 18, 13, "Pierce"}, Dagger = {120, 9, 17, 13, "Pierce"},
Storm = {140, 8, 19, 14, "Electric"}, Storm = {140, 8, 18, 14, "Electric"},
Piety = {143, 7, 18, 15, "Holy"}, Piety = {143, 7, 17, 15, "Holy"},
Suffering = {135, 6, 19, 16, "Negative"}, Suffering = {135, 6, 18, 16, "Negative"},
Burning = {144, 7, 20, 17, "Fire"}, Burning = {144, 7, 19, 17, "Fire"},
Tornado = {142, 7, 21, 18, "Air"}, Tornado = {142, 7, 20, 18, "Air"},
Stone = {120, 7, 21, 19, "Bash"}, Stone = {120, 7, 20, 19, "Bash"},
Magi = {138, 6, 19, 20, "Magic"}, Magi = {138, 6, 18, 20, "Magic"}
} }
clock_season_order = { clock_season_order = {
@ -373,7 +405,7 @@ function drawFace()
WindowText(win, font, (dTime or ""), center((dTime or "")), y, 0, 0, ColourNameToRGB(textColour)) WindowText(win, font, (dTime or ""), center((dTime or "")), y, 0, 0, ColourNameToRGB(textColour))
y = y + font_height 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 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)) 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 y = y + font_height
@ -381,7 +413,7 @@ function drawFace()
if GetVariable("showDigital") == "true" then if GetVariable("showDigital") == "true" then
y = y + font_height 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) --clockWin:resize(window_width, y+font_height)
end end
@ -579,9 +611,8 @@ end -- end Update code
function onHelp() function onHelp()
ColourNote("orange", "", "AardClock Help (Generic until I make it better)") 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 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 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 end
function winShow(name, line, wildcards) function winShow(name, line, wildcards)

Loading…
Cancel
Save