DayZ 1.24
Loading...
Searching...
No Matches
FireworksBase.c File Reference

Go to the source code of this file.

Enumerations

enum  EFireworksState {
  DEFAULT , PLACED , IGNITED , FIRING ,
  FINISHED
}
 

Functions

void FireworksBase ()
 
override void EEOnCECreate ()
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
void SetActions ()
 
override bool HasFlammableMaterial ()
 
float GetMaxAllowedWetness ()
 
EFireworksState GetState ()
 returns one of STATE_...
 
void SetState (EFireworksState state)
 
void OnStateChangedServer (EFireworksState currentState)
 
void OnStateChangedClient (EFireworksState currentState)
 
void OnInventoryEnter (Man player)
 
void OnInventoryExit (Man player)
 
void StandUp ()
 
override void OnIgnitedThis (EntityAI fire_source)
 Executed on Server when some item ignited this one.
 
bool CanBeIgnitedBy (EntityAI igniter=NULL)
 
void OnEventServer (int type)
 Called periodically after the entity gets ignited.
 
float GetEventDelay ()
 
void OnVariablesSynchronized ()
 

Variables

enum EFireworksState m_State
 
EFireworksState m_StatePrev
 
ref Timer m_TimerEvent
 
int m_RandomSeed
 

Enumeration Type Documentation

◆ EFireworksState

Enumerator
DEFAULT 
PLACED 
IGNITED 
FIRING 
FINISHED 

Definition at line 2 of file FireworksBase.c.

3{
5 PLACED,
7 FIRING,
9}
@ FIRING
@ DEFAULT
@ IGNITED
@ PLACED
@ FINISHED

Function Documentation

◆ CanBeIgnitedBy()

bool CanBeIgnitedBy ( EntityAI igniter = NULL)
protected

Definition at line 97 of file FireworksBase.c.

98 {
100 return false;
101
102 if (MiscGameplayFunctions.IsUnderRoofEx(this, 60))
103 return false;
104
105 if ((GetState() <= EFireworksState.PLACED) && vector.Dot(vector.Up, GetDirectionUp()) > 0.95)
106 return true;
107 return false;
108 }
EFireworksState GetState()
returns one of STATE_...
float GetMaxAllowedWetness()
EFireworksState
override float GetWet()
Definition ItemBase.c:8281
static float Dot(vector v1, vector v2)
Returns Dot product of vector v1 and vector v2.
Definition EnConvert.c:271
static const vector Up
Definition EnConvert.c:107

References vector::Dot(), GetMaxAllowedWetness(), GetState(), GetWet(), and vector::Up.

◆ EEOnCECreate()

override void EEOnCECreate ( )
protected

Definition at line 23 of file FireworksBase.c.

24 {
25 StandUp();
26 }
void StandUp()

References StandUp().

◆ FireworksBase()

void FireworksBase ( )
protected

Definition at line 18 of file FireworksBase.c.

19 {
20 Init();
21 }
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition DayZGame.c:120

References Init().

◆ GetEventDelay()

float GetEventDelay ( )
protected

Definition at line 113 of file FireworksBase.c.

114 {
115 return 0;
116 }

◆ GetMaxAllowedWetness()

float GetMaxAllowedWetness ( )
protected

Definition at line 45 of file FireworksBase.c.

46 {
47 return 0.1;
48 }

Referenced by CanBeIgnitedBy().

◆ GetState()

EFireworksState GetState ( )
protected

returns one of STATE_...

returns the state of climb (enum value of ClimbStates);

Definition at line 50 of file FireworksBase.c.

51 {
52 return m_State;
53 }
enum EFireworksState m_State

References m_State.

◆ HasFlammableMaterial()

override bool HasFlammableMaterial ( )
protected

Definition at line 40 of file FireworksBase.c.

41 {
42 return true;
43 }

◆ Init()

void Init ( )
protected

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

pre-init arrays

Definition at line 120 of file DayZGame.c.

121 {
122 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/dialog_queue_position.layout");
123 m_HintPanel = new UiHintPanelLoading(layoutRoot.FindAnyWidget("hint_frame0"));
124 m_txtPosition = TextWidget.Cast(layoutRoot.FindAnyWidget("txtPosition"));
125 m_txtNote = TextWidget.Cast(layoutRoot.FindAnyWidget("txtNote"));
126 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btnLeave"));
127 m_txtNote.Show(true);
128 layoutRoot.FindAnyWidget("notification_root").Show(false);
129
130#ifdef PLATFORM_CONSOLE
131 layoutRoot.FindAnyWidget("toolbar_bg").Show(true);
132 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
134#ifdef PLATFORM_XBOX
135#ifdef BUILD_EXPERIMENTAL
136 layoutRoot.FindAnyWidget("notification_root").Show(true);
137#endif
138#endif
139#endif
140
141 return layoutRoot;
142 }
ref UiHintPanelLoading m_HintPanel
Definition DayZGame.c:676
ButtonWidget m_btnLeave
Definition DayZGame.c:107
class LoginScreenBase extends UIScriptedMenu m_txtPosition
TextWidget m_txtNote
Definition DayZGame.c:106
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition InputUtils.c:151
static const float ICON_SCALE_TOOLBAR
Definition InputUtils.c:15
proto native CGame GetGame()

References AddModifier(), CALL_CATEGORY_GUI, CALL_CATEGORY_SYSTEM, Class::CastTo(), DrawConnectingLines(), UIScriptedMenu::DrawConnectingLines(), FISH_AGILITY, JsonMissionLoaderData::GetData(), GetGame(), CfgGameplayHandler::GetHoldBreathStaminaModifier(), GetPlayer(), InputUtils::GetRichtextButtonIconFromInputAction(), hndDebugPrint(), InputUtils::ICON_SCALE_TOOLBAR, INDEX_NOT_FOUND, INIT_LINE_STRETCH, InitPPEManagerClassMap(), InjectDamageSystemValues(), IsCameraNV(), LogManager::IsInventoryHFSMLogEnable(), ItemOptics::IsNVOptic(), ItemOptics::IsWorking(), LateInit(), m_Back, m_BaseValue, m_btnLeave, m_BurnTimePerFullFuelDose, m_BurnTimePerFullLard, m_BurnTimePerRag, m_ChanceRange, m_context_menu, m_Cooldown, m_CrossHairs, m_Cycler, m_CyclerCatching, m_DrainValvePressureDeanimationSettings, m_DrainValvePressureStageSettings, m_DrainValveWaterStageSettings, m_Duration, m_ExistingPostprocessRequests, m_Exponent, m_FillValvePressureDeanimationSettings, m_FillValvePressureStageSettings, m_FillValveWaterStageSettings, m_FishingTime, m_FishProximity, m_FSwapping, m_FSwappingInst, m_HintPanel, m_Inventory, m_IsFishPulling, m_LastActiveValve, m_ManagerInitialized, m_MaxConsumableFuelQuantity, m_MaxConsumableLardQuantity, m_MissionData, m_MovingTo, m_Multiplier, m_Name, m_Notifiers, m_opticsUsed, m_PipeBrokenParticles, m_PipeSounds, m_Player, m_Pos, m_PPEMaterialUpdateQueueMap, m_pPlayer, m_PressureAnimationRequests, m_PressureDeanimationRequests, m_PressureTimesAccumulated, m_Pull, m_Root, m_StartTimeAdjustment, m_Swapping, m_tab_images, m_TabScript, m_Taking, m_txtNote, m_txtPosition, m_UpdatedMaterials, m_UpdatingRequests, m_ValveManipulatedIndex, m_ValveManipulatedIndexPrev, m_ValveNames, m_ValveParticles, m_ValveStates, m_WaterLevelActual, m_WaterLevelPrev, m_WaterLevelsAvailable, m_WaterLevelSnapshot, m_WaterLevelTimesAccumulated, m_WgtBtnMsnClose, m_WgtBtnMsnPlay, m_WgtLstMsnList, MAX_FISHING_TIME, MIN_FISHING_TIME, path, PIPES_BROKEN_COUNT, Math::RandomInt(), SetCameraNV(), SetCameraNVType(), GameConstants::STAMINA_DRAIN_HOLD_BREATH_DURATION, GameConstants::STAMINA_DRAIN_HOLD_BREATH_EXPONENT, GameConstants::STAMINA_DRAIN_HOLD_BREATH_START, GameConstants::STAMINA_REGEN_COOLDOWN_DEPLETION, Update(), UpdateConstructionParts(), UpdatePlayerStatsValues(), VALVES_COUNT, WL_AVERAGE, WL_MAX, and WL_MIN.

Referenced by ScriptedWidgetEventHandler::Attach(), PluginBase::CheckInit(), ClockBase(), DayZPlayerCameraBase(), DayZPlayerCameraBase::DayZPlayerCameraIronsights(), DayZPlayerImplementMeleeCombat(), DayZPlayerMeleeFightLogic_LightHeavy(), Environment::Environment(), FireworksBase(), Land_Underground_WaterReservoir(), Link< Class T >::Link(), LoginQueueBase::LoginQueueStatic(), LoginTimeBase::LoginTimeStatic(), ModifiersManager(), NotifiersManager(), ScriptedWidgetEventHandler::OnWidgetScriptInit(), ManBase::PlayerBase(), PlayerStats::PlayerStats(), PPEClassBase::PPEClassBase(), BleedingSourcesManagerBase::Reload(), RemotePlayerStatDebug(), UniversalTemperatureSourceDebug::UniversalTemperatureSource(), and DayZInfected::ZombieBase().

◆ OnEventServer()

void OnEventServer ( int type)
protected

Called periodically after the entity gets ignited.

◆ OnIgnitedThis()

override void OnIgnitedThis ( EntityAI fire_source)
protected

Executed on Server when some item ignited this one.

Definition at line 91 of file FireworksBase.c.

92 {
94 }
void SetState(EFireworksState state)

References SetState().

◆ OnInventoryEnter()

void OnInventoryEnter ( Man player)
protected

Definition at line 70 of file FireworksBase.c.

71 {
72 if (GetState() == EFireworksState.PLACED)
74 }

References GetState(), and SetState().

◆ OnInventoryExit()

void OnInventoryExit ( Man player)
protected

Definition at line 76 of file FireworksBase.c.

77 {
78 super.OnInventoryExit(player);
79
80 if (!IsBeingPlaced())
81 StandUp();
82 }
override bool IsBeingPlaced()
Definition ItemBase.c:5625

References IsBeingPlaced(), and StandUp().

◆ OnStateChangedClient()

void OnStateChangedClient ( EFireworksState currentState)
protected

Referenced by OnVariablesSynchronized().

◆ OnStateChangedServer()

void OnStateChangedServer ( EFireworksState currentState)
protected

Referenced by SetState().

◆ OnVariablesSynchronized()

void OnVariablesSynchronized ( )
protected

Definition at line 118 of file FireworksBase.c.

119 {
120 //Print("new state client: " + m_State);
121 super.OnVariablesSynchronized();
122 if (m_State != m_StatePrev)
123 {
126 }
127 }
EFireworksState m_StatePrev
void OnStateChangedClient(EFireworksState currentState)

References m_State, m_StatePrev, and OnStateChangedClient().

◆ SetActions()

void SetActions ( )
protected

Definition at line 31 of file FireworksBase.c.

32 {
33 super.SetActions();
34
36 AddAction(ActionDeployObject);
38 }
ActionLightItemOnFireCB ActionContinuousBaseCB ActionLightItemOnFire()
void AddAction(typename actionName)

References ActionLightItemOnFire(), and AddAction().

◆ SetState()

void SetState ( EFireworksState state)
protected

Definition at line 55 of file FireworksBase.c.

56 {
57 if (state != m_StatePrev && GetGame().IsServer())
58 {
59 m_State = state;
60 SetSynchDirty();
63 }
64 }
void OnStateChangedServer(EFireworksState currentState)

References GetGame(), m_State, m_StatePrev, and OnStateChangedServer().

◆ StandUp()

void StandUp ( )
protected

Definition at line 84 of file FireworksBase.c.

85 {
86 if (!IsRuined())
87 SetOrientation(vector.Zero);
88 }
static const vector Zero
Definition EnConvert.c:110

References vector::Zero.

Referenced by EEOnCECreate(), and OnInventoryExit().

Variable Documentation

◆ m_RandomSeed

int m_RandomSeed
protected

◆ m_State

◆ m_StatePrev

EFireworksState m_StatePrev
protected

Definition at line 14 of file FireworksBase.c.

◆ m_TimerEvent