Crossbow (#327)
* Add powered crossbow * Add spear embedding (#18578) * Add spear embedding * fuck this copy-paste * Juicier * the river * Add crossbow embedding * Fix crossbow construction * Finish crossbow * Remove unused --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Stacks;
|
||||
using Content.Shared.Weapons.Ranged.Components;
|
||||
using Content.Shared.Weapons.Ranged.Events;
|
||||
using Robust.Shared.Map;
|
||||
@@ -6,6 +8,8 @@ namespace Content.Server.Weapons.Ranged.Systems;
|
||||
|
||||
public sealed partial class GunSystem
|
||||
{
|
||||
[Dependency] private readonly StackSystem _stack = default!;
|
||||
|
||||
protected override void Cycle(EntityUid uid, BallisticAmmoProviderComponent component, MapCoordinates coordinates)
|
||||
{
|
||||
EntityUid? ent = null;
|
||||
@@ -32,4 +36,9 @@ public sealed partial class GunSystem
|
||||
var cycledEvent = new GunCycledEvent();
|
||||
RaiseLocalEvent(uid, ref cycledEvent);
|
||||
}
|
||||
|
||||
protected override EntityUid GetStackEntity(EntityUid uid, StackComponent stack) // WD
|
||||
{
|
||||
return _stack.Split(uid, 1, Transform(uid).Coordinates, stack) ?? uid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user