3 const string TEXTURE_FLAME =
"dz\\gear\\cooking\\data\\flame_butane_ca.paa";
4 const string ANIM_PHASE_FLAME =
"FlameHide";
5 const string SOUND_BURNING =
"Blowtorch_Loop_SoundSet";
17 m_Light.AttachOnMemoryPoint(
this,
"light");
20 RefreshFlameVisual(
true);
33 RefreshFlameVisual(
false);
37 protected void RefreshFlameVisual(
bool working =
false)
41 SetObjectTexture(0, TEXTURE_FLAME);
42 SetAnimationPhase(ANIM_PHASE_FLAME, 0.0);
46 SetObjectTexture(0,
"");
47 SetAnimationPhase(ANIM_PHASE_FLAME, 1.0);
51 protected void SoundBurningStart()
53 PlaySoundSetLoop(m_SoundBurningLoop, SOUND_BURNING, 0.1, 0.0);
56 protected void SoundBurningStop()
58 StopSoundSet(m_SoundBurningLoop);
63 if (!super.CanPutInCargo(parent))
68 return !GetCompEM().IsSwitchedOn();
76 override bool IsIgnited()
78 return GetCompEM().IsWorking();
81 override void OnIgnitedTarget(
EntityAI ignited_item)
89 canisterEM.AddEnergy(-1 * (GetCompEM().GetEnergyUsage() *
UATimeSpent.FIREPLACE_IGNITE));
94 override bool CanIgniteItem(
EntityAI ignite_target = NULL)
96 return ignite_target.CanBeIgnitedBy(
this);
112 if (GetInventory().AttachmentCount() != 0)
114 return GetInventory().GetAttachmentFromIndex(0);
120 bool HasEnoughEnergyForRepair(
float pTime)
122 if (GetGasCanister())
127 return canisterEM.GetEnergy() > GetCompEM().GetEnergyUsage() * pTime;
136 GetInventory().CreateInInventory(
"LargeGasCanister");