(cd7359bb3) StatusEffects can modify item sound and sight ranges (requires an AITarget)

This commit is contained in:
Joonas Rikkonen
2019-04-08 23:12:09 +03:00
parent 71128c27e6
commit 443d199017

View File

@@ -235,6 +235,26 @@ namespace Barotrauma
set { /*do nothing*/ }
}
[Serialize(0.0f, false)]
/// <summary>
/// Can be used by status effects or conditionals to modify the sound range
/// </summary>
public float SoundRange
{
get { return aiTarget == null ? 0.0f : aiTarget.SoundRange; }
set { if (aiTarget != null) { aiTarget.SoundRange = Math.Max(0.0f, value); } }
}
[Serialize(0.0f, false)]
/// <summary>
/// Can be used by status effects or conditionals to modify the sound range
/// </summary>
public float SightRange
{
get { return aiTarget == null ? 0.0f : aiTarget.SightRange; }
set { if (aiTarget != null) { aiTarget.SightRange = Math.Max(0.0f, value); } }
}
/// <summary>
/// Should the item's Use method be called with the "Use" or with the "Shoot" key?
/// </summary>