Content fixes for timeoffsets (#15934)

This commit is contained in:
metalgearsloth
2023-05-01 14:49:25 +10:00
committed by GitHub
parent 2cf883b56a
commit d51d74d934
18 changed files with 53 additions and 63 deletions

View File

@@ -39,6 +39,8 @@ public abstract class SharedEmitSoundSystem : EntitySystem
SubscribeLocalEvent<EmitSoundOnActivateComponent, ActivateInWorldEvent>(OnEmitSoundOnActivateInWorld);
SubscribeLocalEvent<EmitSoundOnPickupComponent, GotEquippedHandEvent>(OnEmitSoundOnPickup);
SubscribeLocalEvent<EmitSoundOnDropComponent, DroppedEvent>(OnEmitSoundOnDrop);
SubscribeLocalEvent<EmitSoundOnCollideComponent, EntityUnpausedEvent>(OnEmitSoundUnpaused);
SubscribeLocalEvent<EmitSoundOnCollideComponent, StartCollideEvent>(OnEmitSoundOnCollide);
}
@@ -112,6 +114,11 @@ public abstract class SharedEmitSoundSystem : EntitySystem
}
}
private void OnEmitSoundUnpaused(EntityUid uid, EmitSoundOnCollideComponent component, ref EntityUnpausedEvent args)
{
component.NextSound += args.PausedTime;
}
private void OnEmitSoundOnCollide(EntityUid uid, EmitSoundOnCollideComponent component, ref StartCollideEvent args)
{
if (!args.OurFixture.Hard ||