Adds Diplomacy keywords for ValidTarget checks.

Changes:

Allows diplomacy stance checks to be done on warheads and weapons, using keywords in ValidTargets and InvalidTargets.
This commit is contained in:
UberWaffe
2014-07-09 17:58:06 +02:00
parent ef7d198ca8
commit e3e5e9eb00
4 changed files with 55 additions and 45 deletions

View File

@@ -574,7 +574,7 @@ namespace OpenRA.Utility
newYaml.Add(new MiniYamlNode("Size", newValue));
}
var keywords = new List<string>{ "Damage", "InfDeath", "PreventProne", "ProneModifier", "Delay" };
var keywords = new List<string> { "Damage", "InfDeath", "PreventProne", "ProneModifier", "Delay" };
foreach(var keyword in keywords)
{
@@ -610,7 +610,7 @@ namespace OpenRA.Utility
newYaml.Add(new MiniYamlNode("Spread", newValue));
}
var keywords = new List<string>{ "Damage", "InfDeath", "PreventProne", "ProneModifier", "Delay" };
var keywords = new List<string> { "Damage", "InfDeath", "PreventProne", "ProneModifier", "Delay" };
foreach(var keyword in keywords)
{
@@ -637,7 +637,7 @@ namespace OpenRA.Utility
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string>{ "Spread", "Damage", "InfDeath", "PreventProne", "ProneModifier", "Delay" };
var keywords = new List<string> { "Spread", "Damage", "InfDeath", "PreventProne", "ProneModifier", "Delay" };
foreach(var keyword in keywords)
{
@@ -666,7 +666,7 @@ namespace OpenRA.Utility
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string>{ "Size", "Delay", "ValidTargets", "InvalidTargets" };
var keywords = new List<string> { "Size", "Delay", "ValidTargets", "InvalidTargets" };
foreach(var keyword in keywords)
{
var temp = curNode.Value.Nodes.FirstOrDefault(n => n.Key == keyword);
@@ -684,7 +684,7 @@ namespace OpenRA.Utility
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string>{ "AddsResourceType", "Size", "Delay", "ValidTargets", "InvalidTargets" };
var keywords = new List<string> { "AddsResourceType", "Size", "Delay", "ValidTargets", "InvalidTargets" };
foreach(var keyword in keywords)
{
@@ -703,7 +703,7 @@ namespace OpenRA.Utility
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string>{ "SmudgeType", "Size", "Delay", "ValidTargets", "InvalidTargets" };
var keywords = new List<string> { "SmudgeType", "Size", "Delay", "ValidTargets", "InvalidTargets" };
foreach(var keyword in keywords)
{
@@ -723,7 +723,7 @@ namespace OpenRA.Utility
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string>{ "Explosion", "ImpactSound", "Delay", "ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
var keywords = new List<string> { "Explosion", "ImpactSound", "Delay", "ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
foreach(var keyword in keywords)
{
@@ -744,7 +744,7 @@ namespace OpenRA.Utility
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string>{ "WaterExplosion", "WaterImpactSound", "Delay", "ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
var keywords = new List<string> { "WaterExplosion", "WaterImpactSound", "Delay", "ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
foreach(var keyword in keywords)
{