Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Mods/0-SCore/Features/VersionCheck/Scripts/VersionCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,14 @@ private static void CheckVersions(XUi xui = null)

private static string GetGameVersion()
{
return $"{Constants.cVersionMajor}.{Constants.cVersionMinor}.{Constants.cVersionBuild}";
// Using reflection due to inlining of const fields
var major = (int) typeof(Constants)
.GetField("cVersionMajor").GetRawConstantValue();
var minor = (int) typeof(Constants)
.GetField("cVersionMinor").GetRawConstantValue();
var build = (int) typeof(Constants)
.GetField("cVersionBuild").GetRawConstantValue();
return $"{major}.{minor}.{build}";
}

private static void DisplayVersionMismatchMessage(XUi xui, string gameVersion, string modVersion)
Expand Down
4 changes: 2 additions & 2 deletions Mods/0-SCore/Features/VersionCheck/versioncheck.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<Settings>
<!-- Set this to the version of the game you're modding -->
<!-- This should match the version in the game's build version which is visible in the main menu (top right) -->
<!-- Example: b312 would be <ModVersion>312</ModVersion> -->
<ModVersion>1.3.9</ModVersion>
<!-- Example: b317 would be <ModVersion>1.0.317</ModVersion> -->
<ModVersion>1.4.8</ModVersion>

<!-- Set to true to disable the news screen on game start -->
<!-- Set to false to keep the default behavior -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
wait-for-native-debugger=0
hdr-display-enabled=0
gc-max-time-slice=3
build-guid=63e91874a77e40ffb137ff774af27974
player-connection-debug=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gfx-enable-gfx-jobs=1
gfx-enable-native-gfx-jobs=1
wait-for-native-debugger=0
hdr-display-enabled=0
gc-max-time-slice=3
build-guid=63e91874a77e40ffb137ff774af27974
player-connection-debug=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
This file defines some of the browsers that Microsoft's implementation provides in
<windir>\Microsoft.NET\Framework\<ver>\CONFIG\Browsers\*.browser

It is not derived from any file distributed with Microsoft's implementation. Since
we can't distribute MS's browser files, we use browscap.ini to determine
browser capabilities. Then, if and only if the application contains App_Browser/*.browser
files and we are using .NET 2.0 or higher, we supplement the capabilities with the
information in those files and the files in this directory. The primary goal of this file
is provide browser definitions that might be referenced in App_Browser/*.browser files.
-->
<browsers>
<defaultBrowser id="Default">
</defaultBrowser>
<browser id="Default">
<identification>
<userAgent match="." />
</identification>
</browser>
<browser id="IE6to9" parentID="Default">
<identification>
<capability name="majorver" match="^[6-9]" />
<capability name="browser" match="^(IE|AOL)$" />
</identification>
</browser>
<browser id="Opera8to9" parentID="Default">
<identification>
<capability name="majorver" match="^[8-9]" />
<capability name="browser" match="^Opera$" />
</identification>
</browser>
<browser id="Safari" parentID="Default">
<identification>
<capability name="browser" match="^Safari$" />
</identification>
</browser>
<browser id="Mozilla" parentID="Default">
<identification>
<capability name="browser" match="^Mozilla" />
</identification>
</browser>
</browsers>
Loading