added ToString() for OpenRA.Player

This commit is contained in:
Sascha Biedermann
2013-04-07 17:01:55 +02:00
parent bed26c3dee
commit 2fb12f755a
2 changed files with 5 additions and 1 deletions

View File

@@ -59,7 +59,6 @@ namespace OpenRA.Network
il.Emit(OpCodes.Castclass, t);
il.Emit(OpCodes.Stloc, this_);
var dictAdd_ = dictType.GetMethod("Add", BindingFlags.Instance | BindingFlags.Public, null, new Type[] { typeof(string), typeof(string) }, null);
var dictCtor_ = dictType.GetConstructor(Type.EmptyTypes);
var objToString_ = typeof(object).GetMethod("ToString", BindingFlags.Instance | BindingFlags.Public, null, Type.EmptyTypes, null);

View File

@@ -91,6 +91,11 @@ namespace OpenRA
}
}
public override string ToString()
{
return "{0} ({1})".F(PlayerName, ClientIndex);
}
public Dictionary<Player, Stance> Stances = new Dictionary<Player, Stance>();
}
}