inlined InitializeEngineWithMods; cleaned trailing whitespace in Game; removed non-working Replay code

This commit is contained in:
Bob
2010-08-21 19:16:43 +12:00
parent 18914447aa
commit 1a4e3053ce
3 changed files with 31 additions and 41 deletions

View File

@@ -395,15 +395,10 @@ namespace OpenRA
Renderer = new Renderer();
clientSize = new int2(Renderer.Resolution);
if (Settings.Replay != null)
orderManager = new OrderManager(new ReplayConnection(Settings.Replay));
else
JoinLocal();
StartGame(modData.Manifest.ShellmapUid);
ResetTimer();
}
static bool quit;
@@ -441,7 +436,8 @@ namespace OpenRA
static string baseSupportDir = null;
public static string SupportDir
{
set {
set
{
var dir = value;
// Expand paths relative to the personal directory
@@ -453,14 +449,7 @@ namespace OpenRA
baseSupportDir = dir + Path.DirectorySeparatorChar;
}
get {return baseSupportDir;}
}
public static void InitializeEngineWithMods(string[] mods)
{
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
modData = new ModData( mods );
Rules.LoadRules(modData.Manifest, new Map());
get { return baseSupportDir; }
}
public static T CreateObject<T>( string name )

View File

@@ -47,7 +47,6 @@ namespace OpenRA.GameRules
// External game settings
public string LastServer = "localhost:1234";
public string Replay = null;
public string PlayerName = "Newbie";
public Color PlayerColor1 = Color.FromArgb(255,160,238);
public Color PlayerColor2 = Color.FromArgb(68,0,56);

View File

@@ -39,7 +39,9 @@ namespace RALint
ObjectCreator.MissingTypeAction = s => EmitError("Missing Type: {0}".F(s));
FieldLoader.UnknownFieldAction = (s, f) => EmitError("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
Game.InitializeEngineWithMods(args);
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
Game.modData = new ModData( args );
Rules.LoadRules(Game.modData.Manifest, new Map());
// all the @something names which actually EXIST.
var psuedoPrereqs = Rules.Info.Values.Select(a => a.Traits.GetOrDefault<BuildableInfo>()).Where(b => b != null)