inlined InitializeEngineWithMods; cleaned trailing whitespace in Game; removed non-working Replay code
This commit is contained in:
@@ -395,15 +395,10 @@ namespace OpenRA
|
|||||||
Renderer = new Renderer();
|
Renderer = new Renderer();
|
||||||
clientSize = new int2(Renderer.Resolution);
|
clientSize = new int2(Renderer.Resolution);
|
||||||
|
|
||||||
if (Settings.Replay != null)
|
|
||||||
orderManager = new OrderManager(new ReplayConnection(Settings.Replay));
|
|
||||||
else
|
|
||||||
JoinLocal();
|
JoinLocal();
|
||||||
|
|
||||||
StartGame(modData.Manifest.ShellmapUid);
|
StartGame(modData.Manifest.ShellmapUid);
|
||||||
|
|
||||||
ResetTimer();
|
ResetTimer();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool quit;
|
static bool quit;
|
||||||
@@ -441,7 +436,8 @@ namespace OpenRA
|
|||||||
static string baseSupportDir = null;
|
static string baseSupportDir = null;
|
||||||
public static string SupportDir
|
public static string SupportDir
|
||||||
{
|
{
|
||||||
set {
|
set
|
||||||
|
{
|
||||||
var dir = value;
|
var dir = value;
|
||||||
|
|
||||||
// Expand paths relative to the personal directory
|
// Expand paths relative to the personal directory
|
||||||
@@ -456,13 +452,6 @@ namespace OpenRA
|
|||||||
get { return baseSupportDir; }
|
get { return baseSupportDir; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void InitializeEngineWithMods(string[] mods)
|
|
||||||
{
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
|
|
||||||
modData = new ModData( mods );
|
|
||||||
Rules.LoadRules(modData.Manifest, new Map());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static T CreateObject<T>( string name )
|
public static T CreateObject<T>( string name )
|
||||||
{
|
{
|
||||||
return modData.ObjectCreator.CreateObject<T>( name );
|
return modData.ObjectCreator.CreateObject<T>( name );
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ namespace OpenRA.GameRules
|
|||||||
|
|
||||||
// External game settings
|
// External game settings
|
||||||
public string LastServer = "localhost:1234";
|
public string LastServer = "localhost:1234";
|
||||||
public string Replay = null;
|
|
||||||
public string PlayerName = "Newbie";
|
public string PlayerName = "Newbie";
|
||||||
public Color PlayerColor1 = Color.FromArgb(255,160,238);
|
public Color PlayerColor1 = Color.FromArgb(255,160,238);
|
||||||
public Color PlayerColor2 = Color.FromArgb(68,0,56);
|
public Color PlayerColor2 = Color.FromArgb(68,0,56);
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ namespace RALint
|
|||||||
ObjectCreator.MissingTypeAction = s => EmitError("Missing Type: {0}".F(s));
|
ObjectCreator.MissingTypeAction = s => EmitError("Missing Type: {0}".F(s));
|
||||||
FieldLoader.UnknownFieldAction = (s, f) => EmitError("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
|
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.
|
// all the @something names which actually EXIST.
|
||||||
var psuedoPrereqs = Rules.Info.Values.Select(a => a.Traits.GetOrDefault<BuildableInfo>()).Where(b => b != null)
|
var psuedoPrereqs = Rules.Info.Values.Select(a => a.Traits.GetOrDefault<BuildableInfo>()).Where(b => b != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user