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