181{
183 {
184 super.Init();
185 m_DecraftResult = "LongWoodenStick";
186 m_ParticleLocalPos =
Vector(0, 1.2, 0);
187 }
188
190 {
192
195 }
196
198 {
199 return false;
200 }
201
203 {
204 super.OnWorkStart();
206 }
207
209 {
210 result.SetHealth(result.GetHealthLevelValue(2,""));
212 }
213
215 {
216 if (
GetGame().IsServer() && !IsIgnited() &&
GetEnergy() < 1 && !IsSetForDeletion())
217 return true;
218 else
219 return false;
220 }
221
222
224 {
225 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
226
227 GetCompEM().SetEnergy0To1(GetHealth01("",""));
228 }
229
230
232 {
234 {
235 float currentHealth01 = GetHealth01();
236 float currentEnergy01 = GetCompEM().GetEnergy0To1();
237
238
239 SetHealth01(
"",
"",
Math.
Min(currentHealth01,currentEnergy01));
240
241 GetCompEM().SetEnergy0To1(GetHealth01());
242 }
243 }
244
246 {
248
249 if (!m_FireParticle)
250 {
252 }
253 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY, 1.0);
254 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY_RND, 1.0);
255 if (m_FireParticle)
256 {
257 float scale =
Math.
Max(normalizedQuant * 2.4, 0.4);
258
259 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.SIZE, scale);
260 }
261 }
262
263
265 {
266 float max_energy = GetCompEM().GetEnergyMaxPristine();
268 SetHealth01("","", health01);
269 GetCompEM().SetEnergy( time );
270 }
271
272 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
273 {
279
280 super.GetDebugActions(outputList);
281 }
282
284 {
285 if (super.OnAction(action_id, player, ctx))
286 return true;
288 {
289 if (action_id ==
EActions.BROOM_BURN_VERY_SHORT)
290 {
293 }
294 else if (action_id ==
EActions.BROOM_BURN_SHORT)
295 {
298 }
299 else if (action_id ==
EActions.BROOM_BURN_MEDIUM)
300 {
303 }
304 else if (action_id ==
EActions.BROOM_BURN_LONG)
305 {
308 }
309 }
310 return false;
311 }
312
313}
314
316{
318 {
319 return "DZ\\gear\\tools\\data\\broom_emissive.rvmat";
320 }
321
323 {
324 return "DZ\\gear\\tools\\data\\broom_burn.rvmat";
325 }
326}
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