From aa8ce199c27480c528ab3fbb63a1275c2f9788ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 3 Aug 2014 16:06:10 +0200 Subject: [PATCH] self-document CrushClass of crates --- OpenRA.Mods.RA/Crate.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Crate.cs b/OpenRA.Mods.RA/Crate.cs index f6081bbb36..f7df5848c6 100644 --- a/OpenRA.Mods.RA/Crate.cs +++ b/OpenRA.Mods.RA/Crate.cs @@ -22,8 +22,12 @@ namespace OpenRA.Mods.RA [Desc("Seconds")] public readonly int Lifetime = 5; + [Desc("Allowed to land on.")] 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); } } @@ -127,7 +131,7 @@ namespace OpenRA.Mods.RA public bool CrushableBy(string[] crushClasses, Player owner) { - return crushClasses.Contains("crate"); + return crushClasses.Contains(info.CrushClass); } public void AddedToWorld(Actor self)