Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
refridgerator.c
Go to the documentation of this file.
1
class
Refridgerator
extends
ItemBase
2
{
3
SoundOnVehicle
m_SoundLoopEntity
;
4
5
override
bool
IsElectricAppliance
()
6
{
7
return
true
;
8
}
9
10
override
void
OnInitEnergy
()
11
{
12
m_SoundLoopEntity
= NULL;
13
}
14
15
//--- POWER EVENTS
16
override
void
OnWorkStart
()
17
{
18
// TO DO: Slow down or stop the aging of food inside of the fridge when such functionality is created.
19
20
m_SoundLoopEntity
= PlaySoundLoop(
"powerGeneratorLoop"
, 50);
// using placeholder sound
21
}
22
23
override
void
OnWork
(
float
consumed_energy )
24
{
25
26
}
27
28
override
void
OnWorkStop
()
29
{
30
// TO DO: Allow food inside the fridge to start aging again.
31
32
g_Game
.ObjectDelete(
m_SoundLoopEntity
);
33
m_SoundLoopEntity
= NULL;
34
}
35
36
//--- ACTION EVENTS
37
override
void
OnSwitchOn
()
38
{
39
40
}
41
42
override
void
OnSwitchOff
()
43
{
44
45
}
46
47
//================================================================
48
// ADVANCED PLACEMENT
49
//================================================================
50
51
override
string
GetDeploySoundset
()
52
{
53
return
"placeRefridgerator_SoundSet"
;
54
}
55
56
override
void
SetActions
()
57
{
58
super.SetActions();
59
RemoveAction
(
ActionTakeItemToHands
);
60
61
AddAction
(
ActionPlugIn
);
62
AddAction
(
ActionTogglePlaceObject
);
63
AddAction
(
ActionUnplugThisByCord
);
64
AddAction
(
ActionTurnOnWhileOnGround
);
65
AddAction
(
ActionTurnOffWhileOnGround
);
66
AddAction
(
ActionRepositionPluggedItem
);
67
AddAction
(
ActionPlaceObject
);
68
AddAction
(
ActionTakeItemToHands
);
69
}
70
}
ActionPlaceObject
ActionPlaceObjectCB ActiondeployObjectCB ActionPlaceObject()
Definition
actionplaceobject.c:11
AddAction
void AddAction(typename actionName)
Definition
advancedcommunication.c:220
RemoveAction
void RemoveAction(typename actionName)
Definition
advancedcommunication.c:252
ActionPlugIn
Definition
actionplugin.c:2
ActionRepositionPluggedItem
Definition
actionrepositionpluggeditem.c:2
ActionTakeItemToHands
Definition
actiontakeitemtohands.c:2
ActionTogglePlaceObject
Definition
actiontoggleplaceobject.c:2
ActionTurnOffWhileOnGround
Definition
actionturnoffwhileonground.c:2
ActionTurnOnWhileOnGround
Definition
actionturnonwhileonground.c:2
ActionUnplugThisByCord
Definition
actionunplugthisbycord.c:2
ItemBase
Definition
inventoryitem.c:742
ItemBase::GetDeploySoundset
override string GetDeploySoundset()
Definition
refridgerator.c:51
ItemBase::OnInitEnergy
override void OnInitEnergy()
Definition
refridgerator.c:10
ItemBase::OnSwitchOn
override void OnSwitchOn()
Definition
refridgerator.c:37
ItemBase::OnSwitchOff
override void OnSwitchOff()
Definition
refridgerator.c:42
ItemBase::OnWorkStop
override void OnWorkStop()
Definition
refridgerator.c:28
ItemBase::m_SoundLoopEntity
SoundOnVehicle m_SoundLoopEntity
Definition
refridgerator.c:3
ItemBase::OnWork
override void OnWork(float consumed_energy)
Definition
refridgerator.c:23
ItemBase::IsElectricAppliance
override bool IsElectricAppliance()
Definition
refridgerator.c:5
ItemBase::OnWorkStart
override void OnWorkStart()
Definition
refridgerator.c:16
ItemBase::SetActions
override void SetActions()
Definition
refridgerator.c:56
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
Games
Dayz
scripts
4_world
entities
itembase
refridgerator.c
Generated by
1.17.0