Skip to content

Commit

Permalink
фикс статистических DataField
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Jan 14, 2025
1 parent 642b571 commit 1a313fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public sealed partial class SupermatterComponent : Component
public readonly string SliverPrototype = "SupermatterSliver";

[DataField("zapSound")]
public static SoundSpecifier SupermatterZapSound = new SoundPathSpecifier("/Audio/Weapons/emitter2.ogg");
public SoundSpecifier SupermatterZapSound = new SoundPathSpecifier("/Audio/Weapons/emitter2.ogg");

[DataField("calmAmbienceSound")]
public SoundSpecifier CalmAmbienceSound = new SoundPathSpecifier("/Audio/Ambience/Objects/supermatter_calm.ogg");
Expand All @@ -60,9 +60,6 @@ public sealed partial class SupermatterComponent : Component
[ViewVariables]
public SoundSpecifier CurrentAmbience = new SoundPathSpecifier("/Audio/Ambience/Objects/supermatter_calm.ogg");

[DataField("vaporizeSound")]
public static SoundSpecifier VaporizeSound = new SoundPathSpecifier("/Audio/Effects/Grenades/Supermatter/supermatter_start.ogg");

[DataField("teslaSpawnPrototype")]
public string TeslaPrototype = "TeslaEnergyBall";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using Content.Server.Kitchen.Components;
using Content.Shared.Singularity.Components;
using System;
using Robust.Shared.Audio;

namespace Content.Server.Supermatter.EntitySystems;

Expand All @@ -49,6 +50,9 @@ public sealed class SupermatterSystem : EntitySystem
[Dependency] private readonly DoAfterSystem _doAfter = default!;
[Dependency] private readonly ExplosionSystem _explosion = default!;

public static SoundSpecifier VaporizeSound =
new SoundPathSpecifier("/Audio/Effects/Grenades/Supermatter/supermatter_start.ogg");

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -310,7 +314,7 @@ private void Vaporize(EntityUid uid, EntityUid smUid)
if (TryComp<SupermatterComponent>(smUid, out var sm))
sm.AVExternalDamage += 1f;

_sound.PlayPvs(SupermatterComponent.VaporizeSound, smUid);
_sound.PlayPvs(VaporizeSound, smUid);
EntityManager.QueueDeleteEntity(uid);

// getting discombobulated by the SM is the same as permanent round removal so why not log that
Expand Down

0 comments on commit 1a313fe

Please sign in to comment.