This repository contains the code for the comprehensive rules module used on the Magic the Gathering wiki plus enough of a faked MediaWiki environment to enable it to be run and debugged locally.
It is meant to be used with Visual Studio Code.
The CR module source can be found in the src/wiki folder.
-
Install Visual Studio Code (vsc)
-
Install luacheck. On Windows this is a simple as downloading the luacheck.exe file from here and placing it in a folder that is in your PATH.
-
In vsc install the vscode-lua extension for Lua language support and automatic use of luacheck to lint Lua code.
-
In vsc install the Lua Debug extension to enable Lua debugging.
-
(Optional) Install Lua. You should only need this if you want to run Lua code from the command line.
Have a look at the src\run_*.lua files, they show how to call the CR module locally.
There are debug configurations set up for each of these. Go to the run window and select the one you want and click on the Start Debugging button.
Licensed under CC BY-NC-SA 2.5. Yes it's a strange license for software but it is the license that applies to all content, including code, published on a gamepedia wiki. Principal contributers are the original author Corveroth and Yanderesliver. For a full list of contributers see the history on the MTG wiki.
The exception to this is src/mwhtml.lua which is published under GPL v2.