From bd3bea176ce2451455a2e76f88d533b6bdec470d Mon Sep 17 00:00:00 2001
From: Simon <63975668+Simyon264@users.noreply.github.com>
Date: Mon, 11 Dec 2023 04:17:55 +0100
Subject: [PATCH] Cooler zombie moths (#21744)
---
.../Zombies/ZombieAccentOverrideComponent.cs | 11 ++++++++++
.../Zombies/ZombieSystem.Transform.cs | 6 ++++-
Resources/Locale/en-US/accent/accents.ftl | 8 +++++++
.../Prototypes/Accents/full_replacements.yml | 22 +++++++++++++++++--
.../Prototypes/Entities/Mobs/NPCs/animals.yml | 2 ++
.../Prototypes/Entities/Mobs/Species/moth.yml | 2 ++
6 files changed, 48 insertions(+), 3 deletions(-)
create mode 100644 Content.Server/Zombies/ZombieAccentOverrideComponent.cs
diff --git a/Content.Server/Zombies/ZombieAccentOverrideComponent.cs b/Content.Server/Zombies/ZombieAccentOverrideComponent.cs
new file mode 100644
index 0000000000..f86711426c
--- /dev/null
+++ b/Content.Server/Zombies/ZombieAccentOverrideComponent.cs
@@ -0,0 +1,11 @@
+namespace Content.Server.Zombies;
+
+///
+/// Overrides the applied accent for zombies.
+///
+[RegisterComponent]
+public sealed partial class ZombieAccentOverrideComponent : Component
+{
+ [DataField("accent")]
+ public string Accent = "zombie";
+}
diff --git a/Content.Server/Zombies/ZombieSystem.Transform.cs b/Content.Server/Zombies/ZombieSystem.Transform.cs
index 8b351a5901..77cf121102 100644
--- a/Content.Server/Zombies/ZombieSystem.Transform.cs
+++ b/Content.Server/Zombies/ZombieSystem.Transform.cs
@@ -103,7 +103,11 @@ namespace Content.Server.Zombies
RemComp(target);
//funny voice
- EnsureComp(target).Accent = "zombie";
+ var accentType = "zombie";
+ if (TryComp(target, out var accent))
+ accentType = accent.Accent;
+
+ EnsureComp(target).Accent = accentType;
//This is needed for stupid entities that fuck up combat mode component
//in an attempt to make an entity not attack. This is the easiest way to do it.
diff --git a/Resources/Locale/en-US/accent/accents.ftl b/Resources/Locale/en-US/accent/accents.ftl
index fd9b99a5ec..4a3430b0bf 100644
--- a/Resources/Locale/en-US/accent/accents.ftl
+++ b/Resources/Locale/en-US/accent/accents.ftl
@@ -52,6 +52,14 @@ accent-words-zombie-8 = Braughhh...
accent-words-zombie-9 = Breshhhh...
accent-words-zombie-10 = Graaaaaa...
+# Moth Zombie
+accent-words-zombie-moth-1 = Clothessss...
+accent-words-zombie-moth-2 = Shooooesss...
+accent-words-zombie-moth-3 = Liiiiight...
+accent-words-zombie-moth-4 = Laaamps...
+accent-words-zombie-moth-5 = Haaaatsss... Hatttssss...
+accent-words-zombie-moth-6 = Scarffsss...
+
# Generic Aggressive
accent-words-generic-aggressive-1 = Grr!
accent-words-generic-aggressive-2 = Rrrr!
diff --git a/Resources/Prototypes/Accents/full_replacements.yml b/Resources/Prototypes/Accents/full_replacements.yml
index d4efc806c2..a62d2c1b64 100644
--- a/Resources/Prototypes/Accents/full_replacements.yml
+++ b/Resources/Prototypes/Accents/full_replacements.yml
@@ -27,8 +27,8 @@
- accent-words-mouse-2
- accent-words-mouse-3
- accent-words-mouse-4
- - accent-words-mouse-5
- - accent-words-mouse-6
+ - accent-words-mouse-5
+ - accent-words-mouse-6
- accent-words-mouse-7
- type: accent
@@ -77,6 +77,24 @@
- accent-words-zombie-9
- accent-words-zombie-10
+- type: accent
+ id: zombieMoth
+ fullReplacements:
+ - accent-words-zombie-moth-1
+ - accent-words-zombie-moth-2
+ - accent-words-zombie-moth-3
+ - accent-words-zombie-moth-4
+ - accent-words-zombie-moth-5
+ - accent-words-zombie-moth-6
+ - accent-words-zombie-1
+ - accent-words-zombie-2
+ - accent-words-zombie-4
+ - accent-words-zombie-5
+ - accent-words-zombie-6
+ - accent-words-zombie-8
+ - accent-words-zombie-9
+ - accent-words-zombie-10
+
- type: accent
id: genericAggressive
fullReplacements:
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
index 53fc4e36ef..cbb7448d41 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
@@ -417,6 +417,8 @@
grindableSolutionName: food
- type: ReplacementAccent
accent: mothroach
+ - type: ZombieAccentOverride
+ accent: zombieMoth
- type: Vocal
sounds:
Male: UnisexMoth
diff --git a/Resources/Prototypes/Entities/Mobs/Species/moth.yml b/Resources/Prototypes/Entities/Mobs/Species/moth.yml
index 71385455ac..acb5abcda1 100644
--- a/Resources/Prototypes/Entities/Mobs/Species/moth.yml
+++ b/Resources/Prototypes/Entities/Mobs/Species/moth.yml
@@ -22,6 +22,8 @@
- type: Damageable
damageContainer: Biological
damageModifierSet: Moth
+ - type: ZombieAccentOverride
+ accent: zombieMoth
- type: Speech
speechVerb: Moth
- type: TypingIndicator
--
2.51.2