make thief a subgamemode (#25740)
* add SubGamemodes comp/sys * remove RuleChance from thief rule * use SubGamemodes for adding thief rule instead of adding ThiefRule component to random gamemodes * clean up thief rule prototype * add better logging + end rule if it fails to start * march 1st incident * preset ops * the dreaded --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Content.Server.GameTicking.Rules;
|
||||
using Content.Shared.Storage;
|
||||
|
||||
namespace Content.Server.GameTicking.Rules.Components;
|
||||
|
||||
/// <summary>
|
||||
/// When this gamerule is added it has a chance of adding other gamerules.
|
||||
/// Since it's done when added and not when started you can still use normal start logic.
|
||||
/// Used for starting subgamemodes in game presets.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(SubGamemodesSystem))]
|
||||
public sealed partial class SubGamemodesComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Spawn entries for each gamerule prototype.
|
||||
/// Use orGroups if you want to limit rules.
|
||||
/// </summary>
|
||||
[DataField(required: true)]
|
||||
public List<EntitySpawnEntry> Rules = new();
|
||||
}
|
||||
Reference in New Issue
Block a user