DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

См. определение в файле ActionLightItemOnFireWithBlowtorch.c строка 16

17 {
18 Blowtorch bt = Blowtorch.Cast(item);
19 if (!bt.HasEnoughEnergyForRepair(UATimeSpent.FIREPLACE_IGNITE))
20 {
21 return false;
22 }
23
24 ItemBase target_item = ItemBase.Cast(target.GetObject());
25 if (target_item && item)
26 {
27 // when igniting item on the ground with igniter in hands
28 if (!target_item.IsIgnited() && !IsItemInCargoOfSomething(target_item) && target_item.CanBeIgnitedBy(item))
29 {
30 // oven stage of standard fireplace
31 if (target_item.IsKindOf("Fireplace"))
32 {
33 if (Fireplace.Cast(target_item).IsOven())
34 {
35 return true;
36 }
37
38 if (Fireplace.CanIgniteEntityAsFireplace(target_item))
39 {
40 return true;
41 }
42
43 return false;
44 }
45
46 return true;
47 }
48 // when igniting item in hands from something on ground
49 else if (!item.IsIgnited() && !IsItemInCargoOfSomething(item) && target_item.CanIgniteItem(item) && item.CanBeIgnitedBy(target_item))
50 {
51 return true;
52 }
53 }
54
55 return false;
56 }
bool IsItemInCargoOfSomething(ItemBase item)
Определения ActionLightItemOnFire.c:40
override bool IsIgnited()
Определения Blowtorch.c:76
override bool CanBeIgnitedBy(EntityAI igniter=NULL)
Определения BandageDressing.c:11
override bool CanIgniteItem(EntityAI ignite_target=NULL)
Определения BandageDressing.c:18
Определения InventoryItem.c:731
const float FIREPLACE_IGNITE
Определения ActionConstants.c:96
Определения ActionConstants.c:28

Перекрестные ссылки ActionTarget, ItemBase::CanBeIgnitedBy(), ItemBase::CanIgniteItem(), UATimeSpent::FIREPLACE_IGNITE, ItemBase::IsIgnited() и IsItemInCargoOfSomething().