Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_WeatherInstantTransitionTimeEditorAttribute.c
Go to the documentation of this file.
1 //
5 // Script File
8 {
9  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
10  {
11  //~Todo: Disabled for now until instant transition can have time assigned to it
12  return null;
13 
14  //If opened in global attributes
15  if (!IsGameMode(item))
16  return null;
17 
18  BaseGameMode gameMode = GetGame().GetGameMode();
19  if (!gameMode)
20  return null;
21 
22  /*SCR_TimeAndWeatherEditorComponent editorWeatherComponent = SCR_TimeAndWeatherEditorComponent.Cast(gameMode.FindComponent(SCR_TimeAndWeatherEditorComponent));
23  if (!editorWeatherComponent)
24  return null;*/
25 
26  //~Todo: Not implemented
27  return null;
28  //return SCR_BaseEditorAttributeVar.CreateInt(editorWeatherComponent.GetWeatherInstantTransitionTime());
29  }
30 
31  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
32  {
33  if (!var)
34  return;
35 
36  BaseGameMode gameMode = GetGame().GetGameMode();
37  if (!gameMode)
38  return;
39 
40  /*SCR_TimeAndWeatherEditorComponent editorWeatherComponent = SCR_TimeAndWeatherEditorComponent.Cast(gameMode.FindComponent(SCR_TimeAndWeatherEditorComponent));
41  if (!editorWeatherComponent)
42  return;*/
43 
44  //~Todo: Not implemented
45  //editorWeatherComponent.SetWeatherInstantTransitionTime(var.GetInt());
46  }
47 
48  override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
49  {
50  outEntries.Insert(new SCR_BaseEditorAttributeEntryTimeSlider(1, false));
51  return super.GetEntries(outEntries);
52  }
53 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_WeatherInstantTransitionTimeEditorAttribute
Definition: SCR_WeatherInstantTransitionTimeEditorAttribute.c:7
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_BaseValueListEditorAttribute
Definition: SCR_BaseValueListEditorAttribute.c:5
SCR_BaseEditorAttributeEntryTimeSlider
Definition: SCR_BaseEditorAttribute.c:597
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