Magic staves + wands (#9070)

This commit is contained in:
Kara
2022-07-14 19:45:27 -07:00
committed by GitHub
parent 9608005db0
commit ad7889e8a9
85 changed files with 1299 additions and 34 deletions

View File

@@ -0,0 +1,20 @@
using Content.Shared.Weapons.Ranged.Components;
namespace Content.Client.Weapons.Ranged.Systems;
public partial class GunSystem
{
protected override void InitializeBasicEntity()
{
base.InitializeBasicEntity();
SubscribeLocalEvent<BasicEntityAmmoProviderComponent, UpdateAmmoCounterEvent>(OnBasicEntityAmmoCount);
}
private void OnBasicEntityAmmoCount(EntityUid uid, BasicEntityAmmoProviderComponent component, UpdateAmmoCounterEvent args)
{
if (args.Control is DefaultStatusControl control && component.Count != null && component.Capacity != null)
{
control.Update(component.Count.Value, component.Capacity.Value);
}
}
}