parent
432a103ead
commit
2a643d2606
|
|
@ -4,7 +4,7 @@ using Content.Shared.IdentityManagement;
|
|||
using Content.Shared.Popups;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Weapons.Melee.Events;
|
||||
using Robust.Shared.Audio;
|
||||
using Content.Shared.Throwing;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
|
||||
namespace Content.Server.Weapons.Melee.Balloon;
|
||||
|
|
@ -23,6 +23,7 @@ public sealed class BalloonPopperSystem : EntitySystem
|
|||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<BalloonPopperComponent, MeleeHitEvent>(OnMeleeHit);
|
||||
SubscribeLocalEvent<BalloonPopperComponent, ThrowDoHitEvent>(OnThrowHit);
|
||||
}
|
||||
|
||||
private void OnMeleeHit(EntityUid uid, BalloonPopperComponent component, MeleeHitEvent args)
|
||||
|
|
@ -40,6 +41,15 @@ public sealed class BalloonPopperSystem : EntitySystem
|
|||
}
|
||||
}
|
||||
|
||||
private void OnThrowHit(EntityUid uid, BalloonPopperComponent component, ThrowDoHitEvent args)
|
||||
{
|
||||
foreach (var held in _hands.EnumerateHeld(args.Target))
|
||||
{
|
||||
if (_tag.HasTag(held, component.BalloonTag))
|
||||
PopBallooon(uid, held, component);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pops a target balloon, making a popup and playing a sound.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@
|
|||
max: 1
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- type: BalloonPopper
|
||||
|
||||
- type: entity
|
||||
parent: Dart
|
||||
|
|
|
|||
|
|
@ -12,6 +12,13 @@
|
|||
damage:
|
||||
types:
|
||||
Piercing: 1
|
||||
- type: DamageOtherOnHit
|
||||
damage:
|
||||
types:
|
||||
Piercing: 1
|
||||
- type: Item
|
||||
size: Tiny
|
||||
- type: BalloonPopper
|
||||
- type: ThrowingAngle
|
||||
angle: -135
|
||||
- type: LandAtCursor
|
||||
|
|
|
|||
Loading…
Reference in New Issue