Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SpawnAtRadioVehicleAttribute.c
Go to the documentation of this file.
3 {
4  //------------------------------------------------------------------------------------------------
5  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6  {
7  return null;
8 
9  BaseGameMode gameMode = BaseGameMode.Cast(item);
10  if (!gameMode)
11  return null;
12 
13  SCR_PlayerSpawnPointManagerComponent playerSpawnPointManager = SCR_PlayerSpawnPointManagerComponent.Cast(gameMode.FindComponent(SCR_PlayerSpawnPointManagerComponent));
14  if (!playerSpawnPointManager)
15  return null;
16 
17  return SCR_BaseEditorAttributeVar.CreateBool(playerSpawnPointManager.IsRadioVehicleSpawningEnabled());
18  }
19 
20  //------------------------------------------------------------------------------------------------
21  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
22  {
23  if (!var)
24  return;
25 
26  BaseGameMode gameMode = BaseGameMode.Cast(item);
27  if (!gameMode)
28  return;
29 
30  SCR_PlayerSpawnPointManagerComponent playerSpawnPointManager = SCR_PlayerSpawnPointManagerComponent.Cast(gameMode.FindComponent(SCR_PlayerSpawnPointManagerComponent));
31  if (!playerSpawnPointManager)
32  return;
33 
34  playerSpawnPointManager.EnableRadioVehicleSpawning(var.GetBool(), playerID);
35  }
36 };
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
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_SpawnAtRadioVehicleAttribute
Definition: SCR_SpawnAtRadioVehicleAttribute.c:2
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