return old telebaton (#546)
This commit is contained in:
@@ -3,4 +3,6 @@ namespace Content.Shared._White.Item.TelescopicBaton;
|
|||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed partial class TelescopicBatonComponent : Component
|
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.Damage.Events;
|
||||||
using Content.Shared.Examine;
|
using Content.Shared.Examine;
|
||||||
using Content.Shared.Item;
|
using Content.Shared.Item;
|
||||||
using Content.Shared.Standing.Systems;
|
|
||||||
using Content.Shared.Standing;
|
|
||||||
using Content.Shared.Item.ItemToggle;
|
using Content.Shared.Item.ItemToggle;
|
||||||
using Content.Shared.Item.ItemToggle.Components;
|
using Content.Shared.Item.ItemToggle.Components;
|
||||||
using Content.Shared.Stunnable;
|
using Content.Shared.Stunnable;
|
||||||
@@ -14,7 +12,6 @@ public sealed class TelescopicBatonSystem : EntitySystem
|
|||||||
[Dependency] private readonly SharedItemSystem _item = default!;
|
[Dependency] private readonly SharedItemSystem _item = default!;
|
||||||
[Dependency] private readonly SharedStunSystem _stun = default!;
|
[Dependency] private readonly SharedStunSystem _stun = default!;
|
||||||
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
|
[Dependency] private readonly SharedItemToggleSystem _itemToggle = default!;
|
||||||
[Dependency] private readonly SharedStandingStateSystem _standing = default!;
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -28,12 +25,13 @@ public sealed class TelescopicBatonSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnHit(Entity<TelescopicBatonComponent> ent, ref StaminaMeleeHitEvent args)
|
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)
|
foreach (var (uid, _) in args.HitList)
|
||||||
{
|
{
|
||||||
if (HasComp<StandingStateComponent>(uid))
|
_stun.TryKnockdown(uid, time, true);
|
||||||
{
|
|
||||||
_standing.TryLieDown(uid, null, SharedStandingStateSystem.DropHeldItemsBehavior.NoDrop);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
- type: MeleeWeapon
|
- type: MeleeWeapon
|
||||||
canHeavyAttack: false
|
canHeavyAttack: false
|
||||||
equipCooldown: 1
|
equipCooldown: 1
|
||||||
attackRate: 1.2
|
attackRate: 0.3
|
||||||
wideAnimationRotation: -135
|
wideAnimationRotation: -135
|
||||||
damage:
|
damage:
|
||||||
types:
|
types:
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
- type: ItemToggleMeleeWeapon
|
- type: ItemToggleMeleeWeapon
|
||||||
activatedDamage:
|
activatedDamage:
|
||||||
types:
|
types:
|
||||||
Blunt: 2
|
Blunt: 9
|
||||||
deactivatedSecret: true
|
deactivatedSecret: true
|
||||||
- type: StaminaDamageOnHit
|
- type: StaminaDamageOnHit
|
||||||
damage: 16
|
damage: 16
|
||||||
|
|||||||
Reference in New Issue
Block a user