Unstable 0.17.7.0

This commit is contained in:
Markus Isberg
2022-04-08 00:34:17 +09:00
parent 95764d1fa8
commit 164d72ae3a
82 changed files with 852 additions and 385 deletions
@@ -167,16 +167,9 @@ namespace Barotrauma
var type = Type;
if (type == ConditionType.Uncertain)
{
if (AfflictionPrefab.Prefabs.ContainsKey(AttributeName))
{
type = ConditionType.Affliction;
}
else
{
type = (target?.SerializableProperties?.ContainsKey(AttributeName) ?? false)
? ConditionType.PropertyValue
: ConditionType.HasSpecifierTag;
}
type = AfflictionPrefab.Prefabs.ContainsKey(AttributeName)
? ConditionType.Affliction
: ConditionType.PropertyValue;
}
if (checkContained)
@@ -250,6 +243,14 @@ namespace Barotrauma
}
}
return Operator == OperatorType.Equals ? matches >= SplitAttributeValue.Length : matches <= 0;
case ConditionType.HasSpecifierTag:
{
if (target == null) { return Operator == OperatorType.NotEquals; }
if (!(target is Character { Info: { } characterInfo })) { return false; }
return (Operator == OperatorType.Equals) ==
SplitAttributeValue.All(v => characterInfo.Head.Preset.TagSet.Contains(v));
}
case ConditionType.SpeciesName:
{
if (target == null) { return Operator == OperatorType.NotEquals; }