diff --git a/Content.Client/Anomaly/AnomalySystem.cs b/Content.Client/Anomaly/AnomalySystem.cs index 83f15a9086..4eee43fac6 100644 --- a/Content.Client/Anomaly/AnomalySystem.cs +++ b/Content.Client/Anomaly/AnomalySystem.cs @@ -62,11 +62,11 @@ public sealed class AnomalySystem : SharedAnomalySystem { base.Update(frameTime); - var query = EntityQueryEnumerator(); + var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var super, out var sprite)) + while (query.MoveNext(out var uid, out var anomaly, out var super, out var sprite)) { - var completion = 1f - (float)((super.EndTime - _timing.CurTime) / super.SupercriticalDuration); + var completion = 1f - (float) ((super.EndTime - _timing.CurTime) / anomaly.SupercriticalDuration); var scale = completion * (super.MaxScaleAmount - 1f) + 1f; _sprite.SetScale((uid, sprite), new Vector2(scale, scale)); diff --git a/Content.Shared/Anomaly/Components/AnomalyComponent.cs b/Content.Shared/Anomaly/Components/AnomalyComponent.cs index f58f9f1d07..fb281ca9a3 100644 --- a/Content.Shared/Anomaly/Components/AnomalyComponent.cs +++ b/Content.Shared/Anomaly/Components/AnomalyComponent.cs @@ -135,6 +135,14 @@ public sealed partial class AnomalyComponent : Component /// [DataField] public SoundSpecifier? SupercriticalSoundAtAnimationStart; + + /// + /// The length of the animation before it goes supercritical in seconds. + /// + /// + [DataField, AutoNetworkedField] + [ViewVariables(VVAccess.ReadWrite)] + public TimeSpan SupercriticalDuration = TimeSpan.FromSeconds(10f); #endregion /// diff --git a/Content.Shared/Anomaly/Components/AnomalySupercriticalComponent.cs b/Content.Shared/Anomaly/Components/AnomalySupercriticalComponent.cs index 00ea882ad2..d72bc174be 100644 --- a/Content.Shared/Anomaly/Components/AnomalySupercriticalComponent.cs +++ b/Content.Shared/Anomaly/Components/AnomalySupercriticalComponent.cs @@ -19,13 +19,6 @@ public sealed partial class AnomalySupercriticalComponent : Component [AutoPausedField] public TimeSpan EndTime; - /// - /// The length of the animation before it goes supercritical. - /// - [AutoNetworkedField] - [ViewVariables(VVAccess.ReadWrite)] - public TimeSpan SupercriticalDuration = TimeSpan.FromSeconds(10); - /// /// The maximum size the anomaly scales to while going supercritical /// diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index 3d00d43f41..ee3903a1d9 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -135,10 +135,10 @@ public abstract class SharedAnomalySystem : EntitySystem if (_net.IsServer) Log.Info($"Anomaly is going supercritical. Entity: {ToPrettyString(ent.Owner)}"); - Audio.PlayPvs(ent.Comp.SupercriticalSoundAtAnimationStart, Transform(ent).Coordinates); + Audio.PlayPvs(ent.Comp.SupercriticalSoundAtAnimationStart, ent); var super = AddComp(ent); - super.EndTime = Timing.CurTime + super.SupercriticalDuration; + super.EndTime = Timing.CurTime + ent.Comp.SupercriticalDuration; Appearance.SetData(ent, AnomalyVisuals.Supercritical, true); Dirty(ent, super); } diff --git a/Resources/Audio/Items/Anomaly/attributions.yml b/Resources/Audio/Items/Anomaly/attributions.yml new file mode 100644 index 0000000000..27bf35d875 --- /dev/null +++ b/Resources/Audio/Items/Anomaly/attributions.yml @@ -0,0 +1,114 @@ +- files: ["flesh_crit.ogg"] + license: "CC-BY-SA-3.0" + copyright: "Mashup by GonTar Quantumcross of malescream_1.ogg, malescream_2.ogg, femalescream_4.ogg, femalescream_5.ogg, alien_claw_flesh_2.ogg, alien_claw_flesh_3.ogg" + source: "https://github.com/tgstation/tgstation/commit/3d049e69fe71a0be2133005e65ea469135d648c8" + # additional source for alien claw sounds: + # source: "https://gitlab.com/cmdevs/colonial-warfare/-/tree/dev/sound/weapons" + +- files: ["shadow_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar and Quantumcross of sourced sound effect and anomaly_scary.ogg" + source: https://pixabay.com/sound-effects/psychedelic-144822/ + # Additional sources: + # source: https://pixabay.com/sound-effects/boom-geomorphism-cinematic-trailer-sound-effects-123876/ + +- files: ["tech_crit.ogg"] + license: Custom + copyright: "Mashup by Gontar" + source: https://freesound.org/people/wtermini/sounds/546450/ + # Additional sources: + # source: https://freesound.org/people/unfa/sounds/124547/ + # source: https://pixabay.com/sound-effects/elemental-magic-spell-cast-d-228349/ + +- files: ["present_crit.ogg"] + license: "CC0-1.0" + copyright: "richwise (Freesound), edited by Quantum-cross@github" + source: https://freesound.org/people/richwise/sounds/414374/ + +- files: ["pyro_crit.ogg"] + license: "Custom" + copyright: "Multiple sounds, edited and layered by GonTar" + source: https://freesound.org/people/Robinhood76/sounds/612277/ + # additional sources: + # source: https://freesound.org/people/Fission9/sounds/474850/ + # source: https://pixabay.com/sound-effects/rubber-stretch-sound-effect-201310/ (Pixabay license) + # source: https://pixabay.com/sound-effects/fx-collection-of-flame-sword-swoosh-sound-design-elements-275902/ (Pixabay license) + +- files: ["grav_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar" + source: "https://freesound.org/people/Joao_Janz/sounds/478472/" + # additional sources: + # source: https://pixabay.com/sound-effects/horror-metallic-screeches-183236/ + # source: https://pixabay.com/sound-effects/dark-textures-sfx-001-322559/ + # source: https://pixabay.com/sound-effects/dark-textures-sfx-014-322578/ + # source: https://freesound.org/people/BlenderDiplom/sounds/201094/ + # source: https://pixabay.com/sound-effects/metal-creaking-36742/ + # source: https://pixabay.com/sound-effects/metal-container-rumble-325675/ + # source: https://pixabay.com/sound-effects/metal-hit-10-193281/ + # source: https://pixabay.com/sound-effects/closing-metal-container-for-garbage-303735/ + + +- files: ["electricity_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar" + source: https://pixabay.com/sound-effects/sliding-discharge-160kv-71800/ + # additional sources: + # source: https://pixabay.com/sound-effects/elemental-magic-spell-impact-outgoing-228342/ + # source: https://pixabay.com/sound-effects/elemental-magic-spell-cast-d-228349/ + # source: https://pixabay.com/sound-effects/electric-shock-short-circuit-1-204989/ + # source: https://pixabay.com/sound-effects/electric-impact-37128/ + +- files: ["bluespace_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar" + source: https://pixabay.com/sound-effects/boom-geomorphism-cinematic-trailer-sound-effects-123876/ + # additional sources: + # source: https://pixabay.com/sound-effects/riser-hit-sfx-001-289802/ + # source: https://pixabay.com/sound-effects/pulse3d-106110/ + # source: https://freesound.org/people/Soapuel/sounds/489442/ + +- files: ["ice_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar" + source: https://pixabay.com/sound-effects/ice-1-104148/ + # additional sources: + # source: https://pixabay.com/sound-effects/ice-3-85025/ + # source: https://pixabay.com/sound-effects/ice-4-104135/ + # source: https://pixabay.com/sound-effects/ice-6-104141/ + # source: https://pixabay.com/sound-effects/deep-bass-drone-31424/ + # source: https://pixabay.com/sound-effects/cinematic-deep-tremor-6740/ + # source: https://pixabay.com/sound-effects/cinematic-impact-boom-3-326123/ + # source: https://pixabay.com/sound-effects/dark-textures-sfx-007-322567/ + # source: https://pixabay.com/sound-effects/atmosphere-deep-amp-booming-256197/ + +- files: ["fluid_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar" + source: https://freesound.org/people/unfa/sounds/504930/ + # additional sources: + # source: https://freesound.org/people/DJT4NN3R/sounds/484158/ + # source: https://freesound.org/people/klankbeeld/sounds/325537/ + # source: https://github.com/ParadiseSS13/Paradise + # source: https://pixabay.com/sound-effects/water-flowing-2-327662/ + +- files: ["flora_crit.ogg"] + license: "CC-BY-4.0" + copyright: "Clusman, hereforthebass, eyesplice, Clearwavsound (all Freesound), layered and edited by Quantum-cross@github" + source: https://freesound.org/people/Clusman/sounds/543508/ + # additional sources: + # source: https://freesound.org/people/hereforthebass/sounds/733255/ + # source: https://freesound.org/people/eyesplice/sounds/717773/ + # source: https://freesound.org/people/Clearwavsound/sounds/541032/ + # source: https://freesound.org/people/Stickinthemud/sounds/44162/ + +- files: ["rock_crit.ogg"] + license: Custom + copyright: "Mashup by GonTar" + source: https://pixabay.com/sound-effects/cinematic-deep-rumble-6418/ + # additional sources: + # source: https://pixabay.com/sound-effects/lowrumblesnd-77876/ + # source: https://pixabay.com/sound-effects/077381-scraping-stone-83768/ + # source: https://pixabay.com/sound-effects/stone-slide-sound-effects-322794/ + # source: https://pixabay.com/sound-effects/falling-pebbles-rocks-and-boulders-168593/ + # source: https://pixabay.com/sound-effects/small-rock-break-194553/ diff --git a/Resources/Audio/Items/Anomaly/bluespace_crit.ogg b/Resources/Audio/Items/Anomaly/bluespace_crit.ogg new file mode 100644 index 0000000000..4e84ac278d Binary files /dev/null and b/Resources/Audio/Items/Anomaly/bluespace_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/electricity_crit.ogg b/Resources/Audio/Items/Anomaly/electricity_crit.ogg new file mode 100644 index 0000000000..8649a92aeb Binary files /dev/null and b/Resources/Audio/Items/Anomaly/electricity_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/flesh_crit.ogg b/Resources/Audio/Items/Anomaly/flesh_crit.ogg new file mode 100644 index 0000000000..1a429d876b Binary files /dev/null and b/Resources/Audio/Items/Anomaly/flesh_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/flora_crit.ogg b/Resources/Audio/Items/Anomaly/flora_crit.ogg new file mode 100644 index 0000000000..f098b6c8f5 Binary files /dev/null and b/Resources/Audio/Items/Anomaly/flora_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/fluid_crit.ogg b/Resources/Audio/Items/Anomaly/fluid_crit.ogg new file mode 100644 index 0000000000..c672e09b55 Binary files /dev/null and b/Resources/Audio/Items/Anomaly/fluid_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/grav_crit.ogg b/Resources/Audio/Items/Anomaly/grav_crit.ogg new file mode 100644 index 0000000000..f4fd579fe5 Binary files /dev/null and b/Resources/Audio/Items/Anomaly/grav_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/ice_crit.ogg b/Resources/Audio/Items/Anomaly/ice_crit.ogg new file mode 100644 index 0000000000..010cb38fce Binary files /dev/null and b/Resources/Audio/Items/Anomaly/ice_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/present_crit.ogg b/Resources/Audio/Items/Anomaly/present_crit.ogg new file mode 100644 index 0000000000..1e2ddebc28 Binary files /dev/null and b/Resources/Audio/Items/Anomaly/present_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/pyro_crit.ogg b/Resources/Audio/Items/Anomaly/pyro_crit.ogg new file mode 100644 index 0000000000..3e07ecd270 Binary files /dev/null and b/Resources/Audio/Items/Anomaly/pyro_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/rock_crit.ogg b/Resources/Audio/Items/Anomaly/rock_crit.ogg new file mode 100644 index 0000000000..e32be2fa0e Binary files /dev/null and b/Resources/Audio/Items/Anomaly/rock_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/shadow_crit.ogg b/Resources/Audio/Items/Anomaly/shadow_crit.ogg new file mode 100644 index 0000000000..d5b7cf7f4c Binary files /dev/null and b/Resources/Audio/Items/Anomaly/shadow_crit.ogg differ diff --git a/Resources/Audio/Items/Anomaly/tech_crit.ogg b/Resources/Audio/Items/Anomaly/tech_crit.ogg new file mode 100644 index 0000000000..50c11ed921 Binary files /dev/null and b/Resources/Audio/Items/Anomaly/tech_crit.ogg differ diff --git a/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomalies.yml b/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomalies.yml index 2b046b0182..638947af75 100644 --- a/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomalies.yml +++ b/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomalies.yml @@ -72,6 +72,8 @@ - type: Anomaly corePrototype: AnomalyCorePyroclastic coreInertPrototype: AnomalyCorePyroclasticInert + supercriticalSoundAtAnimationStart: + collection: AnomalyPyroSupercritical - type: Sprite sprite: Structures/Specific/Anomalies/pyro_anom.rsi layers: @@ -124,6 +126,9 @@ - type: Anomaly corePrototype: AnomalyCoreGravity coreInertPrototype: AnomalyCoreGravityInert + supercriticalSoundAtAnimationStart: + collection: AnomalyGravitySupercritical + supercriticalDuration: 15s - type: Sprite layers: - state: anom2 @@ -156,6 +161,8 @@ - type: Anomaly corePrototype: AnomalyCoreElectricity coreInertPrototype: AnomalyCoreElectricityInert + supercriticalSoundAtAnimationStart: + collection: AnomalyElectricitySupercritical - type: Sprite layers: - state: anom3 @@ -181,6 +188,8 @@ coreInertPrototype: AnomalyCoreFleshInert minPulseLength: 180 maxPulseLength: 300 + supercriticalSoundAtAnimationStart: + collection: AnomalyFleshSupercritical - type: Sprite layers: - state: anom5 @@ -306,6 +315,8 @@ - type: Anomaly corePrototype: AnomalyCoreBluespace coreInertPrototype: AnomalyCoreBluespaceInert + supercriticalSoundAtAnimationStart: + collection: AnomalyBluespaceSupercritical pulseSound: collection: RadiationPulse params: @@ -332,6 +343,8 @@ - type: Anomaly corePrototype: AnomalyCoreIce coreInertPrototype: AnomalyCoreIceInert + supercriticalSoundAtAnimationStart: + collection: AnomalyIceSupercritical - type: ExplosionAnomaly supercriticalExplosion: Cryo explosionTotalIntensity: 300 @@ -376,6 +389,8 @@ coreInertPrototype: AnomalyCoreRockInert minPulseLength: 180 maxPulseLength: 300 + supercriticalSoundAtAnimationStart: + collection: AnomalyRockSupercritical - type: Sprite layers: - state: anom6 @@ -778,6 +793,8 @@ coreInertPrototype: AnomalyCoreFloraInert minPulseLength: 60 maxPulseLength: 120 + supercriticalSoundAtAnimationStart: + collection: AnomalyFloraSupercritical - type: TileSpawnAnomaly entries: - settings: @@ -881,6 +898,8 @@ coreInertPrototype: AnomalyCoreLiquidInert minPulseLength: 60 maxPulseLength: 120 + supercriticalSoundAtAnimationStart: + collection: AnomalyFluidSupercritical - type: EntitySpawnAnomaly entries: - settings: @@ -994,6 +1013,8 @@ maxPulseLength: 120 animationTime: 4 offset: "-0.1,0.1" + supercriticalSoundAtAnimationStart: + collection: AnomalyShadowSupercritical - type: EntitySpawnAnomaly entries: - settings: @@ -1054,6 +1075,8 @@ coreInertPrototype: AnomalyCoreTechInert minPulseLength: 60 maxPulseLength: 120 + supercriticalSoundAtAnimationStart: + collection: AnomalyTechSupercritical - type: TechAnomaly - type: DeviceLinkSource ports: @@ -1112,6 +1135,8 @@ coreInertPrototype: AnomalyCoreSantaInert minPulseLength: 60 maxPulseLength: 120 + supercriticalSoundAtAnimationStart: + collection: AnomalyPresentSupercritical - type: EntitySpawnAnomaly entries: - settings: diff --git a/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomaly_injectors.yml b/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomaly_injectors.yml index a5f6f32128..0ad1aa17f4 100644 --- a/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomaly_injectors.yml +++ b/Resources/Prototypes/Entities/Structures/Specific/Anomaly/anomaly_injectors.yml @@ -47,6 +47,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCorePyroclastic coreInertPrototype: AnomalyCorePyroclasticInert + supercriticalSoundAtAnimationStart: + collection: AnomalyPyroSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionPyroclastic startMessage: inner-anomaly-start-message-pyro @@ -77,6 +79,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreElectricity coreInertPrototype: AnomalyCoreElectricityInert + supercriticalSoundAtAnimationStart: + collection: AnomalyElectricitySupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionElectric startMessage: inner-anomaly-start-message-shock @@ -107,6 +111,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreShadow coreInertPrototype: AnomalyCoreShadowInert + supercriticalSoundAtAnimationStart: + collection: AnomalyShadowSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionShadow startMessage: inner-anomaly-start-message-shadow @@ -137,6 +143,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreIce coreInertPrototype: AnomalyCoreIceInert + supercriticalSoundAtAnimationStart: + collection: AnomalyIceSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionIce startMessage: inner-anomaly-start-message-frost @@ -167,6 +175,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreFlora coreInertPrototype: AnomalyCoreFloraInert + supercriticalSoundAtAnimationStart: + collection: AnomalyFloraSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionFlora startMessage: inner-anomaly-start-message-flora @@ -197,6 +207,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreBluespace coreInertPrototype: AnomalyCoreBluespaceInert + supercriticalSoundAtAnimationStart: + collection: AnomalyBluespaceSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionBluespace startMessage: inner-anomaly-start-message-bluespace @@ -227,6 +239,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreFlesh coreInertPrototype: AnomalyCoreFleshInert + supercriticalSoundAtAnimationStart: + collection: AnomalyFleshSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionFlesh startMessage: inner-anomaly-start-message-flesh @@ -257,6 +271,9 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreGravity coreInertPrototype: AnomalyCoreGravityInert + supercriticalSoundAtAnimationStart: + collection: AnomalyGravitySupercritical + supercriticalDuration: 15 - type: InnerBodyAnomaly injectionProto: AnomalyInjectionGravity startMessage: inner-anomaly-start-message-grav @@ -287,6 +304,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreTech coreInertPrototype: AnomalyCoreTechInert + supercriticalSoundAtAnimationStart: + collection: AnomalyTechSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionTech startMessage: inner-anomaly-start-message-tech @@ -318,6 +337,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreRock coreInertPrototype: AnomalyCoreRockInert + supercriticalSoundAtAnimationStart: + collection: AnomalyRockSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionRock startMessage: inner-anomaly-start-message-rock @@ -348,6 +369,8 @@ maxPointsPerSecond: 100 corePrototype: AnomalyCoreSanta coreInertPrototype: AnomalyCoreSantaInert + supercriticalSoundAtAnimationStart: + collection: AnomalyPresentSupercritical - type: InnerBodyAnomaly injectionProto: AnomalyInjectionSanta startMessage: inner-anomaly-start-message-santa diff --git a/Resources/Prototypes/SoundCollections/anomaly.yml b/Resources/Prototypes/SoundCollections/anomaly.yml new file mode 100644 index 0000000000..291b5d4a27 --- /dev/null +++ b/Resources/Prototypes/SoundCollections/anomaly.yml @@ -0,0 +1,59 @@ +- type: soundCollection + id: AnomalyFleshSupercritical + files: + - /Audio/Items/Anomaly/flesh_crit.ogg + +- type: soundCollection + id: AnomalyShadowSupercritical + files: + - /Audio/Items/Anomaly/shadow_crit.ogg + +- type: soundCollection + id: AnomalyTechSupercritical + files: + - /Audio/Items/Anomaly/tech_crit.ogg + +- type: soundCollection + id: AnomalyPresentSupercritical + files: + - /Audio/Items/Anomaly/present_crit.ogg + +- type: soundCollection + id: AnomalyPyroSupercritical + files: + - /Audio/Items/Anomaly/pyro_crit.ogg + +- type: soundCollection + id: AnomalyGravitySupercritical + files: + - /Audio/Items/Anomaly/grav_crit.ogg + +- type: soundCollection + id: AnomalyElectricitySupercritical + files: + - /Audio/Items/Anomaly/electricity_crit.ogg + +- type: soundCollection + id: AnomalyBluespaceSupercritical + files: + - /Audio/Items/Anomaly/bluespace_crit.ogg + +- type: soundCollection + id: AnomalyIceSupercritical + files: + - /Audio/Items/Anomaly/ice_crit.ogg + +- type: soundCollection + id: AnomalyFluidSupercritical + files: + - /Audio/Items/Anomaly/fluid_crit.ogg + +- type: soundCollection + id: AnomalyFloraSupercritical + files: + - /Audio/Items/Anomaly/flora_crit.ogg + +- type: soundCollection + id: AnomalyRockSupercritical + files: + - /Audio/Items/Anomaly/rock_crit.ogg