fix Direct Connect window

This commit is contained in:
Bob
2010-09-25 19:25:34 +12:00
parent 959d3f8bd7
commit 636b2a8ea7
3 changed files with 32 additions and 7 deletions

25
OpenRA.Game/TraitCreator.cs Executable file
View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA
{
class TraitCreator
{
public static object Create( string traitName, World world, Actor actor, ITraitInfo info, TypeDictionary init )
{
var argsDict = new Dictionary<string, object>
{
{ "world", world },
{ "self", actor },
{ "initDict", init },
{ "init", new ActorInitializer( actor, init ) },
{ "info", info },
};
return Game.modData.ObjectCreator.CreateObject<object>( traitName, argsDict );
}
}
}