Move web urls from user config to mod config.

This commit is contained in:
Paul Chote
2017-04-17 09:42:49 +00:00
parent 04f5937476
commit 1722f42f83
11 changed files with 54 additions and 23 deletions

View File

@@ -36,6 +36,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
readonly bool skirmishMode;
readonly Ruleset modRules;
readonly World shellmapWorld;
readonly WebServices services;
enum PanelType { Players, Options, Music, Kick, ForceStart }
PanelType panel = PanelType.Players;
@@ -117,6 +118,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
this.modRules = modData.DefaultRules;
shellmapWorld = worldRenderer.World;
services = modData.Manifest.Get<WebServices>();
orderManager.AddChatLine += AddChatLine;
Game.LobbyInfoChanged += UpdateCurrentMap;
Game.LobbyInfoChanged += UpdatePlayerList;
@@ -655,7 +658,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
else if (Map.Status == MapStatus.DownloadAvailable)
LoadMapPreviewRules(Map);
else if (Game.Settings.Game.AllowDownloading)
modData.MapCache.QueryRemoteMapDetails(new[] { uid }, LoadMapPreviewRules);
modData.MapCache.QueryRemoteMapDetails(services.MapRepository, new[] { uid }, LoadMapPreviewRules);
}
void UpdatePlayerList()