DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ActionCookOnStick.c
См. документацию.
10
12{
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_GESTUREFB_CAMPFIRE;
17 m_FullBody = true;
18 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
19 m_SpecialtyWeight = UASoftSkillsWeight.ROUGH_LOW;
20
21 m_LockTargetOnUse = false;
22 m_Text = "#cook_on_stick";
23 }
24
30
31 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
32 {
33 FireplaceBase fireplace_target = FireplaceBase.Cast(target.GetObject());
34 Object targetObject = target.GetObject();
35 Edible_Base item_on_stick = Edible_Base.Cast(item.GetAttachmentByType(Edible_Base));
36 if (fireplace_target && fireplace_target.CanCookOnStick() && item_on_stick && item_on_stick.CanBeCookedOnStick())
37 {
38 //fireplace
39 if (fireplace_target.IsBaseFireplace())
40 {
41 Fireplace fireplace = Fireplace.Cast(fireplace_target);
42 if (fireplace && fireplace.IsOven())
43 return false;
44
45 if (fireplace_target.CanCookOnStick())
46 return true;
47 }
48
49 //fireplace indoor
50 if (fireplace_target.IsFireplaceIndoor())
51 {
52 if (fireplace_target.CanCookOnStick())
53 return true;
54 }
55 }
56
57 return false;
58 }
59
60 override void OnEndServer(ActionData action_data)
61 {
62 super.OnEndServer(action_data);
63
64 ItemBase stick = action_data.m_MainItem;
65 Edible_Base item_on_stick = Edible_Base.Cast(stick.GetAttachmentByType(Edible_Base));
66
67 if (item_on_stick)
68 {
69 item_on_stick.MakeSoundsOnClient(false);
70 }
71 }
72};
ActionBase ActionData
Определения ActionBase.c:30
class ActionTargets ActionTarget
float m_SpecialtyWeight
Определения ActionBase.c:77
int m_StanceMask
Определения ActionBase.c:62
string m_Text
Определения ActionBase.c:58
ref CCIBase m_ConditionItem
Определения ActionBase.c:64
bool m_LockTargetOnUse
Определения ActionBase.c:60
bool m_FullBody
Определения ActionBase.c:61
ref CCTBase m_ConditionTarget
Определения ActionBase.c:65
ActionData m_ActionData
Определения AnimatedActionBase.c:3
void ActionContinuousBase()
Определения ActionContinuousBase.c:124
override void OnEndServer(ActionData action_data)
Определения ActionCookOnStick.c:60
override void CreateConditionComponents()
Определения ActionCookOnStick.c:25
void ActionCookOnStick()
Определения ActionCookOnStick.c:13
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Определения ActionCookOnStick.c:31
override void CreateActionComponent()
Определения ActionCookOnStick.c:5
const float COOKING_ON_STICK_UPDATE_TIME
Определения ActionCookOnStick.c:3
int m_CommandUID
Определения AnimatedActionBase.c:143
Определения CCINonRuined.c:2
Определения CCTNonRuined.c:2
void MakeSoundsOnClient(bool soundstate, CookingMethodType cookingMethod=CookingMethodType.NONE)
Определения Edible_Base.c:215
override bool CanBeCookedOnStick()
Определения Edible_Base.c:134
Определения Edible_Base.c:2
override bool CanCookOnStick()
Определения BarrelHoles_ColorBase.c:49
override bool IsBaseFireplace()
Определения BarrelHoles_ColorBase.c:54
Определения InventoryItem.c:731
Определения ObjectTyped.c:2
Определения PlayerBaseClient.c:2
const float DEFAULT
Определения ActionConstants.c:112
DayZPlayerConstants
defined in C++
Определения dayzplayer.c:602