Rework mod enumeration / caching.

- Replaced ModMetadata.AllMods with Game.Mods.
- Store / reference mod Manifest instead of ModMetadata.
- Removes engine dependency on ModContent class.
This commit is contained in:
Paul Chote
2016-08-05 17:07:04 +01:00
parent 45a596953e
commit 3df9efb95d
33 changed files with 301 additions and 219 deletions

View File

@@ -158,7 +158,7 @@ namespace OpenRA.Server
foreach (var t in serverTraits.WithInterface<INotifyServerStart>())
t.ServerStarted(this);
Log.Write("server", "Initial mod: {0}", ModData.Manifest.Mod.Id);
Log.Write("server", "Initial mod: {0}", ModData.Manifest.Id);
Log.Write("server", "Initial map: {0}", LobbyInfo.GlobalSettings.Map);
var timeout = serverTraits.WithInterface<ITick>().Min(t => t.TickTimeout);
@@ -262,7 +262,7 @@ namespace OpenRA.Server
// Dispatch a handshake order
var request = new HandshakeRequest
{
Mod = ModData.Manifest.Mod.Id,
Mod = ModData.Manifest.Id,
Version = ModData.Manifest.Mod.Version,
Map = LobbyInfo.GlobalSettings.Map
};
@@ -327,7 +327,7 @@ namespace OpenRA.Server
else
client.Color = HSLColor.FromRGB(255, 255, 255);
if (ModData.Manifest.Mod.Id != handshake.Mod)
if (ModData.Manifest.Id != handshake.Mod)
{
Log.Write("server", "Rejected connection from {0}; mods do not match.",
newConn.Socket.RemoteEndPoint);