8 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Composition layout fits to a small (flat) slot size.",
"et")]
9 protected ResourceName m_sSlotFlatSmallLayout;
11 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Composition layout fits to a medium (flat) slot size.",
"et")]
12 protected ResourceName m_sSlotFlatMediumLayout;
14 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Composition layout fits to a large (flat) slot size.",
"et")]
15 protected ResourceName m_sSlotFlatLargeLayout;
17 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Composition layout fits to a small (road) slot size.",
"et")]
18 protected ResourceName m_sSlotRoadSmallLayout;
20 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Composition layout fits to a medium (road) slot size.",
"et")]
21 protected ResourceName m_sSlotRoadMediumLayout;
23 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Composition layout fits to a large (road) slot size.",
"et")]
24 protected ResourceName m_sSlotRoadLargeLayout;
27 protected ref array<ref SCR_CampaignBuildingCompositionOutline> m_aCompositionLayouts;
29 static const int DEFAULT_BUILDING_VALUE = 50;
35 IEntity composition = entity.GetOwner();
37 return ResourceName.Empty;
39 ResourceName compositionResourceName = composition.GetPrefabData().GetPrefabName();
40 if (compositionResourceName.IsEmpty())
41 return ResourceName.Empty;
45 if (compositionLayout.GetEditableEntity() == compositionResourceName)
46 return compositionLayout.GetCompositionLayout();
51 if (!editableEntityUIInfo)
52 return ResourceName.Empty;
55 return m_sSlotFlatSmallLayout;
57 return m_sSlotFlatMediumLayout;
59 return m_sSlotFlatLargeLayout;
61 return m_sSlotRoadSmallLayout;
63 return m_sSlotRoadMediumLayout;
65 return m_sSlotRoadLargeLayout;
67 return m_sSlotFlatSmallLayout;
72 int GetCompositionBuildingValue(ResourceName originalComposition)
76 if (compositionLayout.GetEditableEntity() == originalComposition)
77 return compositionLayout.GetBuildingValue();
80 return DEFAULT_BUILDING_VALUE;
87 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Editable entity prefab",
"et")]
88 protected ResourceName m_sEditableEntity;
90 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Layout prefab",
"et")]
91 protected ResourceName m_sCompositionLayout;
93 [
Attribute(
"50",
"Defines how long it takes to build up the composition.",
"")]
94 protected int m_iBuildingValue;
97 ResourceName GetEditableEntity()
99 return m_sEditableEntity;
103 ResourceName GetCompositionLayout()
105 return m_sCompositionLayout;
109 int GetBuildingValue()
111 return m_iBuildingValue;