self-document CrushClass of crates
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user