From 3e8326da5018c28556e1a7ad08b73528709b9f9d Mon Sep 17 00:00:00 2001 From: Asnivor Date: Mon, 10 Sep 2018 17:24:36 +0100 Subject: [PATCH] Lua: client.getversion() - #1314 fix #1271 --- .../tools/Lua/Libraries/EmuLuaLibrary.Client.cs | 7 +++++++ Version/VersionInfo.cs | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs index d59f34b9c8..a2a8d3674a 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs @@ -391,6 +391,13 @@ namespace BizHawk.Client.EmuHawk return GlobalWin.MainForm.DesktopLocation.Y; } + [LuaMethodExample("local incbhver = client.getversion( );")] + [LuaMethod("getversion", "Returns the current stable BizHawk version")] + public static string GetVersion() + { + return VersionInfo.Mainversion; + } + [LuaMethodExample("local nlcliget = client.getavailabletools( );")] [LuaMethod("getavailabletools", "Returns a list of the tools currently open")] public LuaTable GetAvailableTools() diff --git a/Version/VersionInfo.cs b/Version/VersionInfo.cs index cbe25607eb..acff25d758 100644 --- a/Version/VersionInfo.cs +++ b/Version/VersionInfo.cs @@ -2,8 +2,9 @@ using System.IO; internal static class VersionInfo { - public const string Mainversion = "2.0.0"; // Use numbers only or the new version notification won't work - public static readonly string RELEASEDATE = "June 25, 2017"; + // keep this updated at every major release + public const string Mainversion = "2.3.0"; // Use numbers only or the new version notification won't work + public static readonly string RELEASEDATE = "June 24, 2018"; public static readonly bool DeveloperBuild = true; public static readonly string HomePage = "http://tasvideos.org/BizHawk.html";