Releases: malware-dev/MDK-SE
Fixed MDK region ends getting lost
MDK preserve and macro region endings were for some reason lost when placed at the end of a class. Moving the analysis to an earlier stage seems to have remedied this problem.
Thank you @Wicorel for reporting this issue.
WARNING
Known issue: Opening script solutions from the solution file in Windows Explorer or the right-click Recent menu on the Visual Studio icon in the task bar seems to prevent MDK from loading. I'm still trying to track down the source if this issue.
Make sure your visual studio is fully updated or this extension won't work.
Small fixes to the previous release
Fixed indentation not being correctly removed
And yeah... Sorry... That was supposed to be a beta, not an alpha - all features are complete and just needs to be tested.
Make sure your visual studio is fully updated or this extension won't work.
Minifier Reloaded
WARNING: Highly experimental release. Pretty much guaranteed to be buggy.
Finally, it's here! I have finally been able to rewrite the script composing system, as well as a complete revamp of the minifier. Of course, as the very first release, this is bound to have bugs galore. The minifier is also rather slow, the larger scripts may take minutes to deploy.
Make sure your visual studio is fully updated or this extension won't work.
Reporting Bugs
Please report problems using the Issues section, and prefix your issue with [Pre].
Features
- Automatically remove type definitions that are not in use by the script
- Control the placement of individual .cs files in relation to each other
- The minifier now supports unminified sections
- Add deployment date and time information to your scripts via macros
- Decide whether you want the blueprint dialog to show after deployment (under tools/options/MDK/SE)
File Sorting Order
You can now control where each individual .cs files are placed in relation to each other by adding
// <mdk sortorder="100" />
at the very top of the code files you wish to control, even above the using
statements. The sortorder number will be used to determine the orders of the files. You can also use negative sortorders to force files above the Program class. Of course, certain rules will be above even the sortorder: The readme.cs
file will always be on top no matter what, and classes that is not inside a partial class Program
will by necessity have to be at the bottom simply due to how such classes work.
Deployment Date and Time Information
In order to both try to save a little time and to make sure these macros don't mess up any code, they only work inside special code regions.
#region mdk macros
// This script was deployed at $MDK_DATETIME$
const string Deployment = "$MDK_DATE$, $MDK_TIME$"
#endregion
Unminified Section
The unminified section system also works by code regions. Simply add the code or comments you wish to preserve within such a region to have the minifier skip over it. Be aware though, that it won't necessarily be completely untouched. Some minor adjustments might be made, but naming will be untouched, and formatting will most probably be.
#region mdk preserve
// Stuff I don't want the minifier to touch
#endregion
Just a small support-release...
A little push fixing a small oversight in the mocking system.
This fix is pushed in support of the ongoing project at https://github.com/malware-dev/MDK-Mockups and isn't important for anyone not interested in that project.
MDK utility and extension templates for shared projects - finally
I have merged the first pull request for MDK! Thank you very much @baratgabor for finding the solution to this annoying issue.
The MDK script templates for utility- and extension classes are finally available directly in Shared Projects.
Updated template to include UpdateType
Just a small update to have the ingame script template include the UpdateType argument for the Main method.
Obscure Crash Fix
A user reported a strange crash deep within Visual Studio. Fortunately this happens in code that's just visual, so in order to fix this I simply ignore any exceptions happening. It's ugly, but there's not much else I can do about it.
Version foolery...
Ok, so that little version kludgery actually caused some problems. Sorry. Should be fixed here.
Compatibility Release
A Space Engineers update pushed breaking changes. This update brings MDK up to date.
Also, messed up the versioning... 😞
Minor Feature
Decided to add the ability to copy scripts to the clipboard from the blueprint manager. Just, you know, if you prefer that rather than going via the local workshop.
Select your blueprint, and either press ctrl+c or the Copy button.