Files
wwdpublic/Content.Client/Weapons/Ranged/Systems/GunSystem.Battery.cs
Remuchi 2bbaaafd67 [Fix] Fixed laser's regulator lamp's visualizer (#530)
* Reapply "[Fix] Regulator Lamp Visuals" (#523)

This reverts commit 5337022158.

* Reapply "[Fix] Regular Lamp Layers" (#522)"

This reverts commit 2ebf5e18

* fix: fixed lamp layers

* style: styled overheat systems

* fix: fixed advanced regulator lamp layers
2025-05-28 15:38:18 +03:00

33 lines
1.4 KiB
C#

using Content.Shared.Weapons.Ranged.Components;
using Robust.Shared.Timing;
namespace Content.Client.Weapons.Ranged.Systems;
public sealed partial class GunSystem
{
protected override void InitializeBattery()
{
base.InitializeBattery();
// Hitscan
SubscribeLocalEvent<HitscanBatteryAmmoProviderComponent, AmmoCounterControlEvent>(OnControl);
//SubscribeLocalEvent<HitscanBatteryAmmoProviderComponent, UpdateAmmoCounterEvent>(OnAmmoCountUpdate); // WWDP EDIT
// Projectile
SubscribeLocalEvent<ProjectileBatteryAmmoProviderComponent, AmmoCounterControlEvent>(OnControl);
//SubscribeLocalEvent<ProjectileBatteryAmmoProviderComponent, UpdateAmmoCounterEvent>(OnAmmoCountUpdate); // WWDP EDIT
}
// WWDP EDIT - DEFUNCT - Trying to make gun-related status controls update themselves instead of whatever the fuck is currently going on
//private void OnAmmoCountUpdate(EntityUid uid, BatteryAmmoProviderComponent component, UpdateAmmoCounterEvent args)
//{
// if (args.Control is not BoxesStatusControl boxes) return;
//
// boxes.Update(component.Shots, component.Capacity);
//}
private void OnControl(EntityUid uid, BatteryAmmoProviderComponent component, AmmoCounterControlEvent args)
{
args.Control = new EnergyGunBatteryStatusControl(uid, component); // WWDP EDIT
}
}