5 protected const string FLAME_BUTANE_ON =
"dz\\gear\\cooking\\data\\flame_butane_ca.paa";
6 protected const string FLAME_BUTANE_OFF =
"";
15 protected const float PARAM_COOKING_TIME_INC_COEF = 0.5;
23 const string SOUND_BURNING =
"portablegasstove_burn_SoundSet";
24 const string SOUND_TURN_ON =
"portablegasstove_turn_on_SoundSet";
25 const string SOUND_TURN_OFF =
"portablegasstove_turn_off_SoundSet";
92 RefreshFlameVisual(m_EM.IsSwitchedOn(),
true);
107 RemoveCookingAudioVisuals();
110 RefreshFlameVisual(m_EM.IsSwitchedOn(),
false);
146 m_Light.AttachOnMemoryPoint(
this,
"light");
164 RefreshFlameVisual(
false,
false);
166 RemoveCookingAudioVisuals();
213 SetObjectTexture(0, FLAME_BUTANE_OFF);
214 SetObjectTexture(1, FLAME_BUTANE_OFF);
222 SetObjectTexture(0, FLAME_BUTANE_ON);
223 SetObjectTexture(1, FLAME_BUTANE_OFF);
228 SetObjectTexture(0, FLAME_BUTANE_OFF);
229 SetObjectTexture(1, FLAME_BUTANE_ON);
262 PlaySoundSetLoop(m_SoundBurningLoop, SOUND_BURNING, 0.1, 0.3);
267 StopSoundSet(m_SoundBurningLoop);
272 PlaySoundSet(m_SoundTurnOn, SOUND_TURN_ON, 0.1, 0.1);
277 PlaySoundSet(m_SoundTurnOff, SOUND_TURN_OFF, 0.1, 0.1);
286 if (!
super.CanPutInCargo(parent))
289 if (GetCompEM().IsSwitchedOn())
296 for (
int i = 0;
i < GetInventory().GetAttachmentSlotsCount();
i++)
298 slotId = GetInventory().GetAttachmentSlotId(
i);
299 if (parent.GetInventory().HasInventorySlot(
slotId))
322 if (
ent.GetInventory().GetCurrentInventoryLocation(
loc) &&
loc.IsValid())
326 parent =
ent.GetHierarchyParent();
327 if (parent && parent.GetInventory().HasInventorySlot(
slotId))
335 ent =
ent.GetHierarchyParent();
344 for (
int i = 0;
i <
attachment.GetInventory().GetSlotIdCount();
i++)
347 if (GetInventory().HasAttachmentSlot(
slotId))
354 if (
ent.GetInventory().GetCurrentInventoryLocation(
loc) &&
loc.IsValid())
358 parent =
ent.GetHierarchyParent();
359 if (parent.GetInventory().HasInventorySlot(
slotId))
367 ent =
ent.GetHierarchyParent();
378 if (!
super.CanPutIntoHands(parent))
381 return !GetCompEM().IsSwitchedOn();
390 return GetCompEM().IsWorking();
395 return GetCompEM().IsWorking();
413 GetInventory().CreateInInventory(
"LargeGasCanister");
414 GetInventory().CreateInInventory(
"Pot");
416 SpawnEntityOnGroundPos(
"WaterBottle",
entity.GetPosition() +
Vector(0.2, 0, 0));
ActionLightItemOnFireCB ActionContinuousBaseCB ActionLightItemOnFire()
void AddAction(typename actionName)
ExplosiveLight m_Light
light
ref UniversalTemperatureSourceSettings m_UTSSettings
ItemBase GetCookingEquipment()
ref Cooking m_CookingProcess
determines how fast will the fuel item burn before spending (lower is better)
void SetCookingEquipment(ItemBase equipment)
ref UniversalTemperatureSource m_UTSource
const float PARAM_COOKING_EQUIP_MAX_TEMP
temperature threshold for starting coooking process (degree Celsius)
ItemBase m_CookingEquipment
void ClearCookingEquipment()
DEPRECATED.
const float PARAM_COOKING_EQUIP_TEMP_INCREASE
maximum temperature of attached cooking equipment (degree Celsius)
const float PARAM_COOKING_TEMP_THRESHOLD
cooking
InventoryLocationType
types of Inventory Location
Super root of all classes in Enforce script.
Wrapper class for managing sound through SEffectManager.
override void EEItemAttached(EntityAI item, string slot_name)
override void OnSwitchOn()
override void OnWork(float consumed_energy)
void RefreshFlameVisual(bool working=false, bool hasAttachment=false)
override void OnWorkStart()
ref UniversalTemperatureSource m_UTSource
DEPRECATED Attached spark plug item.
ref Cooking m_CookingProcess
override bool CanPutIntoHands(EntityAI parent)
override void SetActions()
ref UniversalTemperatureSourceSettings m_UTSSettings
override bool CanLoadAttachment(EntityAI attachment)
void RemoveCookingAudioVisuals()
void SetCookingEquipment(ItemBase equipment)
override bool IsIgnited()
override void OnWorkStop()
ItemBase m_CookingEquipment
void ClearCookingEquipment(ItemBase pItem)
ref UniversalTemperatureSourceLambdaConstant m_UTSLConst
override void EEItemDetached(EntityAI item, string slot_name)
override bool CanRemoveFromCargo(EntityAI parent)
override void OnSwitchOff()
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override bool CanPutInCargo(EntityAI parent)
override void OnDebugSpawn()
override bool CanIgniteItem(EntityAI ignite_target=NULL)
ItemBase GetCookingEquipment()
original Timer deletes m_params which is unwanted
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const float FIRE_ATTACHMENT_DAMAGE_PER_SECOND
various damage per second constants
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.