mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Add get_mse_version script function
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
// ----------------------------------------------------------------------------- : Includes
|
// ----------------------------------------------------------------------------- : Includes
|
||||||
|
|
||||||
#include <util/prec.hpp>
|
#include <util/prec.hpp>
|
||||||
|
#include <util/version.hpp>
|
||||||
#include <script/functions/functions.hpp>
|
#include <script/functions/functions.hpp>
|
||||||
#include <script/functions/util.hpp>
|
#include <script/functions/util.hpp>
|
||||||
#include <util/tagged_string.hpp>
|
#include <util/tagged_string.hpp>
|
||||||
@@ -21,13 +22,17 @@
|
|||||||
|
|
||||||
// ----------------------------------------------------------------------------- : Debugging
|
// ----------------------------------------------------------------------------- : Debugging
|
||||||
|
|
||||||
|
SCRIPT_FUNCTION(get_mse_version) {
|
||||||
|
SCRIPT_RETURN(app_version.toString());
|
||||||
|
}
|
||||||
|
|
||||||
SCRIPT_FUNCTION(trace) {
|
SCRIPT_FUNCTION(trace) {
|
||||||
SCRIPT_PARAM_C(String, input);
|
SCRIPT_PARAM_C(String, input);
|
||||||
#if defined(_DEBUG) && 0
|
#if defined(_DEBUG) && 0
|
||||||
wxLogDebug(_("Trace:\t") + input);
|
wxLogDebug(_("Trace:\t") + input);
|
||||||
#else
|
#else
|
||||||
queue_message(MESSAGE_INFO, _("Trace: ") + input);
|
queue_message(MESSAGE_INFO, _("Trace: ") + input);
|
||||||
#endif
|
#endif
|
||||||
SCRIPT_RETURN(input);
|
SCRIPT_RETURN(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -753,6 +758,7 @@ SCRIPT_FUNCTION(rule) {
|
|||||||
|
|
||||||
void init_script_basic_functions(Context& ctx) {
|
void init_script_basic_functions(Context& ctx) {
|
||||||
// debugging
|
// debugging
|
||||||
|
ctx.setVariable(_("get_mse_version"), script_get_mse_version);
|
||||||
ctx.setVariable(_("trace"), script_trace);
|
ctx.setVariable(_("trace"), script_trace);
|
||||||
ctx.setVariable(_("warning"), script_warning);
|
ctx.setVariable(_("warning"), script_warning);
|
||||||
ctx.setVariable(_("error"), script_error);
|
ctx.setVariable(_("error"), script_error);
|
||||||
|
|||||||
Reference in New Issue
Block a user