Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadowlings can't cuff #205

Merged
merged 5 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Content.Shared/Cuffs/SharedCuffableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,16 @@ public bool TryCuffing(EntityUid user, EntityUid target, EntityUid handcuff, Han
if (HasComp<StunnedComponent>(target))
cuffTime = MathF.Max(0.1f, cuffTime - handcuffComponent.StunBonus);

if (TryComp<CufferComponent>(user, out var cuffer)) // Stories - CuffingSpeed - start
{
if (cuffer.TimeModifier == null)
{
_popup.PopupClient(Loc.GetString("handcuff-component-cannot-use-cuffs"), user, user);
return false;
}
cuffTime = cuffTime * (float)cuffer.TimeModifier;
} // Stories - CuffingSpeed - end

if (HasComp<DisarmProneComponent>(target))
cuffTime = 0.0f; // cuff them instantly.

Expand Down
8 changes: 8 additions & 0 deletions Content.Shared/Stories/Cuffs/CufferComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Shared.Cuffs;

[RegisterComponent]
public sealed partial class CufferComponent : Component
{
[DataField("timeModifier")]
public float? TimeModifier = 1;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ handcuff-component-cuff-interrupt-other-message = Вы помешали { $other
handcuff-component-cuff-interrupt-buckled-message = Вы не можете пристегнуться в наручниках!
handcuff-component-cuff-interrupt-unbuckled-message = Вы не можете отстегнуться в наручниках!
handcuff-component-cannot-drop-cuffs = Вы не можете надеть наручники на { $target }

handcuff-component-cannot-use-cuffs = Ваши пальцы слишком толстые, чтобы использовать наручники!
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
id: BaseMobShadowling
abstract: true
components:
- type: Cuffer
timeModifier: 2
- type: ZombieImmune
- type: ThermalVision
- type: ComplexInteraction
Expand Down
Loading