Straitjacket Functionality. (#18052)
This commit is contained in:
@@ -39,18 +39,6 @@ public sealed class CuffableComponent : Component
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("canStillInteract"), ViewVariables(VVAccess.ReadWrite)]
|
[DataField("canStillInteract"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
public bool CanStillInteract = true;
|
public bool CanStillInteract = true;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Damage is applied to someone when they try to uncuff themselves.
|
|
||||||
/// </summary>
|
|
||||||
[DataField("damageOnResist"), ViewVariables(VVAccess.ReadWrite)]
|
|
||||||
public DamageSpecifier DamageOnResist = new()
|
|
||||||
{
|
|
||||||
DamageDict = new()
|
|
||||||
{
|
|
||||||
{ "Blunt", 3.0 },
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
[Serializable, NetSerializable]
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using Content.Shared.Damage;
|
||||||
using Robust.Shared.Audio;
|
using Robust.Shared.Audio;
|
||||||
using Robust.Shared.GameStates;
|
using Robust.Shared.GameStates;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
@@ -47,6 +48,15 @@ public sealed class HandcuffComponent : Component
|
|||||||
[DataField("brokenPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
[DataField("brokenPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||||
public string? BrokenPrototype;
|
public string? BrokenPrototype;
|
||||||
|
|
||||||
|
[DataField("damageOnResist"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public DamageSpecifier DamageOnResist = new()
|
||||||
|
{
|
||||||
|
DamageDict = new()
|
||||||
|
{
|
||||||
|
{ "Blunt", 3.0 },
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The path of the RSI file used for the player cuffed overlay.
|
/// The path of the RSI file used for the player cuffed overlay.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ namespace Content.Shared.Cuffs
|
|||||||
|
|
||||||
private void OnCuffAfterInteract(EntityUid uid, HandcuffComponent component, AfterInteractEvent args)
|
private void OnCuffAfterInteract(EntityUid uid, HandcuffComponent component, AfterInteractEvent args)
|
||||||
{
|
{
|
||||||
if (args.Target is not {Valid: true} target)
|
if (args.Target is not { Valid: true } target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!args.CanReach)
|
if (!args.CanReach)
|
||||||
@@ -580,7 +580,7 @@ namespace Content.Shared.Cuffs
|
|||||||
|
|
||||||
if (isOwner)
|
if (isOwner)
|
||||||
{
|
{
|
||||||
_damageSystem.TryChangeDamage(target, cuffable.DamageOnResist, true, false);
|
_damageSystem.TryChangeDamage(target, cuff.DamageOnResist, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_net.IsServer)
|
if (_net.IsServer)
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
cuffable-component-cannot-interact-message = You can't do that!
|
cuffable-component-cannot-interact-message = You can't do that!
|
||||||
cuffable-component-cannot-remove-cuffs-too-far-message = You are too far away to remove the cuffs.
|
cuffable-component-cannot-remove-cuffs-too-far-message = You are too far away to remove the restraints.
|
||||||
|
|
||||||
cuffable-component-start-uncuffing-self = You start to painfully wriggle out of your cuffs.
|
cuffable-component-start-uncuffing-self = You start to painfully wriggle out of your restraints.
|
||||||
cuffable-component-start-uncuffing-observer = {$user} starts uncuffing {$target}!
|
cuffable-component-start-uncuffing-observer = {$user} starts unrestraining {$target}!
|
||||||
cuffable-component-start-uncuffing-target-message = You start uncuffing {$targetName}.
|
cuffable-component-start-uncuffing-target-message = You start unrestraining {$targetName}.
|
||||||
cuffable-component-start-uncuffing-by-other-message = {$otherName} starts uncuffing you!
|
cuffable-component-start-uncuffing-by-other-message = {$otherName} starts unrestraining you!
|
||||||
|
|
||||||
cuffable-component-remove-cuffs-success-message = You successfully remove the cuffs.
|
cuffable-component-remove-cuffs-success-message = You successfully remove the restraints.
|
||||||
cuffable-component-remove-cuffs-by-other-success-message = {$otherName} uncuffs your hands.
|
cuffable-component-remove-cuffs-by-other-success-message = {$otherName} unrestrains your hands.
|
||||||
cuffable-component-remove-cuffs-to-other-partial-success-message = You successfully remove the cuffs. {$cuffedHandCount} of {$otherName}'s hands remain cuffed.
|
cuffable-component-remove-cuffs-to-other-partial-success-message = You successfully remove the restraints. {$cuffedHandCount} of {$otherName}'s hands remain restrained.
|
||||||
cuffable-component-remove-cuffs-by-other-partial-success-message = {$otherName} removes your cuffs. {$cuffedHandCount} of your hands remain cuffed.
|
cuffable-component-remove-cuffs-by-other-partial-success-message = {$otherName} removes your restraints. {$cuffedHandCount} of your hands remain restrained.
|
||||||
cuffable-component-remove-cuffs-partial-success-message = You successfully remove the cuffs. {$cuffedHandCount} of your hands remain cuffed.
|
cuffable-component-remove-cuffs-partial-success-message = You successfully remove the restraints. {$cuffedHandCount} of your hands remain restrained.
|
||||||
cuffable-component-remove-cuffs-fail-message = You fail to remove the cuffs.
|
cuffable-component-remove-cuffs-fail-message = You fail to remove the restraints.
|
||||||
|
|
||||||
# UncuffVerb
|
# UnrestrainVerb
|
||||||
uncuff-verb-get-data-text = Uncuff
|
uncuff-verb-get-data-text = Unrestrain
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
handcuff-component-target-self = You start cuffing yourself.
|
handcuff-component-target-self = You start restraining yourself.
|
||||||
handcuff-component-cuffs-broken-error = The cuffs are broken!
|
handcuff-component-cuffs-broken-error = The restraints are broken!
|
||||||
handcuff-component-target-has-no-hands-error = {$targetName} has no hands!
|
handcuff-component-target-has-no-hands-error = {$targetName} has no hands!
|
||||||
handcuff-component-target-has-no-free-hands-error = {$targetName} has no free hands!
|
handcuff-component-target-has-no-free-hands-error = {$targetName} has no free hands!
|
||||||
handcuff-component-too-far-away-error = You are too far away to use the cuffs!
|
handcuff-component-too-far-away-error = You are too far away to use the restraints!
|
||||||
handcuff-component-start-cuffing-observer = {$user} starts cuffing {$target}!
|
handcuff-component-start-cuffing-observer = {$user} starts restraining {$target}!
|
||||||
handcuff-component-start-cuffing-target-message = You start cuffing {$targetName}.
|
handcuff-component-start-cuffing-target-message = You start restraining {$targetName}.
|
||||||
handcuff-component-start-cuffing-by-other-message = {$otherName} starts cuffing you!
|
handcuff-component-start-cuffing-by-other-message = {$otherName} starts restraining you!
|
||||||
handcuff-component-cuff-observer-success-message = {$user} cuffs {$target}.
|
handcuff-component-cuff-observer-success-message = {$user} restrains {$target}.
|
||||||
handcuff-component-cuff-other-success-message = You successfully cuff {$otherName}.
|
handcuff-component-cuff-other-success-message = You successfully restrain {$otherName}.
|
||||||
handcuff-component-cuff-by-other-success-message = You have been cuffed by {$otherName}!
|
handcuff-component-cuff-by-other-success-message = You have been restrained by {$otherName}!
|
||||||
handcuff-component-cuff-self-success-message = You cuff yourself.
|
handcuff-component-cuff-self-success-message = You restrain yourself.
|
||||||
handcuff-component-cuff-interrupt-message = You were interrupted while cuffing {$targetName}!
|
handcuff-component-cuff-interrupt-message = You were interrupted while unrestraining {$targetName}!
|
||||||
handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} while they are cuffing you!
|
handcuff-component-cuff-interrupt-other-message = You interrupt {$otherName} while they are restraining you!
|
||||||
handcuff-component-cuff-interrupt-self-message = You were interrupted while cuffing yourself.
|
handcuff-component-cuff-interrupt-self-message = You were interrupted while unrestraining yourself.
|
||||||
handcuff-component-cuff-interrupt-buckled-message = You can't buckle while cuffed!
|
handcuff-component-cuff-interrupt-buckled-message = You can't buckle while restrained!
|
||||||
handcuff-component-cuff-interrupt-unbuckled-message = You can't unbuckle while cuffed!
|
handcuff-component-cuff-interrupt-unbuckled-message = You can't unbuckle while restrained!
|
||||||
|
|||||||
@@ -145,17 +145,6 @@
|
|||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/OuterClothing/Misc/santa.rsi
|
sprite: Clothing/OuterClothing/Misc/santa.rsi
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: ClothingOuterBase
|
|
||||||
id: ClothingOuterStraightjacket
|
|
||||||
name: straight jacket
|
|
||||||
description: A straight jacket.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/OuterClothing/Misc/straight_jacket.rsi
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/OuterClothing/Misc/straight_jacket.rsi
|
|
||||||
|
|
||||||
# Is this wizard wearing a fanny pack???
|
# Is this wizard wearing a fanny pack???
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: ClothingOuterBase
|
parent: ClothingOuterBase
|
||||||
|
|||||||
@@ -120,11 +120,6 @@
|
|||||||
- map: ["enum.HumanoidVisualLayers.RFoot"]
|
- map: ["enum.HumanoidVisualLayers.RFoot"]
|
||||||
- map: ["enum.HumanoidVisualLayers.LHand"]
|
- map: ["enum.HumanoidVisualLayers.LHand"]
|
||||||
- map: ["enum.HumanoidVisualLayers.RHand"]
|
- map: ["enum.HumanoidVisualLayers.RHand"]
|
||||||
- map: ["enum.HumanoidVisualLayers.Handcuffs"]
|
|
||||||
color: "#ffffff"
|
|
||||||
sprite: Objects/Misc/handcuffs.rsi
|
|
||||||
state: body-overlay-2
|
|
||||||
visible: false
|
|
||||||
- map: [ "id" ]
|
- map: [ "id" ]
|
||||||
- map: [ "gloves" ]
|
- map: [ "gloves" ]
|
||||||
- map: [ "shoes" ]
|
- map: [ "shoes" ]
|
||||||
@@ -143,6 +138,11 @@
|
|||||||
- map: [ "head" ]
|
- map: [ "head" ]
|
||||||
- map: [ "pocket1" ]
|
- map: [ "pocket1" ]
|
||||||
- map: [ "pocket2" ]
|
- map: [ "pocket2" ]
|
||||||
|
- map: ["enum.HumanoidVisualLayers.Handcuffs"]
|
||||||
|
color: "#ffffff"
|
||||||
|
sprite: Objects/Misc/handcuffs.rsi
|
||||||
|
state: body-overlay-2
|
||||||
|
visible: false
|
||||||
- map: [ "clownedon" ] # Dynamically generated
|
- map: [ "clownedon" ] # Dynamically generated
|
||||||
sprite: "Effects/creampie.rsi"
|
sprite: "Effects/creampie.rsi"
|
||||||
state: "creampie_human"
|
state: "creampie_human"
|
||||||
|
|||||||
@@ -117,3 +117,24 @@
|
|||||||
sprite: Objects/Misc/cablecuffs.rsi
|
sprite: Objects/Misc/cablecuffs.rsi
|
||||||
state: cuff-broken
|
state: cuff-broken
|
||||||
color: forestgreen
|
color: forestgreen
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: Handcuffs
|
||||||
|
id: ClothingOuterStraightjacket
|
||||||
|
name: straitjacket
|
||||||
|
description: Used to restrain those who may cause harm to themselves or others.
|
||||||
|
components:
|
||||||
|
- type: Item
|
||||||
|
size: 20
|
||||||
|
- type: Handcuff
|
||||||
|
cuffedRSI: Clothing/OuterClothing/Misc/straight_jacket.rsi
|
||||||
|
breakoutTime: 100
|
||||||
|
damageOnResist:
|
||||||
|
types:
|
||||||
|
Blunt: 0
|
||||||
|
cuffTime: 10
|
||||||
|
uncuffTime: 10
|
||||||
|
stunBonus: 4
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Clothing/OuterClothing/Misc/straight_jacket.rsi
|
||||||
|
state: icon
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -11,7 +11,7 @@
|
|||||||
"name": "icon"
|
"name": "icon"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "equipped-OUTERCLOTHING",
|
"name": "body-overlay-2",
|
||||||
"directions": 4
|
"directions": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user