Reduce Triggers Boilerplate. (#41086)
* Push 1 * cleanup + master merge * launchontrigger * A crumb of cleanup --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
891f5a8f6b
commit
c01ec294d0
@@ -6,10 +6,8 @@ namespace Content.Shared.Trigger.Systems;
|
||||
/// <summary>
|
||||
/// System for creating a trigger when the round ends.
|
||||
/// </summary>
|
||||
public sealed class TriggerOnRoundEndSystem : EntitySystem
|
||||
public sealed class TriggerOnRoundEndSystem : TriggerOnXSystem
|
||||
{
|
||||
[Dependency] private readonly TriggerSystem _trigger = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -25,7 +23,7 @@ public sealed class TriggerOnRoundEndSystem : EntitySystem
|
||||
// trigger everything with the component
|
||||
while (triggerQuery.MoveNext(out var uid, out var comp))
|
||||
{
|
||||
_trigger.Trigger(uid, null, comp.KeyOut);
|
||||
Trigger.Trigger(uid, null, comp.KeyOut);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user