6 m_DecraftResult =
"LongWoodenStick";
7 m_ParticleLocalPos =
Vector(0, 1.2, 0);
10 override void SetActions()
18 override bool CanReceiveUpgrade()
23 override void OnWorkStart()
29 override void ApplyResultModifications(
ItemBase result)
31 result.SetHealth(result.GetHealthLevelValue(2,
""));
32 result.SetQuantity(1);
35 override bool CanTransformIntoStick()
37 if (
GetGame().IsServer() && !IsIgnited() &&
GetEnergy() < 1 && !IsSetForDeletion())
46 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
48 GetCompEM().SetEnergy0To1(GetHealth01(
"",
""));
52 override void CalculateQuantity()
56 float currentHealth01 = GetHealth01();
57 float currentEnergy01 = GetCompEM().GetEnergy0To1();
60 SetHealth01(
"",
"",
Math.Min(currentHealth01,currentEnergy01));
62 GetCompEM().SetEnergy0To1(GetHealth01());
66 override void UpdateParticle()
74 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY, 1.0);
75 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY_RND, 1.0);
78 float scale =
Math.Max(normalizedQuant * 2.4, 0.4);
80 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.SIZE, scale);
85 void DebugSetHealthAndEnergy(
float time)
87 float max_energy = GetCompEM().GetEnergyMaxPristine();
88 float health01 =
Math.InverseLerp(0, max_energy, time);
89 SetHealth01(
"",
"", health01);
90 GetCompEM().SetEnergy( time );
93 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
101 super.GetDebugActions(outputList);
106 if (super.OnAction(action_id, player, ctx))
110 if (action_id ==
EActions.BROOM_BURN_VERY_SHORT)
112 DebugSetHealthAndEnergy(15);
115 else if (action_id ==
EActions.BROOM_BURN_SHORT)
117 DebugSetHealthAndEnergy(60);
120 else if (action_id ==
EActions.BROOM_BURN_MEDIUM)
122 DebugSetHealthAndEnergy(600);
125 else if (action_id ==
EActions.BROOM_BURN_LONG)
127 DebugSetHealthAndEnergy(GetCompEM().GetEnergyMaxPristine());
140 return "DZ\\gear\\tools\\data\\broom_emissive.rvmat";
145 return "DZ\\gear\\tools\\data\\broom_burn.rvmat";