Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
refridgerator.c
Go to the documentation of this file.
1class 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 GetGame().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();
60
69 }
70}
ActionPlaceObjectCB ActiondeployObjectCB ActionPlaceObject()
void AddAction(typename actionName)
void RemoveAction(typename actionName)
void SetActions()
override void OnSwitchOn()
override void OnWork(float consumed_energy)
Definition barbedwire.c:189
override void OnWorkStart()
Definition barbedwire.c:164
override bool IsElectricAppliance()
override void OnInitEnergy()
override string GetDeploySoundset()
Definition barbedwire.c:392
override void OnWorkStop()
Definition barbedwire.c:177
override void OnSwitchOff()
proto native CGame GetGame()