Skip to content

Commit

Permalink
HOT FIXES или ЖАРЕННЫЕ ФИКСЫ (#768)
Browse files Browse the repository at this point in the history
* fix delay

* fixed time

* fixed everlasting book

* fixe longsleep
  • Loading branch information
aw-c authored Feb 22, 2024
1 parent 78fdba3 commit 3fa9bb2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Content.Server/SS220/CQC/CQCCombatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/SS220/UseableBook/UseableBookComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions Content.Shared/SS220/UseableBook/UseableBookSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions Resources/Prototypes/SS220/CQC/Actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- type: EntityTargetAction
icon: SS220/Interface/actions/CQCCombat/blowback.png
event: !type:CQCBlowbackEvent
useDelay: 2
useDelay: 7
checkCanInteract: false
priority: -10

Expand All @@ -20,7 +20,7 @@
- type: EntityTargetAction
icon: SS220/Interface/actions/CQCCombat/punch.png
event: !type:CQCPunchEvent
useDelay: 4
useDelay: 2
checkCanInteract: false
priority: -10

Expand All @@ -46,6 +46,6 @@
- type: InstantAction
icon: SS220/Interface/actions/CQCCombat/longsleep.png
event: !type:CQCLongSleepEvent
useDelay: 60
useDelay: 40
checkCanInteract: false
priority: -10
8 changes: 3 additions & 5 deletions Resources/Prototypes/SS220/UseableBook/basebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
- Book
- type: UseableBook
readTime: 3
leftUses: 1
canUseOneTime: false
canUseOneTime: true
customCanRead: !type:CQCCanReadBook
componentsOnRead:
- type: CQCCombat
Expand All @@ -39,9 +38,8 @@
tags:
- Book
- type: UseableBook
readTime: 3
leftUses: 1
canUseOneTime: false
readTime: 60
canUseOneTime: true
customCanRead: !type:CQCCanReadBook
componentsOnRead:
- type: CQCCombat
Expand Down

0 comments on commit 3fa9bb2

Please sign in to comment.