BatteryWeaponPowerCell tweaks (#33500)
* BatteryWeaponPowerCell tweaks * add update ammo ev & shuttle guns tweaks * MilonPL requested changes * revert changes in OnPowerCellChanged * Add events to get charge info & change current charge --------- Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
@@ -67,7 +67,7 @@ public abstract partial class SharedGunSystem
|
||||
component.Shots--;
|
||||
}
|
||||
|
||||
TakeCharge(uid, component);
|
||||
TakeCharge((uid, component));
|
||||
UpdateBatteryAppearance(uid, component);
|
||||
Dirty(uid, component);
|
||||
}
|
||||
@@ -81,9 +81,9 @@ public abstract partial class SharedGunSystem
|
||||
/// <summary>
|
||||
/// Update the battery (server-only) whenever fired.
|
||||
/// </summary>
|
||||
protected virtual void TakeCharge(EntityUid uid, BatteryAmmoProviderComponent component)
|
||||
protected virtual void TakeCharge(Entity<BatteryAmmoProviderComponent> entity)
|
||||
{
|
||||
UpdateAmmoCount(uid, prediction: false);
|
||||
UpdateAmmoCount(entity, prediction: false);
|
||||
}
|
||||
|
||||
protected void UpdateBatteryAppearance(EntityUid uid, BatteryAmmoProviderComponent component)
|
||||
|
||||
Reference in New Issue
Block a user