Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
petrollighter.c
Go to the documentation of this file.
1class PetrolLighter extends ItemBase
2{
3 override bool CanIgniteItem( EntityAI ignite_target = NULL )
4 {
5 if ( GetQuantity() > 0 )
6 return true;
7 else
8 return false;
9 }
10
11 override void OnIgnitedTarget( EntityAI target_item )
12 {
13 if ( GetGame().IsServer() )
14 {
15 AddQuantity( -0.5 );
16 }
17 }
18
19 override void OnIgnitedTargetFailed( EntityAI target_item )
20 {
21 if ( GetGame().IsServer() )
22 {
23 AddQuantity( -0.5 );
24 }
25 }
26
27 /*
28 override bool IsTargetIgnitionSuccessful( EntityAI item_target = NULL )
29 {
30 }
31 */
32
33 override void SetActions()
34 {
35 super.SetActions();
36
38 }
39}
ActionLightItemOnFireCB ActionContinuousBaseCB ActionLightItemOnFire()
void AddAction(typename actionName)
void SetActions()
proto native CGame GetGame()
bool AddQuantity(float value, bool destroy_config=true, bool destroy_forced=false)
add item quantity[related to varQuantity... config entry], destroy_config = true > if the quantity re...
Definition itembase.c:8202
override float GetQuantity()
Definition itembase.c:8296