7
Content.Server/Speech/Components/BarkAccentComponent.cs
Normal file
7
Content.Server/Speech/Components/BarkAccentComponent.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace Content.Server.Speech.Components
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed partial class BarkAccentComponent : Component
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
43
Content.Server/Speech/EntitySystems/BarkAccentSystem.cs
Normal file
43
Content.Server/Speech/EntitySystems/BarkAccentSystem.cs
Normal file
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -116,4 +116,19 @@
|
|||||||
- files: ["kangaroo_grunt.ogg"]
|
- files: ["kangaroo_grunt.ogg"]
|
||||||
license: "CC-BY-4.0"
|
license: "CC-BY-4.0"
|
||||||
copyright: "Audio is recorded/created by Pfranzen 'FreeSound.org'. The original audio was trimmed and renamed"
|
copyright: "Audio is recorded/created by Pfranzen 'FreeSound.org'. The original audio was trimmed and renamed"
|
||||||
source: "https://freesound.org/people/pfranzen/sounds/322744/"
|
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/"
|
||||||
BIN
Resources/Audio/Animals/dog_bark1.ogg
Normal file
BIN
Resources/Audio/Animals/dog_bark1.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Animals/dog_bark2.ogg
Normal file
BIN
Resources/Audio/Animals/dog_bark2.ogg
Normal file
Binary file not shown.
BIN
Resources/Audio/Animals/dog_bark3.ogg
Normal file
BIN
Resources/Audio/Animals/dog_bark3.ogg
Normal file
Binary file not shown.
@@ -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-name = Cak
|
||||||
ghost-role-information-Cak-description = You are the chef's favorite child. You're a living cake cat.
|
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.
|
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.
|
||||||
@@ -774,3 +774,64 @@
|
|||||||
- ReagentId: Wine
|
- ReagentId: Wine
|
||||||
Quantity: 5
|
Quantity: 5
|
||||||
# Tastes like decaying fungus.
|
# 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
|
||||||
@@ -1282,6 +1282,18 @@
|
|||||||
FoodSnackRaisins: 1
|
FoodSnackRaisins: 1
|
||||||
OrganAnimalHeart: 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
|
- type: microwaveMealRecipe
|
||||||
id: RecipeGrapeTart
|
id: RecipeGrapeTart
|
||||||
name: grape tart recipe
|
name: grape tart recipe
|
||||||
|
|||||||
@@ -104,4 +104,13 @@
|
|||||||
askSound:
|
askSound:
|
||||||
path: /Audio/Animals/cat_meow.ogg
|
path: /Audio/Animals/cat_meow.ogg
|
||||||
exclaimSound:
|
exclaimSound:
|
||||||
path: /Audio/Animals/cat_meow.ogg
|
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
|
||||||
BIN
Resources/Textures/Mobs/Pets/breaddog.rsi/base.png
Normal file
BIN
Resources/Textures/Mobs/Pets/breaddog.rsi/base.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
Resources/Textures/Mobs/Pets/breaddog.rsi/dead.png
Normal file
BIN
Resources/Textures/Mobs/Pets/breaddog.rsi/dead.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 824 B |
21
Resources/Textures/Mobs/Pets/breaddog.rsi/meta.json
Normal file
21
Resources/Textures/Mobs/Pets/breaddog.rsi/meta.json
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user