follow on use inhand (#606)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace Content.Shared._CP14.Follower;
|
||||
|
||||
[RegisterComponent, Access(typeof(CP14FollowOnUseInHandSystem))]
|
||||
public sealed partial class CP14FollowOnUseInHandComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
20
Content.Shared/_CP14/Follower/CP14FollowOnUseInHandSystem.cs
Normal file
20
Content.Shared/_CP14/Follower/CP14FollowOnUseInHandSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Shared.Follower;
|
||||
using Content.Shared.Interaction.Events;
|
||||
|
||||
namespace Content.Shared._CP14.Follower;
|
||||
|
||||
public partial class CP14FollowOnUseInHandSystem : EntitySystem
|
||||
{
|
||||
|
||||
[Dependency] private readonly FollowerSystem _followerSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<CP14FollowOnUseInHandComponent, UseInHandEvent>(OnUseInHand);
|
||||
}
|
||||
|
||||
private void OnUseInHand(EntityUid uid, CP14FollowOnUseInHandComponent component, UseInHandEvent args)
|
||||
{
|
||||
_followerSystem.StartFollowingEntity(uid, args.User);
|
||||
}
|
||||
}
|
||||
@@ -92,6 +92,7 @@
|
||||
- Opaque
|
||||
- type: LandAtCursor
|
||||
- type: MovementIgnoreGravity
|
||||
- type: CP14FollowOnUseInHand
|
||||
- type: PointLight
|
||||
radius: 5.0
|
||||
energy: 1
|
||||
@@ -124,4 +125,4 @@
|
||||
components:
|
||||
- type: CP14SpellStorage
|
||||
spells:
|
||||
- CP14ActionSpellSphereOfLight
|
||||
- CP14ActionSpellSphereOfLight
|
||||
|
||||
Reference in New Issue
Block a user