Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
switchable_base.c
Go to the documentation of this file.
1
class
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
}
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
EntityAI
Definition
inventoryitem.c:2
InventoryLocation
InventoryLocation.
Definition
inventorylocation.c:30
ItemBase
Definition
inventoryitem.c:742
ItemBase::OnWasDetached
override void OnWasDetached(EntityAI parent, int slot_id)
Definition
switchable_base.c:14
ItemBase::EEItemLocationChanged
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Definition
switchable_base.c:25
ItemBase::OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition
switchable_base.c:3
Switchable_Base
Definition
chainsaw.c:2
Switchable_Base::GetLight
override ScriptedLightBase GetLight()
Definition
tlrlight.c:13
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Games
Dayz
scripts
4_world
entities
itembase
switchable_base.c
Generated by
1.17.0