Skip to content

Commit

Permalink
Изменение автоэмоций
Browse files Browse the repository at this point in the history
  • Loading branch information
kanopus952 committed Nov 8, 2024
1 parent 9e38ce3 commit 2978e23
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 12 deletions.
10 changes: 10 additions & 0 deletions Content.Server/_Sunrise/NoEmotions/NoEmotionsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Content.Server._Sunrise;

/// <summary>
/// This is used for the snoring trait.
/// </summary>
[RegisterComponent]
public sealed partial class NoEmotionsComponent : Component
{

}
8 changes: 3 additions & 5 deletions Content.Server/_Sunrise/Paws/PawsComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ public sealed partial class PawsComponent : Component
[DataField("thresholdDamage")]
public FixedPoint2 ThresholdDamage = 5;

public List<string> EmotesTakeDamage = new()
{
"Scream",
"Crying"
};
[ViewVariables(VVAccess.ReadWrite)]
[DataField("emotesTakeDamage")]
public List<string> EmotesTakeDamage = new();

[DataField("nextChargeTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextScreamTime = TimeSpan.FromSeconds(0);
Expand Down
4 changes: 4 additions & 0 deletions Content.Server/_Sunrise/Paws/PawsSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Server._Sunrise;
using Content.Server.Chat.Systems;
using Content.Shared.Damage;
using Content.Shared.Mobs;
Expand Down Expand Up @@ -30,6 +31,9 @@ public override void Initialize()

private void OnDamaged(EntityUid uid, PawsComponent component, DamageChangedEvent args)
{
if (HasComp<NoEmotionsComponent>(uid))
return;

if (!_mobStateSystem.IsAlive(uid))
return;

Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Resources/Locale/en-US/_strings/_sunrise/chat/emotes.ftl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
chat-emote-name-bark = Лаять
chat-emote-name-hisses = Шипеть
chat-emote-name-purrs = Мурчать
chat-emote-name-growls = Рычять
chat-emote-name-growls = Рычать
chat-emote-name-mews = Мявкать
chat-emote-name-howl = Выть
chat-emote-name-oink = Хрюкать
Expand Down
2 changes: 2 additions & 0 deletions Resources/Locale/ru-RU/_strings/chat/emotes.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ chat-emote-name-monkeyscreeches = Обезьяньи крики
chat-emote-name-robotbeep = Робот
chat-emote-name-yawn = Зевать
chat-emote-name-snore = Храпеть
chat-emote-name-whines = Скулить
# Сообщение
chat-emote-msg-scream = кричит!
chat-emote-msg-laugh = смеётся
Expand Down Expand Up @@ -59,3 +60,4 @@ chat-emote-msg-cathisses = шипит
chat-emote-msg-monkeyscreeches = кричит
chat-emote-msg-yawn = зевает
chat-emote-msg-snore = храпит
chat-emote-msg-whines = скулит!
2 changes: 2 additions & 0 deletions Resources/Locale/ru-RU/_strings/traits/traits.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ trait-french-name = Французский акцент
trait-french-desc = Ваш акцент имеет некое «je ne sais quoi».
trait-spanish-name = Испанский акцент
trait-spanish-desc = Hola señor, где находится библиотека?
trait-noemotions-name = Крепкий орешек
trait-noemotions-desc = Вы настолько очерствели, что физическая боль не вызывает у вас произвольных звуков.
3 changes: 3 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Species/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@
screamInterval: 3
thresholdDamage: 5
coughInterval: 5
emotesTakeDamage:
- Scream
- Crying
# Sunrise-End

- type: entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
- type: Inventory
speciesId: human
- type: VulpaAccent
- type: Paws
emotesTakeDamage:
- Scream
- Whines


- type: entity
Expand Down
11 changes: 6 additions & 5 deletions Resources/Prototypes/_Sunrise/SoundCollections/vulpkanin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
- /Audio/_Sunrise/Voice/Vulpkanin/dog_growl5.ogg
- /Audio/_Sunrise/Voice/Vulpkanin/dog_growl6.ogg

- type: soundCollection
id: VulpkaninWhines
files:
- /Audio/_Sunrise/Voice/Vulpkanin/dog_whimpering_1.ogg
- /Audio/_Sunrise/Voice/Vulpkanin/dog_whine.ogg

- type: soundCollection
id: PlushieVulpkaninGrowls
files:
Expand All @@ -28,11 +34,6 @@
- /Audio/_Sunrise/Voice/Vulpkanin/dog_snarl2.ogg
- /Audio/_Sunrise/Voice/Vulpkanin/dog_snarl3.ogg

- type: soundCollection
id: VulpkaninWhines
files:
- /Audio/_Sunrise/Voice/Vulpkanin/dog_whine.ogg

- type: soundCollection
id: VulpkaninHowls
files:
Expand Down
7 changes: 7 additions & 0 deletions Resources/Prototypes/_Sunrise/Trait/quirks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- type: trait
id: NoEmotions
name: trait-noemotions-name
description: trait-noemotions-desc
category: Quirks
components:
- type: NoEmotions
6 changes: 5 additions & 1 deletion Resources/Prototypes/_Sunrise/Voice/speech_emote_sounds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
collection: MaleCoughs
Crying:
collection: MaleCry
Whines:
collection: VulpkaninWhines
Whistle:
collection: Whistles
Sigh:
Expand All @@ -95,6 +97,8 @@
collection: FemaleCoughs
Crying:
collection: FemaleCry
Whines:
collection: VulpkaninWhines
Whistle:
collection: Whistles
Sigh:
Expand Down Expand Up @@ -168,4 +172,4 @@
variation: 0.125
sounds:
Scream:
collection: ClownGoblinScream
collection: ClownGoblinScream
20 changes: 20 additions & 0 deletions Resources/Prototypes/_Sunrise/Voice/speech_emotes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,23 @@
name: chat-emote-name-insult
category: Vocal
chatMessages: [инсульт]

- type: emote
id: Whines
name: chat-emote-name-whines
category: Vocal
icon: Interface/Emotes/cry.png
whitelist:
components:
- Vocal
blacklist:
components:
- BorgChassis
chatMessages: ["chat-emote-msg-whines"]
chatTriggers:
- скулит.
- скулит!
- скулить.
- скулить!
- скулит
- скулить

0 comments on commit 2978e23

Please sign in to comment.