From 1d98df11a34c737eb7c6a49e165db1f0df8c0e08 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Mon, 23 Apr 2018 14:47:36 +0300 Subject: [PATCH] PropertyConditionals match if any of the targets match, junction boxes only take damage underwater when therey're powered up (because trying to fix all boxes in a flooded sub before they break again is pain in the ass) --- .../BarotraumaShared/Content/Items/Electricity/poweritems.xml | 4 +++- .../BarotraumaShared/Source/StatusEffects/StatusEffect.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Content/Items/Electricity/poweritems.xml b/Barotrauma/BarotraumaShared/Content/Items/Electricity/poweritems.xml index 5750f3dab..6e5bb8466 100644 --- a/Barotrauma/BarotraumaShared/Content/Items/Electricity/poweritems.xml +++ b/Barotrauma/BarotraumaShared/Content/Items/Electricity/poweritems.xml @@ -18,7 +18,9 @@ - + + + diff --git a/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs b/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs index ba79c6577..e1a6a160a 100644 --- a/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs +++ b/Barotrauma/BarotraumaShared/Source/StatusEffects/StatusEffect.cs @@ -272,10 +272,10 @@ namespace Barotrauma if (target == null || target.SerializableProperties == null) continue; foreach (PropertyConditional pc in propertyConditionals) { - if (!pc.Matches(target)) return false; + if (pc.Matches(target)) return true; } } - return true; + return false; } public virtual void Apply(ActionType type, float deltaTime, Entity entity, ISerializableEntity target)