230{
232 {
233 super.Init();
234 m_DecraftResult = "LongWoodenStick";
235 m_ParticleLocalPos =
Vector(0, 1.2, 0);
236 }
237
239 {
241
244 }
245
247 {
248 return false;
249 }
250
252 {
253 super.OnWorkStart();
255 }
256
258 {
259 result.SetHealth(result.GetHealthLevelValue(2,""));
261 }
262
264 {
265 if (
GetGame().IsServer() && !IsIgnited() &&
GetEnergy() < 1 && !IsSetForDeletion())
266 return true;
267 else
268 return false;
269 }
270
271
273 {
274 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
275
276 GetCompEM().SetEnergy0To1(GetHealth01("",""));
277 }
278
279
281 {
283 {
284 float currentHealth01 = GetHealth01();
285 float currentEnergy01 = GetCompEM().GetEnergy0To1();
286
287
288 SetHealth01(
"",
"",
Math.
Min(currentHealth01,currentEnergy01));
289
290 GetCompEM().SetEnergy0To1(GetHealth01());
291 }
292 }
293
295 {
297
298 if (!m_FireParticle)
299 {
301 }
302 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY, 1.0);
303 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY_RND, 1.0);
304 if (m_FireParticle)
305 {
306 float scale =
Math.
Max(normalizedQuant * 2.4, 0.4);
307
308 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.SIZE, scale);
309 }
310 }
311
312
314 {
315 float max_energy = GetCompEM().GetEnergyMaxPristine();
317 SetHealth01("","", health01);
318 GetCompEM().SetEnergy( time );
319 }
320
321 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
322 {
328
329 super.GetDebugActions(outputList);
330 }
331
333 {
334 if (super.OnAction(action_id, player, ctx))
335 return true;
337 {
338 if (action_id ==
EActions.BROOM_BURN_VERY_SHORT)
339 {
342 }
343 else if (action_id ==
EActions.BROOM_BURN_SHORT)
344 {
347 }
348 else if (action_id ==
EActions.BROOM_BURN_MEDIUM)
349 {
352 }
353 else if (action_id ==
EActions.BROOM_BURN_LONG)
354 {
357 }
358 }
359 return false;
360 }
361
362}
363
365{
367 {
368 return "DZ\\gear\\tools\\data\\broom_emissive.rvmat";
369 }
370
372 {
373 return "DZ\\gear\\tools\\data\\broom_burn.rvmat";
374 }
375}
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