Add attention.ogg and soundspecifiers for events (#7977)
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Server.Disease.Components;
|
||||
using Content.Server.Disease;
|
||||
using Content.Shared.Disease;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
@@ -32,7 +33,7 @@ public sealed class DiseaseOutbreak : StationEvent
|
||||
public override string Name => "DiseaseOutbreak";
|
||||
public override float Weight => WeightNormal;
|
||||
|
||||
public override string? StartAudio => "/Audio/Announcements/outbreak7.ogg";
|
||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/outbreak7.ogg");
|
||||
protected override float EndAfter => 1.0f;
|
||||
/// <summary>
|
||||
/// Finds 2-5 random, alive entities that can host diseases
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Station;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using Robust.Shared.Log;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.StationEvents.Events;
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Linq;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Projectiles.Components;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
@@ -27,7 +28,7 @@ namespace Content.Server.StationEvents.Events
|
||||
public override string StartAnnouncement => Loc.GetString("station-event-meteor-swarm-start-announcement");
|
||||
protected override string EndAnnouncement => Loc.GetString("station-event-meteor-swarm-ebd-announcement");
|
||||
|
||||
public override string? StartAudio => "/Audio/Announcements/meteors.ogg";
|
||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/meteors.ogg");
|
||||
|
||||
protected override float StartAfter => 30f;
|
||||
protected override float EndAfter => float.MaxValue;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading;
|
||||
using Content.Server.Power.Components;
|
||||
using Content.Shared.Sound;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Player;
|
||||
@@ -20,7 +21,7 @@ namespace Content.Server.StationEvents.Events
|
||||
public override int? MaxOccurrences => 3;
|
||||
public override string StartAnnouncement => Loc.GetString("station-event-power-grid-check-start-announcement");
|
||||
protected override string EndAnnouncement => Loc.GetString("station-event-power-grid-check-end-announcement");
|
||||
public override string? StartAudio => "/Audio/Announcements/power_off.ogg";
|
||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/power_off.ogg");
|
||||
|
||||
// If you need EndAudio it's down below. Not set here because we can't play it at the normal time without spamming sounds.
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Linq;
|
||||
using Content.Server.Radiation;
|
||||
using Content.Server.Station;
|
||||
using Content.Shared.Coordinates;
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Station;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -24,7 +25,7 @@ namespace Content.Server.StationEvents.Events
|
||||
public override string Name => "RadiationStorm";
|
||||
public override string StartAnnouncement => Loc.GetString("station-event-radiation-storm-start-announcement");
|
||||
protected override string EndAnnouncement => Loc.GetString("station-event-radiation-storm-end-announcement");
|
||||
public override string StartAudio => "/Audio/Announcements/radiation.ogg";
|
||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/radiation.ogg");
|
||||
protected override float StartAfter => 10.0f;
|
||||
|
||||
// Event specific details
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Station;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Station;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -51,12 +52,12 @@ namespace Content.Server.StationEvents.Events
|
||||
/// <summary>
|
||||
/// Starting audio of the event.
|
||||
/// </summary>
|
||||
public virtual string? StartAudio { get; set; } = null;
|
||||
public virtual SoundSpecifier? StartAudio { get; set; } = new SoundPathSpecifier("/Audio/Announcements/attention.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// Ending audio of the event.
|
||||
/// </summary>
|
||||
public virtual string? EndAudio { get; } = null;
|
||||
public virtual SoundSpecifier? EndAudio { get; } = null;
|
||||
|
||||
public virtual AudioParams AudioParams { get; } = AudioParams.Default.WithVolume(-10f);
|
||||
|
||||
@@ -137,7 +138,7 @@ namespace Content.Server.StationEvents.Events
|
||||
|
||||
if (StartAudio != null)
|
||||
{
|
||||
SoundSystem.Play(Filter.Broadcast(), StartAudio, AudioParams);
|
||||
SoundSystem.Play(Filter.Broadcast(), StartAudio.GetSound(), AudioParams);
|
||||
}
|
||||
|
||||
Announced = true;
|
||||
@@ -160,7 +161,7 @@ namespace Content.Server.StationEvents.Events
|
||||
|
||||
if (EndAudio != null)
|
||||
{
|
||||
SoundSystem.Play(Filter.Broadcast(), EndAudio, AudioParams);
|
||||
SoundSystem.Play(Filter.Broadcast(), EndAudio.GetSound(), AudioParams);
|
||||
}
|
||||
|
||||
Started = false;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using Content.Server.StationEvents.Components;
|
||||
using Content.Shared.Sound;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.StationEvents.Events;
|
||||
@@ -17,7 +18,7 @@ public sealed class VentCritters : StationEvent
|
||||
public override string? StartAnnouncement =>
|
||||
Loc.GetString("station-event-vent-spiders-start-announcement", ("data", Loc.GetString(Loc.GetString($"random-sentience-event-data-{_random.Next(1, 6)}"))));
|
||||
|
||||
public override string? StartAudio => "/Audio/Announcements/aliens.ogg";
|
||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/aliens.ogg");
|
||||
|
||||
public override int EarliestStart => 15;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using Robust.Shared.Random;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.Disease.Zombie.Components;
|
||||
using Content.Shared.MobState.Components;
|
||||
using Content.Shared.Sound;
|
||||
|
||||
namespace Content.Server.StationEvents.Events
|
||||
{
|
||||
@@ -18,7 +19,7 @@ namespace Content.Server.StationEvents.Events
|
||||
public override int EarliestStart => 50;
|
||||
public override float Weight => WeightLow / 2;
|
||||
|
||||
public override string? StartAudio => "/Audio/Announcements/bloblarm.ogg";
|
||||
public override SoundSpecifier? StartAudio => new SoundPathSpecifier("/Audio/Announcements/bloblarm.ogg");
|
||||
protected override float EndAfter => 1.0f;
|
||||
|
||||
public override int? MaxOccurrences => 1;
|
||||
|
||||
BIN
Resources/Audio/Announcements/attention.ogg
Normal file
BIN
Resources/Audio/Announcements/attention.ogg
Normal file
Binary file not shown.
@@ -1,3 +1,5 @@
|
||||
outbreak7.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0
|
||||
meteors.ogg taken from https://github.com/tgstation/tgstation/blob/95731342b97167d7883ff091d389f79c36442ee6/sound/ai/default/meteors.ogg used under CC-BY-SA-3.0
|
||||
aliens.ogg taken from https://github.com/tgstation/tgstation/blob/95731342b97167d7883ff091d389f79c36442ee6/sound/ai/default/aliens.ogg used under CC-BY-SA-3.0
|
||||
attention.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0
|
||||
meteors.ogg taken from https://github.com/tgstation/tgstation/blob/95731342b97167d7883ff091d389f79c36442ee6/sound/ai/default/meteors.ogg used under CC-BY-SA-3.0
|
||||
outbreak7.ogg taken from /tg/station at commit https://github.com/tgstation/tgstation/commit/40d89d11ea4a5cb81d61dc1018b46f4e7d32c62a used under CC-BY-SA-3.0
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
pill.ogg contains audio from '437480__ruanza__swallowing.wav' by user RuanZA, used under CC BY-NC 3.0 (https://freesound.org/people/RuanZA/sounds/437480/), as well as part of '330657__diniunicorn__popping-pills.wav' by user diniunicorn, used under CC0 1.0 (https://freesound.org/people/diniunicorn/sounds/330657/). ring.ogg used udner CC-BY-SA-3.0, taken from /tg/station commit https://github.com/tgstation/tgstation/commit/c61c452d78425d89920b41ed5f95fd190e733a3c.
|
||||
pill.ogg contains audio from '437480__ruanza__swallowing.wav' by user RuanZA, used under CC BY-NC 3.0 (https://freesound.org/people/RuanZA/sounds/437480/), as well as part of '330657__diniunicorn__popping-pills.wav' by user diniunicorn, used under CC0 1.0 (https://freesound.org/people/diniunicorn/sounds/330657/). ring.ogg used under CC-BY-SA-3.0, taken from /tg/station commit https://github.com/tgstation/tgstation/commit/c61c452d78425d89920b41ed5f95fd190e733a3c.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user