Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_NightModeGameModeComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/GameMode/Components", description: "Component to handle night mode")]
3 {
4 }
5 
6 class SCR_NightModeGameModeComponent : SCR_BaseGameModeComponent
7 {
8  [Attribute("0", desc: "Set true if you want the GM to be able to set global nightmode. Do not change in runtime", category: "Settings")]
9  protected bool m_bAllowGlobalNightMode;
10 
11  [Attribute("0.1", desc: "0 means the sun is setting, 1 means the max value the sun is under (though in reality max value is around 0.5 and the sun is fully set around 0.1) this value dictates when the max nightmode EV value is reached if the sun is at the current state", params: "0.001 1", category: "Settings")]
12  protected float m_fSunStateMaxNightMode;
13 
14  [Attribute("0", desc: "Value of EV when nightmode is NOT enabled", params: "0 12", category: "Settings")]
15  protected int m_iEVValueNormalMode;
16 
17  [Attribute("2", desc: "Value of EV when nightmode is enabled", params: "0 12", category: "Settings")]
18  protected int m_iEVValueNightMode;
19 
20  [Attribute("SOUND_E_TOGGLE_FLASHLIGHT", desc: "SFX when local editor nightMode is enabled/disabled", category: "Sound")]
21  protected string m_sLocalEditorNightModeToggledSound;
22 
23  [Attribute("ManualCameraLight", desc: "Local nightmode shortcut. Toggle On and off")]
24  protected string m_sToggleLocalNightModeShortcut;
25 
26  //~ States
27  protected bool m_bLocalEditorNightModeEnabled;
28  protected bool m_bLocalEditorNightModeOnEditorClose;
29  protected bool m_bUnlimitedEditorIsOpen;
30  protected bool m_bGlobalNightModeEnabled;
31  protected bool m_IsPreviewingTimeOrWeather;
32  protected float m_fNightModeAlpha = 0;
33 
34  //~ Update
35  protected bool m_bUpdateEachFrame;
36  protected float m_fCurrentUpdateTickInSeconds;
37  protected static const float UPDATE_TICK_IN_SECONDS = 1;
38 
39  //~ Ref
40  protected BaseWorld m_World;
41  protected TimeAndWeatherManagerEntity m_TimeAndWeatherManager;
43  protected WeatherStateTransitionManager m_WeatherStateTransitionManager;
44 
45  //~ Script Invokers
46  protected ref ScriptInvokerBool m_OnLocalEditorNightModeEnabledChanged;
47  protected ref ScriptInvokerBool m_OnGlobalNightModeEnabledChanged;
48  protected ref ScriptInvokerBool m_OnNightModeEnabledChanged;
49 
50  //------------------------------------------------------------------------------------------------
51  //~ Onframe is only active if LocalEditor and/or Global nightmode is enabled. The EV value depends on where the sun is in the sky to gratually brighten the night as the night gets darker
52  override void EOnFrame(IEntity owner, float timeSlice)
53  {
54  //~ If onframe is enabled but sun is not set check each second not each frame
55  if (!m_bUpdateEachFrame)
56  {
57  m_fCurrentUpdateTickInSeconds += timeSlice;
58 
59  if (m_fCurrentUpdateTickInSeconds < UPDATE_TICK_IN_SECONDS)
60  return;
61  else
62  m_fCurrentUpdateTickInSeconds = 0;
63  }
64 
65  //~ Get sun direction
66  vector Sundirection, moondirection;
67  float moonphase;
68  m_TimeAndWeatherManager.GetCurrentSunMoonDirAndPhase(Sundirection, moondirection, moonphase);
69 
70  //~ Normalize sun direction using m_fSunStateMaxNightMode as value when the EV is at it's strongest if the sun is down
71  float normalizedSun = Math.Clamp(Sundirection[1] / m_fSunStateMaxNightMode, 0, 1);
72 
73  //~ Check if it should update each frame if sun is at a state that the EV is set
74  m_bUpdateEachFrame = (normalizedSun != 0);
75 
76  //~ If alpha value changed update EV otherwise do nothing to prevent the EV from updating unncessesarrly
77  if (normalizedSun != m_fNightModeAlpha)
78  {
79  m_fNightModeAlpha = normalizedSun;
80  m_World.AdjustCameraEV(0, Math.Lerp(m_iEVValueNormalMode, m_iEVValueNightMode, m_fNightModeAlpha));
81  }
82  }
83 
84  //------------------------------------------------------------------------------------------------
87  {
88  return m_bLocalEditorNightModeEnabled;
89  }
90 
91  //------------------------------------------------------------------------------------------------
93  {
94  EnableLocalEditorNightMode(!m_bLocalEditorNightModeEnabled);
95  }
96 
97  //------------------------------------------------------------------------------------------------
102  void EnableLocalEditorNightMode(bool enable, bool playSound = true)
103  {
104  if (m_bLocalEditorNightModeEnabled == enable)
105  return;
106 
107  //~ Cannot set nightmode if editor is not unlimited
108  if (enable && (!m_EditorManager || m_EditorManager.IsLimited() || !CanEnableNightMode()))
109  return;
110 
111  m_bLocalEditorNightModeEnabled = enable;
112 
113  EnableNightMode(enable);
114 
115  if (playSound && !SCR_StringHelper.IsEmptyOrWhiteSpace(m_sLocalEditorNightModeToggledSound))
116  SCR_UISoundEntity.SoundEvent(m_sLocalEditorNightModeToggledSound);
117 
118  //~ Global night mode state changed
119  if (m_OnLocalEditorNightModeEnabledChanged)
120  m_OnLocalEditorNightModeEnabledChanged.Invoke(enable);
121  }
122 
123  //------------------------------------------------------------------------------------------------
126  {
127  return m_bAllowGlobalNightMode;
128  }
129 
130  //------------------------------------------------------------------------------------------------
133  {
134  return m_bGlobalNightModeEnabled;
135  }
136 
137  //------------------------------------------------------------------------------------------------
142  void EnableGlobalNightMode(bool enable, int nightModeChangerPlayerID = -1)
143  {
144  //~ Server only and check if value can be changed and is changed
145  if (m_bGlobalNightModeEnabled == enable || !IsGlobalNightModeAllowed() || !GetGameMode().IsMaster())
146  return;
147 
148  if (enable && !CanEnableNightMode())
149  return;
150 
151  //~ Execute enable nightmode logic
152  RPC_EnableGlobalNightMode(enable, nightModeChangerPlayerID);
153  Rpc(RPC_EnableGlobalNightMode, enable, nightModeChangerPlayerID);
154  }
155 
156  //------------------------------------------------------------------------------------------------
157  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
158  protected void RPC_EnableGlobalNightMode(bool enable, int nightModeChangerPlayerID)
159  {
160  //~ Cannot change global nightmode or is already the same state as given state
161  if (m_bGlobalNightModeEnabled == enable || !IsGlobalNightModeAllowed())
162  return;
163 
164  m_bGlobalNightModeEnabled = enable;
165 
166  //~ Enable the nightmode
167  EnableNightMode(enable);
168 
169  //~ Global night mode state changed
170  if (m_OnGlobalNightModeEnabledChanged)
171  m_OnGlobalNightModeEnabledChanged.Invoke(enable);
172 
173  //~ Send notification
174  if (nightModeChangerPlayerID > 0)
175  {
176  if (enable)
177  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_GLOBAL_NIGHTMODE_ENABLED, nightModeChangerPlayerID);
178  else
179  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_GLOBAL_NIGHTMODE_DISABLED, nightModeChangerPlayerID);
180  }
181  }
182 
183  //------------------------------------------------------------------------------------------------
186  {
188  }
189 
190  //------------------------------------------------------------------------------------------------
193  {
194  return m_TimeAndWeatherManager != null;
195  }
196 
197  //------------------------------------------------------------------------------------------------
198  //~ Called by EnableLocal or EnableGlobal night mode functions which actually enables the night mode
199  protected void EnableNightMode(bool enable)
200  {
201  //~ If trying to enable but cannot enable if both LocalEditor and GlobalNightmode are not enable do not enable
202  if (enable && (!CanEnableNightMode() || (!IsLocalEditorNightModeEnabled() || (IsLocalEditorNightModeEnabled() && !m_bUnlimitedEditorIsOpen)) && !IsGlobalNightModeEnabled()))
203  return;
204  //~ If trying to disable but localEditorNight mode is enabled (and unlimited editor is open) or Global Night mode is enabled than do not disable
205  else if (!enable && ((IsLocalEditorNightModeEnabled() && m_bUnlimitedEditorIsOpen) || IsGlobalNightModeEnabled()))
206  return;
207 
208  //~ On Night mode enabled start on frame
209  if (IsNightModeEnabled() && !SCR_Enum.HasPartialFlag(GetEventMask(), EntityEvent.FRAME))
210  {
211  SetEventMask(GetOwner(), EntityEvent.FRAME);
212  }
213  //~ On nightmode disabled stop on frame and set EV to default
214  else if (!IsNightModeEnabled())
215  {
216  //~ Set EV to default
217  if (m_fNightModeAlpha != 0)
218  {
219  m_fNightModeAlpha = 0;
220  m_World.AdjustCameraEV(0, m_iEVValueNormalMode);
221  }
222 
223  //~ Stop OnFrame
224  if (SCR_Enum.HasPartialFlag(GetEventMask(), EntityEvent.FRAME))
225  ClearEventMask(GetOwner(), EntityEvent.FRAME);
226  }
227 
228  //~ Reset update values
229  if (enable)
230  {
231  m_bUpdateEachFrame = true;
232  m_fCurrentUpdateTickInSeconds = 0;
233  }
234 
235  //~ Nightmode state changed (Can be by localEditor or GlobalNightMode)
236  if (m_OnNightModeEnabledChanged)
237  m_OnNightModeEnabledChanged.Invoke(enable);
238 
239  //~ Check if previewing time or weather state and set the correct settings
241  }
242 
243  //------------------------------------------------------------------------------------------------
244  protected void OnEditorOpened()
245  {
246  m_bUnlimitedEditorIsOpen = !m_EditorManager.IsLimited();
247 
248  if (m_bUnlimitedEditorIsOpen)
249  EnableLocalEditorNightMode(m_bLocalEditorNightModeOnEditorClose);
250  }
251 
252  //------------------------------------------------------------------------------------------------
253  protected void OnEditorClosed()
254  {
255  m_bUnlimitedEditorIsOpen = false;
256 
257  //~ Disable lightmode as GlobalLightmode was disabled
258  if (!m_EditorManager.IsLimited())
259  {
260  m_bLocalEditorNightModeOnEditorClose = IsLocalEditorNightModeEnabled();
262  }
263  }
264 
265  //------------------------------------------------------------------------------------------------
266  protected void OnEditorLimitedChanged(bool isLimited)
267  {
268  //~ If limited disable local editor nightmode until rights are returned and the player turns it on again
269  if (isLimited)
271  }
272 
273  //------------------------------------------------------------------------------------------------
275  {
276  //~ Check if previewing state changed
277  bool newIsPreviewing = m_WeatherStateTransitionManager.IsPreviewingWind() || m_WeatherStateTransitionManager.IsPreviewingState() || m_WeatherStateTransitionManager.IsPreviewingDateTime();
278  if (m_IsPreviewingTimeOrWeather == newIsPreviewing)
279  return;
280 
281  m_IsPreviewingTimeOrWeather = newIsPreviewing;
282 
283  //~ If local nightmode is enabled but global is not and previewing the scene then turn off nightmode
284  if (!m_bUnlimitedEditorIsOpen || !IsLocalEditorNightModeEnabled() || IsGlobalNightModeEnabled())
285  return;
286 
287  if (m_IsPreviewingTimeOrWeather)
288  {
289  //~ Pause the OnFrame
290  if (SCR_Enum.HasPartialFlag(GetEventMask(), EntityEvent.FRAME))
291  ClearEventMask(GetOwner(), EntityEvent.FRAME);
292 
293  //~ Disable nightmode
294  if (m_fNightModeAlpha != 0)
295  {
296  m_fNightModeAlpha = 0;
297  m_World.AdjustCameraEV(0, m_iEVValueNormalMode);
298 
299  SCR_NotificationsComponent.SendLocal(ENotification.EDITOR_PREVIEWING_IN_NIGHTMODE);
300 
301  if (!SCR_StringHelper.IsEmptyOrWhiteSpace(m_sLocalEditorNightModeToggledSound))
302  SCR_UISoundEntity.SoundEvent(m_sLocalEditorNightModeToggledSound);
303  }
304  }
305  else
306  {
307  //~ Pause continue the on frame again
308  if (!SCR_Enum.HasPartialFlag(GetEventMask(), EntityEvent.FRAME))
309  {
310  SetEventMask(GetOwner(), EntityEvent.FRAME);
311 
312  if (m_TimeAndWeatherManager.IsSunSet() && !SCR_StringHelper.IsEmptyOrWhiteSpace(m_sLocalEditorNightModeToggledSound))
313  SCR_UISoundEntity.SoundEvent(m_sLocalEditorNightModeToggledSound);
314  }
315  }
316  }
317 
318  //------------------------------------------------------------------------------------------------
319  protected void OnWeatherStatePreview(bool preview, string stateName)
320  {
322  }
323 
324  //------------------------------------------------------------------------------------------------
325  protected void OnWindPreview(bool preview, float windSpeed = -1, float windAngleDegrees = -1)
326  {
328  }
329 
330  //------------------------------------------------------------------------------------------------
331  protected void OnDateTimePreview(bool preview, int year = -1, int month = -1, int day = -1, float timeOfTheDay = -1)
332  {
334  }
335 
336  //------------------------------------------------------------------------------------------------
339  {
340  if (!m_OnLocalEditorNightModeEnabledChanged)
341  m_OnLocalEditorNightModeEnabledChanged = new ScriptInvokerBool();
342 
343  return m_OnLocalEditorNightModeEnabledChanged;
344  }
345 
346  //------------------------------------------------------------------------------------------------
349  {
350  if (!m_OnGlobalNightModeEnabledChanged)
351  m_OnGlobalNightModeEnabledChanged = new ScriptInvokerBool();
352 
353  return m_OnGlobalNightModeEnabledChanged;
354  }
355 
356  //------------------------------------------------------------------------------------------------
359  {
360  if (!m_OnNightModeEnabledChanged)
361  m_OnNightModeEnabledChanged = new ScriptInvokerBool();
362 
363  return m_OnNightModeEnabledChanged;
364  }
365 
366  //------------------------------------------------------------------------------------------------
367  protected void OnEditorManagerCreated(SCR_EditorManagerEntity editorManager)
368  {
369  //~ Editor Manager not yet set so that means it was obtained by editorManagerCore. Make sure to no longer listen to OnEditorManagerInitOwner
370  if (!m_EditorManager)
371  {
372  m_EditorManager = editorManager;
373 
375  if (core)
376  core.Event_OnEditorManagerInitOwner.Remove(OnEditorManagerCreated);
377  }
378 
379  //~ Listen to events
380  m_EditorManager.GetOnOpened().Insert(OnEditorOpened);
381  m_EditorManager.GetOnClosed().Insert(OnEditorClosed);
382  m_EditorManager.GetOnLimitedChange().Insert(OnEditorLimitedChanged);
383 
384  if (m_EditorManager.IsOpened())
385  OnEditorOpened();
386  }
387 
388  //------------------------------------------------------------------------------------------------
389  override void EOnInit(IEntity owner)
390  {
391  if (SCR_Global.IsEditMode())
392  return;
393 
394  GetGame().GetInputManager().AddActionListener(m_sToggleLocalNightModeShortcut, EActionTrigger.DOWN, ToggleLocalNightModeShortcut);
395 
396  //~ Get world
397  m_World = GetOwner().GetWorld();
398  if (!m_World)
399  {
400  m_World = GetGame().GetWorld();
401  if (!m_World)
402  Print("'SCR_NightModeGameModeComponent' could not find World this means nightmode can never be enabled!", LogLevel.ERROR);
403 
404  return;
405  }
406 
407  //~ Get time manager
408  ChimeraWorld world = ChimeraWorld.CastFrom(m_World);
409  if (!world)
410  return;
411 
412  m_TimeAndWeatherManager = world.GetTimeAndWeatherManager();
413  if (!m_TimeAndWeatherManager)
414  {
415  Print("'SCR_NightModeGameModeComponent' could not find TimeAndWeatherEntity this means nightmode can never be enabled!", LogLevel.ERROR);
416  return;
417  }
418 
419  //~ Get transition manager to make sure it can check if dateTime or weather is being previewed
420  m_WeatherStateTransitionManager = m_TimeAndWeatherManager.GetTransitionManager();
421  if (m_WeatherStateTransitionManager)
422  {
423  m_TimeAndWeatherManager.GetOnWeatherStatePreview().Insert(OnWeatherStatePreview);
424  m_TimeAndWeatherManager.GetOnWindPreview().Insert(OnWindPreview);
425  m_TimeAndWeatherManager.GetOnDateTimePreview().Insert(OnDateTimePreview);
426  }
427 
428  //~ Get EditorManager
429  SCR_EditorManagerEntity editorManager = SCR_EditorManagerEntity.GetInstance();
430  if (editorManager)
431  {
432  m_EditorManager = editorManager;
433  OnEditorManagerCreated(editorManager);
434  }
435  else
436  {
437  //~ Editor manager does not exist yet (e.g., on mission start), wait for it to be created
439  if (core)
440  core.Event_OnEditorManagerInitOwner.Insert(OnEditorManagerCreated);
441  }
442  }
443 
444  //------------------------------------------------------------------------------------------------
445  override void OnPostInit(IEntity owner)
446  {
447  SetEventMask(owner, EntityEvent.INIT);
448  }
449 
450  //------------------------------------------------------------------------------------------------
451  override void OnDelete(IEntity owner)
452  {
453  if (SCR_Global.IsEditMode())
454  return;
455 
456  super.OnDelete(owner);
457 
458  if (m_EditorManager)
459  {
460  m_EditorManager.GetOnOpened().Remove(OnEditorOpened);
461  m_EditorManager.GetOnClosed().Remove(OnEditorClosed);
462  m_EditorManager.GetOnLimitedChange().Remove(OnEditorLimitedChanged);
463  }
464 
465  if (m_TimeAndWeatherManager && m_WeatherStateTransitionManager)
466  {
467  m_TimeAndWeatherManager.GetOnWeatherStatePreview().Remove(OnWeatherStatePreview);
468  m_TimeAndWeatherManager.GetOnWindPreview().Remove(OnWindPreview);
469  m_TimeAndWeatherManager.GetOnDateTimePreview().Remove(OnDateTimePreview);
470  }
471 
472  GetGame().GetInputManager().RemoveActionListener(m_sToggleLocalNightModeShortcut, EActionTrigger.DOWN, ToggleLocalNightModeShortcut);
473  }
474 
475  //------------------------------------------------------------------------------------------------
476  override bool RplSave(ScriptBitWriter writer)
477  {
479  writer.WriteBool(m_bGlobalNightModeEnabled);
480 
481  return true;
482  }
483 
484  //------------------------------------------------------------------------------------------------
485  override bool RplLoad(ScriptBitReader reader)
486  {
487  bool globalNightModeEnabled;
488 
490  {
491  reader.ReadBool(globalNightModeEnabled);
492  RPC_EnableGlobalNightMode(globalNightModeEnabled, -1);
493  }
494 
495  return true;
496  }
497 }
WeatherStateTransitionManager
Definition: WeatherStateTransitionManager.c:7
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
ChimeraWorld
Definition: ChimeraWorld.c:12
SCR_NightModeGameModeComponentClass
Definition: SCR_NightModeGameModeComponent.c:2
IsMaster
protected bool IsMaster()
Definition: SCR_DataCollectorComponent.c:190
SCR_Enum
Definition: SCR_Enum.c:1
RplLoad
override bool RplLoad(ScriptBitReader reader)
Definition: SCR_NightModeGameModeComponent.c:485
OnEditorOpened
protected void OnEditorOpened()
Definition: SCR_NightModeGameModeComponent.c:244
SCR_UISoundEntity
Definition: SCR_UISoundEntity.c:7
OnDateTimePreview
protected void OnDateTimePreview(bool preview, int year=-1, int month=-1, int day=-1, float timeOfTheDay=-1)
Definition: SCR_NightModeGameModeComponent.c:331
CanEnableNightMode
bool CanEnableNightMode()
Definition: SCR_NightModeGameModeComponent.c:192
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
EOnFrame
override void EOnFrame(IEntity owner, float timeSlice)
Definition: SCR_PlayerProfileManagerComponent.c:199
Attribute
SCR_NightModeGameModeComponentClass SCR_BaseGameModeComponentClass Attribute("0", desc:"Set true if you want the GM to be able to set global nightmode. Do not change in runtime", category:"Settings")
Definition: SCR_NightModeGameModeComponent.c:8
OnDelete
override void OnDelete(IEntity owner)
Definition: SCR_NightModeGameModeComponent.c:451
OnEditorClosed
protected void OnEditorClosed()
Definition: SCR_NightModeGameModeComponent.c:253
SCR_StringHelper
Definition: SCR_StringHelper.c:1
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
GetOnNightModeEnabledChanged
ScriptInvokerBool GetOnNightModeEnabledChanged()
Definition: SCR_NightModeGameModeComponent.c:358
IsGlobalNightModeAllowed
bool IsGlobalNightModeAllowed()
Definition: SCR_NightModeGameModeComponent.c:125
OnWeatherStatePreview
protected void OnWeatherStatePreview(bool preview, string stateName)
Definition: SCR_NightModeGameModeComponent.c:319
GetOnGlobalNightModeEnabledChanged
ScriptInvokerBool GetOnGlobalNightModeEnabledChanged()
Definition: SCR_NightModeGameModeComponent.c:348
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition: SCR_BaseGameModeComponent.c:15
OnEditorLimitedChanged
protected void OnEditorLimitedChanged(bool isLimited)
Definition: SCR_NightModeGameModeComponent.c:266
IsLocalEditorNightModeEnabled
bool IsLocalEditorNightModeEnabled()
Definition: SCR_NightModeGameModeComponent.c:86
ENotification
ENotification
Definition: ENotification.c:4
OnEditorManagerCreated
protected void OnEditorManagerCreated(SCR_EditorManagerEntity editorManager)
Definition: SCR_NightModeGameModeComponent.c:367
SCR_EditorManagerCore
Core component to manage SCR_EditorManagerEntity.
Definition: SCR_EditorManagerCore.c:5
ScriptInvokerBool
ScriptInvokerBase< ScriptInvokerBoolMethod > ScriptInvokerBool
Definition: SCR_ScriptInvokerHelper.c:41
EnableGlobalNightMode
void EnableGlobalNightMode(bool enable, int nightModeChangerPlayerID=-1)
Definition: SCR_NightModeGameModeComponent.c:142
IsNightModeEnabled
bool IsNightModeEnabled()
Definition: SCR_NightModeGameModeComponent.c:185
OnPostInit
override void OnPostInit(IEntity owner)
Editable Mine.
Definition: SCR_NightModeGameModeComponent.c:445
EnableNightMode
protected void EnableNightMode(bool enable)
Definition: SCR_NightModeGameModeComponent.c:199
m_World
protected BaseWorld m_World
Definition: SCR_PreviewEntityEditorUIComponent.c:46
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
OnWindPreview
protected void OnWindPreview(bool preview, float windSpeed=-1, float windAngleDegrees=-1)
Definition: SCR_NightModeGameModeComponent.c:325
RplSave
override bool RplSave(ScriptBitWriter writer)
Definition: SCR_NightModeGameModeComponent.c:476
m_EditorManager
protected SCR_EditorManagerEntity m_EditorManager
Definition: SCR_VotingEditor.c:5
EOnInit
override void EOnInit(IEntity owner)
Initialise this component with data from FactionsManager.
Definition: SCR_NightModeGameModeComponent.c:389
RPC_EnableGlobalNightMode
protected void RPC_EnableGlobalNightMode(bool enable, int nightModeChangerPlayerID)
Definition: SCR_NightModeGameModeComponent.c:158
SCR_Global
Definition: Functions.c:6
IsGlobalNightModeEnabled
bool IsGlobalNightModeEnabled()
Definition: SCR_NightModeGameModeComponent.c:132
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
EnableLocalEditorNightMode
void EnableLocalEditorNightMode(bool enable, bool playSound=true)
Definition: SCR_NightModeGameModeComponent.c:102
ToggleLocalNightModeShortcut
protected void ToggleLocalNightModeShortcut()
Definition: SCR_NightModeGameModeComponent.c:92
UpdatePreviewingTimeOrWeather
protected void UpdatePreviewingTimeOrWeather()
Definition: SCR_NightModeGameModeComponent.c:274
GetOnLocalEditorNightModeEnabledChanged
ScriptInvokerBool GetOnLocalEditorNightModeEnabledChanged()
Definition: SCR_NightModeGameModeComponent.c:338
SCR_BaseGameModeComponentClass
Definition: SCR_BaseGameModeComponent.c:2
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_BaseGameModeComponent
void SCR_BaseGameModeComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_BaseGameModeComponent.c:199
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26