* Mega Antag Refactor * last minute delta save * more workshopping * more shit * ok tested this for once * okkkkk sure * generic delays for starting rules * well darn * nukies partially * ouagh * ballin' faded and smonkin wed * obliterated the diff * Spread my arms and soak up congratulations * I've got plenty of love, but nothing to show for it * but there’s too much sunlight Shining on my laptop monitor, so I Can’t see anything with any amount of clarity * ok this junk * OOK! * fubar * most of sloth's review * oh boy * eek * hell yea! * ASDFJASDJFvsakcvjkzjnhhhyh
19 lines
664 B
C#
19 lines
664 B
C#
using Content.Server.GameTicking.Components;
|
|
using Content.Server.GameTicking.Rules.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);
|
|
}
|
|
}
|
|
}
|