DayZ 1.24
Loading...
Searching...
No Matches
ContainerWithElectricManager.c
Go to the documentation of this file.
1class ContainerWithElectricManager : ContainerWithCargoAndAttachments
2{
3 override void UpdateInterval()
4 {
5 super.UpdateInterval();
6
7 if (m_Entity)
9 }
10
11 override void SetEntity(EntityAI entity, bool immedUpdate = true)
12 {
13 super.SetEntity(entity, immedUpdate);
14
16 }
17
19 {
20 if (GetRootWidget().FindAnyWidget("electricity"))
21 {
22 bool hasElectricityIcon = m_Entity.GetCompEM().HasElectricityIcon();
23 GetRootWidget().FindAnyWidget("electricity").Show(hasElectricityIcon);
24 }
25
26 if (GetRootWidget().FindAnyWidget("electricity_can_work"))
27 {
28 bool electricityCanWorkIcon = m_Entity.GetCompEM().CanWork() && !m_Entity.IsRuined();
29 GetRootWidget().FindAnyWidget("electricity_can_work").Show(electricityCanWorkIcon);
30 }
31 }
32}
EntityAI m_Entity
Definition ActionDebug.c:11
override void SetEntity(EntityAI entity, bool immedUpdate=true)
proto native Widget FindAnyWidget(string pathname)