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:
Aviu00
2024-01-31 21:47:18 +09:00
committed by GitHub
parent 699f42c45b
commit 27d4cf977f
10 changed files with 63 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Server._White.Other.ChangeThrowForceSystem;
using Content.Server.Inventory;
using Content.Server.Pulling;
using Content.Server.Stack;
@@ -206,6 +207,12 @@ namespace Content.Server.Hands.Systems
var throwStrength = hands.ThrowForceMultiplier;
if (TryComp<ChangeThrowForceComponent>(throwEnt, out var thrownChangeForceComponent))
{
var component = EnsureComp<ChangeThrowForceComponent>(player);
component.ThrowForce = thrownChangeForceComponent.ThrowForce;
}
// Let other systems change the thrown entity (useful for virtual items)
// or the throw strength.
var ev = new BeforeThrowEvent(throwEnt, direction, throwStrength, player);
@@ -220,6 +227,8 @@ namespace Content.Server.Hands.Systems
_throwingSystem.TryThrow(ev.ItemUid, ev.Direction, ev.ThrowStrength, ev.PlayerUid);
RemComp<ChangeThrowForceComponent>(player);
return true;
}