Proto-kinetic crusher (#16277)

Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2023-05-14 13:15:18 +10:00
committed by GitHub
parent 356bf96039
commit 6417bb4fa0
68 changed files with 926 additions and 312 deletions

View File

@@ -17,12 +17,16 @@ public sealed partial class GatherableSystem
{
if (!args.OtherFixture.Hard ||
args.OurFixture.ID != SharedProjectileSystem.ProjectileFixture ||
component.Amount <= 0 ||
!TryComp<GatherableComponent>(args.OtherEntity, out var gatherable))
{
return;
}
Gather(args.OtherEntity, uid, gatherable);
QueueDel(uid);
component.Amount--;
if (component.Amount <= 0)
QueueDel(uid);
}
}