From 3fa9bb2dbc6709f455e2b6576a901ac2d81d0afe Mon Sep 17 00:00:00 2001 From: Alan Wake <67761888+aw-c@users.noreply.github.com> Date: Thu, 22 Feb 2024 22:24:25 +0300 Subject: [PATCH] =?UTF-8?q?HOT=20FIXES=20=D0=B8=D0=BB=D0=B8=20=D0=96=D0=90?= =?UTF-8?q?=D0=A0=D0=95=D0=9D=D0=9D=D0=AB=D0=95=20=D0=A4=D0=98=D0=9A=D0=A1?= =?UTF-8?q?=D0=AB=20(#768)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix delay * fixed time * fixed everlasting book * fixe longsleep --- Content.Server/SS220/CQC/CQCCombatSystem.cs | 2 +- Content.Shared/SS220/UseableBook/UseableBookComponent.cs | 2 +- Content.Shared/SS220/UseableBook/UseableBookSystem.cs | 6 ++++-- Resources/Prototypes/SS220/CQC/Actions.yml | 6 +++--- Resources/Prototypes/SS220/UseableBook/basebook.yml | 8 +++----- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Content.Server/SS220/CQC/CQCCombatSystem.cs b/Content.Server/SS220/CQC/CQCCombatSystem.cs index 5f3aea48494c22..10e2c158c6a2d2 100644 --- a/Content.Server/SS220/CQC/CQCCombatSystem.cs +++ b/Content.Server/SS220/CQC/CQCCombatSystem.cs @@ -29,7 +29,7 @@ public sealed class CQCCombatSystem : CQCCombatSharedSystem [Dependency] private readonly DamageableSystem _damage = default!; [Dependency] private readonly HandsSystem _hands = default!; private const string StatusEffectKey = "ForcedSleep"; // Same one used by N2O and other sleep chems. - private const double SleepCooldown = 120; + private const double SleepCooldown = 30; private const double BlowbackParalyze = 4; public override void Initialize() { diff --git a/Content.Shared/SS220/UseableBook/UseableBookComponent.cs b/Content.Shared/SS220/UseableBook/UseableBookComponent.cs index 62aac8ba6b87eb..937b40289d0210 100644 --- a/Content.Shared/SS220/UseableBook/UseableBookComponent.cs +++ b/Content.Shared/SS220/UseableBook/UseableBookComponent.cs @@ -10,7 +10,7 @@ public sealed partial class UseableBookComponent : Component { [DataField()] [ViewVariables(VVAccess.ReadWrite)] - public int LeftUses { get; set; } = 0; + public int LeftUses { get; set; } = 5; [DataField()] [ViewVariables(VVAccess.ReadWrite)] public bool CanUseOneTime = false; diff --git a/Content.Shared/SS220/UseableBook/UseableBookSystem.cs b/Content.Shared/SS220/UseableBook/UseableBookSystem.cs index 459a1cbd5aec30..d7d2a3d85a326b 100644 --- a/Content.Shared/SS220/UseableBook/UseableBookSystem.cs +++ b/Content.Shared/SS220/UseableBook/UseableBookSystem.cs @@ -30,7 +30,10 @@ public bool CanUseBook(EntityUid entity, UseableBookComponent comp, EntityUid us bool bCan = false; if (comp.CanUseOneTime && comp.Used) + { reason = Loc.GetString("useable-book-used-onetime"); // данную книгу можно было изучить только один раз + goto retn; + } if (comp.CustomCanRead is not null) { var customCanRead = comp.CustomCanRead; @@ -49,8 +52,7 @@ public bool CanUseBook(EntityUid entity, UseableBookComponent comp, EntityUid us } if (comp.LeftUses > 0) bCan = true; - - if (!bCan) + else reason = Loc.GetString("useable-book-used"); // потрачены все использования retn: diff --git a/Resources/Prototypes/SS220/CQC/Actions.yml b/Resources/Prototypes/SS220/CQC/Actions.yml index 1d35e805686902..382469c5086f92 100644 --- a/Resources/Prototypes/SS220/CQC/Actions.yml +++ b/Resources/Prototypes/SS220/CQC/Actions.yml @@ -7,7 +7,7 @@ - type: EntityTargetAction icon: SS220/Interface/actions/CQCCombat/blowback.png event: !type:CQCBlowbackEvent - useDelay: 2 + useDelay: 7 checkCanInteract: false priority: -10 @@ -20,7 +20,7 @@ - type: EntityTargetAction icon: SS220/Interface/actions/CQCCombat/punch.png event: !type:CQCPunchEvent - useDelay: 4 + useDelay: 2 checkCanInteract: false priority: -10 @@ -46,6 +46,6 @@ - type: InstantAction icon: SS220/Interface/actions/CQCCombat/longsleep.png event: !type:CQCLongSleepEvent - useDelay: 60 + useDelay: 40 checkCanInteract: false priority: -10 \ No newline at end of file diff --git a/Resources/Prototypes/SS220/UseableBook/basebook.yml b/Resources/Prototypes/SS220/UseableBook/basebook.yml index d630c36fdaa3db..b3c06efb81c1a6 100644 --- a/Resources/Prototypes/SS220/UseableBook/basebook.yml +++ b/Resources/Prototypes/SS220/UseableBook/basebook.yml @@ -13,8 +13,7 @@ - Book - type: UseableBook readTime: 3 - leftUses: 1 - canUseOneTime: false + canUseOneTime: true customCanRead: !type:CQCCanReadBook componentsOnRead: - type: CQCCombat @@ -39,9 +38,8 @@ tags: - Book - type: UseableBook - readTime: 3 - leftUses: 1 - canUseOneTime: false + readTime: 60 + canUseOneTime: true customCanRead: !type:CQCCanReadBook componentsOnRead: - type: CQCCombat