11 SCR_CampaignBuildingLayoutComponent layoutComponent = GetLayoutComponent(editableEntity);
15 if (layoutComponent.GetToBuildValue() <= 0)
19 return SCR_BaseEditorAttributeVar.CreateFloat((layoutComponent.GetCurrentBuildValue() / layoutComponent.GetToBuildValue()) * 100);
25 IEntity child = editableEntity.GetOwner().GetChildren();
26 SCR_CampaignBuildingLayoutComponent layoutComponent;
30 layoutComponent = SCR_CampaignBuildingLayoutComponent.Cast(child.FindComponent(SCR_CampaignBuildingLayoutComponent));
34 child = child.GetSibling();
37 return layoutComponent;
41 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
50 SCR_CampaignBuildingLayoutComponent layoutComponent = GetLayoutComponent(editableEntity);
54 layoutComponent.SetBuildingValue(layoutComponent.GetToBuildValue() * (var.GetFloat() * 0.01));