Explosion SFX juicing + higher persistence (#22544)

This commit is contained in:
Kara
2023-12-15 09:57:46 -07:00
committed by GitHub
parent 46b59329b0
commit e4a227ff0d
40 changed files with 151 additions and 22 deletions

View File

@@ -127,7 +127,7 @@ public sealed partial class AnomalyComponent : Component
/// The sound plays when an anomaly goes supercritical
/// </summary>
[DataField]
public SoundSpecifier? SupercriticalSound = new SoundCollectionSpecifier("explosion");
public SoundSpecifier? SupercriticalSound = new SoundCollectionSpecifier("Explosion");
#endregion
/// <summary>

View File

@@ -349,7 +349,7 @@ namespace Content.Shared.CCVar
CVarDef.Create("discord.ahelp_avatar", string.Empty, CVar.SERVERONLY);
/// <summary>
/// URL of the Discord webhook which will relay all custom votes. If left empty, disables the webhook.
/// URL of the Discord webhook which will relay all custom votes. If left empty, disables the webhook.
/// </summary>
public static readonly CVarDef<string> DiscordVoteWebhook =
CVarDef.Create("discord.vote_webhook", string.Empty, CVar.SERVERONLY);
@@ -846,7 +846,7 @@ namespace Content.Shared.CCVar
/// This determines for how many seconds an explosion should stay visible once it has finished expanding.
/// </summary>
public static readonly CVarDef<float> ExplosionPersistence =
CVarDef.Create("explosion.persistence", 0.3f, CVar.SERVERONLY);
CVarDef.Create("explosion.persistence", 1.0f, CVar.SERVERONLY);
/// <summary>
/// If an explosion covers a larger area than this number, the damaging/processing will always start during

View File

@@ -62,8 +62,26 @@ public sealed partial class ExplosionPrototype : IPrototype
[DataField("fireColor")]
public Color? FireColor;
[DataField("Sound")]
public SoundSpecifier Sound = new SoundCollectionSpecifier("explosion");
/// <summary>
/// If an explosion finishes in less than this many iterations, play a small sound instead.
/// </summary>
/// <remarks>
/// This value is tuned such that a minibomb is considered small, but just about anything larger is normal
/// </remarks>
[DataField("smallSoundIterationThreshold")]
public int SmallSoundIterationThreshold = 6;
[DataField("sound")]
public SoundSpecifier Sound = new SoundCollectionSpecifier("Explosion");
[DataField("smallSound")]
public SoundSpecifier SmallSound = new SoundCollectionSpecifier("ExplosionSmall");
[DataField("soundFar")]
public SoundSpecifier SoundFar = new SoundCollectionSpecifier("ExplosionFar", AudioParams.Default.WithVolume(2f));
[DataField("smallSoundFar")]
public SoundSpecifier SmallSoundFar = new SoundCollectionSpecifier("ExplosionSmallFar", AudioParams.Default.WithVolume(2f));
[DataField("texturePath")]
public ResPath TexturePath = new("/Textures/Effects/fire.rsi");

View File

@@ -71,7 +71,7 @@ public sealed partial class LightBulbComponent : Component
/// </summary>
[DataField("breakSound")]
[ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier BreakSound = new SoundCollectionSpecifier("GlassBreak");
public SoundSpecifier BreakSound = new SoundCollectionSpecifier("GlassBreak", AudioParams.Default.WithVolume(-6f));
#region Appearance