diff options
author | onefang | 2020-09-09 01:11:24 +1000 |
---|---|---|
committer | onefang | 2020-09-09 01:11:24 +1000 |
commit | 76a38dbc31c98bd8f40b219a28f22d36493c95d9 (patch) | |
tree | 43f0d68fe2e46286da74f986680e1e05c2514422 | |
parent | Add a missing .keep. (diff) | |
download | opensim-SC-76a38dbc31c98bd8f40b219a28f22d36493c95d9.zip opensim-SC-76a38dbc31c98bd8f40b219a28f22d36493c95d9.tar.gz opensim-SC-76a38dbc31c98bd8f40b219a28f22d36493c95d9.tar.bz2 opensim-SC-76a38dbc31c98bd8f40b219a28f22d36493c95d9.tar.xz |
Update version number stuff, and hack it into the money display.
-rw-r--r-- | OpenSim/Framework/Servers/Tests/VersionInfoTests.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/VersionInfo.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | 13 |
3 files changed, 26 insertions, 6 deletions
diff --git a/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs b/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs index 68a1c78..2d72cb8 100644 --- a/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs +++ b/OpenSim/Framework/Servers/Tests/VersionInfoTests.cs | |||
@@ -41,5 +41,14 @@ namespace OpenSim.Framework.Servers.Tests | |||
41 | { | 41 | { |
42 | Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.Version.Length," VersionInfo.Version string not " + VersionInfo.VERSIONINFO_VERSION_LENGTH + " chars."); | 42 | Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.Version.Length," VersionInfo.Version string not " + VersionInfo.VERSIONINFO_VERSION_LENGTH + " chars."); |
43 | } | 43 | } |
44 | |||
45 | [Test] | ||
46 | public void TestGetVersionStringLength() | ||
47 | { | ||
48 | foreach (VersionInfo.Flavour flavour in Enum.GetValues(typeof(VersionInfo.Flavour))) | ||
49 | { | ||
50 | Assert.AreEqual(VersionInfo.VERSIONINFO_VERSION_LENGTH, VersionInfo.GetVersionString("0.0.0", "0", flavour).Length, "0.0.0/" + flavour + " failed"); | ||
51 | } | ||
52 | } | ||
44 | } | 53 | } |
45 | } | 54 | } |
diff --git a/OpenSim/Framework/VersionInfo.cs b/OpenSim/Framework/VersionInfo.cs index 7e78d24..3ae5145 100644 --- a/OpenSim/Framework/VersionInfo.cs +++ b/OpenSim/Framework/VersionInfo.cs | |||
@@ -31,6 +31,7 @@ namespace OpenSim | |||
31 | { | 31 | { |
32 | public const string VersionNumber = "0.9.1.1"; | 32 | public const string VersionNumber = "0.9.1.1"; |
33 | public const string AssemblyVersionNumber = "0.9.1.1"; | 33 | public const string AssemblyVersionNumber = "0.9.1.1"; |
34 | public const string SC_BUILD_NUMBER = "0"; | ||
34 | 35 | ||
35 | public const Flavour VERSION_FLAVOUR = Flavour.Release; | 36 | public const Flavour VERSION_FLAVOUR = Flavour.Release; |
36 | 37 | ||
@@ -38,6 +39,7 @@ namespace OpenSim | |||
38 | { | 39 | { |
39 | Unknown, | 40 | Unknown, |
40 | Dev, | 41 | Dev, |
42 | RC0, | ||
41 | RC1, | 43 | RC1, |
42 | RC2, | 44 | RC2, |
43 | RC3, | 45 | RC3, |
@@ -48,16 +50,16 @@ namespace OpenSim | |||
48 | 50 | ||
49 | public static string Version | 51 | public static string Version |
50 | { | 52 | { |
51 | get { return GetVersionString(VersionNumber, VERSION_FLAVOUR); } | 53 | get { return GetVersionString(VersionNumber, SC_BUILD_NUMBER, VERSION_FLAVOUR); } |
52 | } | 54 | } |
53 | 55 | ||
54 | public static string GetVersionString(string versionNumber, Flavour flavour) | 56 | public static string GetVersionString(string versionNumber, string buildNumber, Flavour flavour) |
55 | { | 57 | { |
56 | string versionString = "OpenSim " + versionNumber + " Snail " + flavour; | 58 | string versionString = "opensim-SC " + versionNumber + " " + flavour + " build " + buildNumber; |
57 | return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); | 59 | return versionString.PadRight(VERSIONINFO_VERSION_LENGTH); |
58 | } | 60 | } |
59 | 61 | ||
60 | public const int VERSIONINFO_VERSION_LENGTH = 29; | 62 | public const int VERSIONINFO_VERSION_LENGTH = 39; |
61 | 63 | ||
62 | /// <value> | 64 | /// <value> |
63 | /// This is the external interface version. It is separate from the OpenSimulator project version. | 65 | /// This is the external interface version. It is separate from the OpenSimulator project version. |
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs index b32a429..f378921 100644 --- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs +++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs | |||
@@ -573,9 +573,18 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule | |||
573 | /// <returns></returns> | 573 | /// <returns></returns> |
574 | private int GetFundsForAgentID(UUID AgentID) | 574 | private int GetFundsForAgentID(UUID AgentID) |
575 | { | 575 | { |
576 | int returnfunds = 0; | 576 | int result = 0; |
577 | // Set it to the OpenSim version, plus the SC build number. Muahahaha; | ||
578 | string v = VersionInfo.VersionNumber + VersionInfo.SC_BUILD_NUMBER.PadLeft(3, '0'); | ||
579 | try | ||
580 | { | ||
581 | result = Int32.Parse(v.Replace(".", "")); | ||
582 | } | ||
583 | catch (FormatException) | ||
584 | { | ||
585 | } | ||
577 | 586 | ||
578 | return returnfunds; | 587 | return result; |
579 | } | 588 | } |
580 | 589 | ||
581 | // private void SetLocalFundsForAgentID(UUID AgentID, int amount) | 590 | // private void SetLocalFundsForAgentID(UUID AgentID, int amount) |