Exemplo n.º 1
0
 private void PostSync(NetworkBatteryPostSync ev)
 {
     foreach (var(netBat, bat) in EntityManager.EntityQuery <PowerNetworkBatteryComponent, BatteryComponent>())
     {
         bat.CurrentCharge = netBat.NetworkBattery.CurrentStorage;
     }
 }
Exemplo n.º 2
0
        private void PostSync(EntityUid uid, BatteryComponent component, NetworkBatteryPostSync args)
        {
            var networkBattery = ComponentManager.GetComponent <PowerNetworkBatteryComponent>(uid);

            component.CurrentCharge = networkBattery.NetworkBattery.CurrentStorage;
        }