Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_BasePlayerBudgetEditorAttribute.c
Go to the documentation of this file.
1
6{
8
9 //------------------------------------------------------------------------------------------------
10 protected void SetEditorManager(Managed item)
11 {
12 m_EditorManager = null;
13
14 SCR_EditablePlayerDelegateComponent delegate = SCR_EditablePlayerDelegateComponent.Cast(item);
15 if (!delegate)
16 return;
17
19 if (!core)
20 return;
21
22 m_EditorManager = core.GetEditorManager(delegate.GetPlayerID());
23 }
24
25 //---- REFACTOR NOTE START: Mot used as it's just returning null ----
26
27 //------------------------------------------------------------------------------------------------
28 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
29 {
30 //~ Todo: Disabled for now until serverwide budgets can be set
31 return null;
32
33 SetEditorManager(item);
34 if (!m_EditorManager)
35 return null;
36
38 if (!budgetComponent)
39 return null;
40
41 int maxBudget;
42 budgetComponent.GetMaxBudgetValue(GetBudgetType(), maxBudget);
43
45 }
46
47 //---- REFACTOR NOTE END ----
48
49 //------------------------------------------------------------------------------------------------
50 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
51 {
52 if (!var)
53 return;
54
55 if (!m_EditorManager)
56 SetEditorManager(item);
57 if (!m_EditorManager)
58 return;
59
61 if (!budgetComponent)
62 return;
63
64 budgetComponent.DelayedSetMaxBudgetSetup(GetBudgetType(), var.GetFloat(), playerID);
65 }
66
67 //------------------------------------------------------------------------------------------------
69 {
70 return EEditableEntityBudget.SYSTEMS;
71 }
72};
EEditableEntityBudget
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
static SCR_BaseEditorAttributeVar CreateFloat(float value)
override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
void DelayedSetMaxBudgetSetup(EEditableEntityBudget type, int newValue, int playerChangingBudget)
bool GetMaxBudgetValue(EEditableEntityBudget type, out int maxBudget)
Core component to manage SCR_EditorManagerEntity.
SCR_EditorManagerEntity GetEditorManager()