return old telebaton (#546)

This commit is contained in:
ThereDrD0
2024-08-03 17:02:07 +03:00
committed by GitHub
parent 53528f626d
commit 68ae47c958
3 changed files with 9 additions and 9 deletions

View File

@@ -3,4 +3,6 @@ namespace Content.Shared._White.Item.TelescopicBaton;
[RegisterComponent]
public sealed partial class TelescopicBatonComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan KnockdownTime = TimeSpan.FromSeconds(1.5f);
}

View File

@@ -1,8 +1,6 @@
using Content.Shared.Damage.Events;
using Content.Shared.Examine;
using Content.Shared.Item;
using Content.Shared.Standing.Systems;
using Content.Shared.Standing;
using Content.Shared.Item.ItemToggle;
using Content.Shared.Item.ItemToggle.Components;
using Content.Shared.Stunnable;
@@ -14,7 +12,6 @@ public sealed class TelescopicBatonSystem : EntitySystem
[Dependency] private readonly SharedItemSystem _item = default!;
[Dependency] private readonly SharedStunSystem _stun = default!;
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
[Dependency] private readonly SharedStandingStateSystem _standing = default!;
public override void Initialize()
{
@@ -28,12 +25,13 @@ public sealed class TelescopicBatonSystem : EntitySystem
private void OnHit(Entity<TelescopicBatonComponent> ent, ref StaminaMeleeHitEvent args)
{
var time = ent.Comp.KnockdownTime;
if (time <= TimeSpan.Zero)
return;
foreach (var (uid, _) in args.HitList)
{
if (HasComp<StandingStateComponent>(uid))
{
_standing.TryLieDown(uid, null, SharedStandingStateSystem.DropHeldItemsBehavior.NoDrop);
}
_stun.TryKnockdown(uid, time, true);
}
}

View File

@@ -35,7 +35,7 @@
- type: MeleeWeapon
canHeavyAttack: false
equipCooldown: 1
attackRate: 1.2
attackRate: 0.3
wideAnimationRotation: -135
damage:
types:
@@ -44,7 +44,7 @@
- type: ItemToggleMeleeWeapon
activatedDamage:
types:
Blunt: 2
Blunt: 9
deactivatedSecret: true
- type: StaminaDamageOnHit
damage: 16