diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index b975c28673..95a7ec0596 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -81,7 +81,6 @@ namespace Content.Client.Entry factory.RegisterClass(); factory.RegisterClass(); factory.RegisterClass(); - factory.RegisterClass(); factory.RegisterClass(); factory.RegisterClass(); diff --git a/Content.Client/Kitchen/KitchenSpikeComponent.cs b/Content.Client/Kitchen/Components/KitchenSpikeComponent.cs similarity index 88% rename from Content.Client/Kitchen/KitchenSpikeComponent.cs rename to Content.Client/Kitchen/Components/KitchenSpikeComponent.cs index efae8b89e6..58f271d63f 100644 --- a/Content.Client/Kitchen/KitchenSpikeComponent.cs +++ b/Content.Client/Kitchen/Components/KitchenSpikeComponent.cs @@ -2,7 +2,7 @@ using Content.Shared.DragDrop; using Content.Shared.Kitchen.Components; using Robust.Shared.GameObjects; -namespace Content.Client.Kitchen +namespace Content.Client.Kitchen.Components { [RegisterComponent] internal sealed class KitchenSpikeComponent : SharedKitchenSpikeComponent diff --git a/Content.Client/Kitchen/Components/MicrowaveComponent.cs b/Content.Client/Kitchen/Components/MicrowaveComponent.cs new file mode 100644 index 0000000000..862a8b6de0 --- /dev/null +++ b/Content.Client/Kitchen/Components/MicrowaveComponent.cs @@ -0,0 +1,17 @@ +using Content.Shared.Kitchen.Components; +using Content.Shared.Sound; +using Robust.Shared.Audio; +using Robust.Shared.GameObjects; +using Robust.Shared.Serialization.Manager.Attributes; + +namespace Content.Client.Kitchen.Components +{ + [RegisterComponent] + public class MicrowaveComponent : SharedMicrowaveComponent + { + public IPlayingAudioStream? PlayingStream { get; set; } + + [DataField("loopingSound")] + public SoundSpecifier LoopingSound = new SoundPathSpecifier("/Audio/Machines/microwave_loop.ogg"); + } +} diff --git a/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs new file mode 100644 index 0000000000..6a18a0feac --- /dev/null +++ b/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -0,0 +1,31 @@ +using System; +using Content.Client.Kitchen.Components; +using Robust.Shared.Audio; +using Robust.Shared.GameObjects; +using Robust.Shared.Player; + +namespace Content.Client.Kitchen.EntitySystems +{ + public class MicrowaveSystem : EntitySystem + { + public void StartSoundLoop(MicrowaveComponent microwave) + { + StopSoundLoop(microwave); + + microwave.PlayingStream = SoundSystem.Play(Filter.Local(), microwave.LoopingSound.GetSound(), microwave.Owner, + AudioParams.Default.WithAttenuation(1).WithMaxDistance(5).WithLoop(true)); + } + + public void StopSoundLoop(MicrowaveComponent microwave) + { + try + { + microwave.PlayingStream?.Stop(); + } + catch (Exception _) + { + // TODO: HOLY SHIT EXPOSE SOME DISPOSED PROPERTY ON PLAYING STREAM OR SOMETHING. + } + } + } +} diff --git a/Content.Client/Kitchen/Visualizers/MicrowaveVisualizer.cs b/Content.Client/Kitchen/Visualizers/MicrowaveVisualizer.cs index 97d2bf0e7c..c0a3a68e8c 100644 --- a/Content.Client/Kitchen/Visualizers/MicrowaveVisualizer.cs +++ b/Content.Client/Kitchen/Visualizers/MicrowaveVisualizer.cs @@ -1,10 +1,10 @@ -using Content.Client.Sound; +using Content.Client.Kitchen.Components; +using Content.Client.Kitchen.EntitySystems; using Content.Shared.Kitchen.Components; using Content.Shared.Power; -using Content.Shared.Sound; using JetBrains.Annotations; using Robust.Client.GameObjects; -using Robust.Shared.Audio; +using Robust.Shared.GameObjects; using Robust.Shared.Log; namespace Content.Client.Kitchen.Visualizers @@ -17,35 +17,33 @@ namespace Content.Client.Kitchen.Visualizers base.OnChangeData(component); var sprite = component.Owner.GetComponent(); - var loopingSoundComponent = component.Owner.GetComponentOrNull(); + var microwaveComponent = component.Owner.GetComponentOrNull(); if (!component.TryGetData(PowerDeviceVisuals.VisualState, out MicrowaveVisualState state)) { state = MicrowaveVisualState.Idle; } + // The only reason we get the entity system so late is so that tests don't fail... Amazing, huh? switch (state) { case MicrowaveVisualState.Broken: sprite.LayerSetState(MicrowaveVisualizerLayers.BaseUnlit, "mwb"); - loopingSoundComponent?.StopAllSounds(); + if(microwaveComponent != null) + EntitySystem.Get().StopSoundLoop(microwaveComponent); break; case MicrowaveVisualState.Idle: sprite.LayerSetState(MicrowaveVisualizerLayers.Base, "mw"); sprite.LayerSetState(MicrowaveVisualizerLayers.BaseUnlit, "mw_unlit"); - loopingSoundComponent?.StopAllSounds(); + if(microwaveComponent != null) + EntitySystem.Get().StopSoundLoop(microwaveComponent); break; case MicrowaveVisualState.Cooking: sprite.LayerSetState(MicrowaveVisualizerLayers.Base, "mw"); sprite.LayerSetState(MicrowaveVisualizerLayers.BaseUnlit, "mw_running_unlit"); - var audioParams = AudioParams.Default; - audioParams.Loop = true; - var scheduledSound = new ScheduledSound(); - scheduledSound.Filename = "/Audio/Machines/microwave_loop.ogg"; - scheduledSound.AudioParams = audioParams; - loopingSoundComponent?.StopAllSounds(); - loopingSoundComponent?.AddScheduledSound(scheduledSound); + if(microwaveComponent != null) + EntitySystem.Get().StartSoundLoop(microwaveComponent); break; default: diff --git a/Content.Client/Light/Components/ExpendableLightComponent.cs b/Content.Client/Light/Components/ExpendableLightComponent.cs index 5531379084..37eb37ee13 100644 --- a/Content.Client/Light/Components/ExpendableLightComponent.cs +++ b/Content.Client/Light/Components/ExpendableLightComponent.cs @@ -1,4 +1,5 @@ using Content.Shared.Light.Component; +using Robust.Shared.Audio; using Robust.Shared.GameObjects; namespace Content.Client.Light.Components @@ -9,6 +10,6 @@ namespace Content.Client.Light.Components [RegisterComponent] public class ExpendableLightComponent : SharedExpendableLightComponent { - + public IPlayingAudioStream? PlayingStream { get; set; } } } diff --git a/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs b/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs index 3a21d11b1a..59e11983e8 100644 --- a/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs +++ b/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs @@ -1,7 +1,10 @@ -using Content.Client.Light.Components; +using System; +using Content.Client.Light.Components; using Content.Shared.Light.Component; using JetBrains.Annotations; using Robust.Client.GameObjects; +using Robust.Shared.Audio; +using Robust.Shared.Player; namespace Content.Client.Light.Visualizers { @@ -17,7 +20,7 @@ namespace Content.Client.Light.Visualizers return; } - if (component.TryGetData(ExpendableLightVisuals.State, out string lightBehaviourID)) + if (component.TryGetData(ExpendableLightVisuals.Behavior, out string lightBehaviourID)) { if (component.Owner.TryGetComponent(out var lightBehaviour)) { @@ -33,6 +36,35 @@ namespace Content.Client.Light.Visualizers } } } + + void TryStopStream(IPlayingAudioStream? stream) + { + try + { + stream?.Stop(); + } + catch (Exception _) + { + // TODO: HOLY SHIT EXPOSE SOME DISPOSED PROPERTY ON PLAYING STREAM OR SOMETHING. + } + } + + if (component.TryGetData(ExpendableLightVisuals.State, out ExpendableLightState state) + && component.Owner.TryGetComponent(out var expendableLight)) + { + switch (state) + { + case ExpendableLightState.Lit: + TryStopStream(expendableLight.PlayingStream); + expendableLight.PlayingStream = SoundSystem.Play(Filter.Local(), expendableLight.LoopedSound, + expendableLight.Owner, SharedExpendableLightComponent.LoopedSoundParams.WithLoop(true)); + break; + + case ExpendableLightState.Dead: + TryStopStream(expendableLight.PlayingStream); + break; + } + } } } } diff --git a/Content.Client/Sound/LoopingSoundComponent.cs b/Content.Client/Sound/LoopingSoundComponent.cs deleted file mode 100644 index cd2d2e2812..0000000000 --- a/Content.Client/Sound/LoopingSoundComponent.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections.Generic; -using Content.Shared.Physics; -using Content.Shared.Sound; -using Robust.Shared.Audio; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Network; -using Robust.Shared.Player; -using Robust.Shared.Players; -using Robust.Shared.Random; -using Robust.Shared.Serialization.Manager.Attributes; - -namespace Content.Client.Sound -{ - [RegisterComponent] - public class LoopingSoundComponent : SharedLoopingSoundComponent - { - [Dependency] private readonly IRobustRandom _random = default!; - - private readonly Dictionary _audioStreams = new(); - - [DataField("schedules", true)] - private List _scheduledSounds - { - set => value.ForEach(AddScheduledSound); - get => new(); - } - - public override void StopAllSounds() - { - foreach (var kvp in _audioStreams) - { - kvp.Key.Play = false; - kvp.Value.Stop(); - } - _audioStreams.Clear(); - } - - public override void StopScheduledSound(string filename) - { - foreach (var kvp in _audioStreams) - { - if (kvp.Key.Filename != filename) continue; - kvp.Key.Play = false; - kvp.Value.Stop(); - _audioStreams.Remove(kvp.Key); - } - } - - public override void AddScheduledSound(ScheduledSound schedule) - { - Play(schedule); - } - - public void Play(ScheduledSound schedule) - { - if (!schedule.Play) return; - - Owner.SpawnTimer((int) schedule.Delay + (_random.Next((int) schedule.RandomDelay)),() => - { - if (!schedule.Play) return; // We make sure this hasn't changed. - - if (!_audioStreams.ContainsKey(schedule)) - { - _audioStreams.Add(schedule, SoundSystem.Play(Filter.Local(), schedule.Filename, Owner, schedule.AudioParams)!); - } - else - { - _audioStreams[schedule] = SoundSystem.Play(Filter.Local(), schedule.Filename, Owner, schedule.AudioParams)!; - } - - if (schedule.Times == 0) return; - - if (schedule.Times > 0) schedule.Times--; - - Play(schedule); - }); - } - - public override void HandleNetworkMessage(ComponentMessage message, INetChannel channel, ICommonSession? session = null) - { - base.HandleNetworkMessage(message, channel, session); - switch (message) - { - case ScheduledSoundMessage msg: - AddScheduledSound(msg.Schedule); - break; - - case StopSoundScheduleMessage msg: - StopScheduledSound(msg.Filename); - break; - - case StopAllSoundsMessage _: - StopAllSounds(); - break; - } - } - - protected override void Initialize() - { - base.Initialize(); - SoundSystem.OcclusionCollisionMask = (int) CollisionGroup.Impassable; - } - } -} diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/ActionsComponentTests.cs b/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/ActionsComponentTests.cs index 497e735a82..82bdf16910 100644 --- a/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/ActionsComponentTests.cs +++ b/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/ActionsComponentTests.cs @@ -52,7 +52,6 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs - type: PointLight enabled: false radius: 3 - - type: LoopingSound - type: Appearance visuals: - type: FlashLightVisualizer diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs index c58c5b32ee..2b110578c1 100644 --- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs @@ -195,6 +195,9 @@ namespace Content.Server.Kitchen.EntitySystems while (_uiUpdateQueue.TryDequeue(out var comp)) { + if(comp.Deleted) + continue; + bool canJuice = false; bool canGrind = false; if (comp.BeakerContainer.ContainedEntity != null) diff --git a/Content.Server/Light/Components/ExpendableLightComponent.cs b/Content.Server/Light/Components/ExpendableLightComponent.cs index ef74376c01..180e791009 100644 --- a/Content.Server/Light/Components/ExpendableLightComponent.cs +++ b/Content.Server/Light/Components/ExpendableLightComponent.cs @@ -20,8 +20,6 @@ namespace Content.Server.Light.Components [RegisterComponent] public class ExpendableLightComponent : SharedExpendableLightComponent, IUse { - private static readonly AudioParams LoopedSoundParams = new(0, 1, "Master", 62.5f, 1, true, 0.3f); - /// /// Status of light, whether or not it is emitting light. /// @@ -77,18 +75,20 @@ namespace Content.Server.Light.Components private void UpdateVisualizer() { + _appearance?.SetData(ExpendableLightVisuals.State, CurrentState); + switch (CurrentState) { case ExpendableLightState.Lit: - _appearance?.SetData(ExpendableLightVisuals.State, TurnOnBehaviourID); + _appearance?.SetData(ExpendableLightVisuals.Behavior, TurnOnBehaviourID); break; case ExpendableLightState.Fading: - _appearance?.SetData(ExpendableLightVisuals.State, FadeOutBehaviourID); + _appearance?.SetData(ExpendableLightVisuals.Behavior, FadeOutBehaviourID); break; case ExpendableLightState.Dead: - _appearance?.SetData(ExpendableLightVisuals.State, string.Empty); + _appearance?.SetData(ExpendableLightVisuals.Behavior, string.Empty); break; } } @@ -100,12 +100,6 @@ namespace Content.Server.Light.Components switch (CurrentState) { case ExpendableLightState.Lit: - - if (LoopedSound != string.Empty && Owner.TryGetComponent(out var loopingSound)) - { - loopingSound.Play(LoopedSound, LoopedSoundParams); - } - if (LitSound != string.Empty) { SoundSystem.Play(Filter.Pvs(Owner), LitSound, Owner); @@ -131,11 +125,6 @@ namespace Content.Server.Light.Components SoundSystem.Play(Filter.Pvs(Owner), DieSound, Owner); } - if (LoopedSound != string.Empty && Owner.TryGetComponent(out var loopSound)) - { - loopSound.StopAllSounds(); - } - sprite.LayerSetState(0, IconStateSpent); sprite.LayerSetShader(0, "shaded"); sprite.LayerSetVisible(1, false); diff --git a/Content.Server/Sound/Components/LoopingLoopingSoundComponent.cs b/Content.Server/Sound/Components/LoopingLoopingSoundComponent.cs deleted file mode 100644 index 4230e39d8e..0000000000 --- a/Content.Server/Sound/Components/LoopingLoopingSoundComponent.cs +++ /dev/null @@ -1,67 +0,0 @@ -using Content.Shared.Sound; -using Robust.Shared.Audio; -using Robust.Shared.GameObjects; -using Robust.Shared.Network; - -namespace Content.Server.Sound.Components -{ - [RegisterComponent] - public class LoopingLoopingSoundComponent : SharedLoopingSoundComponent - { - /// - /// Stops all sounds. - /// - /// User that will be affected. - public void StopAllSounds(INetChannel? channel) - { - SendNetworkMessage(new StopAllSoundsMessage(), channel); - } - - /// - /// Stops a certain scheduled sound from playing. - /// - /// User that will be affected. - public void StopScheduledSound(string filename, INetChannel? channel) - { - SendNetworkMessage(new StopSoundScheduleMessage() {Filename = filename}, channel); - } - - /// - /// Adds an scheduled sound to be played. - /// - /// User that will be affected. - public void AddScheduledSound(ScheduledSound schedule, INetChannel? channel) - { - SendNetworkMessage(new ScheduledSoundMessage() {Schedule = schedule}, channel); - } - - public override void StopAllSounds() - { - StopAllSounds(null); - } - - public override void StopScheduledSound(string filename) - { - StopScheduledSound(filename, null); - } - - public override void AddScheduledSound(ScheduledSound schedule) - { - AddScheduledSound(schedule, null); - } - - /// - /// Play an audio file following the entity. - /// - /// The resource path to the OGG Vorbis file to play. - /// User that will be affected. - public void Play(string filename, AudioParams? audioParams = null, INetChannel? channel = null) - { - AddScheduledSound(new ScheduledSound() - { - Filename = filename, - AudioParams = audioParams, - }, channel); - } - } -} diff --git a/Content.Shared/Light/Component/SharedExpendableLightComponent.cs b/Content.Shared/Light/Component/SharedExpendableLightComponent.cs index f6f057ea23..9c0e2960b2 100644 --- a/Content.Shared/Light/Component/SharedExpendableLightComponent.cs +++ b/Content.Shared/Light/Component/SharedExpendableLightComponent.cs @@ -1,4 +1,8 @@ using System; +using Robust.Shared.Audio; +using Robust.Shared.GameObjects; +using Robust.Shared.GameStates; +using Robust.Shared.Players; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; @@ -8,7 +12,8 @@ namespace Content.Shared.Light.Component [Serializable, NetSerializable] public enum ExpendableLightVisuals { - State + State, + Behavior } [Serializable, NetSerializable] @@ -20,8 +25,11 @@ namespace Content.Shared.Light.Component Dead } + [NetworkedComponent] public abstract class SharedExpendableLightComponent: Robust.Shared.GameObjects.Component { + public static readonly AudioParams LoopedSoundParams = new(0, 1, "Master", 62.5f, 1, true, 0.3f); + public sealed override string Name => "ExpendableLight"; [ViewVariables(VVAccess.ReadOnly)] @@ -65,7 +73,7 @@ namespace Content.Shared.Light.Component [ViewVariables] [DataField("loopedSound")] - protected string LoopedSound { get; set; } = string.Empty; + public string LoopedSound { get; set; } = string.Empty; [ViewVariables] [DataField("dieSound")] diff --git a/Content.Shared/Sound/SharedLoopingSoundComponent.cs b/Content.Shared/Sound/SharedLoopingSoundComponent.cs deleted file mode 100644 index b31234d03e..0000000000 --- a/Content.Shared/Sound/SharedLoopingSoundComponent.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using Robust.Shared.Audio; -using Robust.Shared.GameObjects; -using Robust.Shared.GameStates; -using Robust.Shared.Serialization; -using Robust.Shared.Serialization.Manager.Attributes; - -namespace Content.Shared.Sound -{ - [NetworkedComponent()] - public class SharedLoopingSoundComponent : Component - { - public override string Name => "LoopingSound"; - - /// - /// Stops all sounds. - /// - public virtual void StopAllSounds() - {} - - /// - /// Stops a certain scheduled sound from playing. - /// - public virtual void StopScheduledSound(string filename) - {} - - /// - /// Adds an scheduled sound to be played. - /// - public virtual void AddScheduledSound(ScheduledSound scheduledSound) - {} - - /// - /// Play an audio file following the entity. - /// - /// The resource path to the OGG Vorbis file to play. - public void Play(string filename, AudioParams? audioParams = null) - { - AddScheduledSound(new ScheduledSound() - { - Filename = filename, - AudioParams = audioParams, - }); - } - } - - [NetSerializable, Serializable] - public class ScheduledSoundMessage : ComponentMessage - { - public ScheduledSound Schedule = new(); - public ScheduledSoundMessage() - { - Directed = true; - } - } - - [NetSerializable, Serializable] - public class StopSoundScheduleMessage : ComponentMessage - { - public string Filename = string.Empty; - public StopSoundScheduleMessage() - { - Directed = true; - } - } - - [NetSerializable, Serializable] - public class StopAllSoundsMessage : ComponentMessage - { - public StopAllSoundsMessage() - { - Directed = true; - } - } - - [Serializable, NetSerializable] - [DataDefinition] - public class ScheduledSound - { - [DataField("fileName")] - public string Filename = string.Empty; - - /// - /// The parameters to play the sound with. - /// - [DataField("audioparams")] - public AudioParams? AudioParams; - - /// - /// Delay in milliseconds before playing the sound, - /// and delay between repetitions if Times is not 0. - /// - [DataField("delay")] - public uint Delay; - - /// - /// Maximum number of milliseconds to add to the delay randomly. - /// Useful for random ambience noises. Generated value differs from client to client. - /// - [DataField("randomdelay")] - public uint RandomDelay; - - /// - /// How many times to repeat the sound. If it's 0, it will play the sound once. - /// If it's less than 0, it will repeat the sound indefinitely. - /// If it's greater than 0, it will play the sound n+1 times. - /// - [DataField("times")] - public int Times; - - /// - /// Whether the sound will play or not. - /// - public bool Play = true; - } -} diff --git a/Resources/Prototypes/Entities/Clothing/Head/base.yml b/Resources/Prototypes/Entities/Clothing/Head/base.yml index c81acedf5c..ea2aa62164 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/base.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/base.yml @@ -47,7 +47,6 @@ - type: PointLight enabled: false radius: 3 - - type: LoopingSound - type: Appearance visuals: - type: FlashLightVisualizer diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml index e8e403ae9b..ab1d35e31f 100644 --- a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml +++ b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml @@ -15,7 +15,6 @@ - type: PointLight enabled: false radius: 3 - - type: LoopingSound - type: Appearance visuals: - type: FlashLightVisualizer diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml b/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml index d9481657b5..8863546e1c 100644 --- a/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml +++ b/Resources/Prototypes/Entities/Clothing/Shoes/specific.yml @@ -19,7 +19,6 @@ sprite: Clothing/Shoes/Specific/clown.rsi - type: Clothing sprite: Clothing/Shoes/Specific/clown.rsi - - type: LoopingSound - type: FootstepModifier footstepSoundCollection: footstep_clown diff --git a/Resources/Prototypes/Entities/Effects/puddle.yml b/Resources/Prototypes/Entities/Effects/puddle.yml index 300ccbcf6e..6e018f8f0b 100644 --- a/Resources/Prototypes/Entities/Effects/puddle.yml +++ b/Resources/Prototypes/Entities/Effects/puddle.yml @@ -10,7 +10,6 @@ - type: Puddle spill_sound: /Audio/Effects/Fluids/splat.ogg recolor: true - - type: LoopingSound - type: Clickable - type: Slippery - type: Physics diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 4ef1d7ba87..45b1b8e193 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -387,7 +387,6 @@ # Eek! You can eat them alive for now until someone makes something that detects when # a mob is dead or something idk - type: Food - - type: LoopingSound - type: SolutionContainer contents: reagents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml index 5154e389c5..5e08078666 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml @@ -9,7 +9,6 @@ - type: Sprite sprite: Objects/Consumable/Food/Baked/bread.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 20 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml index 5f792c0c8e..0ecb6b5fa6 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml @@ -10,7 +10,6 @@ - type: Sprite sprite: Objects/Consumable/Food/Baked/cake.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 20 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml index 25b22164db..5f71cd9431 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/donut.yml @@ -13,7 +13,6 @@ - type: Sprite sprite: Objects/Consumable/Food/Baked/donut.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 5 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml index d697dd849f..416fcd82ff 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/misc.yml @@ -9,7 +9,6 @@ - type: Sprite sprite: Objects/Consumable/Food/Baked/misc.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 5 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml index c5d94a8ded..2a5c2fa711 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/pizza.yml @@ -10,7 +10,6 @@ - type: Sprite sprite: Objects/Consumable/Food/Baked/pizza.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 15 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml index da91d4b718..b80ef6f762 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/box.yml @@ -92,7 +92,6 @@ - box11 - box12 # Someday... - # - type: LoopingSound # - type: DamageOnLand # amount: 5 # - type: DamageOtherOnHit diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml index f37b3c2670..fa7bc163fa 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/tin.yml @@ -78,7 +78,6 @@ reagents: - ReagentId: Nutriment Quantity: 15 - - type: LoopingSound - type: Food trash: FoodTinPeachesTrash @@ -127,7 +126,6 @@ reagents: - ReagentId: Nutriment Quantity: 15 - - type: LoopingSound - type: Food trash: FoodTinPeachesMaintTrash @@ -176,7 +174,6 @@ reagents: - ReagentId: Nutriment Quantity: 15 - - type: LoopingSound - type: Food trash: FoodTinBeansTrash @@ -227,7 +224,6 @@ reagents: - ReagentId: Nutriment Quantity: 15 - - type: LoopingSound - type: Food trash: FoodTinMRETrash diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml index 956cbabd68..7f4dfafec8 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/burger.yml @@ -10,7 +10,6 @@ - type: Sprite sprite: Objects/Consumable/Food/burger.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 15 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml index 886827dcd8..06c818d1b9 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml @@ -23,7 +23,6 @@ reagents: - ReagentId: Egg Quantity: 5 - - type: LoopingSound - type: DamageOnLand amount: 1 - type: DamageOtherOnHit diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml index 86d65c8845..745d0ec100 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml @@ -9,7 +9,6 @@ - type: Sprite sprite: Objects/Consumable/Food/frozen.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 20 # For sprinkles or something? Idk. contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml index c04c0e016d..fef5800303 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml @@ -9,7 +9,6 @@ - type: Sprite sprite: Objects/Consumable/Food/meat.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 20 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml index 5c0f7ebce4..02ee16cf0c 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/noodles.yml @@ -11,7 +11,6 @@ - type: Sprite sprite: Objects/Consumable/Food/noodles.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 20 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml index 704e8a7376..3de439686d 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/skewer.yml @@ -10,7 +10,6 @@ - type: Sprite sprite: Objects/Consumable/Food/skewer.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 20 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index b3fe15a37c..2fcb644269 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -9,7 +9,6 @@ - type: Sprite sprite: Objects/Consumable/Food/snacks.rsi netsync: false - - type: LoopingSound - type: SolutionContainer maxVol: 30 # Room for extra condiments contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml index 95d8810b6b..d7a7ab1de6 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/soup.yml @@ -5,7 +5,6 @@ components: - type: Food trash: FoodBowlBig - - type: LoopingSound - type: SolutionContainer maxVol: 20 contents: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/trash_drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/trash_drinks.yml index 25c6f54d7c..eb10d855f8 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/trash_drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/trash_drinks.yml @@ -6,7 +6,6 @@ id: DrinkBottleBaseEmpty description: That's an empty bottle. components: - - type: LoopingSound - type: Sprite state: icon - type: SolutionContainer diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index f52578dce9..cf36a7dfa6 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -28,7 +28,6 @@ interfaces: - key: enum.PDAUiKey.Key type: PDABoundUserInterface - - type: LoopingSound - type: entity parent: BasePDA diff --git a/Resources/Prototypes/Entities/Objects/Fun/skub.yml b/Resources/Prototypes/Entities/Objects/Fun/skub.yml index e4695f5062..6f1e2e6842 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/skub.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/skub.yml @@ -10,7 +10,6 @@ - type: Item sprite: Objects/Misc/skub.rsi - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Items/skub.ogg diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index 0d8babe815..3ab1f035c5 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -5,7 +5,7 @@ id: BasePlushie components: - type: EmitSoundOnUse - sound: + sound: collection: ToySqueak - type: EmitSoundOnLand sound: @@ -13,7 +13,6 @@ - type: EmitSoundOnActivate sound: collection: ToySqueak - - type: LoopingSound - type: ItemCooldown - type: UseDelay delay: 1.0 @@ -91,7 +90,6 @@ sprite: Objects/Fun/toys.rsi state: plushie_snake - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Items/Toys/rattle.ogg @@ -108,7 +106,6 @@ sprite: Objects/Fun/toys.rsi state: toy_mouse - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Items/Toys/mousesqueek.ogg @@ -125,7 +122,6 @@ sprite: Objects/Fun/toys.rsi state: plushie_vox - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Voice/Vox/shriek1.ogg @@ -151,7 +147,6 @@ sound: path: /Audio/Items/Toys/helpme.ogg - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Items/Toys/helpme.ogg @@ -170,12 +165,11 @@ - type: Item sprite: Objects/Misc/carvings.rsi - type: EmitSoundOnThrow - sound: + sound: path: /Audio/Items/Toys/hellothere.ogg - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse - sound: + sound: path: /Audio/Items/Toys/hellothere.ogg - type: UseDelay delay: 1.0 @@ -195,9 +189,8 @@ sound: path: /Audio/Items/Toys/thankyou.ogg - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse - sound: + sound: path: /Audio/Items/Toys/thankyou.ogg - type: UseDelay delay: 1.0 @@ -214,12 +207,11 @@ - type: Item sprite: Objects/Misc/carvings.rsi - type: EmitSoundOnThrow - sound: + sound: path: /Audio/Items/Toys/verygood.ogg - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse - sound: + sound: path: /Audio/Items/Toys/verygood.ogg - type: UseDelay delay: 1.0 @@ -239,7 +231,6 @@ sound: path: /Audio/Items/Toys/imsorry.ogg - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Items/Toys/imsorry.ogg @@ -311,7 +302,6 @@ sprite: Objects/Fun/toys.rsi state: ian - type: ItemCooldown - - type: LoopingSound - type: EmitSoundOnUse sound: path: /Audio/Items/Toys/ian.ogg diff --git a/Resources/Prototypes/Entities/Objects/Misc/torch.yml b/Resources/Prototypes/Entities/Objects/Misc/torch.yml index e2ca2f54ec..605ac31e3b 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/torch.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/torch.yml @@ -29,7 +29,6 @@ - type: Item sprite: Objects/Misc/torch.rsi HeldPrefix: unlit - - type: LoopingSound - type: Construction graph: lightTorch node: torch diff --git a/Resources/Prototypes/Entities/Objects/Tools/flare.yml b/Resources/Prototypes/Entities/Objects/Tools/flare.yml index 88f24071e3..cf2d18ee78 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flare.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flare.yml @@ -32,7 +32,6 @@ sprite: Objects/Misc/flare.rsi color: "#FF0000" HeldPrefix: unlit - - type: LoopingSound - type: Appearance visuals: - type: ExpendableLightVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml b/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml index cf5bff920b..80ffa05614 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml @@ -23,7 +23,6 @@ - type: PointLight enabled: false radius: 3 - - type: LoopingSound - type: Appearance visuals: - type: FlashLightVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Tools/lantern.yml b/Resources/Prototypes/Entities/Objects/Tools/lantern.yml index e50fc08d74..11fc7a70db 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/lantern.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/lantern.yml @@ -23,7 +23,6 @@ radius: 3 energy: 2.5 color: "#FFC458" - - type: LoopingSound - type: Appearance visuals: - type: LanternVisualizer @@ -39,4 +38,3 @@ radius: 5 energy: 10 color: "#FFC458" - - type: LoopingSound diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml b/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml index ec7cf4e96a..39f1b8bf96 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Melee/pickaxe.yml @@ -17,4 +17,3 @@ size: 24 sprite: Objects/Weapons/Melee/pickaxe.rsi prefix: inhand - - type: LoopingSound diff --git a/Resources/Prototypes/Entities/Structures/Dispensers/base.yml b/Resources/Prototypes/Entities/Structures/Dispensers/base.yml index 412c455d39..2f33762b74 100644 --- a/Resources/Prototypes/Entities/Structures/Dispensers/base.yml +++ b/Resources/Prototypes/Entities/Structures/Dispensers/base.yml @@ -26,7 +26,6 @@ interfaces: - key: enum.ReagentDispenserUiKey.Key type: ReagentDispenserBoundUserInterface - - type: LoopingSound - type: Anchorable - type: Pullable - type: Damageable diff --git a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml index aa9093711a..4210bdcac9 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/microwave.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/microwave.yml @@ -11,7 +11,6 @@ - type: Appearance visuals: - type: MicrowaveVisualizer - - type: LoopingSound - type: UserInterface interfaces: - key: enum.MicrowaveUiKey.Key diff --git a/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml b/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml index 4a9a89d5a2..1ab00ae0d5 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml @@ -14,7 +14,6 @@ - type: Appearance visuals: - type: ReagentGrinderVisualizer - - type: LoopingSound - type: Physics fixtures: - shape: diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml index 7c387a93d4..b64910f093 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/base.yml @@ -57,4 +57,3 @@ - type: StorageVisualizer state_open: generic_open state_closed: generic_door - - type: LoopingSound diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml index eec102958c..2177b328c2 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/base.yml @@ -49,4 +49,3 @@ - type: StorageVisualizer state_open: crate_open state_closed: crate_door - - type: LoopingSound diff --git a/Resources/Prototypes/Entities/Structures/Storage/morgue.yml b/Resources/Prototypes/Entities/Structures/Storage/morgue.yml index a4dab64e39..92e4e35a4e 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/morgue.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/morgue.yml @@ -105,7 +105,6 @@ openSound: /Audio/Items/deconstruct.ogg trayPrototype: CrematoriumTray doSoulBeep: false - - type: LoopingSound - type: Appearance visuals: - type: CrematoriumVisualizer diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml index 620f13a43d..de20894f6d 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/lighting.yml @@ -16,7 +16,6 @@ !type:PhysShapeAabb bounds: "-0.45, -0.15, 0.45, 0.35" layer: [ Passable ] - - type: LoopingSound - type: Sprite sprite: Structures/Wallmounts/Lighting/light_tube.rsi layers: