SoundSystem Improvements (#3697)
* Refactor all audio to use the new SoundSystem. * Update submodule Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
using Content.Client.Interfaces;
|
using Content.Client.Interfaces;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Client.GameObjects;
|
|
||||||
using Content.Shared;
|
using Content.Shared;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Configuration;
|
using Robust.Shared.Configuration;
|
||||||
@@ -13,6 +12,7 @@ using Robust.Shared.Random;
|
|||||||
using Robust.Client;
|
using Robust.Client;
|
||||||
using Robust.Client.State;
|
using Robust.Client.State;
|
||||||
using Content.Client.State;
|
using Content.Client.State;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Client.GameObjects.EntitySystems
|
namespace Content.Client.GameObjects.EntitySystems
|
||||||
{
|
{
|
||||||
@@ -25,9 +25,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
[Dependency] private readonly IStateManager _stateManager = default!;
|
[Dependency] private readonly IStateManager _stateManager = default!;
|
||||||
[Dependency] private readonly IBaseClient _client = default!;
|
[Dependency] private readonly IBaseClient _client = default!;
|
||||||
[Dependency] private readonly IClientGameTicker _clientGameTicker = default!;
|
[Dependency] private readonly IClientGameTicker _clientGameTicker = default!;
|
||||||
|
|
||||||
private AudioSystem _audioSystem = default!;
|
|
||||||
|
|
||||||
private SoundCollectionPrototype _ambientCollection = default!;
|
private SoundCollectionPrototype _ambientCollection = default!;
|
||||||
|
|
||||||
private AudioParams _ambientParams = new(-10f, 1, "Master", 0, 0, AudioMixTarget.Stereo, true, 0f);
|
private AudioParams _ambientParams = new(-10f, 1, "Master", 0, 0, AudioMixTarget.Stereo, true, 0f);
|
||||||
@@ -40,8 +38,6 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
_audioSystem = Get<AudioSystem>();
|
|
||||||
|
|
||||||
_ambientCollection = _prototypeManager.Index<SoundCollectionPrototype>("AmbienceBase");
|
_ambientCollection = _prototypeManager.Index<SoundCollectionPrototype>("AmbienceBase");
|
||||||
|
|
||||||
_configManager.OnValueChanged(CCVars.AmbienceBasicEnabled, AmbienceCVarChanged);
|
_configManager.OnValueChanged(CCVars.AmbienceBasicEnabled, AmbienceCVarChanged);
|
||||||
@@ -130,7 +126,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
EndAmbience();
|
EndAmbience();
|
||||||
var file = _robustRandom.Pick(_ambientCollection.PickFiles);
|
var file = _robustRandom.Pick(_ambientCollection.PickFiles);
|
||||||
_ambientStream = _audioSystem.Play(file, _ambientParams);
|
_ambientStream = SoundSystem.Play(Filter.Local(), file, _ambientParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EndAmbience()
|
private void EndAmbience()
|
||||||
@@ -174,7 +170,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_lobbyStream = _audioSystem.Play(file, _lobbyParams);
|
_lobbyStream = SoundSystem.Play(Filter.Local(), file, _lobbyParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EndLobbyMusic()
|
private void EndLobbyMusic()
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
@@ -65,7 +67,7 @@ namespace Content.Server.Actions
|
|||||||
|
|
||||||
if (random.Prob(_failProb))
|
if (random.Prob(_failProb))
|
||||||
{
|
{
|
||||||
audio.PlayFromEntity("/Audio/Weapons/punchmiss.ogg", args.Performer,
|
SoundSystem.Play(Filter.Pvs(args.Performer), "/Audio/Weapons/punchmiss.ogg", args.Performer,
|
||||||
AudioHelpers.WithVariation(0.025f));
|
AudioHelpers.WithVariation(0.025f));
|
||||||
args.Performer.PopupMessageOtherClients(Loc.GetString("{0} fails to disarm {1}!", args.Performer.Name, args.Target.Name));
|
args.Performer.PopupMessageOtherClients(Loc.GetString("{0} fails to disarm {1}!", args.Performer.Name, args.Target.Name));
|
||||||
args.Performer.PopupMessageCursor(Loc.GetString("You fail to disarm {0}!", args.Target.Name));
|
args.Performer.PopupMessageCursor(Loc.GetString("You fail to disarm {0}!", args.Target.Name));
|
||||||
@@ -86,7 +88,7 @@ namespace Content.Server.Actions
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
audio.PlayFromEntity("/Audio/Effects/thudswoosh.ogg", args.Performer,
|
SoundSystem.Play(Filter.Pvs(args.Performer), "/Audio/Effects/thudswoosh.ogg", args.Performer,
|
||||||
AudioHelpers.WithVariation(0.025f));
|
AudioHelpers.WithVariation(0.025f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Server.GameObjects.Components.Mobs;
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
@@ -9,10 +9,9 @@ using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
|||||||
using Content.Shared.Preferences;
|
using Content.Shared.Preferences;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
@@ -47,7 +46,7 @@ namespace Content.Server.Actions
|
|||||||
|
|
||||||
if (_random.Prob(.01f) && !string.IsNullOrWhiteSpace(_wilhelm))
|
if (_random.Prob(.01f) && !string.IsNullOrWhiteSpace(_wilhelm))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_wilhelm, args.Performer, AudioParams.Default.WithVolume(Volume));
|
SoundSystem.Play(Filter.Pvs(args.Performer), _wilhelm, args.Performer, AudioParams.Default.WithVolume(Volume));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -55,12 +54,12 @@ namespace Content.Server.Actions
|
|||||||
{
|
{
|
||||||
case Sex.Male:
|
case Sex.Male:
|
||||||
if (_male == null) break;
|
if (_male == null) break;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_random.Pick(_male), args.Performer,
|
SoundSystem.Play(Filter.Pvs(args.Performer), _random.Pick(_male), args.Performer,
|
||||||
AudioHelpers.WithVariation(Variation).WithVolume(Volume));
|
AudioHelpers.WithVariation(Variation).WithVolume(Volume));
|
||||||
break;
|
break;
|
||||||
case Sex.Female:
|
case Sex.Female:
|
||||||
if (_female == null) break;
|
if (_female == null) break;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_random.Pick(_female), args.Performer,
|
SoundSystem.Play(Filter.Pvs(args.Performer), _random.Pick(_female), args.Performer,
|
||||||
AudioHelpers.WithVariation(Variation).WithVolume(Volume));
|
AudioHelpers.WithVariation(Variation).WithVolume(Volume));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -13,12 +13,14 @@ using Content.Shared.Audio;
|
|||||||
using Content.Shared.Maps;
|
using Content.Shared.Maps;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -189,8 +191,11 @@ namespace Content.Server.Atmos
|
|||||||
if(PressureDifference > 15)
|
if(PressureDifference > 15)
|
||||||
{
|
{
|
||||||
if(_soundCooldown == 0)
|
if(_soundCooldown == 0)
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Effects/space_wind.ogg",
|
{
|
||||||
GridIndices.ToEntityCoordinates(GridIndex, _mapManager), AudioHelpers.WithVariation(0.125f).WithVolume(MathHelper.Clamp(PressureDifference / 10, 10, 100)));
|
var coordinates = GridIndices.ToEntityCoordinates(GridIndex, _mapManager);
|
||||||
|
SoundSystem.Play(Filter.Pvs(coordinates), "/Audio/Effects/space_wind.ogg",
|
||||||
|
coordinates, AudioHelpers.WithVariation(0.125f).WithVolume(MathHelper.Clamp(PressureDifference / 10, 10, 100)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var entity in _gridTileLookupSystem.GetEntitiesIntersecting(GridIndex, GridIndices))
|
foreach (var entity in _gridTileLookupSystem.GetEntitiesIntersecting(GridIndex, GridIndices))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using Content.Server.GameObjects.Components.Chemistry;
|
using Content.Server.GameObjects.Components.Chemistry;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
@@ -6,10 +6,12 @@ using Content.Shared.Audio;
|
|||||||
using Content.Shared.Interfaces.Chemistry;
|
using Content.Shared.Interfaces.Chemistry;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.Chemistry.ReactionEffects
|
namespace Content.Server.Chemistry.ReactionEffects
|
||||||
@@ -136,7 +138,7 @@ namespace Content.Server.Chemistry.ReactionEffects
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(_sound))
|
if (!string.IsNullOrEmpty(_sound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_sound, solutionEntity, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(solutionEntity), _sound, solutionEntity, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Construction;
|
using Content.Shared.Construction;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.Construction.Completions
|
namespace Content.Server.Construction.Completions
|
||||||
@@ -22,7 +23,7 @@ namespace Content.Server.Construction.Completions
|
|||||||
|
|
||||||
if (string.IsNullOrEmpty(sound)) return;
|
if (string.IsNullOrEmpty(sound)) return;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(sound, entity, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(entity), sound, entity, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetSound()
|
private string GetSound()
|
||||||
|
|||||||
@@ -11,11 +11,13 @@ using Content.Shared.Physics;
|
|||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
@@ -311,7 +313,7 @@ namespace Content.Server.Explosions
|
|||||||
var boundingBox = new Box2(epicenterMapPos - new Vector2(maxRange, maxRange),
|
var boundingBox = new Box2(epicenterMapPos - new Vector2(maxRange, maxRange),
|
||||||
epicenterMapPos + new Vector2(maxRange, maxRange));
|
epicenterMapPos + new Vector2(maxRange, maxRange));
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Effects/explosion.ogg", epicenter);
|
SoundSystem.Play(Filter.Broadcast(), "/Audio/Effects/explosion.ogg", epicenter);
|
||||||
DamageEntitiesInRange(epicenter, boundingBox, devastationRange, heavyImpactRange, maxRange, mapId);
|
DamageEntitiesInRange(epicenter, boundingBox, devastationRange, heavyImpactRange, maxRange, mapId);
|
||||||
|
|
||||||
var mapGridsNear = mapManager.FindGridsIntersecting(mapId, boundingBox);
|
var mapGridsNear = mapManager.FindGridsIntersecting(mapId, boundingBox);
|
||||||
|
|||||||
@@ -12,11 +12,13 @@ using Content.Shared.GameObjects.Verbs;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -228,15 +230,14 @@ namespace Content.Server.GameObjects.Components.ActionBlocking
|
|||||||
if (isOwner)
|
if (isOwner)
|
||||||
{
|
{
|
||||||
if (cuff.StartBreakoutSound != null)
|
if (cuff.StartBreakoutSound != null)
|
||||||
audio.PlayFromEntity(cuff.StartBreakoutSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartBreakoutSound, Owner);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (cuff.StartUncuffSound != null)
|
if (cuff.StartUncuffSound != null)
|
||||||
audio.PlayFromEntity(cuff.StartUncuffSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartUncuffSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime;
|
var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime;
|
||||||
var doAfterEventArgs = new DoAfterEventArgs(user, uncuffTime)
|
var doAfterEventArgs = new DoAfterEventArgs(user, uncuffTime)
|
||||||
{
|
{
|
||||||
@@ -256,7 +257,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking
|
|||||||
if (result != DoAfterStatus.Cancelled)
|
if (result != DoAfterStatus.Cancelled)
|
||||||
{
|
{
|
||||||
if (cuff.EndUncuffSound != null)
|
if (cuff.EndUncuffSound != null)
|
||||||
audio.PlayFromEntity(cuff.EndUncuffSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), cuff.EndUncuffSound, Owner);
|
||||||
|
|
||||||
Container.ForceRemove(cuffsToRemove);
|
Container.ForceRemove(cuffsToRemove);
|
||||||
cuffsToRemove.Transform.AttachToGridOrMap();
|
cuffsToRemove.Transform.AttachToGridOrMap();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.GUI;
|
using Content.Server.GameObjects.Components.GUI;
|
||||||
@@ -10,9 +10,11 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -183,7 +185,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking
|
|||||||
eventArgs.User.PopupMessage(eventArgs.Target, Loc.GetString("{0:theName} starts cuffing you!", eventArgs.User));
|
eventArgs.User.PopupMessage(eventArgs.Target, Loc.GetString("{0:theName} starts cuffing you!", eventArgs.User));
|
||||||
|
|
||||||
if (StartCuffSound != null)
|
if (StartCuffSound != null)
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(StartCuffSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), StartCuffSound, Owner);
|
||||||
|
|
||||||
TryUpdateCuff(eventArgs.User, eventArgs.Target, cuffed);
|
TryUpdateCuff(eventArgs.User, eventArgs.Target, cuffed);
|
||||||
return true;
|
return true;
|
||||||
@@ -221,7 +223,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking
|
|||||||
if (cuffs.TryAddNewCuffs(user, Owner))
|
if (cuffs.TryAddNewCuffs(user, Owner))
|
||||||
{
|
{
|
||||||
if (EndCuffSound != null)
|
if (EndCuffSound != null)
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(EndCuffSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), EndCuffSound, Owner);
|
||||||
|
|
||||||
user.PopupMessage(Loc.GetString("You successfully cuff {0:theName}.", target));
|
user.PopupMessage(Loc.GetString("You successfully cuff {0:theName}.", target));
|
||||||
target.PopupMessage(Loc.GetString("You have been cuffed by {0:theName}!", user));
|
target.PopupMessage(Loc.GetString("You have been cuffed by {0:theName}!", user));
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -127,7 +128,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
|||||||
_game?.ExecutePlayerAction(msg.PlayerAction);
|
_game?.ExecutePlayerAction(msg.PlayerAction);
|
||||||
break;
|
break;
|
||||||
case PlayerAction.NewGame:
|
case PlayerAction.NewGame:
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/newgame.ogg", Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/Arcade/newgame.ogg", Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
_game = new SpaceVillainGame(this);
|
_game = new SpaceVillainGame(this);
|
||||||
UserInterface?.SendMessage(_game.GenerateMetaDataMessage());
|
UserInterface?.SendMessage(_game.GenerateMetaDataMessage());
|
||||||
break;
|
break;
|
||||||
@@ -293,7 +294,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
|||||||
case PlayerAction.Attack:
|
case PlayerAction.Attack:
|
||||||
var attackAmount = _random.Next(2, 6);
|
var attackAmount = _random.Next(2, 6);
|
||||||
_latestPlayerActionMessage = Loc.GetString("You attack {0} for {1}!", _enemyName, attackAmount);
|
_latestPlayerActionMessage = Loc.GetString("You attack {0} for {1}!", _enemyName, attackAmount);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/player_attack.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_attack.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
if(!_owner._enemyInvincibilityFlag) _enemyHp -= attackAmount;
|
if(!_owner._enemyInvincibilityFlag) _enemyHp -= attackAmount;
|
||||||
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
||||||
break;
|
break;
|
||||||
@@ -301,7 +302,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
|||||||
var pointAmount = _random.Next(1, 3);
|
var pointAmount = _random.Next(1, 3);
|
||||||
var healAmount = _random.Next(6, 8);
|
var healAmount = _random.Next(6, 8);
|
||||||
_latestPlayerActionMessage = Loc.GetString("You use {0} magic to heal for {1} damage!", pointAmount, healAmount);
|
_latestPlayerActionMessage = Loc.GetString("You use {0} magic to heal for {1} damage!", pointAmount, healAmount);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/player_heal.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_heal.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
if(!_owner._playerInvincibilityFlag) _playerMp -= pointAmount;
|
if(!_owner._playerInvincibilityFlag) _playerMp -= pointAmount;
|
||||||
_playerHp += healAmount;
|
_playerHp += healAmount;
|
||||||
_turtleTracker++;
|
_turtleTracker++;
|
||||||
@@ -309,7 +310,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
|||||||
case PlayerAction.Recharge:
|
case PlayerAction.Recharge:
|
||||||
var chargeAmount = _random.Next(4, 7);
|
var chargeAmount = _random.Next(4, 7);
|
||||||
_latestPlayerActionMessage = Loc.GetString("You regain {0} points", chargeAmount);
|
_latestPlayerActionMessage = Loc.GetString("You regain {0} points", chargeAmount);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/player_charge.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/player_charge.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
_playerMp += chargeAmount;
|
_playerMp += chargeAmount;
|
||||||
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
_turtleTracker -= _turtleTracker > 0 ? 1 : 0;
|
||||||
break;
|
break;
|
||||||
@@ -341,7 +342,7 @@ namespace Content.Server.GameObjects.Components.Arcade
|
|||||||
{
|
{
|
||||||
_running = false;
|
_running = false;
|
||||||
UpdateUi(Loc.GetString("You won!"), Loc.GetString("{0} dies.", _enemyName), true);
|
UpdateUi(Loc.GetString("You won!"), Loc.GetString("{0} dies.", _enemyName), true);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/win.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/win.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
_owner.ProcessWin();
|
_owner.ProcessWin();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -352,14 +353,14 @@ namespace Content.Server.GameObjects.Components.Arcade
|
|||||||
{
|
{
|
||||||
_running = false;
|
_running = false;
|
||||||
UpdateUi(Loc.GetString("You lost!"), Loc.GetString("{0} cheers.", _enemyName), true);
|
UpdateUi(Loc.GetString("You lost!"), Loc.GetString("{0} cheers.", _enemyName), true);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (_enemyHp <= 0 || _enemyMp <= 0)
|
if (_enemyHp <= 0 || _enemyMp <= 0)
|
||||||
{
|
{
|
||||||
_running = false;
|
_running = false;
|
||||||
UpdateUi(Loc.GetString("You lost!"), Loc.GetString("{0} dies, but takes you with him.", _enemyName), true);
|
UpdateUi(Loc.GetString("You lost!"), Loc.GetString("{0} dies, but takes you with him.", _enemyName), true);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
SoundSystem.Play(Filter.Pvs(_owner.Owner), "/Audio/Effects/Arcade/gameover.ogg", _owner.Owner, AudioParams.Default.WithVolume(-4f));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,11 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -278,7 +280,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
|||||||
var tileAtmos = Owner.Transform.Coordinates.GetTileAtmosphere();
|
var tileAtmos = Owner.Transform.Coordinates.GetTileAtmosphere();
|
||||||
tileAtmos?.AssumeAir(Air);
|
tileAtmos?.AssumeAir(Air);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("Audio/Effects/spray.ogg", Owner.Transform.Coordinates,
|
SoundSystem.Play(Filter.Pvs(Owner), "Audio/Effects/spray.ogg", Owner.Transform.Coordinates,
|
||||||
AudioHelpers.WithVariation(0.125f));
|
AudioHelpers.WithVariation(0.125f));
|
||||||
|
|
||||||
Owner.Delete();
|
Owner.Delete();
|
||||||
|
|||||||
@@ -10,11 +10,13 @@ using Content.Shared.GameObjects.Components.Movement;
|
|||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.Console;
|
using Robust.Server.Console;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Body
|
namespace Content.Server.GameObjects.Components.Body
|
||||||
@@ -98,8 +100,7 @@ namespace Content.Server.GameObjects.Components.Body
|
|||||||
{
|
{
|
||||||
base.Gib(gibParts);
|
base.Gib(gibParts);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), AudioHelpers.GetRandomFileFromSoundCollection("gib"), Owner.Transform.Coordinates,
|
||||||
.PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("gib"), Owner.Transform.Coordinates,
|
|
||||||
AudioHelpers.WithVariation(0.025f));
|
AudioHelpers.WithVariation(0.025f));
|
||||||
|
|
||||||
if (Owner.TryGetComponent(out ContainerManagerComponent? container))
|
if (Owner.TryGetComponent(out ContainerManagerComponent? container))
|
||||||
|
|||||||
@@ -20,10 +20,12 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -722,8 +724,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(spray.SpraySound))
|
if (!string.IsNullOrEmpty(spray.SpraySound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(spray.SpraySound, usingItem,
|
SoundSystem.Play(Filter.Pvs(usingItem), spray.SpraySound, usingItem, AudioHelpers.WithVariation(0.125f));
|
||||||
AudioHelpers.WithVariation(0.125f));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,13 @@ using Content.Shared.GameObjects.Verbs;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -241,7 +243,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(strap.BuckleSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), strap.BuckleSound, Owner);
|
||||||
|
|
||||||
if (!strap.TryAdd(this))
|
if (!strap.TryAdd(this))
|
||||||
{
|
{
|
||||||
@@ -348,7 +350,7 @@ namespace Content.Server.GameObjects.Components.Buckle
|
|||||||
UpdateBuckleStatus();
|
UpdateBuckleStatus();
|
||||||
|
|
||||||
oldBuckledTo.Remove(this);
|
oldBuckledTo.Remove(this);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(oldBuckledTo.UnbuckleSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), oldBuckledTo.UnbuckleSound, Owner);
|
||||||
|
|
||||||
SendMessage(new UnbuckleMessage(Owner, oldBuckledTo.Owner));
|
SendMessage(new UnbuckleMessage(Owner, oldBuckledTo.Owner));
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Cargo
|
namespace Content.Server.GameObjects.Components.Cargo
|
||||||
{
|
{
|
||||||
@@ -71,7 +72,7 @@ namespace Content.Server.GameObjects.Components.Cargo
|
|||||||
{
|
{
|
||||||
if (!Deleted && !Owner.Deleted && _currentState == CargoTelepadState.Teleporting && _teleportQueue.Count > 0)
|
if (!Deleted && !Owner.Deleted && _currentState == CargoTelepadState.Teleporting && _teleportQueue.Count > 0)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/phasein.ogg", Owner, AudioParams.Default.WithVolume(-8f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/phasein.ogg", Owner, AudioParams.Default.WithVolume(-8f));
|
||||||
Owner.EntityManager.SpawnEntity(_teleportQueue[0].Product, Owner.Transform.Coordinates);
|
Owner.EntityManager.SpawnEntity(_teleportQueue[0].Product, Owner.Transform.Coordinates);
|
||||||
_teleportQueue.RemoveAt(0);
|
_teleportQueue.RemoveAt(0);
|
||||||
if (Owner.TryGetComponent<SpriteComponent>(out var spriteComponent))
|
if (Owner.TryGetComponent<SpriteComponent>(out var spriteComponent))
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -416,7 +417,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Verb]
|
[Verb]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Mobs;
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
using Content.Server.GameObjects.Components.Mobs.State;
|
using Content.Server.GameObjects.Components.Mobs.State;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
@@ -8,9 +8,11 @@ using Content.Shared.GameObjects.EntitySystems;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -88,7 +90,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
meleeSys.SendLunge(angle, user);
|
meleeSys.SendLunge(angle, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Items/hypospray.ogg", user);
|
SoundSystem.Play(Filter.Pvs(user), "/Audio/Items/hypospray.ogg", user);
|
||||||
|
|
||||||
var targetSolution = target.GetComponent<SolutionContainerComponent>();
|
var targetSolution = target.GetComponent<SolutionContainerComponent>();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Body.Behavior;
|
using Content.Server.GameObjects.Components.Body.Behavior;
|
||||||
using Content.Server.GameObjects.Components.Culinary;
|
using Content.Server.GameObjects.Components.Culinary;
|
||||||
@@ -13,6 +13,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -104,8 +105,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
|
|
||||||
if (UseSound != null)
|
if (UseSound != null)
|
||||||
{
|
{
|
||||||
_entitySystem.GetEntitySystem<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(trueTarget), UseSound, trueTarget, AudioParams.Default.WithVolume(-1f));
|
||||||
.PlayFromEntity(UseSound, trueTarget, AudioParams.Default.WithVolume(-1f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trueTarget.PopupMessage(user, Loc.GetString("You swallow the pill."));
|
trueTarget.PopupMessage(user, Loc.GetString("You swallow the pill."));
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -356,8 +357,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Verb]
|
[Verb]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
@@ -8,10 +8,12 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -133,7 +135,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(_useSound))
|
if (!string.IsNullOrEmpty(_useSound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_useSound, Owner, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(Owner), _useSound, Owner, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decrease "Ammo"
|
// Decrease "Ammo"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -67,7 +68,7 @@ namespace Content.Server.GameObjects.Components.Culinary
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_sound, Owner.Transform.Coordinates,
|
SoundSystem.Play(Filter.Pvs(Owner), _sound, Owner.Transform.Coordinates,
|
||||||
AudioParams.Default.WithVolume(-2));
|
AudioParams.Default.WithVolume(-2));
|
||||||
|
|
||||||
Count--;
|
Count--;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Nutrition;
|
using Content.Server.GameObjects.Components.Nutrition;
|
||||||
@@ -8,6 +8,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -74,8 +75,7 @@ namespace Content.Server.GameObjects.Components.Culinary
|
|||||||
{
|
{
|
||||||
if (_breakSound != null && IoCManager.Resolve<IRobustRandom>().Prob(_breakChance))
|
if (_breakSound != null && IoCManager.Resolve<IRobustRandom>().Prob(_breakChance))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(user), _breakSound, user, AudioParams.Default.WithVolume(-2f));
|
||||||
.PlayFromEntity(_breakSound, user, AudioParams.Default.WithVolume(-2f));
|
|
||||||
Owner.Delete();
|
Owner.Delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ using Content.Shared.Audio;
|
|||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.GameObjects.Components.Damage;
|
using Content.Shared.GameObjects.Components.Damage;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision;
|
using Robust.Shared.Physics.Collision;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -51,7 +53,7 @@ namespace Content.Server.GameObjects.Components.Damage
|
|||||||
if (speed < MinimumSpeed) return;
|
if (speed < MinimumSpeed) return;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(SoundHit))
|
if (!string.IsNullOrEmpty(SoundHit))
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(SoundHit, otherBody.Entity, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
|
SoundSystem.Play(Filter.Pvs(otherBody.Entity), SoundHit, otherBody.Entity, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
|
||||||
|
|
||||||
if ((_gameTiming.CurTime - _lastHit).TotalSeconds < DamageCooldown)
|
if ((_gameTiming.CurTime - _lastHit).TotalSeconds < DamageCooldown)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behaviors
|
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behaviors
|
||||||
@@ -23,8 +25,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
|||||||
}
|
}
|
||||||
|
|
||||||
var pos = owner.Transform.Coordinates;
|
var pos = owner.Transform.Coordinates;
|
||||||
|
SoundSystem.Play(Filter.Pvs(pos), Sound, pos, AudioHelpers.WithVariation(0.125f));
|
||||||
system.AudioSystem.PlayAtCoords(Sound, pos, AudioHelpers.WithVariation(0.125f));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behaviors
|
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behaviors
|
||||||
@@ -26,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
|
|||||||
var sound = AudioHelpers.GetRandomFileFromSoundCollection(SoundCollection);
|
var sound = AudioHelpers.GetRandomFileFromSoundCollection(SoundCollection);
|
||||||
var pos = owner.Transform.Coordinates;
|
var pos = owner.Transform.Coordinates;
|
||||||
|
|
||||||
system.AudioSystem.PlayAtCoords(sound, pos, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(pos), sound, pos, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ using Robust.Shared.Localization;
|
|||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -445,7 +446,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
break;
|
break;
|
||||||
case UiButton.Power:
|
case UiButton.Power:
|
||||||
TogglePower();
|
TogglePower();
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -17,6 +17,7 @@ using Robust.Shared.IoC;
|
|||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using static Content.Shared.GameObjects.Components.Disposal.SharedDisposalRouterComponent;
|
using static Content.Shared.GameObjects.Components.Disposal.SharedDisposalRouterComponent;
|
||||||
|
|
||||||
@@ -146,7 +147,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
using Content.Shared.GameObjects.Verbs;
|
using Content.Shared.GameObjects.Verbs;
|
||||||
@@ -14,6 +14,7 @@ using Robust.Shared.ViewVariables;
|
|||||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using static Content.Shared.GameObjects.Components.Disposal.SharedDisposalTaggerComponent;
|
using static Content.Shared.GameObjects.Components.Disposal.SharedDisposalTaggerComponent;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Disposal
|
namespace Content.Server.GameObjects.Components.Disposal
|
||||||
@@ -111,7 +112,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -7,11 +7,13 @@ using Content.Shared.GameObjects.Verbs;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Robust.Server.Console;
|
using Robust.Server.Console;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -257,7 +259,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
}
|
}
|
||||||
|
|
||||||
_lastClang = _gameTiming.CurTime;
|
_lastClang = _gameTiming.CurTime;
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_clangSound, Owner.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(Owner), _clangSound, Owner.Transform.Coordinates);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AnchoredChangedMessage:
|
case AnchoredChangedMessage:
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ using Robust.Shared.IoC;
|
|||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -400,7 +401,7 @@ namespace Content.Server.GameObjects.Components.Disposal
|
|||||||
break;
|
break;
|
||||||
case UiButton.Power:
|
case UiButton.Power:
|
||||||
TogglePower();
|
TogglePower();
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ArgumentOutOfRangeException();
|
throw new ArgumentOutOfRangeException();
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ using Content.Shared.GameObjects.Components.Doors;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
|
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
|
||||||
using static Content.Shared.GameObjects.Components.SharedWiresComponent.WiresAction;
|
using static Content.Shared.GameObjects.Components.SharedWiresComponent.WiresAction;
|
||||||
@@ -453,8 +455,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
|||||||
|
|
||||||
BoltsDown = newBolts;
|
BoltsDown = newBolts;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Broadcast(), newBolts ? "/Audio/Machines/boltsdown.ogg" : "/Audio/Machines/boltsup.ogg", Owner);
|
||||||
.PlayFromEntity(newBolts ? "/Audio/Machines/boltsdown.ogg" : "/Audio/Machines/boltsup.ogg", Owner);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ using Robust.Shared.Players;
|
|||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Physics.Broadphase;
|
using Robust.Shared.Physics.Broadphase;
|
||||||
using Robust.Shared.Physics.Collision;
|
using Robust.Shared.Physics.Collision;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using Timer = Robust.Shared.Timing.Timer;
|
using Timer = Robust.Shared.Timing.Timer;
|
||||||
@@ -257,7 +258,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
|||||||
|
|
||||||
if (user.TryGetComponent(out HandsComponent? hands) && hands.Count == 0)
|
if (user.TryGetComponent(out HandsComponent? hands) && hands.Count == 0)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/bang.ogg", Owner,
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/bang.ogg", Owner,
|
||||||
AudioParams.Default.WithVolume(-2));
|
AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
using Content.Server.GameObjects.Components.Items.Storage;
|
using Content.Server.GameObjects.Components.Items.Storage;
|
||||||
using Content.Server.GameObjects.Components.Weapon;
|
using Content.Server.GameObjects.Components.Weapon;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.GameObjects.EntitySystems;
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Explosion
|
namespace Content.Server.GameObjects.Components.Explosion
|
||||||
@@ -37,7 +39,7 @@ namespace Content.Server.GameObjects.Components.Explosion
|
|||||||
|
|
||||||
if (_sound != null)
|
if (_sound != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_sound, Owner.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(Owner), _sound, Owner.Transform.Coordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_deleteOnFlash && !Owner.Deleted)
|
if (_deleteOnFlash && !Owner.Deleted)
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ using Content.Shared.GameObjects.Components;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -112,8 +114,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
|
|
||||||
private void ClickLatchSound()
|
private void ClickLatchSound()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>() // Don't have original click, this sounds close
|
// Don't have original click, this sounds close
|
||||||
.PlayFromEntity(DoorSound, Owner, AudioHelpers.WithVariation(0.15f));
|
SoundSystem.Play(Filter.Pvs(Owner), DoorSound, Owner, AudioHelpers.WithVariation(0.15f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Chemistry;
|
using Content.Server.GameObjects.Components.Chemistry;
|
||||||
@@ -8,8 +8,10 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Fluids
|
namespace Content.Server.GameObjects.Components.Fluids
|
||||||
@@ -114,7 +116,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
|||||||
|
|
||||||
if (_sound != null)
|
if (_sound != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_sound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), _sound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Content.Server.GameObjects.Components.Chemistry;
|
using Content.Server.GameObjects.Components.Chemistry;
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
@@ -10,6 +10,8 @@ using Robust.Shared.Serialization;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -165,7 +167,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
|||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(_pickupSound))
|
if (!string.IsNullOrWhiteSpace(_pickupSound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_pickupSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), _pickupSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -11,12 +11,14 @@ using Content.Shared.Maps;
|
|||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
@@ -188,7 +190,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_spillSound, Owner.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(Owner), _spillSound, Owner.Transform.Coordinates);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,13 @@ using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -162,7 +164,7 @@ namespace Content.Server.GameObjects.Components.Fluids
|
|||||||
//Play sound
|
//Play sound
|
||||||
if (!string.IsNullOrEmpty(_spraySound))
|
if (!string.IsNullOrEmpty(_spraySound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_spraySound, Owner, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(Owner), _spraySound, Owner, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
|
|
||||||
_lastUseTime = curTime;
|
_lastUseTime = curTime;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Physics.Pull;
|
using Content.Shared.Physics.Pull;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -28,6 +29,7 @@ using Robust.Shared.Network;
|
|||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.GUI
|
namespace Content.Server.GameObjects.Components.GUI
|
||||||
{
|
{
|
||||||
@@ -760,7 +762,7 @@ namespace Content.Server.GameObjects.Components.GUI
|
|||||||
|
|
||||||
if (source != null)
|
if (source != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/thudswoosh.ogg", source,
|
SoundSystem.Play(Filter.Pvs(source), "/Audio/Effects/thudswoosh.ogg", source,
|
||||||
AudioHelpers.WithVariation(0.025f));
|
AudioHelpers.WithVariation(0.025f));
|
||||||
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
|||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Interactable
|
namespace Content.Server.GameObjects.Components.Interactable
|
||||||
@@ -107,7 +108,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
|
|
||||||
if (LitSound != string.Empty)
|
if (LitSound != string.Empty)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(LitSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), LitSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IconStateLit != string.Empty)
|
if (IconStateLit != string.Empty)
|
||||||
@@ -127,7 +128,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
|
|
||||||
if (DieSound != string.Empty)
|
if (DieSound != string.Empty)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(DieSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), DieSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LoopedSound != string.Empty && Owner.TryGetComponent<LoopingLoopingSoundComponent>(out var loopSound))
|
if (LoopedSound != string.Empty && Owner.TryGetComponent<LoopingLoopingSoundComponent>(out var loopSound))
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
|||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -119,7 +121,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
|
|
||||||
if (makeNoise)
|
if (makeNoise)
|
||||||
{
|
{
|
||||||
if (TurnOffSound != null) EntitySystem.Get<AudioSystem>().PlayFromEntity(TurnOffSound, Owner);
|
if (TurnOffSound != null) SoundSystem.Play(Filter.Pvs(Owner), TurnOffSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -134,7 +136,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
|
|
||||||
if (Cell == null)
|
if (Cell == null)
|
||||||
{
|
{
|
||||||
if (TurnOnFailSound != null) EntitySystem.Get<AudioSystem>().PlayFromEntity(TurnOnFailSound, Owner);
|
if (TurnOnFailSound != null) SoundSystem.Play(Filter.Pvs(Owner), TurnOnFailSound, Owner);
|
||||||
Owner.PopupMessage(user, Loc.GetString("Cell missing..."));
|
Owner.PopupMessage(user, Loc.GetString("Cell missing..."));
|
||||||
UpdateLightAction();
|
UpdateLightAction();
|
||||||
return false;
|
return false;
|
||||||
@@ -145,7 +147,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
// Simple enough.
|
// Simple enough.
|
||||||
if (Wattage > Cell.CurrentCharge)
|
if (Wattage > Cell.CurrentCharge)
|
||||||
{
|
{
|
||||||
if (TurnOnFailSound != null) EntitySystem.Get<AudioSystem>().PlayFromEntity(TurnOnFailSound, Owner);
|
if (TurnOnFailSound != null) SoundSystem.Play(Filter.Pvs(Owner), TurnOnFailSound, Owner);
|
||||||
Owner.PopupMessage(user, Loc.GetString("Dead cell..."));
|
Owner.PopupMessage(user, Loc.GetString("Dead cell..."));
|
||||||
UpdateLightAction();
|
UpdateLightAction();
|
||||||
return false;
|
return false;
|
||||||
@@ -156,7 +158,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
SetState(true);
|
SetState(true);
|
||||||
Owner.EntityManager.EventBus.QueueEvent(EventSource.Local, new ActivateHandheldLightMessage(this));
|
Owner.EntityManager.EventBus.QueueEvent(EventSource.Local, new ActivateHandheldLightMessage(this));
|
||||||
|
|
||||||
if (TurnOnSound != null) EntitySystem.Get<AudioSystem>().PlayFromEntity(TurnOnSound, Owner);
|
if (TurnOnSound != null) SoundSystem.Play(Filter.Pvs(Owner), TurnOnSound, Owner);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.GameObjects.Components;
|
using Content.Shared.GameObjects.Components;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -68,7 +70,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
// Play Sound
|
// Play Sound
|
||||||
if (!string.IsNullOrEmpty(_igniteSound))
|
if (!string.IsNullOrEmpty(_igniteSound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_igniteSound, Owner,
|
SoundSystem.Play(Filter.Pvs(Owner), _igniteSound, Owner,
|
||||||
AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
|
AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ using Content.Shared.GameObjects;
|
|||||||
using Content.Shared.GameObjects.Components.Interactable;
|
using Content.Shared.GameObjects.Components.Interactable;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
@@ -44,7 +46,6 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
[DataField("tools")] private List<ToolEntry> _tools = new();
|
[DataField("tools")] private List<ToolEntry> _tools = new();
|
||||||
private int _currentTool = 0;
|
private int _currentTool = 0;
|
||||||
|
|
||||||
private AudioSystem _audioSystem = default!;
|
|
||||||
private ToolComponent? _tool;
|
private ToolComponent? _tool;
|
||||||
private SpriteComponent? _sprite;
|
private SpriteComponent? _sprite;
|
||||||
|
|
||||||
@@ -53,9 +54,6 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
base.Initialize();
|
base.Initialize();
|
||||||
Owner.TryGetComponent(out _tool);
|
Owner.TryGetComponent(out _tool);
|
||||||
Owner.TryGetComponent(out _sprite);
|
Owner.TryGetComponent(out _sprite);
|
||||||
|
|
||||||
_audioSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
|
|
||||||
SetTool();
|
SetTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
SetTool();
|
SetTool();
|
||||||
var current = _tools[_currentTool];
|
var current = _tools[_currentTool];
|
||||||
if(!string.IsNullOrEmpty(current.ChangeSound))
|
if(!string.IsNullOrEmpty(current.ChangeSound))
|
||||||
_audioSystem.PlayFromEntity(current.ChangeSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), current.ChangeSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetTool()
|
private void SetTool()
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ using Content.Shared.Audio;
|
|||||||
using Content.Shared.GameObjects.Components.Interactable;
|
using Content.Shared.GameObjects.Components.Interactable;
|
||||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -102,8 +104,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file = AudioHelpers.GetRandomFileFromSoundCollection(name);
|
var file = AudioHelpers.GetRandomFileFromSoundCollection(name);
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), file, Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
|
||||||
.PlayFromEntity(file, Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PlayUseSound(float volume=-5f)
|
public void PlayUseSound(float volume=-5f)
|
||||||
@@ -112,8 +113,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(UseSound))
|
if (!string.IsNullOrEmpty(UseSound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), UseSound, Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
|
||||||
.PlayFromEntity(UseSound, Owner, AudioHelpers.WithVariation(0.15f).WithVolume(volume));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ using Content.Shared.GameObjects.EntitySystems;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
@@ -321,7 +323,7 @@ namespace Content.Server.GameObjects.Components.Interactable
|
|||||||
var drained = targetSolution.Drain(trans);
|
var drained = targetSolution.Drain(trans);
|
||||||
_solutionComponent.TryAddSolution(drained);
|
_solutionComponent.TryAddSolution(drained);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/refill.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/refill.ogg", Owner);
|
||||||
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("Welder refueled"));
|
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("Welder refueled"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.GameObjects.EntitySystems;
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
@@ -6,6 +6,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -60,7 +61,7 @@ namespace Content.Server.GameObjects.Components.Items
|
|||||||
{
|
{
|
||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
|
||||||
var file = _random.Pick(soundCollection.PickFiles);
|
var file = _random.Pick(soundCollection.PickFiles);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(file, Owner, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(Owner), file, Owner, AudioParams.Default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Chemistry;
|
using Content.Server.GameObjects.Components.Chemistry;
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
using Content.Shared.GameObjects.Components.Chemistry;
|
using Content.Shared.GameObjects.Components.Chemistry;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
@@ -38,7 +40,7 @@ namespace Content.Server.GameObjects.Components.Items
|
|||||||
var drained = targetSolution.Drain(trans);
|
var drained = targetSolution.Drain(trans);
|
||||||
container.TryAddSolution(drained);
|
container.TryAddSolution(drained);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/refill.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/refill.ogg", Owner);
|
||||||
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("{0:TheName} is now refilled", Owner));
|
eventArgs.Target.PopupMessage(eventArgs.User, Loc.GetString("{0:TheName} is now refilled", Owner));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Items
|
namespace Content.Server.GameObjects.Components.Items
|
||||||
@@ -45,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Items
|
|||||||
private void PlaceAt(IMapGrid mapGrid, EntityCoordinates location, ushort tileId, float offset = 0)
|
private void PlaceAt(IMapGrid mapGrid, EntityCoordinates location, ushort tileId, float offset = 0)
|
||||||
{
|
{
|
||||||
mapGrid.SetTile(location.Offset(new Vector2(offset, offset)), new Tile(tileId));
|
mapGrid.SetTile(location.Offset(new Vector2(offset, offset)), new Tile(tileId));
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(location), "/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
async Task<bool> IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
|||||||
using Content.Shared.Maps;
|
using Content.Shared.Maps;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -23,7 +25,6 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
|||||||
public class RCDComponent : Component, IAfterInteract, IUse, IExamine
|
public class RCDComponent : Component, IAfterInteract, IUse, IExamine
|
||||||
{
|
{
|
||||||
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
|
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!;
|
||||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
|
||||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||||
[Dependency] private readonly IServerEntityManager _serverEntityManager = default!;
|
[Dependency] private readonly IServerEntityManager _serverEntityManager = default!;
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
|||||||
|
|
||||||
public void SwapMode(UseEntityEventArgs eventArgs)
|
public void SwapMode(UseEntityEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
_entitySystemManager.GetEntitySystem<AudioSystem>().PlayFromEntity("/Audio/Items/genhit.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Items/genhit.ogg", Owner);
|
||||||
int mode = (int) _mode; //Firstly, cast our RCDmode mode to an int (enums are backed by ints anyway by default)
|
int mode = (int) _mode; //Firstly, cast our RCDmode mode to an int (enums are backed by ints anyway by default)
|
||||||
mode = (++mode) % _modes.Length; //Then, do a rollover on the value so it doesnt hit an invalid state
|
mode = (++mode) % _modes.Length; //Then, do a rollover on the value so it doesnt hit an invalid state
|
||||||
_mode = (RcdMode) mode; //Finally, cast the newly acquired int mode to an RCDmode so we can use it.
|
_mode = (RcdMode) mode; //Finally, cast the newly acquired int mode to an RCDmode so we can use it.
|
||||||
@@ -148,7 +149,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
|||||||
return true; //I don't know why this would happen, but sure I guess. Get out of here invalid state!
|
return true; //I don't know why this would happen, but sure I guess. Get out of here invalid state!
|
||||||
}
|
}
|
||||||
|
|
||||||
_entitySystemManager.GetEntitySystem<AudioSystem>().PlayFromEntity("/Audio/Items/deconstruct.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Items/deconstruct.ogg", Owner);
|
||||||
_ammo--;
|
_ammo--;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Items.Storage
|
namespace Content.Server.GameObjects.Components.Items.Storage
|
||||||
@@ -45,8 +47,8 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
locker.Insert(entity);
|
locker.Insert(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/teleport_departure.ogg", Owner, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/teleport_departure.ogg", Owner, AudioHelpers.WithVariation(0.125f));
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/teleport_arrival.ogg", lockerEnt, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(lockerEnt), "/Audio/Effects/teleport_arrival.ogg", lockerEnt, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -21,6 +22,7 @@ using Robust.Shared.Localization;
|
|||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -223,7 +225,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
ModifyComponents();
|
ModifyComponents();
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_closeSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), _closeSound, Owner);
|
||||||
_lastInternalOpenAttempt = default;
|
_lastInternalOpenAttempt = default;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +234,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
Open = true;
|
Open = true;
|
||||||
EmptyContents();
|
EmptyContents();
|
||||||
ModifyComponents();
|
ModifyComponents();
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_openSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), _openSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ModifyComponents()
|
private void ModifyComponents()
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
if (!CheckAccess(user)) return;
|
if (!CheckAccess(user)) return;
|
||||||
|
|
||||||
Locked = false;
|
Locked = false;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/door_lock_off.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/door_lock_off.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoLock(IEntity user)
|
private void DoLock(IEntity user)
|
||||||
@@ -106,7 +107,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
if (!CheckAccess(user)) return;
|
if (!CheckAccess(user)) return;
|
||||||
|
|
||||||
Locked = true;
|
Locked = true;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/door_lock_on.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/door_lock_on.ogg", Owner, AudioParams.Default.WithVolume(-5));
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CheckAccess(IEntity user)
|
private bool CheckAccess(IEntity user)
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Network;
|
using Robust.Shared.Network;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -620,8 +621,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file = AudioHelpers.GetRandomFileFromSoundCollection(name);
|
var file = AudioHelpers.GetRandomFileFromSoundCollection(name);
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), file, Owner, AudioParams.Default);
|
||||||
.PlayFromEntity(file, Owner, AudioParams.Default);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -35,7 +36,7 @@ namespace Content.Server.GameObjects.Components.Items
|
|||||||
{
|
{
|
||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
|
||||||
var file = _random.Pick(soundCollection.PickFiles);
|
var file = _random.Pick(soundCollection.PickFiles);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(file, Owner, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(Owner), file, Owner, AudioParams.Default);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
using Content.Server.GameObjects.EntitySystems.DoAfter;
|
||||||
@@ -10,8 +10,10 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Kitchen;
|
using Content.Shared.Kitchen;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Kitchen
|
namespace Content.Server.GameObjects.Components.Kitchen
|
||||||
{
|
{
|
||||||
@@ -148,7 +150,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
victim.Delete();
|
victim.Delete();
|
||||||
|
|
||||||
if (SpikeSound != null)
|
if (SpikeSound != null)
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(SpikeSound, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), SpikeSound, Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -297,7 +298,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetAppearance(MicrowaveVisualState.Cooking);
|
SetAppearance(MicrowaveVisualState.Cooking);
|
||||||
_audioSystem.PlayFromEntity(_startCookingSound, Owner, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(Owner), _startCookingSound, Owner, AudioParams.Default);
|
||||||
Owner.SpawnTimer((int)(_currentCookTimerTime * _cookTimeMultiplier), (Action)(() =>
|
Owner.SpawnTimer((int)(_currentCookTimerTime * _cookTimeMultiplier), (Action)(() =>
|
||||||
{
|
{
|
||||||
if (_lostPower)
|
if (_lostPower)
|
||||||
@@ -324,7 +325,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
Owner.EntityManager.SpawnEntity(_badRecipeName, Owner.Transform.Coordinates);
|
Owner.EntityManager.SpawnEntity(_badRecipeName, Owner.Transform.Coordinates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_audioSystem.PlayFromEntity(_cookingCompleteSound, Owner, AudioParams.Default.WithVolume(-1f));
|
SoundSystem.Play(Filter.Pvs(Owner), _cookingCompleteSound, Owner, AudioParams.Default.WithVolume(-1f));
|
||||||
|
|
||||||
SetAppearance(MicrowaveVisualState.Idle);
|
SetAppearance(MicrowaveVisualState.Idle);
|
||||||
_busy = false;
|
_busy = false;
|
||||||
@@ -457,7 +458,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
_audioSystem.PlayFromEntity("/Audio/Machines/machine_switch.ogg",Owner,AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg",Owner,AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
SuicideKind ISuicideAct.Suicide(IEntity victim, IChatManager chat)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -164,7 +165,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
_audioSystem.PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetAppearance()
|
private void SetAppearance()
|
||||||
@@ -328,7 +329,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
switch (program)
|
switch (program)
|
||||||
{
|
{
|
||||||
case GrinderProgram.Grind:
|
case GrinderProgram.Grind:
|
||||||
_audioSystem.PlayFromEntity("/Audio/Machines/blender.ogg", Owner, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/blender.ogg", Owner, AudioParams.Default);
|
||||||
//Get each item inside the chamber and get the reagents it contains. Transfer those reagents to the beaker, given we have one in.
|
//Get each item inside the chamber and get the reagents it contains. Transfer those reagents to the beaker, given we have one in.
|
||||||
Owner.SpawnTimer(_workTime, (Action) (() =>
|
Owner.SpawnTimer(_workTime, (Action) (() =>
|
||||||
{
|
{
|
||||||
@@ -349,7 +350,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GrinderProgram.Juice:
|
case GrinderProgram.Juice:
|
||||||
_audioSystem.PlayFromEntity("/Audio/Machines/juicer.ogg", Owner, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/juicer.ogg", Owner, AudioParams.Default);
|
||||||
Owner.SpawnTimer(_workTime, (Action) (() =>
|
Owner.SpawnTimer(_workTime, (Action) (() =>
|
||||||
{
|
{
|
||||||
foreach (var item in _chamber.ContainedEntities.ToList())
|
foreach (var item in _chamber.ContainedEntities.ToList())
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Weapon.Melee;
|
using Content.Server.GameObjects.Components.Weapon.Melee;
|
||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.GameObjects.Components.Damage;
|
using Content.Shared.GameObjects.Components.Damage;
|
||||||
@@ -7,6 +7,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Mining
|
namespace Content.Server.GameObjects.Components.Mining
|
||||||
@@ -37,7 +38,7 @@ namespace Content.Server.GameObjects.Components.Mining
|
|||||||
if (!item.TryGetComponent(out PickaxeComponent? pickaxeComponent)) return true;
|
if (!item.TryGetComponent(out PickaxeComponent? pickaxeComponent)) return true;
|
||||||
if (!string.IsNullOrWhiteSpace(pickaxeComponent.MiningSound))
|
if (!string.IsNullOrWhiteSpace(pickaxeComponent.MiningSound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(pickaxeComponent.MiningSound, Owner, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(Owner), pickaxeComponent.MiningSound, Owner, AudioParams.Default);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,12 @@ using Content.Shared.GameObjects.Components.Mobs;
|
|||||||
using Content.Shared.GameObjects.Components.Mobs.State;
|
using Content.Shared.GameObjects.Components.Mobs.State;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
@@ -56,8 +59,7 @@ namespace Content.Server.GameObjects.Components.Mobs
|
|||||||
|
|
||||||
protected override void OnInteractHand()
|
protected override void OnInteractHand()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/thudswoosh.ogg", Owner, AudioHelpers.WithVariation(0.05f));
|
||||||
.PlayFromEntity("/Audio/Effects/thudswoosh.ogg", Owner, AudioHelpers.WithVariation(0.05f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IDisarmedAct.Disarmed(DisarmedActEventArgs eventArgs)
|
bool IDisarmedAct.Disarmed(DisarmedActEventArgs eventArgs)
|
||||||
@@ -72,9 +74,8 @@ namespace Content.Server.GameObjects.Components.Mobs
|
|||||||
|
|
||||||
if (source != null)
|
if (source != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/thudswoosh.ogg", source,
|
SoundSystem.Play(Filter.Pvs(source), "/Audio/Effects/thudswoosh.ogg", source,
|
||||||
AudioHelpers.WithVariation(0.025f));
|
AudioHelpers.WithVariation(0.025f));
|
||||||
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
source.PopupMessageOtherClients(Loc.GetString("{0} pushes {1}!", source.Name, target.Name));
|
source.PopupMessageOtherClients(Loc.GetString("{0} pushes {1}!", source.Name, target.Name));
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ using Robust.Shared.IoC;
|
|||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Morgue
|
namespace Content.Server.GameObjects.Components.Morgue
|
||||||
{
|
{
|
||||||
@@ -113,7 +115,7 @@ namespace Content.Server.GameObjects.Components.Morgue
|
|||||||
|
|
||||||
TryOpenStorage(Owner);
|
TryOpenStorage(Owner);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/ding.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/ding.ogg", Owner);
|
||||||
}, _cremateCancelToken.Token);
|
}, _cremateCancelToken.Token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Content.Server.GameObjects.Components.Items.Storage;
|
using Content.Server.GameObjects.Components.Items.Storage;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
using Content.Shared.GameObjects.Components.Body;
|
using Content.Shared.GameObjects.Components.Body;
|
||||||
@@ -9,10 +9,12 @@ using Content.Shared.Interfaces.GameObjects.Components;
|
|||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -140,7 +142,7 @@ namespace Content.Server.GameObjects.Components.Morgue
|
|||||||
CheckContents();
|
CheckContents();
|
||||||
|
|
||||||
if(DoSoulBeep && Appearance !=null && Appearance.TryGetData(MorgueVisuals.HasSoul, out bool hasSoul) && hasSoul)
|
if(DoSoulBeep && Appearance !=null && Appearance.TryGetData(MorgueVisuals.HasSoul, out bool hasSoul) && hasSoul)
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg", Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
using Content.Server.GameObjects.Components.Chemistry;
|
using Content.Server.GameObjects.Components.Chemistry;
|
||||||
using Content.Server.GameObjects.Components.Fluids;
|
using Content.Server.GameObjects.Components.Fluids;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Nutrition
|
namespace Content.Server.GameObjects.Components.Nutrition
|
||||||
{
|
{
|
||||||
@@ -14,8 +15,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
|
|
||||||
public void PlaySound()
|
public void PlaySound()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), AudioHelpers.GetRandomFileFromSoundCollection("desecration"), Owner,
|
||||||
.PlayFromEntity(AudioHelpers.GetRandomFileFromSoundCollection("desecration"), Owner,
|
|
||||||
AudioHelpers.WithVariation(0.125f));
|
AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Body.Behavior;
|
using Content.Server.GameObjects.Components.Body.Behavior;
|
||||||
@@ -18,6 +18,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -125,7 +126,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollection);
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollection);
|
||||||
var file = _random.Pick(soundCollection.PickFiles);
|
var file = _random.Pick(soundCollection.PickFiles);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(file, args.User, AudioParams.Default);
|
SoundSystem.Play(Filter.Pvs(args.User), file, args.User, AudioParams.Default);
|
||||||
Opened = true;
|
Opened = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -217,7 +218,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(_useSound))
|
if (!string.IsNullOrEmpty(_useSound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_useSound, target, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(target), _useSound, target, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
target.PopupMessage(Loc.GetString("Slurp"));
|
target.PopupMessage(Loc.GetString("Slurp"));
|
||||||
@@ -249,7 +250,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
var solution = interactions.Drain(interactions.DrainAvailable);
|
var solution = interactions.Drain(interactions.DrainAvailable);
|
||||||
solution.SpillAt(Owner, "PuddleSmear");
|
solution.SpillAt(Owner, "PuddleSmear");
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_burstSound, Owner,
|
SoundSystem.Play(Filter.Pvs(Owner), _burstSound, Owner,
|
||||||
AudioParams.Default.WithVolume(-4));
|
AudioParams.Default.WithVolume(-4));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -163,8 +164,7 @@ namespace Content.Server.GameObjects.Components.Nutrition
|
|||||||
|
|
||||||
if (UseSound != null)
|
if (UseSound != null)
|
||||||
{
|
{
|
||||||
_entitySystem.GetEntitySystem<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(trueTarget), UseSound, trueTarget, AudioParams.Default.WithVolume(-1f));
|
||||||
.PlayFromEntity(UseSound, trueTarget, AudioParams.Default.WithVolume(-1f));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trueTarget.PopupMessage(user, Loc.GetString("Nom"));
|
trueTarget.PopupMessage(user, Loc.GetString("Nom"));
|
||||||
|
|||||||
@@ -19,10 +19,12 @@ using Content.Shared.GameObjects.Verbs;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -300,7 +302,7 @@ namespace Content.Server.GameObjects.Components.PDA
|
|||||||
{
|
{
|
||||||
_idSlot.Insert(card.Owner);
|
_idSlot.Insert(card.Owner);
|
||||||
ContainedID = card;
|
ContainedID = card;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Weapons/Guns/MagIn/batrifle_magin.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Weapons/Guns/MagIn/batrifle_magin.ogg", Owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -329,7 +331,7 @@ namespace Content.Server.GameObjects.Components.PDA
|
|||||||
|
|
||||||
_lightOn = !_lightOn;
|
_lightOn = !_lightOn;
|
||||||
light.Enabled = _lightOn;
|
light.Enabled = _lightOn;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Items/flashlight_toggle.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Items/flashlight_toggle.ogg", Owner);
|
||||||
UpdatePDAUserInterface();
|
UpdatePDAUserInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,7 +350,7 @@ namespace Content.Server.GameObjects.Components.PDA
|
|||||||
hands.PutInHandOrDrop(cardItemComponent);
|
hands.PutInHandOrDrop(cardItemComponent);
|
||||||
ContainedID = null;
|
ContainedID = null;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/id_swipe.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/id_swipe.ogg", Owner);
|
||||||
UpdatePDAUserInterface();
|
UpdatePDAUserInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Explosions;
|
using Content.Server.Explosions;
|
||||||
using Content.Shared.GameObjects.Components.Pointing;
|
using Content.Shared.GameObjects.Components.Pointing;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -120,7 +122,7 @@ namespace Content.Server.GameObjects.Components.Pointing
|
|||||||
}
|
}
|
||||||
|
|
||||||
Owner.SpawnExplosion(0, 2, 1, 1);
|
Owner.SpawnExplosion(0, 2, 1, 1);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/explosion.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/explosion.ogg", Owner);
|
||||||
|
|
||||||
Owner.Delete();
|
Owner.Delete();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ using System.Collections.Generic;
|
|||||||
using Content.Shared.GameObjects.Components.Portal;
|
using Content.Shared.GameObjects.Components.Portal;
|
||||||
using Content.Shared.GameObjects.Components.Tag;
|
using Content.Shared.GameObjects.Components.Tag;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision;
|
using Robust.Shared.Physics.Collision;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -139,13 +141,12 @@ namespace Content.Server.GameObjects.Components.Portal
|
|||||||
}
|
}
|
||||||
|
|
||||||
var position = _connectingTeleporter.Transform.Coordinates;
|
var position = _connectingTeleporter.Transform.Coordinates;
|
||||||
var soundPlayer = EntitySystem.Get<AudioSystem>();
|
|
||||||
|
|
||||||
// Departure
|
// Departure
|
||||||
// Do we need to rate-limit sounds to stop ear BLAST?
|
// Do we need to rate-limit sounds to stop ear BLAST?
|
||||||
soundPlayer.PlayAtCoords(_departureSound, entity.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(entity), _departureSound, entity.Transform.Coordinates);
|
||||||
entity.Transform.Coordinates = position;
|
entity.Transform.Coordinates = position;
|
||||||
soundPlayer.PlayAtCoords(_arrivalSound, entity.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(entity), _arrivalSound, entity.Transform.Coordinates);
|
||||||
TryChangeState(PortalState.RecentlyTeleported);
|
TryChangeState(PortalState.RecentlyTeleported);
|
||||||
|
|
||||||
// To stop spam teleporting. Could potentially look at adding a timer to flush this from the portal
|
// To stop spam teleporting. Could potentially look at adding a timer to flush this from the portal
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Shared.GameObjects.Components.Portal;
|
using Content.Shared.GameObjects.Components.Portal;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -124,8 +126,7 @@ namespace Content.Server.GameObjects.Components.Portal
|
|||||||
Owner.SpawnTimer(TimeSpan.FromSeconds(_chargeTime + _cooldown), () => SetState(ItemTeleporterState.Off));
|
Owner.SpawnTimer(TimeSpan.FromSeconds(_chargeTime + _cooldown), () => SetState(ItemTeleporterState.Off));
|
||||||
if (_cooldownSound != null)
|
if (_cooldownSound != null)
|
||||||
{
|
{
|
||||||
var soundPlayer = EntitySystem.Get<AudioSystem>();
|
SoundSystem.Play(Filter.Pvs(Owner), _cooldownSound, Owner);
|
||||||
soundPlayer.PlayFromEntity(_cooldownSound, Owner);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,7 +210,6 @@ namespace Content.Server.GameObjects.Components.Portal
|
|||||||
{
|
{
|
||||||
// Messy maybe?
|
// Messy maybe?
|
||||||
var targetGrid = user.Transform.Coordinates.WithPosition(vector);
|
var targetGrid = user.Transform.Coordinates.WithPosition(vector);
|
||||||
var soundPlayer = EntitySystem.Get<AudioSystem>();
|
|
||||||
|
|
||||||
// If portals use those, otherwise just move em over
|
// If portals use those, otherwise just move em over
|
||||||
if (_portalAliveTime > 0.0f)
|
if (_portalAliveTime > 0.0f)
|
||||||
@@ -229,12 +229,12 @@ namespace Content.Server.GameObjects.Components.Portal
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Departure
|
// Departure
|
||||||
soundPlayer.PlayAtCoords(_departureSound, user.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(user), _departureSound, user.Transform.Coordinates);
|
||||||
|
|
||||||
// Arrival
|
// Arrival
|
||||||
user.Transform.AttachToGridOrMap();
|
user.Transform.AttachToGridOrMap();
|
||||||
user.Transform.WorldPosition = vector;
|
user.Transform.WorldPosition = vector;
|
||||||
soundPlayer.PlayAtCoords(_arrivalSound, user.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(user), _arrivalSound, user.Transform.Coordinates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ using Content.Shared.Audio;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components
|
namespace Content.Server.GameObjects.Components
|
||||||
@@ -44,8 +46,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
|
|
||||||
private void Rustle()
|
private void Rustle()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/plant_rustle.ogg", Owner, AudioHelpers.WithVariation(0.25f));
|
||||||
.PlayFromEntity("/Audio/Effects/plant_rustle.ogg", Owner, AudioHelpers.WithVariation(0.25f));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Power.AME
|
namespace Content.Server.GameObjects.Components.Power.AME
|
||||||
@@ -319,14 +320,12 @@ namespace Content.Server.GameObjects.Components.Power.AME
|
|||||||
|
|
||||||
private void ClickSound()
|
private void ClickSound()
|
||||||
{
|
{
|
||||||
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InjectSound(bool overloading)
|
private void InjectSound(bool overloading)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/bang.ogg", Owner, AudioParams.Default.WithVolume(overloading ? 10f : 0f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/bang.ogg", Owner, AudioParams.Default.WithVolume(overloading ? 10f : 0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs args)
|
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs args)
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ using Content.Shared.GameObjects.Components.Interactable;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Power.AME
|
namespace Content.Server.GameObjects.Components.Power.AME
|
||||||
{
|
{
|
||||||
@@ -48,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Power.AME
|
|||||||
var ent = _serverEntityManager.SpawnEntity("AMEShielding", mapGrid.GridTileToLocal(snapPos));
|
var ent = _serverEntityManager.SpawnEntity("AMEShielding", mapGrid.GridTileToLocal(snapPos));
|
||||||
ent.Transform.LocalRotation = Owner.Transform.LocalRotation;
|
ent.Transform.LocalRotation = Owner.Transform.LocalRotation;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_unwrap, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), _unwrap, Owner);
|
||||||
|
|
||||||
Owner.Delete();
|
Owner.Delete();
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents
|
|||||||
{
|
{
|
||||||
MainBreakerEnabled = !MainBreakerEnabled;
|
MainBreakerEnabled = !MainBreakerEnabled;
|
||||||
_uiDirty = true;
|
_uiDirty = true;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/machine_switch.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ using Content.Shared.Audio;
|
|||||||
using Content.Shared.GameObjects.EntitySystems;
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -131,7 +133,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>("GlassBreak");
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>("GlassBreak");
|
||||||
var file = _random.Pick(soundCollection.PickFiles);
|
var file = _random.Pick(soundCollection.PickFiles);
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(file, Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), file, Owner);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -115,8 +116,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
{
|
{
|
||||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("You burn your hand!"));
|
Owner.PopupMessage(eventArgs.User, Loc.GetString("You burn your hand!"));
|
||||||
damageableComponent.ChangeDamage(DamageType.Heat, 20, false, Owner);
|
damageableComponent.ChangeDamage(DamageType.Heat, 20, false, Owner);
|
||||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/lightburn.ogg", Owner);
|
||||||
audioSystem.PlayFromEntity("/Audio/Effects/lightburn.ogg", Owner);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Eject()
|
void Eject()
|
||||||
@@ -201,7 +201,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
if (time > _lastThunk + _thunkDelay)
|
if (time > _lastThunk + _thunkDelay)
|
||||||
{
|
{
|
||||||
_lastThunk = time;
|
_lastThunk = time;
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/light_tube_on.ogg", Owner, AudioParams.Default.WithVolume(-10f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Machines/light_tube_on.ogg", Owner, AudioParams.Default.WithVolume(-10f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ using Content.Shared.GameObjects.EntitySystems;
|
|||||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||||
using Content.Shared.GameObjects.Verbs;
|
using Content.Shared.GameObjects.Verbs;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.Containers;
|
using Robust.Shared.Containers;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -146,7 +148,7 @@ namespace Content.Server.GameObjects.Components.Power
|
|||||||
|
|
||||||
if (playSound && CellRemoveSound != null)
|
if (playSound && CellRemoveSound != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(CellRemoveSound, Owner, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(Owner), CellRemoveSound, Owner, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
SendMessage(new PowerCellChangedMessage(true));
|
SendMessage(new PowerCellChangedMessage(true));
|
||||||
return cell;
|
return cell;
|
||||||
@@ -168,7 +170,7 @@ namespace Content.Server.GameObjects.Components.Power
|
|||||||
//Dirty();
|
//Dirty();
|
||||||
if (playSound && CellInsertSound != null)
|
if (playSound && CellInsertSound != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(CellInsertSound, Owner, AudioHelpers.WithVariation(0.125f));
|
SoundSystem.Play(Filter.Pvs(Owner), CellInsertSound, Owner, AudioHelpers.WithVariation(0.125f));
|
||||||
}
|
}
|
||||||
SendMessage(new PowerCellChangedMessage(false));
|
SendMessage(new PowerCellChangedMessage(false));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ using System;
|
|||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Projectiles
|
namespace Content.Server.GameObjects.Components.Projectiles
|
||||||
@@ -82,7 +84,8 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
|||||||
{
|
{
|
||||||
// TODO: No wall component so ?
|
// TODO: No wall component so ?
|
||||||
var offset = angle.ToVec().Normalized / 2;
|
var offset = angle.ToVec().Normalized / 2;
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundHitWall, user.Transform.Coordinates.Offset(offset));
|
var coordinates = user.Transform.Coordinates.Offset(offset);
|
||||||
|
SoundSystem.Play(Filter.Pvs(coordinates), _soundHitWall, coordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
Owner.SpawnTimer((int) _deathTime.TotalMilliseconds, () =>
|
Owner.SpawnTimer((int) _deathTime.TotalMilliseconds, () =>
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ using Content.Shared.Damage;
|
|||||||
using Content.Shared.GameObjects.Components.Damage;
|
using Content.Shared.GameObjects.Components.Damage;
|
||||||
using Content.Shared.GameObjects.Components.Projectiles;
|
using Content.Shared.GameObjects.Components.Projectiles;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Collision;
|
using Robust.Shared.Physics.Collision;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -63,13 +65,15 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var coordinates = otherBody.Entity.Transform.Coordinates;
|
||||||
|
var playerFilter = Filter.Pvs(coordinates);
|
||||||
if (otherBody.Entity.TryGetComponent(out IDamageableComponent? damage) && _soundHitSpecies != null)
|
if (otherBody.Entity.TryGetComponent(out IDamageableComponent? damage) && _soundHitSpecies != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundHitSpecies, otherBody.Entity.Transform.Coordinates);
|
SoundSystem.Play(playerFilter, _soundHitSpecies, coordinates);
|
||||||
}
|
}
|
||||||
else if (_soundHit != null)
|
else if (_soundHit != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundHit, otherBody.Entity.Transform.Coordinates);
|
SoundSystem.Play(playerFilter, _soundHit, coordinates);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damage != null)
|
if (damage != null)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
@@ -10,6 +10,7 @@ using Robust.Server.Player;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -124,8 +125,7 @@ namespace Content.Server.GameObjects.Components.Research
|
|||||||
{
|
{
|
||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(SoundCollectionName);
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(SoundCollectionName);
|
||||||
var file = _random.Pick(soundCollection.PickFiles);
|
var file = _random.Pick(soundCollection.PickFiles);
|
||||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
SoundSystem.Play(Filter.Pvs(Owner), file,Owner,AudioParams.Default);
|
||||||
audioSystem.PlayFromEntity(file,Owner,AudioParams.Default);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,12 @@ using Content.Shared.Interfaces;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Log;
|
using Robust.Shared.Log;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -257,7 +259,7 @@ namespace Content.Server.GameObjects.Components.Singularity
|
|||||||
// TODO: Move to projectile's code.
|
// TODO: Move to projectile's code.
|
||||||
Timer.Spawn(3000, () => projectile.Delete());
|
Timer.Spawn(3000, () => projectile.Delete());
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_fireSound, Owner,
|
SoundSystem.Play(Filter.Pvs(Owner), _fireSound, Owner,
|
||||||
AudioHelpers.WithVariation(Variation).WithVolume(Volume).WithMaxDistance(Distance));
|
AudioHelpers.WithVariation(Variation).WithVolume(Volume).WithMaxDistance(Distance));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using Robust.Shared.Physics.Dynamics.Shapes;
|
|||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Content.Shared.GameObjects.Components.Singularity;
|
using Content.Shared.GameObjects.Components.Singularity;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
@@ -98,7 +99,6 @@ namespace Content.Server.GameObjects.Components.Singularity
|
|||||||
private PhysicsComponent? _collidableComponent;
|
private PhysicsComponent? _collidableComponent;
|
||||||
private SpriteComponent? _spriteComponent;
|
private SpriteComponent? _spriteComponent;
|
||||||
private RadiationPulseComponent? _radiationPulseComponent;
|
private RadiationPulseComponent? _radiationPulseComponent;
|
||||||
private AudioSystem _audioSystem = null!;
|
|
||||||
private IPlayingAudioStream? _playingSound;
|
private IPlayingAudioStream? _playingSound;
|
||||||
|
|
||||||
public override ComponentState GetComponentState(ICommonSession player)
|
public override ComponentState GetComponentState(ICommonSession player)
|
||||||
@@ -110,13 +110,12 @@ namespace Content.Server.GameObjects.Components.Singularity
|
|||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
_audioSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
var audioParams = AudioParams.Default;
|
var audioParams = AudioParams.Default;
|
||||||
audioParams.Loop = true;
|
audioParams.Loop = true;
|
||||||
audioParams.MaxDistance = 20f;
|
audioParams.MaxDistance = 20f;
|
||||||
audioParams.Volume = 5;
|
audioParams.Volume = 5;
|
||||||
_audioSystem.PlayFromEntity("/Audio/Effects/singularity_form.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/singularity_form.ogg", Owner);
|
||||||
Timer.Spawn(5200,() => _playingSound = _audioSystem.PlayFromEntity("/Audio/Effects/singularity.ogg", Owner, audioParams));
|
Timer.Spawn(5200,() => _playingSound = SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/singularity.ogg", Owner, audioParams));
|
||||||
|
|
||||||
if (!Owner.TryGetComponent(out _spriteComponent))
|
if (!Owner.TryGetComponent(out _spriteComponent))
|
||||||
Logger.Error("SingularityComponent was spawned without SpriteComponent");
|
Logger.Error("SingularityComponent was spawned without SpriteComponent");
|
||||||
@@ -163,7 +162,7 @@ namespace Content.Server.GameObjects.Components.Singularity
|
|||||||
public override void OnRemove()
|
public override void OnRemove()
|
||||||
{
|
{
|
||||||
_playingSound?.Stop();
|
_playingSound?.Stop();
|
||||||
_audioSystem.PlayAtCoords("/Audio/Effects/singularity_collapse.ogg", Owner.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/singularity_collapse.ogg", Owner.Transform.Coordinates);
|
||||||
base.OnRemove();
|
base.OnRemove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Sound
|
namespace Content.Server.GameObjects.Components.Sound
|
||||||
@@ -28,9 +28,9 @@ namespace Content.Server.GameObjects.Components.Sound
|
|||||||
{
|
{
|
||||||
if (_pitchVariation > 0.0)
|
if (_pitchVariation > 0.0)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundName, Owner, AudioHelpers.WithVariation(_pitchVariation).WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundName, Owner, AudioHelpers.WithVariation(_pitchVariation).WithVolume(-2f));
|
||||||
}
|
}
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundName, Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundName, Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -28,15 +28,15 @@ namespace Content.Server.GameObjects.Components.Sound
|
|||||||
{
|
{
|
||||||
if (_pitchVariation > 0.0)
|
if (_pitchVariation > 0.0)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundName, Owner, AudioHelpers.WithVariation(_pitchVariation).WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundName, Owner, AudioHelpers.WithVariation(_pitchVariation).WithVolume(-2f));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_semitoneVariation > 0)
|
if (_semitoneVariation > 0)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundName, Owner, AudioHelpers.WithSemitoneVariation(_semitoneVariation).WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundName, Owner, AudioHelpers.WithSemitoneVariation(_semitoneVariation).WithVolume(-2f));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundName, Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundName, Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -30,7 +31,7 @@ namespace Content.Server.GameObjects.Components.Sound
|
|||||||
{
|
{
|
||||||
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
|
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
|
||||||
var file = _footstepRandom.Pick(soundCollection.PickFiles);
|
var file = _footstepRandom.Pick(soundCollection.PickFiles);
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(file, Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), file, Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Shared.GameObjects.Components;
|
using Content.Shared.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -92,7 +94,7 @@ namespace Content.Server.GameObjects.Components.StationEvents
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!string.IsNullOrEmpty(Sound))
|
if(!string.IsNullOrEmpty(Sound))
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(Sound, Owner.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(Owner), Sound, Owner.Transform.Coordinates);
|
||||||
|
|
||||||
Dirty();
|
Dirty();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using Robust.Shared.Audio;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -187,7 +188,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines
|
|||||||
Owner.EntityManager.SpawnEntity(id, Owner.Transform.Coordinates);
|
Owner.EntityManager.SpawnEntity(id, Owner.Transform.Coordinates);
|
||||||
});
|
});
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundVend, Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundVend, Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TryEject(string id, IEntity? sender)
|
private void TryEject(string id, IEntity? sender)
|
||||||
@@ -206,7 +207,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines
|
|||||||
|
|
||||||
private void Deny()
|
private void Deny()
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(_soundDeny, Owner, AudioParams.Default.WithVolume(-2f));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundDeny, Owner, AudioParams.Default.WithVolume(-2f));
|
||||||
|
|
||||||
// Play the Deny animation
|
// Play the Deny animation
|
||||||
TrySetVisualState(VendingMachineVisualState.Deny);
|
TrySetVisualState(VendingMachineVisualState.Deny);
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ using Robust.Shared.Random;
|
|||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.Components.Watercloset
|
namespace Content.Server.GameObjects.Components.Watercloset
|
||||||
{
|
{
|
||||||
@@ -124,8 +126,7 @@ namespace Content.Server.GameObjects.Components.Watercloset
|
|||||||
public void ToggleToiletSeat()
|
public void ToggleToiletSeat()
|
||||||
{
|
{
|
||||||
IsSeatUp = !IsSeatUp;
|
IsSeatUp = !IsSeatUp;
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/toilet_seat_down.ogg", Owner, AudioHelpers.WithVariation(0.05f));
|
||||||
.PlayFromEntity("/Audio/Effects/toilet_seat_down.ogg", Owner, AudioHelpers.WithVariation(0.05f));
|
|
||||||
|
|
||||||
UpdateSprite();
|
UpdateSprite();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ using Content.Shared.GameObjects.Components.Weapons;
|
|||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
|
||||||
@@ -42,7 +44,7 @@ namespace Content.Server.GameObjects.Components.Weapon
|
|||||||
|
|
||||||
if (!string.IsNullOrEmpty(sound))
|
if (!string.IsNullOrEmpty(sound))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(sound, source.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(source), sound, source.Transform.Coordinates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Robust.Server.GameObjects;
|
|||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -98,7 +99,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Weapons/flash.ogg", Owner.Transform.Coordinates,
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Weapons/flash.ogg", Owner.Transform.Coordinates,
|
||||||
AudioParams.Default);
|
AudioParams.Default);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -8,11 +8,13 @@ using Content.Shared.GameObjects.Components.Items;
|
|||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Content.Shared.Physics;
|
using Content.Shared.Physics;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Broadphase;
|
using Robust.Shared.Physics.Broadphase;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -85,15 +87,14 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
|
|
||||||
// This should really be improved. GetEntitiesInArc uses pos instead of bounding boxes.
|
// This should really be improved. GetEntitiesInArc uses pos instead of bounding boxes.
|
||||||
var entities = ArcRayCast(eventArgs.User.Transform.WorldPosition, angle, eventArgs.User);
|
var entities = ArcRayCast(eventArgs.User.Transform.WorldPosition, angle, eventArgs.User);
|
||||||
|
|
||||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
if (entities.Count != 0)
|
if (entities.Count != 0)
|
||||||
{
|
{
|
||||||
audioSystem.PlayFromEntity(_hitSound, entities.First());
|
SoundSystem.Play(Filter.Pvs(Owner), _hitSound, entities.First());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
audioSystem.PlayFromEntity(_missSound, eventArgs.User);
|
SoundSystem.Play(Filter.Pvs(Owner), _missSound, eventArgs.User);
|
||||||
}
|
}
|
||||||
|
|
||||||
var hitEntities = new List<IEntity>();
|
var hitEntities = new List<IEntity>();
|
||||||
@@ -141,14 +142,13 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
var diff = eventArgs.ClickLocation.ToMapPos(Owner.EntityManager) - location.ToMapPos(Owner.EntityManager);
|
var diff = eventArgs.ClickLocation.ToMapPos(Owner.EntityManager) - location.ToMapPos(Owner.EntityManager);
|
||||||
var angle = Angle.FromWorldVec(diff);
|
var angle = Angle.FromWorldVec(diff);
|
||||||
|
|
||||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
audioSystem.PlayFromEntity(_hitSound, target);
|
SoundSystem.Play(Filter.Pvs(Owner), _hitSound, target);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
audioSystem.PlayFromEntity(_missSound, eventArgs.User);
|
SoundSystem.Play(Filter.Pvs(Owner), _missSound, eventArgs.User);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Items.Storage;
|
using Content.Server.GameObjects.Components.Items.Storage;
|
||||||
@@ -10,9 +10,11 @@ using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
|||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -86,27 +88,31 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
if (!Cell.TryUseCharge(EnergyPerUse))
|
if (!Cell.TryUseCharge(EnergyPerUse))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Weapons/egloves.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Weapons/egloves.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
|
|
||||||
foreach (var entity in entities)
|
foreach (var entity in entities)
|
||||||
{
|
{
|
||||||
if (!entity.TryGetComponent(out StunnableComponent? stunnable)) continue;
|
if (!entity.TryGetComponent(out StunnableComponent? stunnable)) continue;
|
||||||
|
|
||||||
if(!stunnable.SlowedDown)
|
if(!stunnable.SlowedDown)
|
||||||
|
{
|
||||||
if(_robustRandom.Prob(_paralyzeChanceNoSlowdown))
|
if(_robustRandom.Prob(_paralyzeChanceNoSlowdown))
|
||||||
stunnable.Paralyze(_paralyzeTime);
|
stunnable.Paralyze(_paralyzeTime);
|
||||||
else
|
else
|
||||||
stunnable.Slowdown(_slowdownTime);
|
stunnable.Slowdown(_slowdownTime);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
if(_robustRandom.Prob(_paralyzeChanceWithSlowdown))
|
if(_robustRandom.Prob(_paralyzeChanceWithSlowdown))
|
||||||
stunnable.Paralyze(_paralyzeTime);
|
stunnable.Paralyze(_paralyzeTime);
|
||||||
else
|
else
|
||||||
stunnable.Slowdown(_slowdownTime);
|
stunnable.Slowdown(_slowdownTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(Cell.CurrentCharge < EnergyPerUse)) return true;
|
if (!(Cell.CurrentCharge < EnergyPerUse)) return true;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(Filter.Pvs(Owner), AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
TurnOff();
|
TurnOff();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -137,7 +143,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
var sprite = Owner.GetComponent<SpriteComponent>();
|
var sprite = Owner.GetComponent<SpriteComponent>();
|
||||||
var item = Owner.GetComponent<ItemComponent>();
|
var item = Owner.GetComponent<ItemComponent>();
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(Filter.Pvs(Owner), AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
|
|
||||||
item.EquippedPrefix = "off";
|
item.EquippedPrefix = "off";
|
||||||
sprite.LayerSetState(0, "stunbaton_off");
|
sprite.LayerSetState(0, "stunbaton_off");
|
||||||
@@ -154,9 +160,10 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
var sprite = Owner.GetComponent<SpriteComponent>();
|
var sprite = Owner.GetComponent<SpriteComponent>();
|
||||||
var item = Owner.GetComponent<ItemComponent>();
|
var item = Owner.GetComponent<ItemComponent>();
|
||||||
|
|
||||||
|
var playerFilter = Filter.Pvs(Owner);
|
||||||
if (Cell == null)
|
if (Cell == null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Machines/button.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(playerFilter, "/Audio/Machines/button.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
|
|
||||||
Owner.PopupMessage(user, Loc.GetString("Cell missing..."));
|
Owner.PopupMessage(user, Loc.GetString("Cell missing..."));
|
||||||
return;
|
return;
|
||||||
@@ -164,12 +171,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
|
|
||||||
if (Cell.CurrentCharge < EnergyPerUse)
|
if (Cell.CurrentCharge < EnergyPerUse)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Machines/button.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(playerFilter, "/Audio/Machines/button.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
Owner.PopupMessage(user, Loc.GetString("Dead cell..."));
|
Owner.PopupMessage(user, Loc.GetString("Dead cell..."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(playerFilter, AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
|
|
||||||
item.EquippedPrefix = "on";
|
item.EquippedPrefix = "on";
|
||||||
sprite.LayerSetState(0, "stunbaton_on");
|
sprite.LayerSetState(0, "stunbaton_on");
|
||||||
@@ -204,7 +211,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
|||||||
if (!Activated || Cell == null || !Cell.TryUseCharge(EnergyPerUse) || !eventArgs.Target.TryGetComponent(out StunnableComponent? stunnable))
|
if (!Activated || Cell == null || !Cell.TryUseCharge(EnergyPerUse) || !eventArgs.Target.TryGetComponent(out StunnableComponent? stunnable))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Weapons/egloves.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Weapons/egloves.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||||
|
|
||||||
stunnable.Paralyze(_paralyzeTime);
|
stunnable.Paralyze(_paralyzeTime);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
|
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
@@ -14,6 +14,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
@@ -68,15 +69,13 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var soundSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
TryEjectChamber();
|
TryEjectChamber();
|
||||||
if (_soundBoltOpen != null)
|
if (_soundBoltOpen != null)
|
||||||
{
|
{
|
||||||
soundSystem.PlayAtCoords(_soundBoltOpen, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundBoltOpen, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -84,7 +83,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
TryFeedChamber();
|
TryFeedChamber();
|
||||||
if (_soundBoltClosed != null)
|
if (_soundBoltClosed != null)
|
||||||
{
|
{
|
||||||
soundSystem.PlayAtCoords(_soundBoltClosed, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundBoltClosed, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,7 +225,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(_soundCycle))
|
if (!string.IsNullOrEmpty(_soundCycle))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundCycle, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundCycle, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +257,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
_chamberContainer.Insert(ammo);
|
_chamberContainer.Insert(ammo);
|
||||||
if (_soundInsert != null)
|
if (_soundInsert != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
Dirty();
|
Dirty();
|
||||||
UpdateAppearance();
|
UpdateAppearance();
|
||||||
@@ -271,7 +270,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
_spawnedAmmo.Push(ammo);
|
_spawnedAmmo.Push(ammo);
|
||||||
if (_soundInsert != null)
|
if (_soundInsert != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
Dirty();
|
Dirty();
|
||||||
UpdateAppearance();
|
UpdateAppearance();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
|
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
@@ -11,6 +11,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
@@ -189,7 +190,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(_soundCycle))
|
if (!string.IsNullOrEmpty(_soundCycle))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundCycle, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundCycle, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +219,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
UpdateAppearance();
|
UpdateAppearance();
|
||||||
if (_soundInsert != null)
|
if (_soundInsert != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
|
using Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition;
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
@@ -14,6 +14,7 @@ using Robust.Shared.GameObjects;
|
|||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -164,7 +165,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
_ammoContainer.Insert(entity);
|
_ammoContainer.Insert(entity);
|
||||||
if (_soundInsert != null)
|
if (_soundInsert != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dirty();
|
Dirty();
|
||||||
@@ -194,7 +195,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
_currentSlot = random;
|
_currentSlot = random;
|
||||||
if (!string.IsNullOrEmpty(_soundSpin))
|
if (!string.IsNullOrEmpty(_soundSpin))
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundSpin, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundSpin, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
Dirty();
|
Dirty();
|
||||||
}
|
}
|
||||||
@@ -248,7 +249,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (_soundEject != null)
|
if (_soundEject != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-1));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
@@ -221,7 +222,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
|
|
||||||
if (_soundPowerCellInsert != null)
|
if (_soundPowerCellInsert != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundPowerCellInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundPowerCellInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
|
|
||||||
_powerCellContainer.Insert(entity);
|
_powerCellContainer.Insert(entity);
|
||||||
@@ -274,7 +275,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
|
|
||||||
if (_soundPowerCellEject != null)
|
if (_soundPowerCellEject != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundPowerCellEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundPowerCellEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ using Robust.Shared.Containers;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Utility;
|
using Robust.Shared.Utility;
|
||||||
@@ -92,14 +93,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var soundSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
|
|
||||||
if (value)
|
if (value)
|
||||||
{
|
{
|
||||||
TryEjectChamber();
|
TryEjectChamber();
|
||||||
if (_soundBoltOpen != null)
|
if (_soundBoltOpen != null)
|
||||||
{
|
{
|
||||||
soundSystem.PlayAtCoords(_soundBoltOpen, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundBoltOpen, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -107,7 +106,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
TryFeedChamber();
|
TryFeedChamber();
|
||||||
if (_soundBoltClosed != null)
|
if (_soundBoltClosed != null)
|
||||||
{
|
{
|
||||||
soundSystem.PlayAtCoords(_soundBoltClosed, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundBoltClosed, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,13 +224,11 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
|
|
||||||
TryFeedChamber();
|
TryFeedChamber();
|
||||||
|
|
||||||
var soundSystem = EntitySystem.Get<AudioSystem>();
|
|
||||||
|
|
||||||
if (_chamberContainer.ContainedEntity == null && !BoltOpen)
|
if (_chamberContainer.ContainedEntity == null && !BoltOpen)
|
||||||
{
|
{
|
||||||
if (_soundBoltOpen != null)
|
if (_soundBoltOpen != null)
|
||||||
{
|
{
|
||||||
soundSystem.PlayAtCoords(_soundBoltOpen, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-5));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundBoltOpen, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-5));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Owner.TryGetContainer(out var container))
|
if (Owner.TryGetContainer(out var container))
|
||||||
@@ -246,7 +243,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (_soundRack != null)
|
if (_soundRack != null)
|
||||||
{
|
{
|
||||||
soundSystem.PlayAtCoords(_soundRack, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundRack, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +271,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (_soundBoltClosed != null)
|
if (_soundBoltClosed != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundBoltClosed, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-5));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundBoltClosed, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-5));
|
||||||
}
|
}
|
||||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("Bolt closed"));
|
Owner.PopupMessage(eventArgs.User, Loc.GetString("Bolt closed"));
|
||||||
BoltOpen = false;
|
BoltOpen = false;
|
||||||
@@ -328,8 +325,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (_soundAutoEject != null)
|
if (_soundAutoEject != null)
|
||||||
{
|
{
|
||||||
var soundSystem = EntitySystem.Get<AudioSystem>();
|
SoundSystem.Play(Filter.Pvs(Owner), _soundAutoEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
soundSystem.PlayAtCoords(_soundAutoEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_magazineContainer.Remove(magazine);
|
_magazineContainer.Remove(magazine);
|
||||||
@@ -356,7 +352,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
_magazineContainer.Remove(mag);
|
_magazineContainer.Remove(mag);
|
||||||
if (_soundMagEject != null)
|
if (_soundMagEject != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundMagEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundMagEject, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.TryGetComponent(out HandsComponent? handsComponent))
|
if (user.TryGetComponent(out HandsComponent? handsComponent))
|
||||||
@@ -395,7 +391,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
|||||||
{
|
{
|
||||||
if (_soundMagInsert != null)
|
if (_soundMagInsert != null)
|
||||||
{
|
{
|
||||||
EntitySystem.Get<AudioSystem>().PlayAtCoords(_soundMagInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
SoundSystem.Play(Filter.Pvs(Owner), _soundMagInsert, Owner.Transform.Coordinates, AudioParams.Default.WithVolume(-2));
|
||||||
}
|
}
|
||||||
Owner.PopupMessage(eventArgs.User, Loc.GetString("Magazine inserted"));
|
Owner.PopupMessage(eventArgs.User, Loc.GetString("Magazine inserted"));
|
||||||
_magazineContainer.Insert(eventArgs.Using);
|
_magazineContainer.Insert(eventArgs.Using);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Server.GameObjects.Components.GUI;
|
using Content.Server.GameObjects.Components.GUI;
|
||||||
using Content.Server.GameObjects.Components.Mobs;
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
using Content.Server.GameObjects.Components.Weapon.Ranged.Barrels;
|
using Content.Server.GameObjects.Components.Weapon.Ranged.Barrels;
|
||||||
@@ -8,7 +8,6 @@ using Content.Shared.GameObjects.Components.Weapons.Ranged;
|
|||||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Content.Shared.Interfaces.GameObjects.Components;
|
using Content.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Server.GameObjects;
|
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
@@ -17,6 +16,7 @@ using Robust.Shared.Log;
|
|||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Network;
|
using Robust.Shared.Network;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Players;
|
using Robust.Shared.Players;
|
||||||
using Robust.Shared.Serialization.Manager.Attributes;
|
using Robust.Shared.Serialization.Manager.Attributes;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -151,12 +151,11 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged
|
|||||||
|
|
||||||
if (ClumsyCheck && ClumsyComponent.TryRollClumsy(user, ClumsyExplodeChance))
|
if (ClumsyCheck && ClumsyComponent.TryRollClumsy(user, ClumsyExplodeChance))
|
||||||
{
|
{
|
||||||
var soundSystem = EntitySystem.Get<AudioSystem>();
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Items/bikehorn.ogg",
|
||||||
soundSystem.PlayAtCoords("/Audio/Items/bikehorn.ogg",
|
Owner.Transform.Coordinates, AudioParams.Default.WithMaxDistance(5));
|
||||||
Owner.Transform.Coordinates, AudioParams.Default, 5);
|
|
||||||
|
|
||||||
soundSystem.PlayAtCoords("/Audio/Weapons/Guns/Gunshots/bang.ogg",
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Weapons/Guns/Gunshots/bang.ogg",
|
||||||
Owner.Transform.Coordinates, AudioParams.Default, 5);
|
Owner.Transform.Coordinates, AudioParams.Default.WithMaxDistance(5));
|
||||||
|
|
||||||
if (user.TryGetComponent(out IDamageableComponent? health))
|
if (user.TryGetComponent(out IDamageableComponent? health))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using Content.Server.Utility;
|
using Content.Server.Utility;
|
||||||
using Content.Shared.Audio;
|
using Content.Shared.Audio;
|
||||||
@@ -10,9 +10,11 @@ using Content.Server.GameObjects.Components.Destructible;
|
|||||||
using Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers;
|
using Content.Server.GameObjects.Components.Destructible.Thresholds.Triggers;
|
||||||
using Content.Shared.Utility;
|
using Content.Shared.Utility;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
@@ -129,8 +131,8 @@ namespace Content.Server.GameObjects.Components
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(eventArgs.Target), "/Audio/Effects/glass_knock.ogg",
|
||||||
.PlayAtCoords("/Audio/Effects/glass_knock.ogg", eventArgs.Target.Transform.Coordinates, AudioHelpers.WithVariation(0.05f));
|
eventArgs.Target.Transform.Coordinates, AudioHelpers.WithVariation(0.05f));
|
||||||
eventArgs.Target.PopupMessageEveryone(Loc.GetString("comp-window-knock"));
|
eventArgs.Target.PopupMessageEveryone(Loc.GetString("comp-window-knock"));
|
||||||
|
|
||||||
_lastKnockTime = _gameTiming.CurTime;
|
_lastKnockTime = _gameTiming.CurTime;
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ using Content.Shared.Utility;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Localization;
|
using Robust.Shared.Localization;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Serialization;
|
using Robust.Shared.Serialization;
|
||||||
@@ -448,7 +450,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_audioSystem.PlayFromEntity("/Audio/Effects/multitool_pulse.ogg", Owner);
|
SoundSystem.Play(Filter.Pvs(Owner), "/Audio/Effects/multitool_pulse.ogg", Owner);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,8 +500,7 @@ namespace Content.Server.GameObjects.Components
|
|||||||
else if (await tool.UseTool(eventArgs.User, Owner, 0.5f, ToolQuality.Screwing))
|
else if (await tool.UseTool(eventArgs.User, Owner, 0.5f, ToolQuality.Screwing))
|
||||||
{
|
{
|
||||||
IsPanelOpen = !IsPanelOpen;
|
IsPanelOpen = !IsPanelOpen;
|
||||||
EntitySystem.Get<AudioSystem>()
|
SoundSystem.Play(Filter.Pvs(Owner), IsPanelOpen ? "/Audio/Machines/screwdriveropen.ogg" : "/Audio/Machines/screwdriverclose.ogg",
|
||||||
.PlayFromEntity(IsPanelOpen ? "/Audio/Machines/screwdriveropen.ogg" : "/Audio/Machines/screwdriverclose.ogg",
|
|
||||||
Owner);
|
Owner);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
using Content.Shared.GameObjects.EntitySystems;
|
using Content.Shared.GameObjects.EntitySystems;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Player;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.EntitySystems.NewFolder
|
namespace Content.Server.GameObjects.EntitySystems.NewFolder
|
||||||
{
|
{
|
||||||
@@ -13,7 +14,7 @@ namespace Content.Server.GameObjects.EntitySystems.NewFolder
|
|||||||
base.OnReaction(reaction, owner, unitReactions);
|
base.OnReaction(reaction, owner, unitReactions);
|
||||||
|
|
||||||
if (reaction.Sound != null)
|
if (reaction.Sound != null)
|
||||||
Get<AudioSystem>().PlayAtCoords(reaction.Sound, owner.Transform.Coordinates);
|
SoundSystem.Play(Filter.Pvs(owner), reaction.Sound, owner.Transform.Coordinates);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.GameObjects.Components.Gravity;
|
using Content.Server.GameObjects.Components.Gravity;
|
||||||
using Content.Server.GameObjects.Components.Mobs;
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
@@ -7,10 +7,12 @@ using Content.Shared.GameObjects.EntitySystemMessages.Gravity;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Server.GameObjects;
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Map;
|
using Robust.Shared.Map;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Player;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects.EntitySystems
|
namespace Content.Server.GameObjects.EntitySystems
|
||||||
@@ -101,7 +103,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
{
|
{
|
||||||
if (player.AttachedEntity == null
|
if (player.AttachedEntity == null
|
||||||
|| player.AttachedEntity.Transform.GridID != gridId) continue;
|
|| player.AttachedEntity.Transform.GridID != gridId) continue;
|
||||||
Get<AudioSystem>().PlayFromEntity("/Audio/Effects/alert.ogg", player.AttachedEntity);
|
SoundSystem.Play(Filter.Pvs(player.AttachedEntity), "/Audio/Effects/alert.ogg", player.AttachedEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user