* First commit * Lockers * Lockers electric boogaloo * Crates and Lockers * Almost finishing the Textures folder * Updating texture paths. Reminder to fix: * Lockers * Windows * Vending Machines * APC * Catwalks * Bedsheets and Cloaks * Status effects * dont know what happened here * Commit before merge * re-organizing * Lockers broken * Commit before merge * Submodule * renaming * Fixing most issues * forgot these ones * Updating submodule * typo * Fixing some paths * fixing some paths * updating submodule * (hopefully) fixing the submodule
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Content.Shared.GameObjects.Components.PDA;
|
|
using Robust.Client.GameObjects.EntitySystems;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameObjects.Systems;
|
|
using Robust.Shared.Interfaces.Network;
|
|
using Robust.Shared.Players;
|
|
|
|
namespace Content.Client.GameObjects.Components.PDA
|
|
{
|
|
[RegisterComponent]
|
|
public class PDAComponent : SharedPDAComponent
|
|
{
|
|
public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession session = null)
|
|
{
|
|
base.HandleNetworkMessage(message, netChannel, session);
|
|
switch(message)
|
|
{
|
|
case PDAUplinkBuySuccessMessage _ :
|
|
EntitySystem.Get<AudioSystem>().Play("/Audio/Effects/kaching.ogg", Owner, AudioParams.Default.WithVolume(-2f));
|
|
break;
|
|
|
|
case PDAUplinkInsufficientFundsMessage _ :
|
|
EntitySystem.Get<AudioSystem>().Play("/Audio/Effects/error.ogg", Owner, AudioParams.Default);
|
|
break;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|