Remove LobbyDefaults from mod.yaml.
This commit is contained in:
@@ -44,7 +44,6 @@ namespace OpenRA
|
|||||||
public readonly IReadOnlyDictionary<string, string> Packages;
|
public readonly IReadOnlyDictionary<string, string> Packages;
|
||||||
public readonly IReadOnlyDictionary<string, string> MapFolders;
|
public readonly IReadOnlyDictionary<string, string> MapFolders;
|
||||||
public readonly MiniYaml LoadScreen;
|
public readonly MiniYaml LoadScreen;
|
||||||
public readonly MiniYaml LobbyDefaults;
|
|
||||||
|
|
||||||
public readonly Dictionary<string, string> RequiresMods;
|
public readonly Dictionary<string, string> RequiresMods;
|
||||||
public readonly Dictionary<string, Pair<string, int>> Fonts;
|
public readonly Dictionary<string, Pair<string, int>> Fonts;
|
||||||
@@ -98,9 +97,6 @@ namespace OpenRA
|
|||||||
if (!yaml.TryGetValue("LoadScreen", out LoadScreen))
|
if (!yaml.TryGetValue("LoadScreen", out LoadScreen))
|
||||||
throw new InvalidDataException("`LoadScreen` section is not defined.");
|
throw new InvalidDataException("`LoadScreen` section is not defined.");
|
||||||
|
|
||||||
if (!yaml.TryGetValue("LobbyDefaults", out LobbyDefaults))
|
|
||||||
throw new InvalidDataException("`LobbyDefaults` section is not defined.");
|
|
||||||
|
|
||||||
Fonts = yaml["Fonts"].ToDictionary(my =>
|
Fonts = yaml["Fonts"].ToDictionary(my =>
|
||||||
{
|
{
|
||||||
var nd = my.ToDictionary();
|
var nd = my.ToDictionary();
|
||||||
|
|||||||
@@ -154,8 +154,6 @@ namespace OpenRA.Server
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
FieldLoader.Load(LobbyInfo.GlobalSettings, modData.Manifest.LobbyDefaults);
|
|
||||||
|
|
||||||
new Thread(_ =>
|
new Thread(_ =>
|
||||||
{
|
{
|
||||||
foreach (var t in serverTraits.WithInterface<INotifyServerStart>())
|
foreach (var t in serverTraits.WithInterface<INotifyServerStart>())
|
||||||
@@ -608,10 +606,7 @@ namespace OpenRA.Server
|
|||||||
DispatchOrders(toDrop, frame, new byte[] { 0xbf });
|
DispatchOrders(toDrop, frame, new byte[] { 0xbf });
|
||||||
|
|
||||||
if (!Conns.Any())
|
if (!Conns.Any())
|
||||||
{
|
|
||||||
FieldLoader.Load(LobbyInfo.GlobalSettings, ModData.Manifest.LobbyDefaults);
|
|
||||||
TempBans.Clear();
|
TempBans.Clear();
|
||||||
}
|
|
||||||
|
|
||||||
if (Conns.Any() || LobbyInfo.GlobalSettings.Dedicated)
|
if (Conns.Any() || LobbyInfo.GlobalSettings.Dedicated)
|
||||||
SyncLobbyClients();
|
SyncLobbyClients();
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ namespace OpenRA.Mods.Common.Server
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
var defaults = new Session.Global();
|
var defaults = new Session.Global();
|
||||||
FieldLoader.Load(defaults, Game.ModData.Manifest.LobbyDefaults);
|
|
||||||
|
|
||||||
if (server.LobbyInfo.GlobalSettings.AllowCheats != defaults.AllowCheats)
|
if (server.LobbyInfo.GlobalSettings.AllowCheats != defaults.AllowCheats)
|
||||||
server.SendOrderTo(conn, "Message", "Allow Cheats: {0}".F(server.LobbyInfo.GlobalSettings.AllowCheats));
|
server.SendOrderTo(conn, "Message", "Allow Cheats: {0}".F(server.LobbyInfo.GlobalSettings.AllowCheats));
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ ChromeMetrics:
|
|||||||
|
|
||||||
Fonts:
|
Fonts:
|
||||||
|
|
||||||
LobbyDefaults:
|
|
||||||
|
|
||||||
SoundFormats:
|
SoundFormats:
|
||||||
|
|
||||||
SpriteFormats:
|
SpriteFormats:
|
||||||
|
|||||||
@@ -162,8 +162,6 @@ ServerTraits:
|
|||||||
MasterServerPinger
|
MasterServerPinger
|
||||||
LobbySettingsNotification
|
LobbySettingsNotification
|
||||||
|
|
||||||
LobbyDefaults:
|
|
||||||
|
|
||||||
ChromeMetrics:
|
ChromeMetrics:
|
||||||
common|metrics.yaml
|
common|metrics.yaml
|
||||||
cnc|metrics.yaml
|
cnc|metrics.yaml
|
||||||
|
|||||||
@@ -155,8 +155,6 @@ ServerTraits:
|
|||||||
MasterServerPinger
|
MasterServerPinger
|
||||||
LobbySettingsNotification
|
LobbySettingsNotification
|
||||||
|
|
||||||
LobbyDefaults:
|
|
||||||
|
|
||||||
ChromeMetrics:
|
ChromeMetrics:
|
||||||
common|metrics.yaml
|
common|metrics.yaml
|
||||||
d2k|metrics.yaml
|
d2k|metrics.yaml
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ Fonts:
|
|||||||
Font: common|FreeSansBold.ttf
|
Font: common|FreeSansBold.ttf
|
||||||
Size:10
|
Size:10
|
||||||
|
|
||||||
LobbyDefaults:
|
|
||||||
|
|
||||||
SoundFormats:
|
SoundFormats:
|
||||||
|
|
||||||
SpriteFormats: ShpTD
|
SpriteFormats: ShpTD
|
||||||
|
|||||||
@@ -165,8 +165,6 @@ ServerTraits:
|
|||||||
MasterServerPinger
|
MasterServerPinger
|
||||||
LobbySettingsNotification
|
LobbySettingsNotification
|
||||||
|
|
||||||
LobbyDefaults:
|
|
||||||
|
|
||||||
ChromeMetrics:
|
ChromeMetrics:
|
||||||
common|metrics.yaml
|
common|metrics.yaml
|
||||||
ra|metrics.yaml
|
ra|metrics.yaml
|
||||||
|
|||||||
@@ -214,8 +214,6 @@ ServerTraits:
|
|||||||
MasterServerPinger
|
MasterServerPinger
|
||||||
LobbySettingsNotification
|
LobbySettingsNotification
|
||||||
|
|
||||||
LobbyDefaults:
|
|
||||||
|
|
||||||
ChromeMetrics:
|
ChromeMetrics:
|
||||||
common|metrics.yaml
|
common|metrics.yaml
|
||||||
ts|metrics.yaml
|
ts|metrics.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user