DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
Switchable_Base.c
См. документацию.
1class Switchable_Base extends ItemBase
2{
3 override void OnWasAttached( EntityAI parent, int slot_id )
4 {
5 super.OnWasAttached( parent, slot_id );
6
7 ItemBase parent_item;
8 if ( Class.CastTo(parent_item,parent) )
9 {
10 parent_item.AddLightSourceItem(this);
11 }
12 }
13
14 override void OnWasDetached( EntityAI parent, int slot_id )
15 {
16 super.OnWasDetached( parent, slot_id );
17
18 ItemBase parent_item;
19 if ( Class.CastTo(parent_item,parent) )
20 {
21 parent_item.RemoveLightSourceItem();
22 }
23 }
24
25 override void EEItemLocationChanged (notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
26 {
27 super.EEItemLocationChanged(oldLoc, newLoc);
28
29 if (GetLight())
30 {
31 GetLight().UpdateMode();
32 }
33 }
34}
Super root of all classes in Enforce script.
Определения EnScript.c:11
Определения Building.c:6
InventoryLocation.
Определения InventoryLocation.c:29
override void OnWasDetached(EntityAI parent, int slot_id)
Определения Switchable_Base.c:14
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Определения Switchable_Base.c:25
override void OnWasAttached(EntityAI parent, int slot_id)
Определения Switchable_Base.c:3
Определения InventoryItem.c:731
override ScriptedLightBase GetLight()
Определения TLRLight.c:13
Определения Chainsaw.c:2
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.