diff --git a/Content.Shared/Buckle/Components/StrapComponent.cs b/Content.Shared/Buckle/Components/StrapComponent.cs
index 5190821b08c904..6cf5c88505cdcc 100644
--- a/Content.Shared/Buckle/Components/StrapComponent.cs
+++ b/Content.Shared/Buckle/Components/StrapComponent.cs
@@ -106,6 +106,14 @@ public sealed partial class StrapComponent : Component
///
[DataField]
public bool BuckleOnInteractHand = true;
+
+ // SS220 Add uncuff time modifier when buckled begin
+ ///
+ /// A modifier that affects the time of uncuff when the entity is buckled on the strap.
+ ///
+ [DataField]
+ public float UncuffTimeModifier = 1f;
+ // SS220 Add uncuff time modifier when buckled end
}
public enum StrapPosition
diff --git a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
index f351c41418bfa0..aefa3fa97aa339 100644
--- a/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
+++ b/Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
@@ -63,6 +63,8 @@ private void InitializeBuckle()
{
BuckleDoafterEarly((uid, comp), ev.Event, ev);
});
+
+ SubscribeLocalEvent(OnBuckleModifyUncuffDuration); // SS220 Add uncuff time modifier when buckled
}
private void OnBuckleComponentShutdown(Entity ent, ref ComponentShutdown args)
@@ -211,6 +213,20 @@ private void OnBuckleUpdateCanMove(EntityUid uid, BuckleComponent component, Upd
args.Cancel();
}
+ // SS220 Add uncuff time modifier when buckled begin
+ private void OnBuckleModifyUncuffDuration(Entity entity, ref ModifyUncuffDurationEvent args)
+ {
+ if (!entity.Comp.Buckled)
+ return;
+
+ var strapUid = entity.Comp.BuckledTo;
+ if (!TryComp(strapUid, out var strapComp))
+ return;
+
+ args.Duration *= strapComp.UncuffTimeModifier;
+ }
+ // SS220 Add uncuff time modifier when buckled end
+
public bool IsBuckled(EntityUid uid, BuckleComponent? component = null)
{
return Resolve(uid, ref component, false) && component.Buckled;
diff --git a/Resources/Prototypes/SS220/Entities/Objects/CultYogg/buildings.yml b/Resources/Prototypes/SS220/Entities/Objects/CultYogg/buildings.yml
index 4bd5156fefb08f..f4dfc0900334b5 100644
--- a/Resources/Prototypes/SS220/Entities/Objects/CultYogg/buildings.yml
+++ b/Resources/Prototypes/SS220/Entities/Objects/CultYogg/buildings.yml
@@ -67,3 +67,17 @@
- stack: Tokl
count: 25
icon: { sprite: SS220/Interface/Materials/material_icons_16.rsi, state: tokl}
+
+# TODO: раскомментить после того, как будут спрайты кровати
+#- type: cultYoggBuilding
+# id: CultYoggBedBuilding
+# order: 6
+# frame: CultYoggBuildingFrame
+# result: CultYoggBed
+# materials:
+# - stack: Tokl
+# count: 10
+# icon: { sprite: SS220/Interface/Materials/material_icons_16.rsi, state: tokl}
+# - stack: Cablelive
+# count: 5
+# icon: { sprite: SS220/Interface/Materials/material_icons_16.rsi, state: coillv}
diff --git a/Resources/Prototypes/SS220/Entities/Structures/CultYogg/buildings.yml b/Resources/Prototypes/SS220/Entities/Structures/CultYogg/buildings.yml
index 253e3e511aa8b3..5a550c8de75f55 100644
--- a/Resources/Prototypes/SS220/Entities/Structures/CultYogg/buildings.yml
+++ b/Resources/Prototypes/SS220/Entities/Structures/CultYogg/buildings.yml
@@ -116,3 +116,19 @@
acts: ["Destruction"]
- type: CultYoggBuilding
eraseTime: 3
+
+- type: entity
+ parent: Bed
+ id: CultYoggBed
+ suffix: CultYogg
+ components:
+ - type: Strap
+ hasSeatbelt: true
+ uncuffTimeModifier: 2.0
+ - type: CultYoggBuilding
+ eraseTime: 3
+ spawnOnErase:
+ - id: CableApcStack1Live
+ stackAmount: 3
+ - id: SheetTokl1
+ stackAmount: 5