mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
22 lines
598 B
C#
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
|
|
}
|
|
}
|
|
}
|