]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Bread dog (#22548)
authorEd <96445749+TheShuEd@users.noreply.github.com>
Sat, 16 Dec 2023 08:30:20 +0000 (11:30 +0300)
committerGitHub <noreply@github.com>
Sat, 16 Dec 2023 08:30:20 +0000 (01:30 -0700)
* add content

* add new bark accent

13 files changed:
Content.Server/Speech/Components/BarkAccentComponent.cs [new file with mode: 0644]
Content.Server/Speech/EntitySystems/BarkAccentSystem.cs [new file with mode: 0644]
Resources/Audio/Animals/attributions.yml
Resources/Audio/Animals/dog_bark1.ogg [new file with mode: 0644]
Resources/Audio/Animals/dog_bark2.ogg [new file with mode: 0644]
Resources/Audio/Animals/dog_bark3.ogg [new file with mode: 0644]
Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl
Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/bread.yml
Resources/Prototypes/Recipes/Cooking/meal_recipes.yml
Resources/Prototypes/Voice/speech_sounds.yml
Resources/Textures/Mobs/Pets/breaddog.rsi/base.png [new file with mode: 0644]
Resources/Textures/Mobs/Pets/breaddog.rsi/dead.png [new file with mode: 0644]
Resources/Textures/Mobs/Pets/breaddog.rsi/meta.json [new file with mode: 0644]

diff --git a/Content.Server/Speech/Components/BarkAccentComponent.cs b/Content.Server/Speech/Components/BarkAccentComponent.cs
new file mode 100644 (file)
index 0000000..2e9aef2
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Content.Server.Speech.Components
+{
+    [RegisterComponent]
+    public sealed partial class BarkAccentComponent : Component
+    {
+    }
+}
diff --git a/Content.Server/Speech/EntitySystems/BarkAccentSystem.cs b/Content.Server/Speech/EntitySystems/BarkAccentSystem.cs
new file mode 100644 (file)
index 0000000..a6e5b68
--- /dev/null
@@ -0,0 +1,43 @@
+using Content.Server.Speech.Components;
+using Robust.Shared.Random;
+
+namespace Content.Server.Speech.EntitySystems
+{
+    public sealed class BarkAccentSystem : EntitySystem
+    {
+        [Dependency] private readonly IRobustRandom _random = default!;
+
+        private static readonly IReadOnlyList<string> Barks = new List<string>{
+            " Woof!", " WOOF", " wof-wof"
+        }.AsReadOnly();
+
+        private static readonly IReadOnlyDictionary<string, string> SpecialWords = new Dictionary<string, string>()
+        {
+            { "ah", "arf" },
+            { "Ah", "Arf" },
+            { "oh", "oof" },
+            { "Oh", "Oof" },
+        };
+
+        public override void Initialize()
+        {
+            SubscribeLocalEvent<BarkAccentComponent, AccentGetEvent>(OnAccent);
+        }
+
+        public string Accentuate(string message)
+        {
+            foreach (var (word, repl) in SpecialWords)
+            {
+                message = message.Replace(word, repl);
+            }
+
+            return message.Replace("!", _random.Pick(Barks))
+                .Replace("l", "r").Replace("L", "R");
+        }
+
+        private void OnAccent(EntityUid uid, BarkAccentComponent component, AccentGetEvent args)
+        {
+            args.Message = Accentuate(args.Message);
+        }
+    }
+}
index 180502850fdf8c26d60ef79f5124c6ace7986783..c9c20473c21e969829bee8ae39764c68412bddb1 100644 (file)
 - files: ["kangaroo_grunt.ogg"]
   license: "CC-BY-4.0"
   copyright: "Audio is recorded/created by Pfranzen 'FreeSound.org'. The original audio was trimmed and renamed"
-  source: "https://freesound.org/people/pfranzen/sounds/322744/"
\ No newline at end of file
+  source: "https://freesound.org/people/pfranzen/sounds/322744/"
+  
+- files: ["dog_bark1.ogg"]
+  license: "CC0-1.0"
+  copyright: "Audio is recorded/created by KFerentchak 'FreeSound.org'. The original audio was trimmed and renamed"
+  source: "https://freesound.org/people/KFerentchak/sounds/235912/"  
+  
+- files: ["dog_bark2.ogg"]
+  license: "CC0-1.0"
+  copyright: "Audio is recorded/created by KFerentchak 'FreeSound.org'. The original audio was trimmed and renamed"
+  source: "https://freesound.org/people/KFerentchak/sounds/235912/"  
+  
+- files: ["dog_bark3.ogg"]
+  license: "CC0-1.0"
+  copyright: "Audio is recorded/created by KFerentchak 'FreeSound.org'. The original audio was trimmed and renamed"
+  source: "https://freesound.org/people/KFerentchak/sounds/235912/"
\ No newline at end of file
diff --git a/Resources/Audio/Animals/dog_bark1.ogg b/Resources/Audio/Animals/dog_bark1.ogg
new file mode 100644 (file)
index 0000000..8e5b8ca
Binary files /dev/null and b/Resources/Audio/Animals/dog_bark1.ogg differ
diff --git a/Resources/Audio/Animals/dog_bark2.ogg b/Resources/Audio/Animals/dog_bark2.ogg
new file mode 100644 (file)
index 0000000..c0dbd32
Binary files /dev/null and b/Resources/Audio/Animals/dog_bark2.ogg differ
diff --git a/Resources/Audio/Animals/dog_bark3.ogg b/Resources/Audio/Animals/dog_bark3.ogg
new file mode 100644 (file)
index 0000000..634c3e2
Binary files /dev/null and b/Resources/Audio/Animals/dog_bark3.ogg differ
index d3f447ae471a476a3b1455029d992567b1f8fff9..5d6d0b337b2b176e9a5ffc9353d401dd6c4b4bb2 100644 (file)
@@ -184,4 +184,8 @@ ghost-role-information-Death-Squad-description = One of Nanotrasen's top interna
 
 ghost-role-information-Cak-name = Cak
 ghost-role-information-Cak-description = You are the chef's favorite child. You're a living cake cat.  
-ghost-role-information-Cak-rules = You are a living edible sweet cat. Your task is to find your place in this world where everything wants to eat you.
\ No newline at end of file
+ghost-role-information-Cak-rules = You are a living edible sweet cat. Your task is to find your place in this world where everything wants to eat you.
+
+ghost-role-information-BreadDog-name = BreadDog
+ghost-role-information-BreadDog-description = You are the chef's favorite child. You're a living bread dog.
+ghost-role-information-BreadDog-rules = You're an edible dog made of bread. Your task is to find your place in this world where everything wants to eat you.
\ No newline at end of file
index 4ca9ab4a748d757ef85273963dab75e1c18f3212..56bcfff306be86e482416f7376724b87ec4b49b9 100644 (file)
         - ReagentId: Wine
           Quantity: 5
 # Tastes like decaying fungus.
+
+- type: entity
+  name: bread dog
+  id: MobBreadDog
+  parent: FoodBreadSausage
+  description: It's a bread. It's a dog. It's a... breaddog?
+  components:
+  - type: Sprite
+    noRot: true
+    drawdepth: Mobs
+    sprite: Mobs/Pets/breaddog.rsi
+    layers:
+    - map: ["enum.DamageStateVisualLayers.Base"]
+      state: base
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeCircle
+          radius: 0.35
+        density: 50
+        mask:
+        - MobMask
+        layer:
+        - MobLayer
+  - type: RotationVisuals
+    defaultRotation: 0
+    horizontalRotation: 0
+  - type: Item
+    size: Ginormous
+  - type: GhostRole
+    prob: 1
+    name: ghost-role-information-BreadDog-name
+    allowMovement: true
+    description: ghost-role-information-BreadDog-description
+    rules: ghost-role-information-BreadDog-rules
+  - type: GhostTakeoverAvailable
+  - type: BarkAccent
+  - type: Speech
+    speechSounds: Dog
+    speechVerb: SmallMob
+  - type: MovementSpeedModifier
+    baseWalkSpeed : 5
+    baseSprintSpeed : 3
+  - type: Tag
+    tags:
+    - VimPilot
+    - DoorBumpOpener
+  - type: CanEscapeInventory
+    baseResistTime: 2
+  - type: Puller
+    needsHands: false
+  - type: Examiner
+  - type: CombatMode
+  - type: MeleeWeapon
+    soundHit:
+      path: /Audio/Animals/dog_bark1.ogg
+    hidden: true
+    damage:
+      groups:
+        Brute: 1
\ No newline at end of file
index 0472a2c42fe740b5a1896c5d907eced2b038b7f9..10fb7b3aef993fcdcee187c79d70ecc9bba73ca9 100644 (file)
     FoodSnackRaisins: 1
     OrganAnimalHeart: 1
 
+- type: microwaveMealRecipe
+  id: RecipeBreadDog
+  name: bread dog recipe
+  result: MobBreadDog
+  time: 15
+  reagents:
+    Cognizine: 5
+  solids:
+    FoodBreadSausage: 1
+    OrganAnimalHeart: 1
+    FoodSpaceshroomCooked: 1
+
 - type: microwaveMealRecipe
   id: RecipeGrapeTart
   name: grape tart recipe
index ece518a7cc0a33a4b6630c49dc41efe5b0f0c815..abe6a8310295f7200d2e37c234de60672a7dc46b 100644 (file)
   askSound:
     path: /Audio/Animals/cat_meow.ogg
   exclaimSound:
-    path: /Audio/Animals/cat_meow.ogg
\ No newline at end of file
+    path: /Audio/Animals/cat_meow.ogg
+    
+- type: speechSounds
+  id: Dog
+  saySound:
+    path: /Audio/Animals/dog_bark1.ogg
+  askSound:
+    path: /Audio/Animals/dog_bark3.ogg
+  exclaimSound:
+    path: /Audio/Animals/dog_bark2.ogg
\ No newline at end of file
diff --git a/Resources/Textures/Mobs/Pets/breaddog.rsi/base.png b/Resources/Textures/Mobs/Pets/breaddog.rsi/base.png
new file mode 100644 (file)
index 0000000..4897cc6
Binary files /dev/null and b/Resources/Textures/Mobs/Pets/breaddog.rsi/base.png differ
diff --git a/Resources/Textures/Mobs/Pets/breaddog.rsi/dead.png b/Resources/Textures/Mobs/Pets/breaddog.rsi/dead.png
new file mode 100644 (file)
index 0000000..4a1a7c8
Binary files /dev/null and b/Resources/Textures/Mobs/Pets/breaddog.rsi/dead.png differ
diff --git a/Resources/Textures/Mobs/Pets/breaddog.rsi/meta.json b/Resources/Textures/Mobs/Pets/breaddog.rsi/meta.json
new file mode 100644 (file)
index 0000000..45d0190
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "version": 1,
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "license": "CC-BY-SA-3.0",
+  "copyright": "taken from tgstation on commit https://github.com/tgstation/tgstation/commit/ce6f2724cd79fa7c916e97167f9eab61cbd0a8cb",
+  "states":
+  [
+    {
+      "name": "base",
+      "directions": 4
+    },
+
+    {
+      "name": "dead",
+      "directions": 1
+    }
+  ]
+}
\ No newline at end of file