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)
This commit is contained in:
@@ -18,7 +18,9 @@
|
|||||||
</fixrequirement>
|
</fixrequirement>
|
||||||
|
|
||||||
<PowerTransfer canbeselected = "true">
|
<PowerTransfer canbeselected = "true">
|
||||||
<StatusEffect type="InWater" target="This" condition="-0.5"/>
|
<StatusEffect type="InWater" target="This" condition="-0.5">
|
||||||
|
<Conditional currPowerConsumption="lt -10"/>
|
||||||
|
</StatusEffect>
|
||||||
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
|
<GuiFrame rect="0,0,350,160" alignment="Center" style="ItemUI"/>
|
||||||
</PowerTransfer>
|
</PowerTransfer>
|
||||||
|
|
||||||
|
|||||||
@@ -272,10 +272,10 @@ namespace Barotrauma
|
|||||||
if (target == null || target.SerializableProperties == null) continue;
|
if (target == null || target.SerializableProperties == null) continue;
|
||||||
foreach (PropertyConditional pc in propertyConditionals)
|
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)
|
public virtual void Apply(ActionType type, float deltaTime, Entity entity, ISerializableEntity target)
|
||||||
|
|||||||
Reference in New Issue
Block a user