Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GlobalCharBleedingEditorAttribute.c
Go to the documentation of this file.
3 
4 {
5  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6  {
7  //If opened in global attributes
8 
9  BaseGameMode gamemode = BaseGameMode.Cast(item);
10  if (!gamemode)
11  return null;
12 
13  SCR_GameModeHealthSettings gameModeHealthSettings = SCR_GameModeHealthSettings.Cast(gamemode.FindComponent(SCR_GameModeHealthSettings));
14  if (!gameModeHealthSettings)
15  return null;
16 
17  return SCR_BaseEditorAttributeVar.CreateFloat(gameModeHealthSettings.GetBleedingScale());
18  }
19 
20  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
21  {
22  if (!var)
23  return;
24 
25  BaseGameMode gamemode = BaseGameMode.Cast(item);
26  if (!gamemode)
27  return;
28 
29  SCR_GameModeHealthSettings gameModeHealthSettings = SCR_GameModeHealthSettings.Cast(gamemode.FindComponent(SCR_GameModeHealthSettings));
30  if (!gameModeHealthSettings)
31  return;
32 
33  gameModeHealthSettings.SetBleedingScale(var.GetFloat());
34  }
35 };
SCR_GlobalCharBleedingEditorAttribute
Definition: SCR_GlobalCharBleedingEditorAttribute.c:2
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_BaseValueListEditorAttribute
Definition: SCR_BaseValueListEditorAttribute.c:5
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