add an event for lobby info changing to Game

This commit is contained in:
Chris Forbes
2010-04-23 20:46:25 +12:00
parent b20a8d193e
commit 13dbfae982

View File

@@ -29,12 +29,11 @@ using OpenRA.FileFormats;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Network; using OpenRA.Network;
using OpenRA.Server;
using OpenRA.Support; using OpenRA.Support;
using OpenRA.Traits; using OpenRA.Traits;
using Timer = OpenRA.Support.Timer; using Timer = OpenRA.Support.Timer;
using XRandom = OpenRA.Thirdparty.Random; using XRandom = OpenRA.Thirdparty.Random;
using OpenRA.Server;
namespace OpenRA namespace OpenRA
{ {
@@ -263,6 +262,8 @@ namespace OpenRA
MasterServerQuery.Tick(); MasterServerQuery.Tick();
} }
public static event Action LobbyInfoChanged = () => { };
public static void SyncLobbyInfo(string data) public static void SyncLobbyInfo(string data)
{ {
var oldLobbyInfo = LobbyInfo; var oldLobbyInfo = LobbyInfo;
@@ -312,6 +313,8 @@ namespace OpenRA
Debug("Mods list changed, reloading: {0}".F(string.Join(",", LobbyInfo.GlobalSettings.Mods))); Debug("Mods list changed, reloading: {0}".F(string.Join(",", LobbyInfo.GlobalSettings.Mods)));
packageChangePending = true; packageChangePending = true;
} }
LobbyInfoChanged();
} }
public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */ public static void IssueOrder(Order o) { orderManager.IssueOrder(o); } /* avoid exposing the OM to mod code */