DayZ
1.24
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
parent_item
.AddLightSourceItem(
this
);
10
}
11
12
override
void
OnWasDetached
(
EntityAI
parent,
int
slot_id
)
13
{
14
super
.OnWasDetached(parent,
slot_id
);
15
16
ItemBase
parent_item
;
17
if
(
Class
.
CastTo
(
parent_item
, parent))
18
parent_item
.RemoveLightSourceItem();
19
}
20
21
override
void
EEItemLocationChanged
(
notnull
InventoryLocation
oldLoc
,
notnull
InventoryLocation
newLoc
)
22
{
23
super
.EEItemLocationChanged(
oldLoc
,
newLoc
);
24
25
if
(
GetLight
())
26
GetLight
().UpdateMode();
27
}
28
}
Class
Super root of all classes in Enforce script.
Definition
EnScript.c:11
EntityAI
Definition
Building.c:6
InventoryLocation
InventoryLocation.
Definition
InventoryLocation.c:28
ItemBase
Definition
InventoryItem.c:697
ItemBase::OnWasDetached
override void OnWasDetached(EntityAI parent, int slot_id)
Definition
Switchable_Base.c:12
ItemBase::EEItemLocationChanged
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
Definition
Switchable_Base.c:21
ItemBase::OnWasAttached
override void OnWasAttached(EntityAI parent, int slot_id)
Definition
Switchable_Base.c:3
Param3
Definition
EntityAI.c:95
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.
scripts
4_World
Entities
ItemBase
Switchable_Base.c
Generated by
1.10.0