Use new ComponentPauseGenerator (#25183)

Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.
This commit is contained in:
Pieter-Jan Briers
2024-02-26 04:36:19 +01:00
committed by GitHub
parent 2a2324ecaf
commit e00f74505c
130 changed files with 150 additions and 539 deletions

View File

@@ -63,7 +63,6 @@ public sealed class SmokeSystem : EntitySystem
SubscribeLocalEvent<SmokeComponent, ReactionAttemptEvent>(OnReactionAttempt);
SubscribeLocalEvent<SmokeComponent, SolutionRelayEvent<ReactionAttemptEvent>>(OnReactionAttempt);
SubscribeLocalEvent<SmokeComponent, SpreadNeighborsEvent>(OnSmokeSpread);
SubscribeLocalEvent<SmokeAffectedComponent, EntityUnpausedEvent>(OnAffectedUnpaused);
}
/// <inheritdoc/>
@@ -124,11 +123,6 @@ public sealed class SmokeSystem : EntitySystem
RemComp(args.OtherEntity, smokeAffectedComponent);
}
private void OnAffectedUnpaused(Entity<SmokeAffectedComponent> entity, ref EntityUnpausedEvent args)
{
entity.Comp.NextSecond += args.PausedTime;
}
private void OnSmokeSpread(Entity<SmokeComponent> entity, ref SpreadNeighborsEvent args)
{
if (entity.Comp.SpreadAmount == 0 || !_solutionContainerSystem.ResolveSolution(entity.Owner, SmokeComponent.SolutionName, ref entity.Comp.Solution, out var solution))