Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_WeatherUseAdvancedEditorAttribute.c
Go to the documentation of this file.
1 //SCR_WeatherUseAdvancedEditorAttribute
4 {
5  /*override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6  {
7  //Disabled for now
8  return null;
9 
10  //If opened in global attributes
11  if (!IsGameMode(item)) return null;
12 
13  BaseGameMode gameMode = GetGame().GetGameMode();
14  if (!gameMode)
15  return null;
16 
17  SCR_TimeAndWeatherEditorComponent editorWeatherComponent = SCR_TimeAndWeatherEditorComponent.Cast(gameMode.FindComponent(SCR_TimeAndWeatherEditorComponent));
18  if (!editorWeatherComponent)
19  return null;
20 
21  return SCR_BaseEditorAttributeVar.CreateBool(editorWeatherComponent.GetUseAdvancedWeather());
22  }
23 
24  //Disable respawn time if respawning is disabled
25  override void UpdateInterlinkedVariables(SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, bool isInit = false)
26  {
27  bool useAdvanced = false;
28 
29  if (var)
30  useAdvanced = var.GetBool();
31 
32  manager.SetAttributeEnabled(SCR_WeatherInstantTransitionTimeEditorAttribute, var && !useAdvanced);
33  manager.SetAttributeEnabled(SCR_WeatherInstantEditorAttribute, var && !useAdvanced);
34  }
35 
36  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
37  {
38  if (!var)
39  return;
40 
41  BaseGameMode gameMode = GetGame().GetGameMode();
42  if (!gameMode)
43  return;
44 
45  SCR_TimeAndWeatherEditorComponent editorWeatherComponent = SCR_TimeAndWeatherEditorComponent.Cast(gameMode.FindComponent(SCR_TimeAndWeatherEditorComponent));
46  if (!editorWeatherComponent)
47  return;
48 
49  editorWeatherComponent.SetUseAdvancedWeather(var.GetBool());
50 
51  }*/
52 };
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition: SCR_BaseEditorAttribute.c:3
SCR_WeatherUseAdvancedEditorAttribute
Definition: SCR_WeatherUseAdvancedEditorAttribute.c:3
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