Electricity Changed

public event PlayerElectricityChangedAction ElectricityChanged

Event fired when player electricity (used or total) is changed. Keep in mind, that this works for any ingame player, even AI.

To subscribe to the local player event, do:

Player.LocalPlayer.ElectricityChanged += OnPlayerElectricityChanged;

void OnPlayerElectricityChanged(int totalElectricity, int usedElectricity)
{
  // your actions
}