Add default ammo for guns (#1207)
* Add default ammo types * Add revolver and bolt action default pro support Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -110,7 +110,13 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
||||
{
|
||||
if (_fillPrototype != null)
|
||||
{
|
||||
_unspawnedCount += Capacity - 1;
|
||||
_unspawnedCount += Capacity;
|
||||
if (_unspawnedCount > 0)
|
||||
{
|
||||
_unspawnedCount--;
|
||||
var chamberEntity = Owner.EntityManager.SpawnEntity(_fillPrototype, Owner.Transform.GridPosition);
|
||||
_chamberContainer.Insert(chamberEntity);
|
||||
}
|
||||
}
|
||||
UpdateAppearance();
|
||||
}
|
||||
@@ -139,6 +145,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
|
||||
}
|
||||
|
||||
_appearanceComponent?.SetData(MagazineBarrelVisuals.MagLoaded, true);
|
||||
Dirty();
|
||||
UpdateAppearance();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user