CatStation/Content.Server/GameTicking/ServerRuleGridsSystem.cs
AftrLite 3d022fff3d
Move RuleGridSystem to Shared (#46116)
* wow i wonder if this works

* fix my own stupidity
2026-09-22 04:18:31 +00:00

22 lines
598 B
C#

using Content.Shared.GameTicking;
using Content.Shared.Whitelist;
namespace Content.Server.GameTicking;
/// <inheritdoc/>
public sealed partial class ServerRuleGridsSystem : RuleGridsSystem
{
[SubscribeLocalEvent]
private void OnGridSplit(ref GridSplitEvent args)
{
var rule = QueryActiveRules();
while (rule.MoveNext(out var comp, out _, out _))
{
if (!comp.MapGrids.Contains(args.Grid))
continue;
comp.MapGrids.AddRange(args.NewGrids);
break; // only 1 rule can own a grid, not multiple
}
}
}