committed by
GitHub
parent
f93bdcd226
commit
dc18997bf8
@@ -81,7 +81,6 @@ namespace Content.Client.Entry
|
||||
factory.RegisterClass<SharedCargoConsoleComponent>();
|
||||
factory.RegisterClass<SharedReagentDispenserComponent>();
|
||||
factory.RegisterClass<SharedChemMasterComponent>();
|
||||
factory.RegisterClass<SharedMicrowaveComponent>();
|
||||
factory.RegisterClass<SharedGravityGeneratorComponent>();
|
||||
factory.RegisterClass<SharedAMEControllerComponent>();
|
||||
|
||||
|
||||
@@ -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
|
||||
17
Content.Client/Kitchen/Components/MicrowaveComponent.cs
Normal file
17
Content.Client/Kitchen/Components/MicrowaveComponent.cs
Normal file
@@ -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");
|
||||
}
|
||||
}
|
||||
31
Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs
Normal file
31
Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs
Normal file
@@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<ISpriteComponent>();
|
||||
|
||||
var loopingSoundComponent = component.Owner.GetComponentOrNull<LoopingSoundComponent>();
|
||||
var microwaveComponent = component.Owner.GetComponentOrNull<MicrowaveComponent>();
|
||||
|
||||
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<MicrowaveSystem>().StopSoundLoop(microwaveComponent);
|
||||
break;
|
||||
|
||||
case MicrowaveVisualState.Idle:
|
||||
sprite.LayerSetState(MicrowaveVisualizerLayers.Base, "mw");
|
||||
sprite.LayerSetState(MicrowaveVisualizerLayers.BaseUnlit, "mw_unlit");
|
||||
loopingSoundComponent?.StopAllSounds();
|
||||
if(microwaveComponent != null)
|
||||
EntitySystem.Get<MicrowaveSystem>().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<MicrowaveSystem>().StartSoundLoop(microwaveComponent);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<LightBehaviourComponent>(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<ExpendableLightComponent>(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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<ScheduledSound, IPlayingAudioStream> _audioStreams = new();
|
||||
|
||||
[DataField("schedules", true)]
|
||||
private List<ScheduledSound> _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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,6 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs
|
||||
- type: PointLight
|
||||
enabled: false
|
||||
radius: 3
|
||||
- type: LoopingSound
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
/// <summary>
|
||||
/// Status of light, whether or not it is emitting light.
|
||||
/// </summary>
|
||||
@@ -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<LoopingLoopingSoundComponent>(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<LoopingLoopingSoundComponent>(out var loopSound))
|
||||
{
|
||||
loopSound.StopAllSounds();
|
||||
}
|
||||
|
||||
sprite.LayerSetState(0, IconStateSpent);
|
||||
sprite.LayerSetShader(0, "shaded");
|
||||
sprite.LayerSetVisible(1, false);
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Stops all sounds.
|
||||
/// </summary>
|
||||
/// <param name="channel">User that will be affected.</param>
|
||||
public void StopAllSounds(INetChannel? channel)
|
||||
{
|
||||
SendNetworkMessage(new StopAllSoundsMessage(), channel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stops a certain scheduled sound from playing.
|
||||
/// </summary>
|
||||
/// <param name="channel">User that will be affected.</param>
|
||||
public void StopScheduledSound(string filename, INetChannel? channel)
|
||||
{
|
||||
SendNetworkMessage(new StopSoundScheduleMessage() {Filename = filename}, channel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds an scheduled sound to be played.
|
||||
/// </summary>
|
||||
/// <param name="channel">User that will be affected.</param>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play an audio file following the entity.
|
||||
/// </summary>
|
||||
/// <param name="filename">The resource path to the OGG Vorbis file to play.</param>
|
||||
/// <param name="channel">User that will be affected.</param>
|
||||
public void Play(string filename, AudioParams? audioParams = null, INetChannel? channel = null)
|
||||
{
|
||||
AddScheduledSound(new ScheduledSound()
|
||||
{
|
||||
Filename = filename,
|
||||
AudioParams = audioParams,
|
||||
}, channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")]
|
||||
|
||||
@@ -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";
|
||||
|
||||
/// <summary>
|
||||
/// Stops all sounds.
|
||||
/// </summary>
|
||||
public virtual void StopAllSounds()
|
||||
{}
|
||||
|
||||
/// <summary>
|
||||
/// Stops a certain scheduled sound from playing.
|
||||
/// </summary>
|
||||
public virtual void StopScheduledSound(string filename)
|
||||
{}
|
||||
|
||||
/// <summary>
|
||||
/// Adds an scheduled sound to be played.
|
||||
/// </summary>
|
||||
public virtual void AddScheduledSound(ScheduledSound scheduledSound)
|
||||
{}
|
||||
|
||||
/// <summary>
|
||||
/// Play an audio file following the entity.
|
||||
/// </summary>
|
||||
/// <param name="filename">The resource path to the OGG Vorbis file to play.</param>
|
||||
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;
|
||||
|
||||
/// <summary>
|
||||
/// The parameters to play the sound with.
|
||||
/// </summary>
|
||||
[DataField("audioparams")]
|
||||
public AudioParams? AudioParams;
|
||||
|
||||
/// <summary>
|
||||
/// Delay in milliseconds before playing the sound,
|
||||
/// and delay between repetitions if Times is not 0.
|
||||
/// </summary>
|
||||
[DataField("delay")]
|
||||
public uint Delay;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum number of milliseconds to add to the delay randomly.
|
||||
/// Useful for random ambience noises. Generated value differs from client to client.
|
||||
/// </summary>
|
||||
[DataField("randomdelay")]
|
||||
public uint RandomDelay;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[DataField("times")]
|
||||
public int Times;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the sound will play or not.
|
||||
/// </summary>
|
||||
public bool Play = true;
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,6 @@
|
||||
- type: PointLight
|
||||
enabled: false
|
||||
radius: 3
|
||||
- type: LoopingSound
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
- type: PointLight
|
||||
enabled: false
|
||||
radius: 3
|
||||
- type: LoopingSound
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Puddle
|
||||
spill_sound: /Audio/Effects/Fluids/splat.ogg
|
||||
recolor: true
|
||||
- type: LoopingSound
|
||||
- type: Clickable
|
||||
- type: Slippery
|
||||
- type: Physics
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/Baked/bread.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 20
|
||||
contents:
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/Baked/cake.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 20
|
||||
contents:
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/Baked/donut.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 5
|
||||
contents:
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/Baked/misc.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 5
|
||||
contents:
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/Baked/pizza.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 15
|
||||
contents:
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
- box11
|
||||
- box12
|
||||
# Someday...
|
||||
# - type: LoopingSound
|
||||
# - type: DamageOnLand
|
||||
# amount: 5
|
||||
# - type: DamageOtherOnHit
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/burger.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 15
|
||||
contents:
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
reagents:
|
||||
- ReagentId: Egg
|
||||
Quantity: 5
|
||||
- type: LoopingSound
|
||||
- type: DamageOnLand
|
||||
amount: 1
|
||||
- type: DamageOtherOnHit
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/meat.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 20
|
||||
contents:
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/noodles.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 20
|
||||
contents:
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Sprite
|
||||
sprite: Objects/Consumable/Food/skewer.rsi
|
||||
netsync: false
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 20
|
||||
contents:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
components:
|
||||
- type: Food
|
||||
trash: FoodBowlBig
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
maxVol: 20
|
||||
contents:
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
id: DrinkBottleBaseEmpty
|
||||
description: That's an empty bottle.
|
||||
components:
|
||||
- type: LoopingSound
|
||||
- type: Sprite
|
||||
state: icon
|
||||
- type: SolutionContainer
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
interfaces:
|
||||
- key: enum.PDAUiKey.Key
|
||||
type: PDABoundUserInterface
|
||||
- type: LoopingSound
|
||||
|
||||
- type: entity
|
||||
parent: BasePDA
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
- type: Item
|
||||
sprite: Objects/Misc/skub.rsi
|
||||
- type: ItemCooldown
|
||||
- type: LoopingSound
|
||||
- type: EmitSoundOnUse
|
||||
sound:
|
||||
path: /Audio/Items/skub.ogg
|
||||
|
||||
@@ -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
|
||||
@@ -173,7 +168,6 @@
|
||||
sound:
|
||||
path: /Audio/Items/Toys/hellothere.ogg
|
||||
- type: ItemCooldown
|
||||
- type: LoopingSound
|
||||
- type: EmitSoundOnUse
|
||||
sound:
|
||||
path: /Audio/Items/Toys/hellothere.ogg
|
||||
@@ -195,7 +189,6 @@
|
||||
sound:
|
||||
path: /Audio/Items/Toys/thankyou.ogg
|
||||
- type: ItemCooldown
|
||||
- type: LoopingSound
|
||||
- type: EmitSoundOnUse
|
||||
sound:
|
||||
path: /Audio/Items/Toys/thankyou.ogg
|
||||
@@ -217,7 +210,6 @@
|
||||
sound:
|
||||
path: /Audio/Items/Toys/verygood.ogg
|
||||
- type: ItemCooldown
|
||||
- type: LoopingSound
|
||||
- type: EmitSoundOnUse
|
||||
sound:
|
||||
path: /Audio/Items/Toys/verygood.ogg
|
||||
@@ -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
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
- type: Item
|
||||
sprite: Objects/Misc/torch.rsi
|
||||
HeldPrefix: unlit
|
||||
- type: LoopingSound
|
||||
- type: Construction
|
||||
graph: lightTorch
|
||||
node: torch
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
sprite: Objects/Misc/flare.rsi
|
||||
color: "#FF0000"
|
||||
HeldPrefix: unlit
|
||||
- type: LoopingSound
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: ExpendableLightVisualizer
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
- type: PointLight
|
||||
enabled: false
|
||||
radius: 3
|
||||
- type: LoopingSound
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,4 +17,3 @@
|
||||
size: 24
|
||||
sprite: Objects/Weapons/Melee/pickaxe.rsi
|
||||
prefix: inhand
|
||||
- type: LoopingSound
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
interfaces:
|
||||
- key: enum.ReagentDispenserUiKey.Key
|
||||
type: ReagentDispenserBoundUserInterface
|
||||
- type: LoopingSound
|
||||
- type: Anchorable
|
||||
- type: Pullable
|
||||
- type: Damageable
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: MicrowaveVisualizer
|
||||
- type: LoopingSound
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
- key: enum.MicrowaveUiKey.Key
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: ReagentGrinderVisualizer
|
||||
- type: LoopingSound
|
||||
- type: Physics
|
||||
fixtures:
|
||||
- shape:
|
||||
|
||||
@@ -57,4 +57,3 @@
|
||||
- type: StorageVisualizer
|
||||
state_open: generic_open
|
||||
state_closed: generic_door
|
||||
- type: LoopingSound
|
||||
|
||||
@@ -49,4 +49,3 @@
|
||||
- type: StorageVisualizer
|
||||
state_open: crate_open
|
||||
state_closed: crate_door
|
||||
- type: LoopingSound
|
||||
|
||||
@@ -105,7 +105,6 @@
|
||||
openSound: /Audio/Items/deconstruct.ogg
|
||||
trayPrototype: CrematoriumTray
|
||||
doSoulBeep: false
|
||||
- type: LoopingSound
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: CrematoriumVisualizer
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user