Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BuildingRefundMultiplierEditorAttribute.c
Go to the documentation of this file.
1
/*
2
The multiplier of refund cost - buildign feature
3
*/
4
/*[BaseContainerProps(), SCR_BaseEditorAttributeCustomTitle()]
5
class SCR_BuildingRefundMultiplierEditorAttribute : SCR_BaseValueListEditorAttribute
6
{
7
override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
8
{
9
//If opened in global attributes
10
if (!IsGameMode(item))
11
return null;
12
13
SCR_CampaignBuildingManagerEntity buildingManagerEnt = SCR_CampaignBuildingManagerEntity.GetInstance();
14
if (!buildingManagerEnt) return null;
15
16
float value = buildingManagerEnt.GetRefundMultiplier();
17
18
return SCR_BaseEditorAttributeVar.CreateFloat(value);
19
}
20
override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
21
{
22
if (!var) return;
23
24
SCR_CampaignBuildingManagerEntity buildingManagerEnt = SCR_CampaignBuildingManagerEntity.GetInstance();
25
if (!buildingManagerEnt) return;
26
27
float value = var.GetFloat();
28
buildingManagerEnt.SetRefundMultiplier(value);
29
}
30
};*/
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
Editor
Containers
Attributes
SCR_BuildingRefundMultiplierEditorAttribute.c
Generated by
1.8.17