]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Give monkeys clumsy (#16320)
authorKara <lunarautomaton6@gmail.com>
Thu, 11 May 2023 00:27:47 +0000 (17:27 -0700)
committerGitHub <noreply@github.com>
Thu, 11 May 2023 00:27:47 +0000 (10:27 +1000)
Content.Server/Weapons/Ranged/Systems/GunSystem.cs
Content.Shared/Interaction/Components/ClumsyComponent.cs
Resources/Prototypes/Entities/Mobs/NPCs/animals.yml

index 72a85776ed73715b5aa483690d7103ff12f48a88..995c1ffbc6b4938e4168356aa0156aef183f09ab 100644 (file)
@@ -83,7 +83,7 @@ public sealed partial class GunSystem : SharedGunSystem
 
                     // Apply salt to the wound ("Honk!")
                     Audio.PlayPvs(new SoundPathSpecifier("/Audio/Weapons/Guns/Gunshots/bang.ogg"), gunUid);
-                    Audio.PlayPvs(new SoundPathSpecifier("/Audio/Items/bikehorn.ogg"), gunUid);
+                    Audio.PlayPvs(clumsy.ClumsySound, gunUid);
 
                     PopupSystem.PopupEntity(Loc.GetString("gun-clumsy"), user.Value);
                     _adminLogger.Add(LogType.EntityDelete, LogImpact.Medium, $"Clumsy fire by {ToPrettyString(user.Value)} deleted {ToPrettyString(gunUid)}");
index 6938187f46cdd1db0918adabb39e92c295aee0de..2acbdeaf68d82adbb3a91ca9ba7a053509b8eb94 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Shared.Damage;
+using Robust.Shared.Audio;
 
 namespace Content.Shared.Interaction.Components
 {
@@ -11,5 +12,11 @@ namespace Content.Shared.Interaction.Components
         [DataField("clumsyDamage", required: true)]
         [ViewVariables(VVAccess.ReadWrite)]
         public DamageSpecifier ClumsyDamage = default!;
+
+        /// <summary>
+        ///     Sound to play when clumsy interactions fail
+        /// </summary>
+        [DataField("clumsySound")]
+        public SoundSpecifier ClumsySound = new SoundPathSpecifier("/Audio/Items/bikehorn.ogg");
     }
 }
index d2d3f14b73a6c7df666aed7f4ce56442a0b1c284..0fe5bca505047e4dc8d766fb182630bae0f1eb42 100644 (file)
     name: ghost-role-information-monkey-name
     description: ghost-role-information-monkey-description
   - type: GhostTakeoverAvailable
+  - type: Clumsy
+    clumsyDamage:
+      types:
+        Blunt: 5
+        Piercing: 4
+      groups:
+        Burn: 3
+    clumsySound:
+      path: /Audio/Animals/monkey_scream.ogg
 
 - type: entity
   name: guidebook monkey