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>
This commit is contained in:
deltanedas
2023-09-25 04:16:09 +01:00
committed by GitHub
parent 2616cb69e8
commit 91a157d7ed
6 changed files with 44 additions and 23 deletions

View File

@@ -10,9 +10,9 @@ namespace Content.Shared.Communications;
public abstract class SharedCommsHackerSystem : EntitySystem
{
/// <summary>
/// Set the list of threats to choose from when hacking a comms console.
/// Set the threats prototype to choose from when hacking a comms console.
/// </summary>
public void SetThreats(EntityUid uid, List<Threat> threats, CommsHackerComponent? comp = null)
public void SetThreats(EntityUid uid, string threats, CommsHackerComponent? comp = null)
{
if (!Resolve(uid, ref comp))
return;