class ComponentEnergyManagerSource
ComponentEnergyManager › Component
All members, including inherited
Constructors 2
void ComponentEnergyManager()void ~ComponentEnergyManager()Constants 7
protected const float DEFAULT_UPDATE_INTERVAL = 15protected static const string SOCKET_ = "socket_"Show 2 more
, UpdateSelections(), and UpdateSocketSelections()protected static const string _PLUGGED = "_plugged"Show 2 more
, UpdateSelections(), and UpdateSocketSelections()protected static const string _AVAILABLE = "_available"static const string SEL_CORD_PLUGGED = "cord_plugged"Show 2 more
, UnplugDevice(), and UpdateSelections()static const string SEL_CORD_FOLDED = "cord_folded"const int MAX_SOCKETS_COUNT = 4Members 43
protected static bool m_DebugPlugs = falsetrue; // Use this to toggle visualisation of plug connections
Show 3 more
, RefreshDebug(), SetDebugPlugs(), and UnplugDevice()protected Shape m_DebugPlugArrowprotected bool m_IsSwichedOnprotected bool m_IsSwichedOnPreviousStateNecesarry due to synchronization of m_IsSwichedOn
protected bool m_IsPassiveDeviceShow 2 more
, SetPassiveState(), and StartUpdates()protected bool m_IsWorkingprotected bool m_CanWorkprotected bool m_CanStopWorkprotected bool m_RestorePlugStateAfter server restart, this value reports if this device was plugged into something or not at the end of last session.
protected bool m_AutoSwitchOffprotected bool m_ShowSocketsInInventoryprotected bool m_HasElectricityIconElectricity icon over the item in inventory
protected bool m_AutoSwitchOffWhenInCargoprotected bool m_ConvertEnergyToQuantityprotected int m_MySocketID = -1protected int m_PlugTypeprotected int m_EnergySourceStorageIDb1Storage persistence ID
protected int m_EnergySourceStorageIDb2Storage persistence ID
protected int m_EnergySourceStorageIDb3Storage persistence ID
protected int m_EnergySourceStorageIDb4Storage persistence ID
protected int m_AttachmentActionTypeprotected int m_EnergySourceNetworkIDLow = -1Network ID
protected int m_EnergySourceNetworkIDHigh = -1Network ID
protected float m_EnergyUsageprotected float m_EnergyShow 2 more
, GetEnergy0To100(), and SetEnergy()protected float m_EnergyAtSpawnprotected float m_EnergyStorageMaxShow 2 more
, GetEnergyMaxPristine(), and SetEnergyMaxPristine()protected float m_ReduceMaxEnergyByDamageCoefprotected float m_SocketsCountprotected float m_CordLengthprotected float m_LastUpdateTimeprotected float m_WetnessExposureprotected float m_UpdateIntervalInterval of OnWork(...) calls and device updates.
protected string m_CordTextureFileprotected ref TIntArray m_CompatiblePlugTypesref Timer m_UpdateTimerref Timer m_UpdateQuantityTimerref Timer m_DebugUpdateEntityAI m_Sockets[MAX_SOCKETS_COUNT]Methods 116
override void Event_OnInit()Show 1 more
, Component.m_ThisEntityAIvoid DebugUpdate()EntityAI GetThisEntityAI()override void Event_OnAwake()Show 48 more
, CGame.ConfigGetIntArray(), CGame.ConfigGetText(), CGame.ConfigIsExisting(), DPrint(), Error(), GetSocketsCount(), Object.GetType(), HasEnoughStoredEnergy(), EntityAI.HideSelection(), array.Insert(), IsPlugCompatible(), Timer.Run(), map.Set(), SetUpdateInterval(), SwitchOn(), new Timer(), int.ToString(), int.ToString(), _PLUGGED, DEFAULT_UPDATE_INTERVAL, m_AttachmentActionType, m_AutoSwitchOff, m_AutoSwitchOffWhenInCargo, m_CanWork, m_CompatiblePlugTypes, m_ConvertEnergyToQuantity, m_CordLength, m_CordTextureFile, m_DeviceByPlugSelection, m_Energy, m_EnergyAtSpawn, CGame.m_EnergyManagerArray, m_EnergyStorageMax, m_EnergyUsage, m_HasElectricityIcon, m_IsPassiveDevice, m_PluggedDevices, m_PlugType, m_ReduceMaxEnergyByDamageCoef, m_ShowSocketsInInventory, m_Sockets, m_SocketsCount, Component.m_ThisEntityAI, m_UpdateQuantityTimer, m_WetnessExposure, MAX_SOCKETS_COUNT, SEL_CORD_PLUGGED, and SOCKET_override int GetCompType()void OnDeviceDestroyed()Show 5 more
, SetPowered(), SwitchOff(), UnplugAllDevices(), UnplugThis(), and Component.m_ThisEntityAIvoid RefreshDebug()Show 4 more
, new Timer(), m_DebugPlugArrow, m_DebugPlugs, and m_DebugUpdatevoid SetDebugPlugs(bool newVal)void SwitchOn()Energy manager: Switches ON the device so it starts doing its work if it has enough energy.
Show 29 more
, ActionRepairCarChassisWithBlowtorch.OnStartAnimationLoopServer(), ActionRepairCarEngineWithBlowtorch.OnStartAnimationLoopServer(), ActionRepairCarPartWithBlowtorch.OnStartAnimationLoopServer(), ActionRepairItemWithBlowtorch.OnStartAnimationLoopServer(), ActionTurnOnHeadtorch.Start(), ActionTurnOnHelmetFlashlight.Start(), ActionTurnOnPowerGenerator.OnExecuteServer(), ActionTurnOnSpotlight.OnExecuteServer(), ActionTurnOnTransmitter.OnExecuteServer(), ActionTurnOnWeaponFlashlight.OnExecuteServer(), ActionTurnOnWhileInHands.OnExecuteServer(), ActionTurnOnWhileOnGround.OnExecuteServer(), ActionViewOptics.EnterOptics(), AdvancedCommunication.TurnOnTransmitter(), Event_OnAwake(), DayZPlayerImplement.SwitchOptics(), EntityAI.OnStoreLoad(), EntityAI.OnVariablesSynchronized(), FlammableBase.OnIgnitedThis(), Headtorch_ColorBase.CheckParent(), MiscGameplayFunctions.TransferEntityVariables(), NVGoggles.EEItemAttached(), NVGoggles.RotateGoggles(), NVGoggles.SwitchOnNVGCheck(), PlayerBase.SetEnergyManagerState(), PoweredOptic_Base.StartWorkServer(), Roadflare.OnActivatedByItem(), SmokeGrenadeBase.OnActivatedByItem(), and SmokeGrenadeBase.OnActivateFinished()void SwitchOff()Energy manager: Switches OFF the device.
Show 40 more
, ActionRepairBoatEngine.OnEndServer(), ActionRepairCarChassisWithBlowtorch.OnEndServer(), ActionRepairCarEngineWithBlowtorch.OnEndServer(), ActionRepairCarPartWithBlowtorch.OnEndServer(), ActionRepairItemWithBlowtorch.OnEndServer(), ActionTurnOffHeadtorch.Start(), ActionTurnOffHelmetFlashlight.Start(), ActionTurnOffPowerGenerator.OnExecuteServer(), ActionTurnOffSpotlight.OnExecuteServer(), ActionTurnOffTransmitter.OnExecuteServer(), ActionTurnOffWeaponFlashlight.OnExecuteServer(), ActionTurnOffWhileInHands.OnExecuteServer(), ActionTurnOffWhileOnGround.OnExecuteServer(), ActionViewOptics.ExitOptics(), AdvancedCommunication.TurnOffTransmitter(), DeviceUpdate(), HandleMoveInsideCargo(), OnDeviceDestroyed(), DayZPlayerImplement.SwitchOptics(), Defibrillator.DischargeServer(), Defibrillator.OnWorkStop(), EntityAI.OnVariablesSynchronized(), ExtinguishTorch.Do(), FlammableBase.OnItemInHandsPlayerSwimStart(), FlammableBase.OnSwitchOn(), Land_Radio_PanelBig.OnSwitchOn(), Land_Radio_PanelBig.OnWorkStop(), Land_Radio_PanelPAS.OnSwitchOn(), Land_WarheadStorage_PowerStation.OnLeverToggled(), Megaphone.OnSwitchOn(), Megaphone.OnWorkStop(), NVGoggles.RotateGoggles(), PlayerBase.OnCommandVehicleStart(), PlayerBase.SetEnergyManagerState(), PoweredOptic_Base.StopWorkServer(), PowerGeneratorBase.EEItemDetached(), Radio.OnWorkStop(), Spotlight.Fold(), TransmitterBase.OnSwitchOn(), and TransmitterBase.OnWorkStop()void SetPassiveState(bool state = true)Energy manager: Changes the status of this device. When it's passive (true), the main timer and OnWork events are not used.
void UnplugDevice(EntityAI device_to_unplug)Energy manager: Unplugs the given device from this one.
Show 18 more
, EntityAI.GetCompEM(), GetMySocketID(), GetPluggedDevices(), GetPluggedDevicesCount(), EntityAI.HideSelection(), OnIsUnplugged(), OnOwnSocketReleased(), array.Remove(), SetEnergySource(), EntityAI.ShowSelection(), StartUpdates(), UnplugCordFromSocket(), WakeUpWholeBranch(), m_DebugPlugArrow, m_DebugPlugs, Component.m_ThisEntityAI, SEL_CORD_FOLDED, and SEL_CORD_PLUGGEDvoid UnplugThis()Energy manager: Unplugs this device from its power source
Show 1 more
, Component.m_ThisEntityAIShow 12 more
, BarbedWire.OnInventoryEnter(), CableReel.OnInventoryEnter(), OnAttachmentRemoved(), OnDeviceDestroyed(), PlugInDevice(), UpdatePlugState(), EntityAI.OnVariablesSynchronized(), ItemBase.EOnContact(), ItemBase.OnItemLocationChanged(), MetalWire.OnInventoryEnter(), Spotlight.Fold(), and XmasLights.DetachFromObject()void UnplugAllDevices()Energy manager: Unplugs everything directly connected to this device
void SetEnergy(float new_energy)Energy manager: Sets stored energy for this device. It ignores the min/max limit!
Show 5 more
, Math.Min(), EntityAI.SetWeightDirty(), UpdateCanWork(), m_Energy, and Component.m_ThisEntityAIvoid SetEnergy0To1(float energy01)Energy manager: Sets stored energy for this device between 0 and MAX based on relative input value between 0 and 1
Show 2 more
, DeCraftDetonator.Do(), and ItemBase.SetCEBasedQuantity()void UpdateSelections()Energy manager: Shows/Hides all selections this system works with. Call this if something is wrong with selections (like during Init and Restore event in config)
void UpdatePlugState()Energy manager: Unplugs this device when it's necesarry
void GetCompatiblePlugTypes(out TIntArray IDs)Show 1 more
, m_EnergySourceStorageIDb4void SetEnergyMaxPristine(float new_limit)Energy manager: Changes the maximum amount of energy this device can store (when pristine).
void SetCordLength(float new_length)Energy manager: Changes the length of the virtual power cord.
void SetPlugType(int new_type)void SetAttachmentAction(int new_action_type)void SetEnergyUsage(float new_usage)Energy manager: Changes the energy usage per second.
void ResetEnergyUsage()Energy manager: Resets energy usage to default (config) value.
Show 1 more
, Component.m_ThisEntityAIvoid SetCordTextureFile(string new_path)void SetEnergySourceClient(EntityAI source)Energy manager: Stores the device which is plugged into the given socket ID.
void SetElectricityIconVisibility(bool make_visible)Energy manager: Sets visibility of the electricity icon (bolt).
void UpdateCanWork()Show 6 more
, CGame.IsMultiplayer(), CGame.IsServer(), Synch(), UpdateCanWork(), m_CanWork, and Component.m_ThisEntityAIShow 5 more
, SetEnergy(), SwitchOff(), SwitchOn(), UpdateCanWork(), and WakeUpWholeBranch()void HandleMoveInsideCargo(EntityAI container)void SetUpdateInterval(float value)Energy manager: Sets the interval of the OnWork(...) calls. Changing this value does not change the rate of energy consumption.
Energy manager: Attempts to plug this device into the energy_source. Returns true if the action was successfull, or false if not (due to plug incompatibility or no free socket on the receiver). The ID of the power socket is chosen automatically unless optional parameter socket_id is used (starting from 0). If the given ID is not free then a free socket is found.
bool CanSwitchOn()Energy manager: Checks if the device can be switched ON
Energy manager: Checks whenever this device can do work or not.
test_energyfloatoptional parameter will overwite the default energy consumption value of this device.
Returns: bool Returns true if this device will work when it's switched on. Otherwise it returns false.
Show 25 more
, ActionTurnOnHelmetFlashlight.ActionCondition(), ActionTurnOnHelmetFlashlight.Start(), ActionTurnOnPowerGenerator.ActionCondition(), ActionTurnOnWeaponFlashlight.ActionCondition(), ActionTurnOnWeaponFlashlight.OnExecuteServer(), ActionTurnOnWhileInHands.ActionCondition(), ActionTurnOnWhileInHands.OnExecuteServer(), ActionTurnOnWhileOnGround.ActionCondition(), ActionTurnOnWhileOnGround.OnExecuteServer(), ActionUseRangefinder.ActionCondition(), ActionViewOptics.CanWork(), CASingleUseTurnOnPlugged.Execute(), UpdateCanWork(), ContainerWithElectricManager.ElectricityIcon(), FlammableBase.CanBeIgnitedBy(), HandsContainer.ElectricityIcon(), ItemOptics.IsWorking(), Land_Radio_PanelBig.OnSwitchOn(), Land_Radio_PanelPAS.OnSwitchOn(), Megaphone.OnSwitchOn(), NVGoggles.EEItemAttached(), NVGoggles.RotateGoggles(), RadialQuickbarMenu.CheckForLightsAndNVG(), SmokeGrenadeBase.OnActivateFinished(), and TransmitterBase.OnSwitchOn()bool CheckWetness()Energy manager: Checks if this device is being stopped from working by its wetness level. Returns true when its wetness is not blocking it, false when its to owet to work.
bool CanSwitchOff()Energy manager: Checks if the device can be switched OFF
Show 7 more
, ActionTurnOffSpotlight.ActionCondition(), ActionTurnOffTransmitterOnGround.ActionCondition(), ActionTurnOffWeaponFlashlight.ActionCondition(), ActionTurnOffWhileInHands.ActionCondition(), ActionTurnOffWhileOnGround.ActionCondition(), ActionTurnOffWhileOnGround.OnExecuteServer(), and SwitchOff()bool GetPreviousSwitchState()bool IsSwitchedOn()Energy manager: Returns state of the switch. Whenever the device is working or not does not matter. Use IsWorking() to account for that as well.
Show 22 more
, ActionTurnOffHelmetFlashlight.Start(), ActionTurnOffWeaponFlashlight.OnExecuteServer(), BarbedWire.PreAreaDamageActions(), Blowtorch.CanPutInCargo(), Chainsaw.CanPutInCargo(), CanSwitchOff(), CanSwitchOn(), CanWork(), DeviceUpdate(), FindAndConsumeEnergy(), GetPoweredDevices(), HandleMoveInsideCargo(), EntityAI.GetDebugText(), EntityAI.OnStoreSave(), EntityAI.OnVariablesSynchronized(), MiscGameplayFunctions.TransferEntityVariables(), NVGoggles.SwitchOnNVGCheck(), PortableGasStove.CanPutInCargo(), PortableGasStove.CanPutIntoHands(), PortableGasStove.EEItemAttached(), PortableGasStove.EEItemDetached(), and Radio.CanOperate()bool IsCordFolded()Energy manager: Returns true if the cord of this device is folded. Returns false if it's plugged.
bool IsPassive()Energy manager: Returns true if this device is set to be passive. False if otherwise.
bool IsPlugged()Energy manager: Returns true if this device is plugged into some other device (even if they are OFF or ruined). Otherwise it returns false.
Show 27 more
, BarbedWire.OnPlacementComplete(), BarbedWire.PreAreaDamageActions(), BatteryCharger.CanPutInCargo(), BatteryCharger.CanPutIntoHands(), CableReel.CanPutInCargo(), CableReel.OnInventoryEnter(), FindAndConsumeEnergy(), IsCordFolded(), IsEnergySourceAtReach(), PlugInDevice(), EntityAI.OnStoreSave(), Hologram.CheckPowerSource(), Hologram.CorrectMaterialPathName(), ItemBase.EOnContact(), ItemBase.OnItemLocationChanged(), MetalWire.OnInventoryEnter(), PlayerBase.OnScheduledTick(), PlayerBase.PlacingCancelLocal(), PlayerBase.PlacingCancelServer(), Spotlight.CanPutInCargo(), Spotlight.OnInitEnergy(), Spotlight.OnItemLocationChanged(), Spotlight.UpdateAllSelections(), VehicleBattery.CanDisplayAttachmentSlot(), VehicleBattery.CanReceiveAttachment(), VehicleBattery.OnInventoryEnter(), and XmasLights.AttachToObject()Energy manager: Consumes the given amount of energy. If there is not enough of stored energy in this device, then it tries to take it from its power source, if any exists. Returns true if the requested amount of energy was consumed. Otherwise it returns false.
Show 2 more
, CarScript.UpdateBattery(), and DeviceUpdate()bool IsWorking()Energy manager: Returns true if this device is working right now.
Show 45 more
, ActionTuneFrequency.ActionCondition(), ActionTuneFrequencyOnGround.ActionCondition(), ActionTurnOffTransmitter.ActionCondition(), ActionTurnOnTransmitter.ActionCondition(), BarbedWire.OnPlacementComplete(), BatteryCharger.UpdateStatusLights(), Blowtorch.IsIgnited(), Chemlight_ColorBase.EEHealthLevelChanged(), Chemlight_ColorBase.StandUp(), DeviceUpdate(), OnDeviceDestroyed(), SwitchOff(), Defibrillator.OnIsCharged(), EntityAI.GetDebugText(), EntityAI.IsIgnited(), FlammableBase.CanBeTakenAsCargo(), FlammableBase.CanIgniteItem(), FlammableBase.CanPutAsAttachment(), FlammableBase.CanReleaseAttachment(), FlammableBase.GetMeleeHeavyMode(), FlammableBase.GetMeleeMode(), FlammableBase.GetMeleeSprintMode(), FlammableBase.IsIgnited(), FlammableBase.OnAttachmentQuantityChangedEx(), FlammableBase.UpdateMaterial(), Flashlight.OnInventoryExit(), GPSReceiver.IsTurnedOn(), Heatpack.IsSelfAdjustingTemperature(), Land_WarheadStorage_PowerStation.GetClosestBunker(), Land_WarheadStorage_PowerStation.LinkPowerGeneratorServer(), PortableGasStove.CanIgniteItem(), PortableGasStove.IsIgnited(), PortableGasStove.IsSelfAdjustingTemperature(), PowerGeneratorBase.CanManipulate(), PowerGeneratorBase.StartLoopSound(), PowerGeneratorStatic.CanReleaseAttachment(), Rag.CanBeSplit(), Roadflare.CanIgniteItem(), SharpenBroom.CanDo(), SmokeGrenadeBase.CanPutInCargo(), SplitBroom.CanDo(), Spotlight.UpdateAllSelections(), TLRLight.OnInventoryExit(), UniversalLight.OnInventoryExit(), and XmasLights.TurnOnItem()bool HasEnoughStoredEnergy()Energy manager: Returns true if this device has enough of stored energy for its own use.
Energy manager: Returns true if this device has any free socket to receive a plug. If optional parameter socket_id is provided then only that socket ID is checked.
Energy manager: Checks if the given plug is compatible with this device's socket. Used by CanReceivePlugFrom() method.
Energy manager: Returns true if this device can receive power plug of the other device.
Show 3 more
, CanBePluggedInto(), OnAttachmentAdded(), and PlugInDevice()Energy manager: Returns true if this device can be plugged into the given energy source. Otherwise returns false.
bool HasElectricityIcon()Energy manager: Returns true if the electricity icon (bolt) is supposed to be visible for this device. False if not.
bool HasConversionOfEnergyToQuantity()Energy manager: Returns true if this item automatically converts its energy to quantity
bool IsEnergySourceAtReach(vector from_position, float add_tolerance = 0, vector override_source_position = "-1 -1 -1")Energy manager: Returns true if this device's virtual power cord can reach its energy source at the given position, depending on its cordLength config parameter. Otherwise returns false.
from_positionvectorposition from where the measurement will be takenadd_tolerancefloatparameter will add to the cord's length in meters (optional)
Returns: bool True if the power source will be at reach for the plug, or if config param cordLength is absent or 0. False if not, or is not plugged, or this device lacks Energy Manager component.
vector position_player = g_Game.GetPlayer().GetPosition();
if ( my_device.GetCompEM().IsEnergySourceAtReach( position_player ) )
{
Print("Power source is at reach!");
}else{
Print("Power source is NOT at reach!");
}Show 2 more
, Object.GetPosition(), and IsPlugged()bool HasVisibleSocketsInInventory()Energy manager: Returns true if this selection is a plug that's plugged into this device. Otherwise returns false.
int GetSocketsCount()Energy manager: Returns the count of power sockets (whenever used or not)
Show 4 more
, IsSelectionAPlug(), PlugCordIntoSocket(), UpdateSelections(), and WakeUpWholeBranch()int GetPlugType()Energy manager: Returns plug type. Check \DZ\data\basicDefines.hpp OR \Scripts\Classes\Component\_constants.h files for types of plugs
int GetAttachmentAction()int GetEnergySourceStorageIDb1()int GetEnergySourceStorageIDb2()int GetEnergySourceStorageIDb3()int GetEnergySourceStorageIDb4()int GetEnergySourceNetworkIDLow()int GetEnergySourceNetworkIDHigh()int GetPluggedDevicesCount()Energy manager: Returns the number of devices plugged into this one.
int GetEnergy0To100()Energy manager: Returns % of stored energy this device has as integer (from 0 to 100)
Show 1 more
, PowerGeneratorBase.SetFuel()float GetEnergy0To1()Energy manager: Returns % of stored energy this device has as float (from 0.0 to 1.0)
float GetUpdateInterval()Energy manager: Returns the update interval of this device.
float GetWetnessExposure()Returns wetness exposure value defined in config
float GetEnergyUsage()Energy manager: Returns the number of energy this device needs to run itself (See its config >> energyUsagePerSecond)
Show 5 more
, CanWork(), DeviceUpdate(), HasEnoughStoredEnergy(), SetEnergy(), and FlammableBase.CanBeIgnitedBy()float GetEnergy()Energy manager: Returns the amount of stored energy this device has
Show 26 more
, Blowtorch.HasEnoughEnergyForRepair(), CAContinuousFillPowerGenerator.Setup(), CarScript.CheckOperationalRequirements(), CarScript.OnBeforeLightOn(), CarScript.UpdateBattery(), Chemlight_ColorBase.OnWorkStop(), AddEnergy(), CanWork(), HasEnoughStoredEnergy(), EntityAI.OnStoreSave(), FlammableBase.CanBeIgnitedBy(), FlammableBase.ConsumeFuelFromBottle(), FlammableBase.ConsumeFuelFromGasStation(), FlammableBase.ConsumeLard(), FlammableBase.OnWork(), FlammableBase.OnWorkStop(), FlammableBase.UpdateCheckForReceivingUpgrade(), FlammableBase.Upgrade(), FuelChainsaw.Do(), ItemBase.GetEnergy(), ItemBase.GetWeightSpecialized(), MiscGameplayFunctions.TransferEntityVariables(), PowerGeneratorBase.CanAddFuel(), PowerGeneratorBase.GetFuel(), Roadflare.OnWork(), and Roadflare.OnWorkStop()Energy manager: Adds energy to this device and clamps it within its min/max storage limits. Returns the amount of energy that was clamped. Negative value is supported, but you should still use ConsumeEnergy(...) for propper substraction of energy.
float GetEnergyMax()Energy manager: Returns the maximum amount of energy this device can curently store. If parameter 'reduceMaxEnergyByDamageCoef' is used in the config of this device then the returned value will be reduced by damage.
Show 10 more
, SetEnergy0To1(), FlammableBase.ConsumeFuelFromBottle(), FlammableBase.ConsumeFuelFromGasStation(), FlammableBase.ConsumeLard(), FuelChainsaw.Do(), ItemBase.OnAction(), PowerGeneratorBase.CanAddFuel(), PowerGeneratorBase.OnInitEnergy(), PowerGeneratorBase.SetFuel(), and Roadflare.OnWork()float GetEnergyMaxPristine()Energy manager: Returns the maximum amount of energy this device can store. It's damage is NOT taken into account.
Show 1 more
, ItemBase.SetCEBasedQuantity()float GetCordLength()Energy manager: Returns the length of the virtual power cord.
EntityAI GetEnergySource()Energy manager: Returns the energy source this device is plugged into
Show 15 more
, DebugUpdate(), FindAndConsumeEnergy(), IsEnergySourceAtReach(), OnAttachmentRemoved(), UnplugThis(), UpdatePlugState(), UpdateSelections(), EntityAI.GetDebugText(), EntityAI.OnStoreSave(), Flashlight.OnWork(), Headtorch_ColorBase.OnWork(), ItemBase.EOnContact(), MetalWire.UpdateAllSelections(), TLRLight.OnWork(), and UniversalLight.OnWork()Energy manager: Returns the device which is plugged into the given socket ID.
Show 1 more
, UpdateSelections()Energy manager: Returns the device to which the given plug selection belongs to
EntityAI GetPluggedDevice()Energy manager: Returns a device which is plugged into this one. If there are more devices to choose from then it returns the first one that is found.
Show 12 more
, BatteryCharger.CanPutInCargo(), BatteryCharger.CanPutIntoHands(), BatteryCharger.CanReceiveAttachment(), BatteryCharger.OnWork(), BatteryCharger.UpdateStatusLights(), MetalWire.OnInventoryEnter(), MetalWire.UpdateAllSelections(), VehicleBattery.CanPutAsAttachment(), VehicleBattery.CanPutInCargo(), VehicleBattery.CanPutIntoHands(), VehicleBattery.OnInventoryEnter(), and VehicleBattery.OnMovedInsideCargo()string GetCordTextureFile()Energy manager: Returns path to the cord texture file.
Energy manager: Returns an array of devices which are plugged into this one
Show 6 more
, InteractBranch(), IsSelectionAPlug(), PlugInDevice(), UnplugAllDevices(), UnplugDevice(), and WakeUpWholeBranch()Energy manager: Returns an array of devices which are plugged into this one and are turned on
Show 2 more
, array.Insert(), and IsSwitchedOn()void OnWork(float consumed_energy)void OnIsPlugged(EntityAI source_device)Show 5 more
, new Timer(), UpdateCanWork(), m_DebugPlugs, m_DebugUpdate, and Component.m_ThisEntityAIvoid OnIsUnplugged(EntityAI last_energy_source)void OnOwnSocketTaken(EntityAI device)Show 3 more
, EntityAI.OnOwnSocketTaken(), Object.PlaySoundSet(), and Component.m_ThisEntityAIvoid OnOwnSocketReleased(EntityAI device)Show 3 more
, EntityAI.OnOwnSocketReleased(), Object.PlaySoundSet(), and Component.m_ThisEntityAIvoid OnAttachmentAdded(EntityAI elec_device)Show 3 more
, PlugThisInto(), PlugThisInto(), and Component.m_ThisEntityAIvoid OnAttachmentRemoved(EntityAI elec_device)Show 2 more
, UnplugThis(), and UnplugThis()void StartUpdates()Show 3 more
, new Timer(), m_IsPassiveDevice, and m_UpdateTimerShow 3 more
, UnplugDevice(), WakeUpWholeBranch(), and EntityAI.OnVariablesSynchronized()void OnEnergyConsumed()Energy manager: Called when energy was consumed on this device
void OnEnergyAdded()Energy manager: Called when energy was added on this device
Show 1 more
, m_UpdateQuantityTimerprotected void StopUpdates()Gets called originally when the player is interacting with an item containing this energy component, then recursively following the branches of connection from the original item to the peripheries External calling of this function is not automatic for all item interactions and may need to be implemented on case by case bases Avoid using for gameplay logic, use 'OnInteractBranch' instead
Show 2 more
, InteractBranch(), and OnInteractBranch()Called when the player is interacting with an item containing this energy component, or when interacting with an item this device is connected to
protected void WakeUpWholeBranch(EntityAI original_caller)Show 6 more
, EntityAI.GetCompEM(), GetPluggedDevices(), GetSocketsCount(), StartUpdates(), UpdateCanWork(), and WakeUpWholeBranch()Show 3 more
, SwitchOn(), UnplugDevice(), and WakeUpWholeBranch()protected void SetEnergySource(EntityAI source)Show 4 more
, m_EnergySource, m_EnergySourceNetworkIDHigh, m_EnergySourceNetworkIDLow, and m_IsPluggedShow 17 more
, EntityAI.HideSelection(), EntityAI.IncreaseLifetime(), array.Insert(), InteractBranch(), CGame.IsMultiplayer(), IsPlugged(), CGame.IsServer(), OnIsPlugged(), OnOwnSocketTaken(), PlugCordIntoSocket(), SetEnergySource(), EntityAI.ShowSelection(), UnplugThis(), WakeUpWholeBranch(), Component.m_ThisEntityAI, SEL_CORD_FOLDED, and SEL_CORD_PLUGGEDprotected void UnplugCordFromSocket(int socket_to_unplug_ID)protected void SetPowered(bool state)protected bool FindAndConsumeEnergy(EntityAI original_caller, float amount, bool ignore_switch_state = false)Show 5 more
, GetEnergySource(), IsPlugged(), Object.IsRuined(), IsSwitchedOn(), and Component.m_ThisEntityAIprotected void SetMySocketID(int slot_ID)void Synch()void RememberLastUpdateTime()float GetCurrentUpdateTime()void DeviceUpdate()