component.Shots = state.Shots;
component.Capacity = state.MaxShots;
component.FireCost = state.FireCost;
+ UpdateAmmoCount(uid, prediction: false);
}
private void OnBatteryGetState(EntityUid uid, BatteryAmmoProviderComponent component, ref ComponentGetState args)
/// <summary>
/// Update the battery (server-only) whenever fired.
/// </summary>
- protected virtual void TakeCharge(EntityUid uid, BatteryAmmoProviderComponent component) {}
+ protected virtual void TakeCharge(EntityUid uid, BatteryAmmoProviderComponent component)
+ {
+ UpdateAmmoCount(uid, prediction: false);
+ }
protected void UpdateBatteryAppearance(EntityUid uid, BatteryAmmoProviderComponent component)
{