Fix bola stam damage, bring back old construction requirements (#21340)
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Server.Body.Systems;
|
using Content.Server.Body.Systems;
|
||||||
using Content.Shared.Alert;
|
using Content.Shared.Alert;
|
||||||
using Content.Shared.Body.Components;
|
|
||||||
using Content.Shared.Body.Part;
|
using Content.Shared.Body.Part;
|
||||||
|
using Content.Shared.Damage.Components;
|
||||||
|
using Content.Shared.Damage.Systems;
|
||||||
using Content.Shared.DoAfter;
|
using Content.Shared.DoAfter;
|
||||||
using Content.Shared.Ensnaring;
|
using Content.Shared.Ensnaring;
|
||||||
using Content.Shared.Ensnaring.Components;
|
using Content.Shared.Ensnaring.Components;
|
||||||
@@ -17,6 +18,7 @@ public sealed partial class EnsnareableSystem
|
|||||||
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
||||||
[Dependency] private readonly AlertsSystem _alerts = default!;
|
[Dependency] private readonly AlertsSystem _alerts = default!;
|
||||||
[Dependency] private readonly BodySystem _body = default!;
|
[Dependency] private readonly BodySystem _body = default!;
|
||||||
|
[Dependency] private readonly StaminaSystem _stamina = default!;
|
||||||
|
|
||||||
public void InitializeEnsnaring()
|
public void InitializeEnsnaring()
|
||||||
{
|
{
|
||||||
@@ -72,6 +74,15 @@ public sealed partial class EnsnareableSystem
|
|||||||
if (freeLegs <= 0)
|
if (freeLegs <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Apply stamina damage to target if they weren't ensnared before.
|
||||||
|
if (ensnareable.IsEnsnared != true)
|
||||||
|
{
|
||||||
|
if (TryComp<StaminaComponent>(target, out var stamina))
|
||||||
|
{
|
||||||
|
_stamina.TakeStaminaDamage(target, component.StaminaDamage, with: ensnare);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
component.Ensnared = target;
|
component.Ensnared = target;
|
||||||
ensnareable.Container.Insert(ensnare);
|
ensnareable.Container.Insert(ensnare);
|
||||||
ensnareable.IsEnsnared = true;
|
ensnareable.IsEnsnared = true;
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ public sealed partial class EnsnaringComponent : Component
|
|||||||
[DataField("sprintSpeed")]
|
[DataField("sprintSpeed")]
|
||||||
public float SprintSpeed = 0.9f;
|
public float SprintSpeed = 0.9f;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// How much stamina does the ensnare sap
|
||||||
|
/// </summary>
|
||||||
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
[DataField("staminaDamage")]
|
||||||
|
public float StaminaDamage = 55f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should this ensnare someone when thrown?
|
/// Should this ensnare someone when thrown?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
sound: /Audio/Weapons/bolathrow.ogg
|
sound: /Audio/Weapons/bolathrow.ogg
|
||||||
- type: EmitSoundOnLand
|
- type: EmitSoundOnLand
|
||||||
sound: /Audio/Effects/snap.ogg
|
sound: /Audio/Effects/snap.ogg
|
||||||
- type: StaminaDamageOnCollide
|
|
||||||
damage: 80
|
|
||||||
- type: Construction
|
- type: Construction
|
||||||
graph: Bola
|
graph: Bola
|
||||||
node: bola
|
node: bola
|
||||||
@@ -39,11 +37,13 @@
|
|||||||
- type: DamageOnLand
|
- type: DamageOnLand
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
Blunt: 3
|
Blunt: 5
|
||||||
- type: Ensnaring
|
- type: Ensnaring
|
||||||
freeTime: 2.0
|
freeTime: 2.0
|
||||||
breakoutTime: 3.5 #all bola should generally be fast to remove
|
breakoutTime: 3.5 #all bola should generally be fast to remove
|
||||||
walkSpeed: 0.7 #makeshift bola shouldn't slow too much
|
walkSpeed: 0.7 #makeshift bola shouldn't slow too much
|
||||||
sprintSpeed: 0.7
|
sprintSpeed: 0.7
|
||||||
|
staminaDamage: 55 # Sudden weight increase sapping stamina
|
||||||
canThrowTrigger: true
|
canThrowTrigger: true
|
||||||
|
canMoveBreakout: true
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,12 @@
|
|||||||
edges:
|
edges:
|
||||||
- to: bola
|
- to: bola
|
||||||
steps:
|
steps:
|
||||||
- material: Cable
|
- tag: Handcuffs
|
||||||
amount: 5
|
icon:
|
||||||
doAfter: 2
|
sprite: Objects/Misc/cablecuffs.rsi
|
||||||
|
state: cuff
|
||||||
|
color: red
|
||||||
|
name: cuffs
|
||||||
- material: Steel
|
- material: Steel
|
||||||
amount: 6
|
amount: 6
|
||||||
doAfter: 2
|
doAfter: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user