forked from DeltaV-Station/Delta-v
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR DeltaV-Station#37 by Tetronamecronicus (MaxWell)
MaxWellCM
- Loading branch information
Showing
16 changed files
with
175 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
//AudioParams auSt = new AudioParams(); | ||
//auSt.Loop = true; | ||
//AudioComponent audi = _audio.SetupAudio(uid, audiCom.fileName, auSt); | ||
//audi.StartPlaying(); | ||
using Robust.Shared.Audio.Systems; | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.Audio.Components; | ||
using Content.Shared.Interaction; | ||
using Robust.Shared.Audio.Effects; | ||
using Content.Shared.Stray.AudioLoop; | ||
using JetBrains.Annotations; | ||
using Content.Shared.Interaction; | ||
using Content.Shared.Interaction.Events; | ||
|
||
|
||
|
||
namespace Content.Server.Stray.AudioLoop; | ||
|
||
[UsedImplicitly] | ||
public sealed class DiceSystem : SharedAudioLoopSystem | ||
{ | ||
[Dependency] private readonly SharedAudioSystem _audio = default!; | ||
|
||
|
||
public override void ActToggle(EntityUid uid, AudioLoopComponent audiCom, UseInHandEvent args){ | ||
audiCom.act = !audiCom.act; | ||
|
||
if(audiCom.act==false){ | ||
_audio.Stop(audiCom.ent, audiCom.auC); | ||
}else{ | ||
(EntityUid Entity, AudioComponent Component)? res = _audio.PlayPvs(audiCom.sound, uid, new AudioParams(0, 1, SharedAudioSystem.DefaultSoundRange, 3, 1, true, 0f)); | ||
if(res!=null){ | ||
audiCom.ent = res.Value.Entity; | ||
audiCom.auC = res.Value.Component; | ||
} | ||
} | ||
} | ||
|
||
//public override void OnSpawn(EntityUid uid, AudioLoopComponent audiCom, MapInitEvent args){ | ||
// //AudioParams auSt = new(0, 1, SharedAudioSystem.DefaultSoundRange, 1, 1, true, 0f);//new AudioParams(); | ||
// //auSt.Loop = true; | ||
// //auSt.RolloffFactor = 1; | ||
// ////source.RolloffFactor = audioParams.RolloffFactor; | ||
// //auSt.MaxDistance = 15; | ||
// //auSt.ReferenceDistance = 1; | ||
// //AudioComponent audi = _audio.SetupAudio(uid, audiCom.fileName, auSt); | ||
// //audi.StartPlaying(); | ||
// (EntityUid Entity, AudioComponent Component)? res = _audio.PlayPvs(audiCom.sound, uid, new AudioParams(0, 1, SharedAudioSystem.DefaultSoundRange, 1, 1, true, 0f)); | ||
// if(res!=null){ | ||
// audiCom.ent = res.Value.Entity; | ||
// audiCom.auC = res.Value.Component; | ||
// } | ||
//} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//Audio/Items/drill_use.ogg | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Numerics; | ||
using Robust.Shared.Audio.Effects; | ||
using Robust.Shared.Audio.Sources; | ||
using Robust.Shared.Audio.Systems; | ||
using Robust.Shared.GameObjects; | ||
using Content.Shared.Stray.AudioLoop; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.Audio.Components; | ||
using Robust.Shared.Serialization; | ||
using Robust.Shared.Serialization.Manager.Attributes; | ||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; | ||
using Robust.Shared.ViewVariables; | ||
|
||
namespace Content.Shared.Stray.AudioLoop; | ||
|
||
/// <summary> | ||
/// Stores the audio data for an audio entity. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), Access(typeof(SharedAudioLoopSystem))] | ||
public sealed partial class AudioLoopComponent : Component | ||
{ | ||
[DataField("sound",required: true)] | ||
public SoundSpecifier sound { get; private set; } | ||
public EntityUid ent; | ||
public AudioComponent auC; | ||
[AutoNetworkedField] | ||
public bool act = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Robust.Shared.Audio.Components; | ||
using Robust.Shared.Audio; | ||
using Robust.Shared.Audio.Systems; | ||
using Content.Shared.Interaction; | ||
using Robust.Shared.Audio.Effects; | ||
using Robust.Shared.GameObjects; | ||
using Content.Shared.Interaction; | ||
using Content.Shared.Interaction.Events; | ||
|
||
namespace Content.Shared.Stray.AudioLoop; | ||
|
||
public abstract partial class SharedAudioLoopSystem : EntitySystem | ||
{ | ||
|
||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
//_audio. | ||
//InitializeEffect(); | ||
//ZOffset = CfgManager.GetCVar(CVars.AudioZOffset); | ||
//Subs.CVar(CfgManager, CVars.AudioZOffset, SetZOffset); | ||
//SubscribeLocalEvent<AudioComponent, ComponentGetStateAttemptEvent>(OnAudioGetStateAttempt); | ||
//SubscribeLocalEvent<AudioLoopComponent, MapInitEvent>(OnSpawn); | ||
SubscribeLocalEvent<AudioLoopComponent, UseInHandEvent>(ActToggle); | ||
} | ||
//(EntityUid uid, string? fileName, AudioParams? audioParams, TimeSpan? length = null) | ||
//public virtual void OnSpawn(EntityUid uid, AudioLoopComponent audiCom, MapInitEvent args){ | ||
// | ||
//} | ||
|
||
public virtual void ActToggle(EntityUid uid, AudioLoopComponent audiCom, UseInHandEvent args){ | ||
|
||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- type: entity | ||
parent: BasePlushie | ||
id: ToyMaxwell | ||
name: Максвелл | ||
description: "Игрушка Максвелла. По неизвестной причине постоянно крутится и издаёт музыку" | ||
components: | ||
- type: Sprite | ||
sprite: Stray/Objects/Fun/toys.rsi | ||
state: maxwell | ||
- type: AudioLoop | ||
sound: | ||
path: /Audio/Stray/Fun/maxwell-the-cat-theme.ogg | ||
#- type: EmitSoundOnSpawn | ||
# sound: | ||
# path: /Audio/Weapons/Guns/Gunshots/rocket_launcher.ogg |
Binary file modified
BIN
-92 Bytes
(88%)
Resources/Textures/SimpleStation14/Mobs/Ghosts/ghost.rsi/BioMass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+654 Bytes
Resources/Textures/SimpleStation14/Mobs/Ghosts/ghost_admin.rsi/Kotovasu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"version": 1, | ||
"license": "CC-BY-SA-3.0", | ||
"copyright": "Made for DeltaV-Stray by boctonskuitea", | ||
"size": { | ||
"x": 32, | ||
"y": 32 | ||
}, | ||
"states": [ | ||
{ | ||
"name": "maxwell", | ||
"delays": [ | ||
[ | ||
0.1, | ||
0.1, | ||
0.1, | ||
0.1, | ||
0.1, | ||
0.1, | ||
0.1, | ||
0.1 | ||
] | ||
] | ||
} | ||
] | ||
} |