241{
243 {
244 super.Init();
245 m_DecraftResult = "LongWoodenStick";
246 m_ParticleLocalPos =
Vector(0, 1.2, 0);
247 }
248
250 {
252
255 }
256
258 {
259 return false;
260 }
261
263 {
264 super.OnWorkStart();
266 }
267
269 {
270 result.SetHealth(result.GetHealthLevelValue(2,""));
272 }
273
275 {
276 if (
GetGame().IsServer() && !IsIgnited() &&
GetEnergy() < 1 && !IsSetForDeletion())
277 return true;
278 else
279 return false;
280 }
281
282
284 {
285 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
286
287 GetCompEM().SetEnergy0To1(GetHealth01("",""));
288 }
289
290
292 {
294 {
295 float currentHealth01 = GetHealth01();
296 float currentEnergy01 = GetCompEM().GetEnergy0To1();
297
298
299 SetHealth01(
"",
"",
Math.
Min(currentHealth01,currentEnergy01));
300
301 GetCompEM().SetEnergy0To1(GetHealth01());
302 }
303 }
304
306 {
308
309 if (!m_FireParticle)
310 {
312 }
313 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY, 1.0);
314 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY_RND, 1.0);
315 if (m_FireParticle)
316 {
317 float scale =
Math.
Max(normalizedQuant * 2.4, 0.4);
318
319 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.SIZE, scale);
320 }
321 }
322
323
325 {
326 float max_energy = GetCompEM().GetEnergyMaxPristine();
328 SetHealth01("","", health01);
329 GetCompEM().SetEnergy( time );
330 }
331
332 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
333 {
339
340 super.GetDebugActions(outputList);
341 }
342
344 {
345 if (super.OnAction(action_id, player, ctx))
346 return true;
348 {
349 if (action_id ==
EActions.BROOM_BURN_VERY_SHORT)
350 {
353 }
354 else if (action_id ==
EActions.BROOM_BURN_SHORT)
355 {
358 }
359 else if (action_id ==
EActions.BROOM_BURN_MEDIUM)
360 {
363 }
364 else if (action_id ==
EActions.BROOM_BURN_LONG)
365 {
368 }
369 }
370 return false;
371 }
372
373}
374
376{
378 {
379 return "DZ\\gear\\tools\\data\\broom_emissive.rvmat";
380 }
381
383 {
384 return "DZ\\gear\\tools\\data\\broom_burn.rvmat";
385 }
386}
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