155{
157 {
158 super.Init();
159 m_DecraftResult = "LongWoodenStick";
160 m_ParticleLocalPos =
Vector(0, 1.2, 0);
161 }
162
164 {
166
169 }
170
172 {
173 return false;
174 }
175
177 {
178 super.OnWorkStart();
180 }
181
183 {
184 result.SetHealth(result.GetHealthLevelValue(2,""));
186 }
187
189 {
190 if (
GetGame().IsServer() && !IsIgnited() &&
GetEnergy() < 1 && !IsSetForDeletion())
191 return true;
192 else
193 return false;
194 }
195
196
198 {
199 super.EEHitBy(damageResult, damageType, source,
component, dmgZone, ammo, modelPos, speedCoef);
200
201 GetCompEM().SetEnergy0To1(GetHealth01("",""));
202 }
203
204
206 {
208 {
209 float currentHealth01 = GetHealth01();
210 float currentEnergy01 = GetCompEM().GetEnergy0To1();
211
212
213 SetHealth01(
"",
"",
Math.
Min(currentHealth01,currentEnergy01));
214
215 GetCompEM().SetEnergy0To1(GetHealth01());
216 }
217 }
218
220 {
222
223 if (!m_FireParticle)
224 {
226 }
227 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY, 1.0);
228 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.VELOCITY_RND, 1.0);
229 if (m_FireParticle)
230 {
231 float scale =
Math.
Max(normalizedQuant * 2.4, 0.4);
232
233 m_FireParticle.ScaleParticleParamFromOriginal(
EmitorParam.SIZE, scale);
234 }
235 }
236
237
239 {
240 float max_energy = GetCompEM().GetEnergyMaxPristine();
242 SetHealth01("","", health01);
243 GetCompEM().SetEnergy( time );
244 }
245
246 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
247 {
253
254 super.GetDebugActions(outputList);
255 }
256
258 {
259 if (super.OnAction(action_id, player, ctx))
260 return true;
262 {
263 if (action_id ==
EActions.BROOM_BURN_VERY_SHORT)
264 {
267 }
268 else if (action_id ==
EActions.BROOM_BURN_SHORT)
269 {
272 }
273 else if (action_id ==
EActions.BROOM_BURN_MEDIUM)
274 {
277 }
278 else if (action_id ==
EActions.BROOM_BURN_LONG)
279 {
282 }
283 }
284 return false;
285 }
286
287}
288
290{
292 {
293 return "DZ\\gear\\tools\\data\\broom_emissive.rvmat";
294 }
295
297 {
298 return "DZ\\gear\\tools\\data\\broom_burn.rvmat";
299 }
300}
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