Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_EditorNotificationEditorOnlyHintCondition.c
Go to the documentation of this file.
1 [BaseContainerProps(), SCR_BaseContainerHintCondition()]
3 {
4  //------------------------------------------------------------------------------------------------
5  protected void OnNotification(SCR_NotificationData data)
6  {
7  if (!data)
8  return;
9 
10  if (data.GetNotificationReceiverType() != ENotificationReceiver.GM_ONLY && data.GetNotificationReceiverType() != ENotificationReceiver.LOCAL_GM_ONLY)
11  return;
12 
13  //~ Add 1 frame delay as in many causes the notifcation is shown after an attribute is changed and it will need to wait until menu is properly closed
14  GetGame().GetCallqueue().CallLater(DelayedShowHint);
15  }
16 
17  //------------------------------------------------------------------------------------------------
18  protected void DelayedShowHint()
19  {
20  Activate();
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  override protected void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
25  {
26  SCR_NotificationsComponent notificationsManager = SCR_NotificationsComponent.GetInstance();
27  if (notificationsManager)
28  notificationsManager.GetOnNotification().Insert(OnNotification);
29  }
30 
31  //------------------------------------------------------------------------------------------------
32  override protected void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
33  {
34  SCR_NotificationsComponent notificationsManager = SCR_NotificationsComponent.GetInstance();
35  if (notificationsManager)
36  notificationsManager.GetOnNotification().Remove(OnNotification);
37  }
38 }
SCR_BaseEditorHintCondition
Definition: SCR_BaseEditorHintCondition.c:2
ENotificationReceiver
ENotificationReceiver
Definition: ENotificationReceiver.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_EditorNotificationEditorOnlyHintCondition
Definition: SCR_EditorNotificationEditorOnlyHintCondition.c:2
Activate
protected void Activate()
Definition: SCR_BaseHintCondition.c:9
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26