* 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:
Aviu00
2023-08-24 21:05:56 +03:00
committed by Aviu00
parent 7b9a36e4b6
commit d0431ee61e
31 changed files with 723 additions and 15 deletions

View File

@@ -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;
}
}