class BatteryCharger
BatteryCharger › ItemBase › InventoryItem › EntityAI › Entity › ObjectTyped › Object › IEntity › Managed
Constructors 1
void BatteryCharger()References CGame.ConfigGetFloat(), Object.GetType(), EntityAI.RegisterNetSyncVariableInt()
Show 3 more
, new Timer(), m_ChargeEnergyPerSecond, and m_UpdateStatusLightsTimerConstants 17
protected static const string SEL_CLIPS_CAR = "clips_car_battery"Referenced by OnOwnSocketTaken()
protected static const string SEL_CLIPS_TRUCK = "clips_truck_battery"Referenced by OnOwnSocketTaken()
protected static const string SEL_CLIPS_DETACHED = "clips_detached"Referenced by OnInventoryEnter(), OnInventoryExit(), OnOwnSocketReleased()
Show 2 more
, OnOwnSocketTaken(), and OnPlacementStarted()protected static const string SEL_CLIPS_FOLDED = "clips_folded"Referenced by OnInventoryEnter(), OnInventoryExit(), OnOwnSocketTaken()
Show 1 more
, OnPlacementStarted()protected static const string SEL_SWITCH_ON = "switch_on"Referenced by OnPlacementStarted(), OnSwitchOff(), OnSwitchOn()
Show 2 more
, SwitchLightOff(), and SwitchLightOn()protected static const string SEL_SWITCH_OFF = "switch_off"protected static const string SEL_CORD_PLUGGED = "cord_plugged"Referenced by OnPlacementStarted()
protected static const string SEL_CORD_FOLDED = "cord_folded"Referenced by OnPlacementStarted()
protected static const string SEL_LIGHT_STATE_1 = "light_stand_by"Referenced by OnPlacementStarted()
protected static const string SEL_LIGHT_STATE_2 = "light_charging"Referenced by OnPlacementStarted()
protected static const string SEL_LIGHT_STATE_3 = "light_charged"Referenced by OnPlacementStarted()
protected static const string SEL_STANDBY_LIGHT = "light_stand_by_on"protected static const string SEL_SWITCH_LIGHT_ON = "light_switch_on"protected static const string SEL_LIGHT_CHARGED_ON = "light_charged_on"protected static const string SEL_LIGHT_CHARGING_ON = "light_charging_on"protected const string ATTACHED_CLIPS_STATES[] = {SEL_CLIPS_CAR, SEL_CLIPS_TRUCK}TO DO: If it's required by design, add helicopter battery here and register its selection names.
Referenced by HideAttachedClipsStates()
protected const int ATTACHED_CLIPS_STATES_COUNT = 2Reffers to this ^ array
Referenced by HideAttachedClipsStates()
Members 5
int m_BatteryEnergy0To100protected float m_ChargeEnergyPerSecondstatic protected float m_BlinkingStatusLightInterval = 0.4How often the lights blink
Referenced by OnWorkStart()
ref Timer m_UpdateStatusLightsTimerprotected bool m_BlinkingStatusLightIsOn = falseStatus of one blinking light
Referenced by UpdateStatusLights()
Methods 29
override void EEInit()References EntityAI.EEInit(), GreenLightOff(), RedLightOff()
Show 2 more
, SwitchLightOff(), and YellowLightOff()override bool IsElectricAppliance()override void OnWork(float consumed_energy)References ComponentEnergyManager.AddEnergy(), Class.Cast(), ComponentEnergyManager.ConsumeEnergy()
Show 15 more
, EntityAI.GetCompEM(), EntityAI.GetCompEM(), ComponentEnergyManager.GetEnergy(), ComponentEnergyManager.GetEnergy0To100(), ComponentEnergyManager.GetEnergyMax(), ComponentEnergyManager.GetEnergyUsage(), FeatureTimeAccel.GetFeatureTimeAccelEnabled(), FeatureTimeAccel.GetFeatureTimeAccelValue(), Object.GetHealth(), ComponentEnergyManager.GetPluggedDevice(), CGame.IsServer(), ComponentEnergyManager.SetEnergy(), EntityAI.SetSynchDirty(), m_BatteryEnergy0To100, and m_ChargeEnergyPerSecondoverride void OnWorkStart()References CGame.IsClient(), CGame.IsMultiplayer(), Timer.Run()
Show 3 more
, UpdateStatusLights(), m_BlinkingStatusLightInterval, and m_UpdateStatusLightsTimeroverride void OnWorkStop()References CGame.IsClient(), CGame.IsMultiplayer(), Timer.Stop()
Show 2 more
, UpdateStatusLights(), and m_UpdateStatusLightsTimervoid UpdateStatusLights()override void OnOwnSocketTaken(EntityAI device)References Object.GetType(), HideAttachedClipsStates(), EntityAI.HideSelection()
Show 5 more
, EntityAI.ShowSelection(), SEL_CLIPS_CAR, SEL_CLIPS_DETACHED, SEL_CLIPS_FOLDED, and SEL_CLIPS_TRUCKoverride void OnOwnSocketReleased(EntityAI device)Referenced by VehicleBattery.CanPutAsAttachment()
void HideAttachedClipsStates()Referenced by OnInventoryEnter(), OnInventoryExit(), OnOwnSocketReleased()
Show 1 more
, OnOwnSocketTaken()void RedLightOn()Referenced by UpdateStatusLights()
void GreenLightOn()Referenced by UpdateStatusLights()
void YellowLightOn()Referenced by UpdateStatusLights()
void SwitchLightOn()Referenced by UpdateStatusLights()
void RedLightOff()void GreenLightOff()void YellowLightOff()void SwitchLightOff()override void OnSwitchOn()References EntityAI.HideSelection(), EntityAI.ShowSelection(), SEL_SWITCH_OFF
Show 1 more
, SEL_SWITCH_ONoverride void OnSwitchOff()References EntityAI.HideSelection(), EntityAI.ShowSelection(), SEL_SWITCH_OFF
Show 1 more
, SEL_SWITCH_ONoverride void OnInventoryExit(Man player)References HideAttachedClipsStates(), EntityAI.HideSelection(), ItemBase.OnInventoryExit()
Show 3 more
, EntityAI.ShowSelection(), SEL_CLIPS_DETACHED, and SEL_CLIPS_FOLDEDoverride void OnInventoryEnter(Man player)References HideAttachedClipsStates(), EntityAI.HideSelection(), ItemBase.OnInventoryEnter()
Show 3 more
, EntityAI.ShowSelection(), SEL_CLIPS_DETACHED, and SEL_CLIPS_FOLDEDoverride void RefreshPhysics()References Object.AddProxyPhysics(), EntityAI.GetAttachmentByType(), ItemBase.RefreshPhysics()
Show 1 more
, Object.RemoveProxyPhysics()override void OnPlacementStarted(Man player)References Class.Cast(), PlayerBase.GetHologramLocal(), PlayerBase.GetHologramServer()
Show 15 more
, CGame.IsMultiplayer(), CGame.IsServer(), ItemBase.OnPlacementStarted(), Entity.SetAnimationPhase(), Hologram.SetSelectionToRefresh(), Hologram.SetSelectionToRefresh(), SEL_CLIPS_DETACHED, SEL_CLIPS_FOLDED, SEL_CORD_FOLDED, SEL_CORD_PLUGGED, SEL_LIGHT_STATE_1, SEL_LIGHT_STATE_2, SEL_LIGHT_STATE_3, SEL_SWITCH_OFF, and SEL_SWITCH_ONoverride bool IsDeployable()override void SetActions()