mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
Minor cult audio tweaks (#4213)
* Replace colossus briefing sound * Voice override for cult armor * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Why do I keep forgetting those --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci[bot]
parent
430d895f70
commit
274ada2996
@@ -31,6 +31,7 @@ public sealed class VocalSystem : EntitySystem
|
||||
SubscribeLocalEvent<VocalComponent, SexChangedEvent>(OnSexChanged);
|
||||
SubscribeLocalEvent<VocalComponent, EmoteEvent>(OnEmote);
|
||||
SubscribeLocalEvent<VocalComponent, ScreamActionEvent>(OnScreamAction);
|
||||
SubscribeLocalEvent<VocalComponent, SoundsChangedEvent>(OnSoundsChanged); // DeltaV - support for changing vocal sounds on the go. Why it wasn't there in the first place is beyond me.
|
||||
}
|
||||
|
||||
private void OnMapInit(EntityUid uid, VocalComponent component, MapInitEvent args)
|
||||
@@ -54,6 +55,13 @@ public sealed class VocalSystem : EntitySystem
|
||||
LoadSounds(uid, component, args.NewSex);
|
||||
}
|
||||
|
||||
// Begin DeltaV additions
|
||||
private void OnSoundsChanged(EntityUid uid, VocalComponent component, ref SoundsChangedEvent args)
|
||||
{
|
||||
LoadSounds(uid, component);
|
||||
}
|
||||
// End DeltaV additions
|
||||
|
||||
private void OnEmote(EntityUid uid, VocalComponent component, ref EmoteEvent args)
|
||||
{
|
||||
if (args.Handled || !args.Emote.Category.HasFlag(EmoteCategory.Vocal))
|
||||
|
||||
@@ -18,6 +18,7 @@ using Content.Shared.Eye;
|
||||
using Content.Shared.Hands;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Speech.Components;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
@@ -78,8 +79,8 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
||||
SubscribeLocalEvent<CosmicCultLeadComponent, ComponentInit>(OnStartCultLead);
|
||||
SubscribeLocalEvent<CosmicCultComponent, GetVisMaskEvent>(OnGetVisMask);
|
||||
|
||||
SubscribeLocalEvent<CosmicEquipmentComponent, GotEquippedEvent>(OnGotEquipped);
|
||||
SubscribeLocalEvent<CosmicEquipmentComponent, GotUnequippedEvent>(OnGotUnequipped);
|
||||
SubscribeLocalEvent<CosmicEquipmentComponent, GotEquippedEvent>(OnGotCosmicItemEquipped);
|
||||
SubscribeLocalEvent<CosmicEquipmentComponent, GotUnequippedEvent>(OnGotCosmicItemUnequipped);
|
||||
SubscribeLocalEvent<CosmicEquipmentComponent, GotEquippedHandEvent>(OnGotHeld);
|
||||
SubscribeLocalEvent<CosmicEquipmentComponent, GotUnequippedHandEvent>(OnGotUnheld);
|
||||
|
||||
@@ -98,6 +99,9 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
||||
SubscribeLocalEvent<RadioSendAttemptEvent>(OnRadioSendAttempt);
|
||||
SubscribeLocalEvent<CosmicJammerComponent, AnchorStateChangedEvent>(OnJammerAnchorStateChange);
|
||||
|
||||
SubscribeLocalEvent<SpeechOverrideComponent, GotEquippedEvent>(OnGotSpeechOverrideEquipped);
|
||||
SubscribeLocalEvent<SpeechOverrideComponent, GotUnequippedEvent>(OnGotSpeechOverrideUnequipped);
|
||||
|
||||
SubscribeFinale(); //Hook up the cosmic cult finale system
|
||||
}
|
||||
|
||||
@@ -170,7 +174,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
||||
#endregion
|
||||
|
||||
#region Equipment Pickup
|
||||
private void OnGotEquipped(Entity<CosmicEquipmentComponent> ent, ref GotEquippedEvent args)
|
||||
private void OnGotCosmicItemEquipped(Entity<CosmicEquipmentComponent> ent, ref GotEquippedEvent args)
|
||||
{
|
||||
if (!EntityIsCultist(args.Equipee))
|
||||
{
|
||||
@@ -179,7 +183,7 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGotUnequipped(Entity<CosmicEquipmentComponent> ent, ref GotUnequippedEvent args)
|
||||
private void OnGotCosmicItemUnequipped(Entity<CosmicEquipmentComponent> ent, ref GotUnequippedEvent args)
|
||||
{
|
||||
if (!EntityIsCultist(args.Equipee))
|
||||
_statusEffects.TryRemoveStatusEffect(args.Equipee, EntropicDegen);
|
||||
@@ -199,6 +203,24 @@ public sealed partial class CosmicCultSystem : SharedCosmicCultSystem
|
||||
if (!EntityIsCultist(args.User))
|
||||
_statusEffects.TryRemoveStatusEffect(args.User, EntropicDegen);
|
||||
}
|
||||
|
||||
private void OnGotSpeechOverrideEquipped(Entity<SpeechOverrideComponent> ent, ref GotEquippedEvent args)
|
||||
{
|
||||
if (ent.Comp.OverrideIDs is not { } overrides || !TryComp<VocalComponent>(args.Equipee, out var vocalComp)) return;
|
||||
ent.Comp.StoredIDs = vocalComp.Sounds;
|
||||
vocalComp.Sounds = overrides;
|
||||
var ev = new SoundsChangedEvent();
|
||||
RaiseLocalEvent(args.Equipee, ref ev);
|
||||
}
|
||||
|
||||
private void OnGotSpeechOverrideUnequipped(Entity<SpeechOverrideComponent> ent, ref GotUnequippedEvent args)
|
||||
{
|
||||
if (ent.Comp.StoredIDs is not { } stored || !TryComp<VocalComponent>(args.Equipee, out var vocalComp)) return;
|
||||
ent.Comp.StoredIDs = null;
|
||||
vocalComp.Sounds = stored;
|
||||
var ev = new SoundsChangedEvent();
|
||||
RaiseLocalEvent(args.Equipee, ref ev);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Movespeed
|
||||
|
||||
@@ -6,6 +6,7 @@ using Content.Server.Popups;
|
||||
using Content.Shared._DV.CosmicCult.Components;
|
||||
using Content.Shared.Mind;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Timing;
|
||||
@@ -30,6 +31,7 @@ public sealed class CosmicChantrySystem : EntitySystem
|
||||
/// Mind role to add to colossi.
|
||||
/// </summary>
|
||||
public static readonly EntProtoId MindRole = "MindRoleCosmicColossus";
|
||||
private readonly SoundSpecifier _briefingSound = new SoundPathSpecifier("/Audio/_DV/CosmicCult/antag_cosmic_AI_briefing.ogg");
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -61,7 +63,7 @@ public sealed class CosmicChantrySystem : EntitySystem
|
||||
_mind.TransferTo(mindEnt, colossus);
|
||||
_mind.TryAddObjective(mindEnt, mind, "CosmicFinalityObjective");
|
||||
_role.MindAddRole(mindEnt, MindRole, mind, true);
|
||||
_antag.SendBriefing(colossus, Loc.GetString("cosmiccult-silicon-colossus-briefing"), Color.FromHex("#4cabb3"), null);
|
||||
_antag.SendBriefing(colossus, Loc.GetString("cosmiccult-silicon-colossus-briefing"), Color.FromHex("#4cabb3"), _briefingSound);
|
||||
Spawn(comp.SpawnVFX, tgtpos);
|
||||
QueueDel(comp.InternalVictim);
|
||||
QueueDel(uid);
|
||||
|
||||
@@ -51,3 +51,9 @@ public sealed partial class VocalComponent : Component
|
||||
[AutoNetworkedField]
|
||||
public EmoteSoundsPrototype? EmoteSounds = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DeltaV: raised when the component's Sounds field changes.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct SoundsChangedEvent();
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using Content.Shared.Chat.Prototypes;
|
||||
using Content.Shared.Humanoid;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||
|
||||
namespace Content.Shared._DV.CosmicCult.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Component for overriding an entity's vocal sounds through equipment.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class SpeechOverrideComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Sounds to assign to the entity equipping this item.
|
||||
/// </summary>
|
||||
[DataField(customTypeSerializer: typeof(PrototypeIdValueDictionarySerializer<Sex, EmoteSoundsPrototype>))]
|
||||
[AutoNetworkedField]
|
||||
public Dictionary<Sex, string>? OverrideIDs = null;
|
||||
|
||||
/// <summary>
|
||||
/// Entity's original sounds to use when the item is unequipped.
|
||||
/// </summary>
|
||||
[DataField(customTypeSerializer: typeof(PrototypeIdValueDictionarySerializer<Sex, EmoteSoundsPrototype>))]
|
||||
[AutoNetworkedField]
|
||||
public Dictionary<Sex, string>? StoredIDs = null;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
- files:
|
||||
- cosmic_laugh.ogg
|
||||
- cosmic_scream.ogg
|
||||
- cosmic_crying.ogg
|
||||
- colossus_laugh.ogg
|
||||
license: "CC-BY-SA-3.0"
|
||||
copyright: "By NoElkaTheGod(GitHub) for Cosmic Cult. Made using a combination of (Creative Commons 0) samples from freesound.org."
|
||||
source: "https://freesound.org/"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -84,8 +84,6 @@
|
||||
- type: BatterySelfRecharger
|
||||
autoRecharge: true
|
||||
autoRechargeRate: 5
|
||||
- type: TypingIndicatorClothing
|
||||
proto: CosmicTyping
|
||||
|
||||
# COSMIC CULT HARDSUIT HELMET
|
||||
- type: entity
|
||||
@@ -112,3 +110,10 @@
|
||||
Piercing: 0.90
|
||||
Heat: 0.90
|
||||
- type: EyeProtection
|
||||
- type: TypingIndicatorClothing
|
||||
proto: CosmicTyping
|
||||
- type: SpeechOverride
|
||||
overrideIDs:
|
||||
Male: CosmicEmotesMale
|
||||
Female: CosmicEmotesFemale
|
||||
Unsexed: CosmicEmotesMale # Humans use male soudns for unsexed so here we are.
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
briefing:
|
||||
text: ghost-role-colossus-briefing
|
||||
color: CadetBlue
|
||||
sound: /Audio/_DV/CosmicCult/antag_cosmic_briefing.ogg
|
||||
sound: /Audio/_DV/CosmicCult/antag_cosmic_AI_briefing.ogg
|
||||
components:
|
||||
- type: CosmicColossus
|
||||
timed: true
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
- type: emoteSounds
|
||||
id: CosmicEmotesMale
|
||||
params:
|
||||
variation: 0.125
|
||||
sounds:
|
||||
Scream:
|
||||
path: /Audio/_DV/CosmicCult/Emotes/cosmic_scream.ogg
|
||||
Laugh:
|
||||
path: /Audio/_DV/CosmicCult/Emotes/cosmic_laugh.ogg
|
||||
Crying:
|
||||
path: /Audio/_DV/CosmicCult/Emotes/cosmic_crying.ogg # The urge to use minecraft ghast sounds
|
||||
Cough:
|
||||
collection: MaleCoughs
|
||||
Yawn:
|
||||
collection: MaleYawn
|
||||
Sigh:
|
||||
collection: MaleSigh
|
||||
Whistle:
|
||||
collection: TrenchWhistle # Kinda creepy, I think it fits well
|
||||
Snore:
|
||||
collection: Snores
|
||||
Weh:
|
||||
collection: Weh
|
||||
Hew:
|
||||
collection: Hew
|
||||
Honk:
|
||||
collection: BikeHorn
|
||||
|
||||
- type: emoteSounds
|
||||
id: CosmicEmotesFemale
|
||||
params:
|
||||
variation: 0.125
|
||||
sounds:
|
||||
Scream:
|
||||
path: /Audio/_DV/CosmicCult/Emotes/cosmic_scream.ogg
|
||||
Laugh:
|
||||
path: /Audio/_DV/CosmicCult/Emotes/cosmic_laugh.ogg
|
||||
Crying:
|
||||
path: /Audio/_DV/CosmicCult/Emotes/cosmic_crying.ogg
|
||||
Cough:
|
||||
collection: FemaleCoughs
|
||||
Yawn:
|
||||
collection: FemaleYawn
|
||||
Sigh:
|
||||
collection: FemaleSigh
|
||||
Whistle:
|
||||
collection: TrenchWhistle
|
||||
Snore:
|
||||
collection: Snores
|
||||
Weh:
|
||||
collection: Weh
|
||||
Hew:
|
||||
collection: Hew
|
||||
Honk:
|
||||
collection: BikeHorn
|
||||
Reference in New Issue
Block a user