* move MinMax to shared * cleanup MinMax * move other ticking components to shared just because * remove unused prototype file * update everything to use shared components * test * test 2 * test 3 --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
19 lines
664 B
C#
19 lines
664 B
C#
using Content.Server.GameTicking.Rules.Components;
|
|
using Content.Shared.GameTicking.Components;
|
|
using Content.Shared.Storage;
|
|
|
|
namespace Content.Server.GameTicking.Rules;
|
|
|
|
public sealed class SubGamemodesSystem : GameRuleSystem<SubGamemodesComponent>
|
|
{
|
|
protected override void Added(EntityUid uid, SubGamemodesComponent comp, GameRuleComponent rule, GameRuleAddedEvent args)
|
|
{
|
|
var picked = EntitySpawnCollection.GetSpawns(comp.Rules, RobustRandom);
|
|
foreach (var id in picked)
|
|
{
|
|
Log.Info($"Starting gamerule {id} as a subgamemode of {ToPrettyString(uid):rule}");
|
|
GameTicker.AddGameRule(id);
|
|
}
|
|
}
|
|
}
|