(5c35a640e) Update tutorial-rework with dev

This commit is contained in:
Joonas Rikkonen
2019-03-27 20:52:47 +02:00
parent 47b16f4f9e
commit 080ac78ded
113 changed files with 3206 additions and 1298 deletions
@@ -107,7 +107,7 @@ namespace Barotrauma
public string[] propertyNames;
private object[] propertyEffects;
private PropertyConditional.Comparison conditionalComparison = PropertyConditional.Comparison.And;
private PropertyConditional.Comparison conditionalComparison = PropertyConditional.Comparison.Or;
private List<PropertyConditional> propertyConditionals;
private bool setValue;
@@ -465,6 +465,13 @@ namespace Barotrauma
if (target == null || target.SerializableProperties == null) { continue; }
foreach (PropertyConditional pc in propertyConditionals)
{
if (!string.IsNullOrEmpty(pc.TargetItemComponentName))
{
if (!(target is ItemComponent ic) || ic.Name != pc.TargetItemComponentName)
{
continue;
}
}
if (pc.Matches(target)) { return true; }
}
}
@@ -475,6 +482,13 @@ namespace Barotrauma
if (target == null || target.SerializableProperties == null) { continue; }
foreach (PropertyConditional pc in propertyConditionals)
{
if (!string.IsNullOrEmpty(pc.TargetItemComponentName))
{
if (!(target is ItemComponent ic) || ic.Name != pc.TargetItemComponentName)
{
continue;
}
}
if (!pc.Matches(target)) { return false; }
}
}
@@ -696,6 +710,8 @@ namespace Barotrauma
foreach (Limb limb in character.AnimController.Limbs)
{
limb.character.DamageLimb(entity.WorldPosition, limb, new List<Affliction>() { multipliedAffliction }, stun: 0.0f, playSound: false, attackImpulse: 0.0f);
//only apply non-limb-specific afflictions to the first limb
if (!affliction.Prefab.LimbSpecific) { break; }
}
}
else if (target is Limb limb)