self-document CrushClass of crates

This commit is contained in:
Matthias Mailänder
2014-08-03 16:06:10 +02:00
parent 91b612fa47
commit aa8ce199c2

View File

@@ -22,8 +22,12 @@ namespace OpenRA.Mods.RA
[Desc("Seconds")] [Desc("Seconds")]
public readonly int Lifetime = 5; public readonly int Lifetime = 5;
[Desc("Allowed to land on.")]
public readonly string[] TerrainTypes = { }; public readonly string[] TerrainTypes = { };
[Desc("Define actors that can collect crates by setting this into the Crushes field from the Mobile trait.")]
public readonly string CrushClass = "crate";
public object Create(ActorInitializer init) { return new Crate(init, this); } public object Create(ActorInitializer init) { return new Crate(init, this); }
} }
@@ -127,7 +131,7 @@ namespace OpenRA.Mods.RA
public bool CrushableBy(string[] crushClasses, Player owner) public bool CrushableBy(string[] crushClasses, Player owner)
{ {
return crushClasses.Contains("crate"); return crushClasses.Contains(info.CrushClass);
} }
public void AddedToWorld(Actor self) public void AddedToWorld(Actor self)