Skip to content

Releases: demonnic/MDK

Notification option for EMCO

22 Jun 03:56
2a621b9
Compare
Choose a tag to compare

OS notifications from EMCO

Adds a new option you can pass in the options table for EMCO:new, notifyTabs. Set like

notifyTabs = { "Says", "Tells", "Org" },

Also adds EMCO:addNotifyTab and EMCO:removeNotifyTab for interacting with the notification system post-creation.

image

EMCO gagging options

02 Oct 01:07
2ee080f
Compare
Choose a tag to compare

Adds gagging capabilities to EMCO

  • New constraint for :new
    • gags
      • table of Lua patterns to prevent from being sent to the EMCO consoles
      • example:
        • testEMCO = EMCO:new({gags = {'^A goblin says \".+\"$', "GAGTHISLINE" }, name = "testEMCO"})
  • New functions
    • EMCO:addGag(pattern)
      • adds Lua pattern pattern to the gag list
      • returns true if the pattern was added. false if it was already there and thus not added again
    • EMCO:removeGag(pattern)
      • removes Lua pattern pattern from the gag list
      • returns true if the pattern was removed, false if it was not there to remove.
    • EMCO:matchesGag(str)
      • returns false if string str does not match any of the gag patterns for the EMCO
      • returns true and the pattern it matched if it does match one of the gag patterns

If a line is gagged, then EMCO will print a debug message to the error console in the script, so that you aren't left without any way to tell what happened.

EMCO tab change event + bugfixes

31 Aug 23:04
Compare
Choose a tag to compare

EMCO tab change event

EMCO will now raise the "EMCO tab change" event with three arguments, the emco name, the old tab name, and the new tab name.
so if your EMCO is named "testEMCO" and you go from the "All" tab to the "Guild" tab it would raiseEvent("EMCO tab change", "testEMCO", "All", "Guild")

No event is raised if you click on the already selected tab.

demontools bugfixes

Fixes to demontools.exists and demontools.isDir to make them more durable and resolve an issue on OSX where it would falsely report directories as missing due to lacking permissions. Causes logging to work on OSX for loggingconsole/EMCO again as well.

EMCO logging control and bugfix

09 Aug 17:16
a02a321
Compare
Choose a tag to compare

New functions

Adds the following functions to enable/disable logging on all or specific tabs.

  • EMCO:enableTabLogging(tabName)
  • EMCO:disableTabLogging(tabName)
  • EMCO:enableAllLogging()
  • EMCO:disableAllLogging()

Bugfix

Fixes #22 by setting the majority of the defaults in the metatable rather than setting them in the :new() function.

Bug fixes

04 Jul 00:49
Compare
Choose a tag to compare

Chyron

properly respects the displayWidth at instantiation

SUG/getValueAt

fixed bug where it did not properly return nil when a table in the middle of the chain is nil.

Several small features, one small release

17 Jun 19:52
df7a452
Compare
Choose a tag to compare

Self Updating Gauges

Adds updateEvent constraint to make the gauge update on receiving the appropriate event

  • defaults to "" which disables the functionality
  • runs alongside updateTime
  • set updateTime to 0 to disable the timer but still leave the gauge active for event updates

EMCO

Will not spin up a blinky timer if you haven't turned on blinking. Previously it would create one regardless. Thanks to @Kebap for this improvement.

fText.TableMaker

Optional row separator

Add separateRows constraint. When false, does not display the line between rows in the table. Defaults to true, to maintain current behaviour. First picture is with separateRows = true, second with separateRows = false

image

image

Table title display option

adds title constraint to give the table a title, as well as printTitle which controls whether the title is printed and titleColor which controls the color of the text in the title.

local TableMaker = require("MDK.ftext").TableMaker

testMaker = TableMaker:new({
  title = "Test Table",
  printTitle = true,
  titleColor = "<red>",
  printHeaders = false,
  separateRows = false,
})
testMaker:addColumn({name = "col1", width = 15, textColor = "<orange>"})
testMaker:addColumn({name = "col2", width = 20, textColor = "<green>"})
testMaker:addColumn({name = "col3", width = 30, textColor = "<purple>"})
testMaker:addRow({"row 1 col 1", "row 1 col 2", "row 1 col 3"})
testMaker:addRow({"row 2 col 1", "row 2 col 2", "row 2 col 3"})
testMaker:addRow({"row 3 col 1", "row 3 col 2", "row 3 col 3"})
cecho(testMaker:assemble())

image

Introducing the LOGINATOR!

05 May 23:30
715e904
Compare
Choose a tag to compare

the Loginator will log all of your messages

Slowly allowing you to take over all of the Tri State AREA!
Or, at least, keep logfiles for your scripts. There is more information in the Wiki and API docs but here is a screenshot of an html log and the code used to write it

image

Bug Fixes

LoggingConsole

There was an issue with the replay in loggingconsoles. This should be resolved now.

SUG (Self Updating Gauges)

Due to SUG:stop() ~= self:stop() before now the second and subsequent SUGs would be set to inactive by default. This embarrassing typo/bug/brainfart has been rectified.

Master Mind solver

23 Apr 22:27
Compare
Choose a tag to compare

Minor EMCO fix

There was an issue with saving the timestamp constraint. This resolves it.

Master Mind Solver

This adds a new module, mastermindsolver, which you can use to solve Master Mind puzzles.

What is Master Mind?

Master Mind is a code-breaking game where a secret code is set and you attempt to figure out what it is.
The board game version is typically six different colors of peg which make up the code, and four code positions.
The solver makes a guess at the code, and is told how many items have the right color in the right position, and how many items are the right color, but in the wrong position.
This is most often represented with fully right guesses being colored pegs, and right color but wrong position being white pegs.
The solver then uses this information and any information from previous answers to make another guess.

A more thorough write up can be found on wikipedia

See the MasterMindSolver wiki for more info on using it.

No new features whatsoever

07 Feb 23:23
Compare
Choose a tag to compare

Instead I opted to

  • standardize filenames to be all lowercase
  • change the name of the package from MDK-1 to MDK
  • move the TextFormatter and TableMaker classes to inside of the ftext module. It's just simpler/easier/less fragile/better to do it this way than to create multi-level dependency chains.
  • consolidate all of the various wikis into the MDK github wiki
  • end maintaining the downstream projects like EMCO as separate entities.
    • If you just want the things to use for yourself you can install the MDK mpackage and use it that way but the extra maintenance ended up meaning the downstream projects fell behind

So what's really changed?

All of your local EMCO = require("MDK-1.EMCO") will change to local EMCO = require("MDK.emco"). If the part after the period had uppercase letters before they should be lowercase now. And I dropped the -1 from the reference mpackage name.

TextFormatter and TableMaker are not separate files any more.

local TableMaker = require("MDK.ftext").TableMaker if you just want it like before.

And all the wiki docs are store in the MDK wiki

EchoFile gets some updates

06 Feb 06:31
Compare
Choose a tag to compare

Offer unfiltered options

Splits filtered and unfiltered echoFiles into two sets of functions, echofile.echoFile and echofile.echoFilef, where the function with the f at the end is filtered through echofile.f before being echoed.

I did this rather than adding a third option in order to be able to maintain the pattern used in other echo functions of echoFile([window,] text).

Also trying to add another optional argument to a function with a leading optional argument in lua is folly I'd prefer not to engage in, thank you all the same.

The Future!

There will be a 2.0 release soon. Of Note

  • the mdk mpackage directory will change from "MDK-1" to just "MDK" (overdue, but I promised not to change it for a while the last time I did)
  • All filenames will be lowercase. ftext.lua, textgauge.lua, emco.lua, etc
  • I am not going to change the name of any functions or EXCEPT
    • fText, TextFormatter, and TableMaker will all be inside the single fText module
      • local textFormatter = require("MDK.textformatter") will change to
      • local ftext = require("MDK.ftext") and TextFormatter will be at ftext.TextFormatter