Adds some extra toys to the arcade machine (#10637)

This commit is contained in:
Flipp Syder
2022-08-16 02:57:39 -07:00
committed by GitHub
parent ed8414c800
commit 0396f8eb9d
9 changed files with 85 additions and 61 deletions

View File

@@ -151,15 +151,17 @@ public abstract partial class SharedGunSystem
{
entity = component.Entities[^1];
args.Ammo.Add(EnsureComp<AmmoComponent>(entity));
// Leave the entity as is if it doesn't auto cycle
// TODO: Suss this out with NewAmmoComponent as I don't think it gets removed from container properly
if (HasComp<CartridgeAmmoComponent>(entity) && component.AutoCycle)
if (!component.AutoCycle)
{
component.Entities.RemoveAt(component.Entities.Count - 1);
component.Container.Remove(entity);
return;
}
args.Ammo.Add(EnsureComp<AmmoComponent>(entity));
component.Entities.RemoveAt(component.Entities.Count - 1);
component.Container.Remove(entity);
}
else if (component.UnspawnedCount > 0)
{