diff --git a/Content.Shared/Sound/SharedEmitSoundSystem.cs b/Content.Shared/Sound/SharedEmitSoundSystem.cs index c4c0ae507a..098a85f74d 100644 --- a/Content.Shared/Sound/SharedEmitSoundSystem.cs +++ b/Content.Shared/Sound/SharedEmitSoundSystem.cs @@ -6,6 +6,7 @@ using Content.Shared.Popups; using Content.Shared.Sound.Components; using Content.Shared.Throwing; using Content.Shared.White.EndOfRoundStats.EmitSoundStatSystem; +using Content.Shared.White.Sounds; using JetBrains.Annotations; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; @@ -43,6 +44,9 @@ public abstract class SharedEmitSoundSystem : EntitySystem SubscribeLocalEvent(OnEmitSoundOnPickup); SubscribeLocalEvent(OnEmitSoundOnDrop); + // WD edit + SubscribeLocalEvent(EmitSoundOnGotRemoved); + SubscribeLocalEvent(OnEmitSoundUnpaused); SubscribeLocalEvent(OnEmitSoundOnCollide); } @@ -99,6 +103,12 @@ public abstract class SharedEmitSoundSystem : EntitySystem TryEmitSound(uid, component, args.User); } + // WD edit + private void EmitSoundOnGotRemoved(EntityUid uid, EmitSoundOnPickupComponent component, GotRemovedEvent args) + { + TryEmitSound(uid, component, args.User, false); + } + private void OnEmitSoundOnDrop(EntityUid uid, EmitSoundOnDropComponent component, DroppedEvent args) { TryEmitSound(uid, component, args.User); @@ -120,7 +130,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem } if (_netMan.IsServer) - RaiseLocalEvent(new EmitSoundStatEvent(component.Owner, component.Sound)); + RaiseLocalEvent(new EmitSoundStatEvent(uid, component.Sound)); } private void OnEmitSoundUnpaused(EntityUid uid, EmitSoundOnCollideComponent component, ref EntityUnpausedEvent args) diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index 17eb30ad50..9f91412505 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -17,6 +17,7 @@ using Content.Shared.Stacks; using Content.Shared.Storage.Components; using Content.Shared.Timing; using Content.Shared.Verbs; +using Content.Shared.White.Sounds; using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; using Robust.Shared.Map; @@ -389,6 +390,13 @@ public abstract class SharedStorageSystem : EntitySystem && storageComp.StorageRemoveSound != null) Audio.PlayPredicted(storageComp.StorageRemoveSound, uid, player); { + // WD edit + if (hands.ActiveHand != null) + { + var gotRemoved = new GotRemovedEvent(player, entity, hands.ActiveHand); + RaiseLocalEvent(entity, gotRemoved, false); + } + return; } } diff --git a/Content.Shared/White/Sounds/GotRemovedEvent.cs b/Content.Shared/White/Sounds/GotRemovedEvent.cs new file mode 100644 index 0000000000..6a0cfcc996 --- /dev/null +++ b/Content.Shared/White/Sounds/GotRemovedEvent.cs @@ -0,0 +1,10 @@ +using Content.Shared.Hands; +using Content.Shared.Hands.Components; + +namespace Content.Shared.White.Sounds; + + +public sealed class GotRemovedEvent : EquippedHandEvent +{ + public GotRemovedEvent(EntityUid user, EntityUid unequipped, Hand hand) : base(user, unequipped, hand) { } +} diff --git a/Resources/Audio/White/Web/attack.ogg b/Resources/Audio/White/Web/attack.ogg new file mode 100644 index 0000000000..9ce1c36100 Binary files /dev/null and b/Resources/Audio/White/Web/attack.ogg differ diff --git a/Resources/Audio/White/Web/walk1.ogg b/Resources/Audio/White/Web/walk1.ogg new file mode 100644 index 0000000000..eab26b0cbb Binary files /dev/null and b/Resources/Audio/White/Web/walk1.ogg differ diff --git a/Resources/Audio/White/Web/walk2.ogg b/Resources/Audio/White/Web/walk2.ogg new file mode 100644 index 0000000000..94456c175a Binary files /dev/null and b/Resources/Audio/White/Web/walk2.ogg differ diff --git a/Resources/Audio/White/Web/walk3.ogg b/Resources/Audio/White/Web/walk3.ogg new file mode 100644 index 0000000000..777b25d07f Binary files /dev/null and b/Resources/Audio/White/Web/walk3.ogg differ diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml index dca5f2c5d3..a5cafa4b8d 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml @@ -49,7 +49,7 @@ - type: Tag tags: - Trash - - type: SpaceGarbage +# - type: SpaceGarbage # WD edit - type: Damageable damageContainer: Inorganic damageModifierSet: Glass diff --git a/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml b/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml index af65ac95a8..bceaf459bd 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml @@ -11,7 +11,12 @@ soundGroups: Brute: path: - "/Audio/Weapons/slash.ogg" + "/Audio/White/Web/attack.ogg" # WD edit start + - type: FootstepModifier + footstepSoundCollection: + collection: FootstepWeb + params: + volume: 1 # WD edit end - type: Sprite sprite: Objects/Misc/spiderweb.rsi layers: @@ -40,9 +45,15 @@ layer: - MidImpassable - type: Damageable - damageModifierSet: Wood + damageModifierSet: Web - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 10 diff --git a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml index f60bc74a0e..14c129df8a 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/MaterialDoors/material_doors.yml @@ -221,18 +221,26 @@ thresholds: - trigger: !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. # WD edit start + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger # WD edit end damage: 50 behaviors: - !type:DoActsBehavior acts: ["Destruction"] - - !type:PlaySoundBehavior - sound: - path: /Audio/Effects/woodhit.ogg - !type:SpawnEntitiesBehavior spawn: MaterialWebSilk: min: 3 max: 5 + - type: MeleeSound # WD edit start + soundGroups: + Brute: + path: + "/Audio/Weapons/slash.ogg" # WD edit end - type: Damageable damageModifierSet: Web - type: Door diff --git a/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml b/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml index d3252824f9..bbddd134fc 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/Tables/tables.yml @@ -31,7 +31,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 25 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -88,7 +88,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -172,7 +172,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 125 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -210,7 +210,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 150 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -263,7 +263,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 25 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -309,7 +309,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 300 # WD edit behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. - !type:DoActsBehavior acts: [ "Destruction" ] @@ -358,7 +358,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 250 + damage: 300 # WD edit behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. - !type:DoActsBehavior acts: [ "Destruction" ] @@ -401,7 +401,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 300 # WD edit behaviors: #excess damage (nuke?). avoid computational cost of spawning entities. - !type:DoActsBehavior acts: [ "Destruction" ] @@ -500,12 +500,23 @@ sprite: Structures/Furniture/Tables/web.rsi - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 50 behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] + - !type:SpawnEntitiesBehavior + spawn: + MaterialWebSilk: + min: 1 + max: 2 - type: MeleeSound soundGroups: Brute: @@ -558,7 +569,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 100 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -572,7 +583,7 @@ - !type:SpawnEntitiesBehavior spawn: MaterialWoodPlank1: - min: 0 + min: 1 max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] @@ -598,7 +609,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 125 + damage: 300 # WD edit behaviors: - !type:DoActsBehavior acts: [ "Destruction" ] @@ -614,7 +625,7 @@ - !type:SpawnEntitiesBehavior spawn: SheetSteel1: - min: 0 + min: 1 max: 1 - !type:DoActsBehavior acts: [ "Destruction" ] diff --git a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml index 1e01d55654..14bd8b4ade 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml @@ -138,18 +138,29 @@ thresholds: - trigger: !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. # WD edit start + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger # WD edit end damage: 50 behaviors: - !type:DoActsBehavior acts: ["Destruction"] - - !type:PlaySoundBehavior - sound: - path: /Audio/Effects/woodhit.ogg +# - !type:PlaySoundBehavior WD edit - govno +# sound: +# path: /Audio/Effects/woodhit.ogg - !type:SpawnEntitiesBehavior spawn: MaterialWebSilk: - min: 1 - max: 1 + min: 3 # WD edit start + max: 4 + - type: MeleeSound + soundGroups: + Brute: + path: + "/Audio/Weapons/slash.ogg" # WD edit end - type: Construction graph: WebStructures node: bed diff --git a/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml b/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml index 7460c52080..948b64a795 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/chairs.yml @@ -291,18 +291,21 @@ thresholds: - trigger: !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. # WD edit start + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger # WD edit end damage: 50 behaviors: - !type:DoActsBehavior acts: ["Destruction"] - - !type:PlaySoundBehavior - sound: - path: /Audio/Effects/woodhit.ogg - !type:SpawnEntitiesBehavior spawn: MaterialWebSilk: min: 1 - max: 1 + max: 2 - type: Construction graph: WebStructures node: chair diff --git a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml index 16792b0be3..47f6a163bb 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Crates/crates.yml @@ -145,18 +145,26 @@ thresholds: - trigger: !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. # WD edit start + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] + - trigger: + !type:DamageTrigger # WD edit end damage: 50 behaviors: - !type:DoActsBehavior acts: ["Destruction"] - - !type:PlaySoundBehavior - sound: - path: /Audio/Effects/woodhit.ogg - !type:SpawnEntitiesBehavior spawn: MaterialWebSilk: min: 3 max: 5 + - type: MeleeSound # WD edit start + soundGroups: + Brute: + path: + "/Audio/Weapons/slash.ogg" # WD edit end - type: EntityStorage closeSound: path: /Audio/Effects/rustle1.ogg diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 47c3e94e21..7685a12f3c 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -526,6 +526,11 @@ node: girder - !type:DoActsBehavior acts: ["Destruction"] + - !type:SpawnEntitiesBehavior # WD edit start + spawn: + SheetPlasteel1: + min: 1 + max: 2 # WD edit end destroySound: path: /Audio/Effects/metalbreak.ogg - type: IconSmooth @@ -816,6 +821,11 @@ path: /Audio/Effects/metalbreak.ogg - !type:ChangeConstructionNodeBehavior node: girder + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 1 + max: 2 - !type:DoActsBehavior acts: ["Destruction"] destroySound: @@ -870,7 +880,7 @@ acts: ["Destruction"] - trigger: !type:DamageTrigger - damage: 200 + damage: 100 behaviors: - !type:PlaySoundBehavior sound: @@ -879,6 +889,11 @@ node: girder - !type:DoActsBehavior acts: ["Destruction"] + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 1 + max: 1 destroySound: path: /Audio/Effects/metalbreak.ogg - type: IconSmooth @@ -985,6 +1000,12 @@ sprite: Structures/Walls/web.rsi - type: Destructible thresholds: + - trigger: + !type:DamageTrigger + damage: 300 #excess damage (nuke?). avoid computational cost of spawning entities. + behaviors: + - !type:DoActsBehavior + acts: [ "Destruction" ] - trigger: !type:DamageTrigger damage: 30 @@ -994,8 +1015,8 @@ - !type:SpawnEntitiesBehavior spawn: MaterialWebSilk: - min: 1 - max: 1 + min: 2 + max: 3 - !type:PlaySoundBehavior sound: path: /Audio/Effects/woodhit.ogg diff --git a/Resources/Prototypes/White/SoundCollections/web.yml b/Resources/Prototypes/White/SoundCollections/web.yml new file mode 100644 index 0000000000..9109026a77 --- /dev/null +++ b/Resources/Prototypes/White/SoundCollections/web.yml @@ -0,0 +1,6 @@ +- type: soundCollection + id: FootstepWeb + files: + - /Audio/White/Web/walk1.ogg + - /Audio/White/Web/walk2.ogg + - /Audio/White/Web/walk3.ogg