From 3f005b158bb4ec0f5ad62d5aefee0cb93ffe75fe Mon Sep 17 00:00:00 2001 From: ThereDrD0 <88589686+ThereDrD0@users.noreply.github.com> Date: Mon, 11 Mar 2024 02:07:37 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=BC=D1=83=D0=B2=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BF=D0=B0=D0=BF=D0=B0=20=D1=81=D0=BD=D0=B0=20(#146)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * remove: remove ZZZ popup * fix: client popup for target doll --- Content.Server/Bed/Sleep/SleepingSystem.cs | 1 - Content.Server/Damage/Systems/DamagePopupSystem.cs | 7 ++++++- Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs | 6 ------ Resources/Locale/en-US/actions/actions/sleep.ftl | 1 - Resources/Locale/ru-RU/actions/actions/sleep.ftl | 1 - 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Content.Server/Bed/Sleep/SleepingSystem.cs b/Content.Server/Bed/Sleep/SleepingSystem.cs index ca7274bc52..f9f52205b0 100644 --- a/Content.Server/Bed/Sleep/SleepingSystem.cs +++ b/Content.Server/Bed/Sleep/SleepingSystem.cs @@ -69,7 +69,6 @@ namespace Content.Server.Bed.Sleep emitSound.Sound = sleepSound.Snore; emitSound.PlayChance = sleepSound.Chance; emitSound.RollInterval = sleepSound.Interval; - emitSound.PopUp = sleepSound.PopUp; } return; diff --git a/Content.Server/Damage/Systems/DamagePopupSystem.cs b/Content.Server/Damage/Systems/DamagePopupSystem.cs index 12fd894ac6..7ef0dfdda9 100644 --- a/Content.Server/Damage/Systems/DamagePopupSystem.cs +++ b/Content.Server/Damage/Systems/DamagePopupSystem.cs @@ -30,7 +30,12 @@ public sealed class DamagePopupSystem : EntitySystem DamagePopupType.Hit => "!", _ => "Invalid type", }; - _popupSystem.PopupEntity(msg, uid); + + if (args.Origin.HasValue) + _popupSystem.PopupEntity(msg, uid, args.Origin.Value); + else + _popupSystem.PopupEntity(msg, uid); + } } } diff --git a/Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs b/Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs index 6313f633f2..2599bb5c2f 100644 --- a/Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs +++ b/Content.Shared/Bed/Sleep/SleepEmitSoundComponent.cs @@ -22,10 +22,4 @@ public sealed partial class SleepEmitSoundComponent : Component /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float Chance = 0.33f; - - /// - /// Popup for snore (e.g. Zzz...) - /// - [DataField, ViewVariables(VVAccess.ReadWrite)] - public LocId PopUp = "sleep-onomatopoeia"; } diff --git a/Resources/Locale/en-US/actions/actions/sleep.ftl b/Resources/Locale/en-US/actions/actions/sleep.ftl index fd833fd4a5..d048c8e4d5 100644 --- a/Resources/Locale/en-US/actions/actions/sleep.ftl +++ b/Resources/Locale/en-US/actions/actions/sleep.ftl @@ -1,6 +1,5 @@ action-name-wake = Wake up -sleep-onomatopoeia = Zzz... sleep-examined = [color=lightblue]{CAPITALIZE(SUBJECT($target))} {CONJUGATE-BE($target)} asleep.[/color] wake-other-success = You shake {THE($target)} awake. diff --git a/Resources/Locale/ru-RU/actions/actions/sleep.ftl b/Resources/Locale/ru-RU/actions/actions/sleep.ftl index 7b46518e73..53ea8cfde8 100644 --- a/Resources/Locale/ru-RU/actions/actions/sleep.ftl +++ b/Resources/Locale/ru-RU/actions/actions/sleep.ftl @@ -2,7 +2,6 @@ action-name-sleep = Спать action-desc-sleep = Лечь спать. action-name-wake = Проснуться action-desc-wake = Перестать спать. -sleep-onomatopoeia = Zzz... sleep-examined = [color=lightblue]{ CAPITALIZE($target) } спит.[/color] wake-other-success = Вы разбудили { $target }. wake-other-failure = Вы тормошите { $target }, но { $target } не просыпается.