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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user