v0.10.6.2
This commit is contained in:
@@ -9,7 +9,17 @@ namespace Barotrauma
|
||||
[Serialize(0.0f, true)]
|
||||
public float Chance { get; set; }
|
||||
|
||||
public RNGAction(ScriptedEvent parentEvent, XElement element) : base(parentEvent, element) { }
|
||||
public RNGAction(ScriptedEvent parentEvent, XElement element) : base(parentEvent, element)
|
||||
{
|
||||
if (Chance >= 1.0f)
|
||||
{
|
||||
DebugConsole.ThrowError($"Incorrectly configured RNG Action in event \"{parentEvent.Prefab.Identifier}\". Probability is 1.0 (100%) or more, the action will always succeed.");
|
||||
}
|
||||
else if (Chance <= 0.0f)
|
||||
{
|
||||
DebugConsole.ThrowError($"Incorrectly configured RNG Action in event \"{parentEvent.Prefab.Identifier}\". Probability is 0 or less, the action will never succeed.");
|
||||
}
|
||||
}
|
||||
|
||||
private bool isFinished;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user