misc flare fixes (#12942)
This commit is contained in:
@@ -19,6 +19,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
[Dependency] private readonly SharedItemSystem _item = default!;
|
||||
[Dependency] private readonly ClothingSystem _clothing = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -130,9 +131,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
switch (component.CurrentState)
|
||||
{
|
||||
case ExpendableLightState.Lit:
|
||||
{
|
||||
SoundSystem.Play(component.LitSound.GetSound(), Filter.Pvs(component.Owner), component.Owner);
|
||||
|
||||
_audio.PlayPvs(component.LitSound, component.Owner);
|
||||
if (component.IconStateLit != string.Empty)
|
||||
{
|
||||
sprite.LayerSetState(2, component.IconStateLit);
|
||||
@@ -141,22 +140,21 @@ namespace Content.Server.Light.EntitySystems
|
||||
|
||||
sprite.LayerSetVisible(1, true);
|
||||
break;
|
||||
}
|
||||
case ExpendableLightState.Fading:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
case ExpendableLightState.Dead:
|
||||
{
|
||||
if (component.DieSound != null)
|
||||
SoundSystem.Play(component.DieSound.GetSound(), Filter.Pvs(component.Owner), component.Owner);
|
||||
_audio.PlayPvs(component.DieSound, component.Owner);
|
||||
if (!string.IsNullOrEmpty(component.IconStateSpent))
|
||||
{
|
||||
sprite.LayerSetState(0, component.IconStateSpent);
|
||||
sprite.LayerSetShader(0, "shaded");
|
||||
}
|
||||
|
||||
sprite.LayerSetState(0, component.IconStateSpent);
|
||||
sprite.LayerSetShader(0, "shaded");
|
||||
sprite.LayerSetVisible(1, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user