RandomChance trigger condition (#39543)

* branch names don't matter anyway

* commits are a window to the soul

* requested change

* also requested

* ship it

* remove key

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
This commit is contained in:
āda
2025-08-12 18:04:29 -05:00
committed by GitHub
parent dcfdd8914a
commit 024301e698
2 changed files with 40 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Conditions;
/// <summary>
/// This condition will cancel triggers based on random chance.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class RandomChanceTriggerConditionComponent : BaseTriggerConditionComponent
{
/// <summary>
/// Chance for the trigger to succeed.
/// </summary>
[DataField, AutoNetworkedField]
public float SuccessChance = .9f;
}