203{
205 {
206 super.Init();
207 m_DecraftResult = "LongWoodenStick";
208 m_ParticleLocalPos =
Vector(0, 1.2, 0);
209 }
210
212 {
214
217 }
218
220 {
221 return false;
222 }
223
225 {
226 super.OnWorkStart();
228 }
229
231 {
232 result.SetHealth(result.GetHealthLevelValue(2,""));
234 }
235
237 {
238 if (
GetGame().IsServer() && !IsIgnited() &&
GetEnergy() < 1 && !IsSetForDeletion())
239 return true;
240 else
241 return false;
242 }
243
244
246 {
247 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
248
249 GetCompEM().SetEnergy0To1(GetHealth01("",""));
250 }
251
252
254 {
256 {
257 float currentHealth01 = GetHealth01();
258 float currentEnergy01 = GetCompEM().GetEnergy0To1();
259
260
261 SetHealth01(
"",
"",
Math.
Min(currentHealth01,currentEnergy01));
262
263 GetCompEM().SetEnergy0To1(GetHealth01());
264 }
265 }
266
268 {
270
271 if (!m_FireParticle)
272 {
274 }
275 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY, 1.0);
276 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY_RND, 1.0);
277 if (m_FireParticle)
278 {
279 float scale =
Math.
Max(normalizedQuant * 2.4, 0.4);
280
281 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.SIZE, scale);
282 }
283 }
284
285
287 {
288 float max_energy = GetCompEM().GetEnergyMaxPristine();
290 SetHealth01("","", health01);
291 GetCompEM().SetEnergy( time );
292 }
293
294 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
295 {
301
302 super.GetDebugActions(outputList);
303 }
304
306 {
307 if (super.OnAction(action_id, player, ctx))
308 return true;
310 {
311 if (action_id ==
EActions.BROOM_BURN_VERY_SHORT)
312 {
315 }
316 else if (action_id ==
EActions.BROOM_BURN_SHORT)
317 {
320 }
321 else if (action_id ==
EActions.BROOM_BURN_MEDIUM)
322 {
325 }
326 else if (action_id ==
EActions.BROOM_BURN_LONG)
327 {
330 }
331 }
332 return false;
333 }
334
335}
336
338{
340 {
341 return "DZ\\gear\\tools\\data\\broom_emissive.rvmat";
342 }
343
345 {
346 return "DZ\\gear\\tools\\data\\broom_burn.rvmat";
347 }
348}
Param4< int, int, string, int > TSelectableActionInfoWithColor
void AddAction(typename actionName)
override void UpdateParticle()
override void CalculateQuantity()
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
override bool CanReceiveUpgrade()
override void SetActions()
override void OnWorkStart()
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
override bool CanTransformIntoStick()
override void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
override void EEHitBy(TotalDamageResult damageResult, int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos, float speedCoef)
void DebugSetHealthAndEnergy(float time)
override void ApplyResultModifications(ItemBase result)
override void OnIgnitedThis(EntityAI fire_source)
Executed on Server when some item ignited this one.
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.
override float GetQuantity()
override int GetQuantityMax()
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
override void SetActions()
string GetBurningMaterial()
string GetBurntMaterial()
override bool SetQuantity(float value, bool destroy_config=true, bool destroy_forced=false, bool allow_client=false, bool clamp_to_stack_max=true)
static const int BROOM_TORCH_T1
Serializer ParamsReadContext
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto float Max(float x, float y)
Returns bigger of two given values.
static proto float Min(float x, float y)
Returns smaller of two given values.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
const int SAT_DEBUG_ACTION