Use Prerequisites: ~disabled for unbuildable actors.

This commit is contained in:
Matthias Mailänder
2014-06-11 11:25:17 +02:00
committed by Paul Chote
parent ca082e3cec
commit 74be133e40
7 changed files with 110 additions and 57 deletions

View File

@@ -42,8 +42,9 @@ namespace OpenRA.Mods.RA
var bi = i.Value.Traits.GetOrDefault<BuildableInfo>();
if (bi != null)
foreach (var prereq in bi.Prerequisites)
if (!providedPrereqs.Contains(prereq.Replace("!", "").Replace("~", "")))
emitError("Buildable actor {0} has prereq {1} not provided by anything.".F(i.Key, prereq));
if (!prereq.StartsWith("~disabled"))
if (!providedPrereqs.Contains(prereq.Replace("!", "").Replace("~", "")))
emitError("Buildable actor {0} has prereq {1} not provided by anything.".F(i.Key, prereq));
}
}
}