Files
tbd-station-14/Content.Shared/Communications/SharedCommsHackerSystem.cs
deltanedas 91a157d7ed use weighted random for ninja threats (#20469)
* change threats to be weighted random and a little cleanup

* ninja rule stores weighted random id for threats

* move threats out of the rule and into weighted random

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-24 23:16:09 -04:00

29 lines
785 B
C#

using Content.Shared.DoAfter;
using Robust.Shared.Serialization;
namespace Content.Shared.Communications;
/// <summary>
/// Only exists in shared to provide API and for access.
/// All logic is serverside.
/// </summary>
public abstract class SharedCommsHackerSystem : EntitySystem
{
/// <summary>
/// Set the threats prototype to choose from when hacking a comms console.
/// </summary>
public void SetThreats(EntityUid uid, string threats, CommsHackerComponent? comp = null)
{
if (!Resolve(uid, ref comp))
return;
comp.Threats = threats;
}
}
/// <summary>
/// DoAfter event for comms console terror ability.
/// </summary>
[Serializable, NetSerializable]
public sealed partial class TerrorDoAfterEvent : SimpleDoAfterEvent { }