return old telebaton (#546)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user