Skip to content

Commit

Permalink
Fix ambiguous Version name after semver introduction in uibase.
Browse files Browse the repository at this point in the history
  • Loading branch information
Holt59 committed Jun 30, 2024
1 parent 613eea0 commit a403274
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
12 changes: 6 additions & 6 deletions src/base_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,28 +567,28 @@ namespace CSharp {
// Versioning / INIs:

// Convert to Version^ from a MO2 version:
inline Version^ make_version(VersionInfo version) {
inline System::Version^ make_version(VersionInfo version) {
auto qversion = version.asQVersionNumber();
return gcnew Version(qversion.majorVersion(), qversion.minorVersion(), qversion.microVersion());
return gcnew System::Version(qversion.majorVersion(), qversion.minorVersion(), qversion.microVersion());

}

Version^ BaseScriptImpl::GetModManagerVersion() {
System::Version^ BaseScriptImpl::GetModManagerVersion() {
return make_version(g_Organizer->appVersion());
}

Version^ BaseScriptImpl::GetGameVersion() {
System::Version^ BaseScriptImpl::GetGameVersion() {
return make_version(g_Organizer->managedGame()->gameVersion());
}

Version^ BaseScriptImpl::GetScriptExtenderVersion() {
System::Version^ BaseScriptImpl::GetScriptExtenderVersion() {
auto scriptExtender = g_Organizer->gameFeatures()->gameFeature<ScriptExtender>();

if (!scriptExtender || !scriptExtender->isInstalled()) {
return nullptr;
}

return gcnew Version(msclr::interop::marshal_as<String^>(scriptExtender->getExtenderVersion().toStdString()));
return gcnew System::Version(msclr::interop::marshal_as<String^>(scriptExtender->getExtenderVersion().toStdString()));
}

bool BaseScriptImpl::ScriptExtenderPresent() {
Expand Down
16 changes: 8 additions & 8 deletions src/base_script.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,48 +323,48 @@ namespace CSharp {
/// Gets the version of the mod manager.
/// </summary>
/// <returns>The version of the mod manager.</returns>
static Version^ GetModManagerVersion();
static System::Version^ GetModManagerVersion();

/// <summary>
/// Gets the version of the game that is installed.
/// </summary>
/// <returns>The version of the game, or <c>null</c> if Fallout
/// is not installed.</returns>
static Version^ GetGameVersion();
static System::Version^ GetGameVersion();

// This is not in the spec., but I do not see a point in checking each
// script extender in a different way.
static Version^ GetScriptExtenderVersion();
static System::Version^ GetScriptExtenderVersion();

/// <summary>
/// Gets the script extender version or null if it's not installed
/// </summary>
/// <returns></returns>
static Version^ GetSkseVersion() {
static System::Version^ GetSkseVersion() {
return GetScriptExtenderVersion();
}

/// <summary>
/// Gets the script extender version or null if it's not installed
/// </summary>
/// <returns></returns>
static Version^ GetFoseVersion() {
static System::Version^ GetFoseVersion() {
return GetScriptExtenderVersion();
}

/// <summary>
/// Gets the script extender version or null if it's not installed
/// </summary>
/// <returns></returns>
static Version^ GetNvseVersion() {
static System::Version^ GetNvseVersion() {
return GetScriptExtenderVersion();
}

/// <summary>
/// Gets the version of the mod manager.
/// </summary>
/// <returns>The version of the mod manager.</returns>
static Version^ GetFommVersion() {
static System::Version^ GetFommVersion() {
return GetModManagerVersion();
}

Expand All @@ -373,7 +373,7 @@ namespace CSharp {
/// </summary>
/// <returns>The version of the game, or <c>null</c> if Fallout
/// is not installed.</returns>
static Version^ GetFalloutVersion() {
static System::Version^ GetFalloutVersion() {
// I think this is an old function... What Fallout anyway? So just going
// to return the game version, whatever current game.
return GetGameVersion();
Expand Down
10 changes: 5 additions & 5 deletions src/installer_fomod_csharp_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,33 +91,33 @@
<context>
<name>FomodInfoReader</name>
<message>
<location filename="xml_info_reader.h" line="106"/>
<location filename="xml_info_reader.h" line="109"/>
<source>Failed to parse %1. See console for details.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>InstallerFomodCSharp</name>
<message>
<location filename="installer_fomod_csharp.h" line="40"/>
<location filename="installer_fomod_csharp.h" line="36"/>
<source>Fomod Installer C#</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="installer_fomod_csharp.h" line="48"/>
<location filename="installer_fomod_csharp.h" line="42"/>
<source>Installer for C# based FOMOD archives.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="base_script.cpp" line="513"/>
<location filename="base_script.cpp" line="515"/>
<source>Choose any:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="base_script.cpp" line="516"/>
<location filename="base_script.cpp" line="518"/>
<source>Choose one:</source>
<translation type="unfinished"></translation>
</message>
Expand Down

0 comments on commit a403274

Please sign in to comment.