Start energy consumption once battery is attached and the lock is already attached to a parent that can have a construction component
См. определение в файле CodeLock.c строка 69
70 {
71 super.EEItemAttached(item, slot_name);
72
74 {
77 {
78 Battery9V battery = Battery9V.Cast(item);
79 if (battery)
80 {
81 float batteryEnergy = battery.GetCompEM().GetEnergy();
83 {
85 GetCompEM().SwitchOn();
86 }
87
89 }
90 }
91 }
92 }
const string ATTACHMENT_SLOT_BATTERY
ref CodeLockComponent m_CodeLockComponent
Перекрестные ссылки ATTACHMENT_SLOT_BATTERY, g_Game, HasValidParent(), m_CodeLockComponent и UpdateVisuals().