Hardlight spear tweaks (#3)
* - tweak: Increased hardlight spear throw force and use delay * - fix: Hardlight spear can now hit holocarps when thrown * - add: New sprites for hardlight spear * - fix: Fix duping hardlight spears by inserting them into containers
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace Content.Server._White.Other.ChangeThrowForceSystem;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class ChangeThrowForceComponent : Component
|
||||
{
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float ThrowForce = 10f;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Content.Shared.Throwing;
|
||||
|
||||
namespace Content.Server._White.Other.ChangeThrowForceSystem;
|
||||
|
||||
public sealed class ChangeThrowForceSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<ChangeThrowForceComponent, BeforeThrowEvent>(HandleThrow);
|
||||
}
|
||||
|
||||
private void HandleThrow(EntityUid uid, ChangeThrowForceComponent component, ref BeforeThrowEvent args)
|
||||
{
|
||||
args.ThrowStrength = component.ThrowForce;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user