11 IEntity provider = editableEntity.GetOwner();
15 SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(GetProviderComponent(provider));
16 if (!providerComponent)
24 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
33 IEntity provider = editableEntity.GetOwner();
37 SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(GetProviderComponent(provider));
38 if (!providerComponent)
41 providerComponent.SetAIValue(providerComponent.GetMaxBudgetValue(
EEditableEntityBudget.AI) * (var.GetFloat() * 0.01));
46 SCR_CampaignBuildingProviderComponent GetProviderComponent(notnull IEntity entity)
48 array<IEntity> output = {};
51 foreach (IEntity ent : output)
53 SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(ent.FindComponent(SCR_CampaignBuildingProviderComponent));
54 if (providerComponent)
55 return providerComponent;