* add content

* add new bark accent
This commit is contained in:
Ed
2023-12-16 11:30:20 +03:00
committed by GitHub
parent 31077fd370
commit 088d39f7ac
13 changed files with 175 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
namespace Content.Server.Speech.Components
{
[RegisterComponent]
public sealed partial class BarkAccentComponent : Component
{
}
}

View 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);
}
}
}

View File

@@ -116,4 +116,19 @@
- 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/"
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/"

Binary file not shown.

Binary file not shown.

Binary file not shown.

View 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.
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.

View File

@@ -774,3 +774,64 @@
- 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

View File

@@ -1282,6 +1282,18 @@
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

View File

@@ -104,4 +104,13 @@
askSound:
path: /Audio/Animals/cat_meow.ogg
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

View 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
}
]
}