expose appropriate *Inits, and make them work in editor
This commit is contained in:
@@ -15,8 +15,8 @@ namespace OpenRA.FileFormats
|
||||
{
|
||||
public class ActorReference : IEnumerable
|
||||
{
|
||||
public readonly string Type;
|
||||
public readonly TypeDictionary InitDict;
|
||||
public string Type;
|
||||
public TypeDictionary InitDict;
|
||||
|
||||
public ActorReference( string type ) : this( type, new Dictionary<string, MiniYaml>() ) { }
|
||||
|
||||
|
||||
@@ -121,8 +121,7 @@ namespace OpenRA
|
||||
|
||||
return inits.Select(
|
||||
i => Pair.New(
|
||||
i.GetType().Name.Replace( "Init", "" ),
|
||||
i.GetType().GetInterfaces()[0].GetGenericArguments()[0] ) );
|
||||
i.Name.Replace( "Init", "" ), i ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using OpenRA.GameRules;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
public class HealthInfo : ITraitInfo
|
||||
public class HealthInfo : ITraitInfo, UsesInit<HealthInit>
|
||||
{
|
||||
public readonly int HP = 0;
|
||||
public readonly float Radius = 10;
|
||||
|
||||
Reference in New Issue
Block a user