Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
switchable_base.c
Go to the documentation of this file.
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.
Definition enscript.c:11
InventoryLocation.
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
override void OnWasDetached(EntityAI parent, int slot_id)