Skip to content

Commit 780df7c

Browse files
committed
Hotfix
See README.md changelog to know whats changed.
1 parent 6d20f24 commit 780df7c

File tree

5 files changed

+42
-13
lines changed

5 files changed

+42
-13
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
----------- Unturned Server Manager -----------
22

3-
Version: Public 4.0.0.0
3+
Version: Public 4.0.0.1
44

55
[![Github Releases](https://img.shields.io/github/downloads/persiafighter/UnturnedServerManager/latest/total.svg?style=plastic)](https://github.com/persiafighter/UnturnedServerManager/releases/latest)
66

@@ -14,14 +14,20 @@ Windows
1414

1515
# Known Bugs:
1616

17-
None as of 4.0.0.0
17+
None as of 4.0.0.1
1818

1919
# Download:
2020

2121
https://github.com/persiafighter/UnturnedServerManager/releases/latest
2222

2323
# Changelog:
2424

25+
**V4.0.0.1** -
26+
* Fixed raised exception when leaving the map field empty in the server configuration, saving and loading it again. (Credit to Luke_ArOres#0769 for finding it)
27+
* Fixed forgotten addition of auto-detection of workshop maps. (Credit to Luke_ArOres#0769 for reminding of this issue)
28+
* Fixed minor issue when loading maps for a vanilla server.
29+
* Updated Fody and Costura.Fody to latest versions.
30+
2531
**V4.0.0.0** -
2632

2733
* Added more local control over server instances.

src/GUI/Server Settings.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ private void LoadMaps()
3737
foreach (var rocketserver in RocketmodDirectoryInfo.GetDirectories())
3838
Maps.Items.Add(rocketserver.Name);
3939
}
40+
else
41+
{
42+
var Dir = Path.Combine(RocketmodServerPath.Value, "Maps");
43+
FileActions.VerifyPath(Dir, true);
44+
45+
var VanillaDirectoryInfo = new DirectoryInfo(Dir);
46+
foreach (var rocketserver in VanillaDirectoryInfo.GetDirectories())
47+
Maps.Items.Add(rocketserver.Name);
48+
}
49+
50+
var WorkshopMaps = Path.Combine(server.Folder, "Workshop", "Maps");
51+
FileActions.VerifyPath(WorkshopMaps, true);
52+
53+
var Fldr = new DirectoryInfo(WorkshopMaps);
54+
var Content = Fldr.GetDirectories();
55+
foreach (var folder in Content)
56+
foreach (var MapName in folder.GetDirectories())
57+
Maps.Items.Add(MapName.Name);
4058
}
4159
private void Save()
4260
{
@@ -82,7 +100,12 @@ private void LoadSaved()
82100

83101
NameSel.Text = conf.PublicName;
84102
Port.Value = conf.Port;
85-
Maps.SelectedIndex = Maps.Items.IndexOf(conf.Map);
103+
104+
if (string.IsNullOrEmpty(conf.Map))
105+
Maps.SelectedIndex = 0;
106+
else
107+
Maps.SelectedIndex = Maps.Items.IndexOf(conf.Map);
108+
86109
PasswordSel.Text = conf.Password;
87110
OwnerID.Value = conf.Owner;
88111
MessageSel.Text = conf.LoginMessage;

src/Manager.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@
6161
</AssemblyOriginatorKeyFile>
6262
</PropertyGroup>
6363
<ItemGroup>
64-
<Reference Include="Costura, Version=2.0.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
65-
<HintPath>..\packages\Costura.Fody.2.0.1\lib\net452\Costura.dll</HintPath>
64+
<Reference Include="Costura, Version=3.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
65+
<HintPath>..\packages\Costura.Fody.3.1.0\lib\net46\Costura.dll</HintPath>
6666
</Reference>
6767
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
6868
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -197,15 +197,15 @@
197197
</BootstrapperPackage>
198198
</ItemGroup>
199199
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
200+
<Import Project="..\packages\Fody.3.1.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.1.3\build\Fody.targets')" />
200201
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
201202
<PropertyGroup>
202203
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
203204
</PropertyGroup>
204-
<Error Condition="!Exists('..\packages\Fody.3.0.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.0.3\build\Fody.targets'))" />
205-
<Error Condition="!Exists('..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets'))" />
205+
<Error Condition="!Exists('..\packages\Fody.3.1.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.1.3\build\Fody.targets'))" />
206+
<Error Condition="!Exists('..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets'))" />
206207
</Target>
207-
<Import Project="..\packages\Fody.3.0.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.0.3\build\Fody.targets')" />
208-
<Import Project="..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.2.0.1\build\Costura.Fody.targets')" />
208+
<Import Project="..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.3.1.0\build\Costura.Fody.targets')" />
209209
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
210210
Other similar extension points exist, see Microsoft.Common.targets.
211211
<Target Name="BeforeBuild">

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
[assembly: AssemblyCulture("")]
1111
[assembly: ComVisible(false)]
1212
[assembly: Guid("2d1dcd0a-9719-44f5-8f0e-2fd79d918fb5")]
13-
[assembly: AssemblyVersion("4.0.0.0")]
14-
[assembly: AssemblyFileVersion("4.0.0.0")]
13+
[assembly: AssemblyVersion("4.0.0.1")]
14+
[assembly: AssemblyFileVersion("4.0.0.1")]

src/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Costura.Fody" version="2.0.1" targetFramework="net461" />
4-
<package id="Fody" version="3.0.3" targetFramework="net461" developmentDependency="true" />
3+
<package id="Costura.Fody" version="3.1.0" targetFramework="net461" />
4+
<package id="Fody" version="3.1.3" targetFramework="net461" developmentDependency="true" />
55
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
66
</packages>

0 commit comments

Comments
 (0)