Proto-kinetic crusher (#16277)
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user