4 [
Attribute(uiwidget: UIWidgets.Object,
desc:
"Tree groups to spawn in this forest generator level")]
5 ref array<ref TreeGroupClass> m_aTreeGroups;
7 [
Attribute(defvalue:
"1", uiwidget: UIWidgets.CheckBox,
desc:
"Generate this level?")]
10 [
Attribute(defvalue:
"1",
desc:
"How many trees per hectare should be generated", uiwidget: UIWidgets.SpinBox)]
13 [
Attribute(defvalue:
"",
category:
"Forest",
desc:
"Curve defining level's outline scaling; from inside (left, forest core) to outside (right, forest outline)", uiwidget: UIWidgets.GraphDialog,
params:
"100 " + (SCALE_CURVE_MAX_VALUE - SCALE_CURVE_MIN_VALUE) +
" 0 " + SCALE_CURVE_MIN_VALUE)]
14 ref Curve m_aOutlineScaleCurve;
16 [
Attribute(defvalue:
"0",
category:
"Forest",
desc:
"Distance from shape over which the scaling occurs", uiwidget: UIWidgets.Slider,
params:
"0 100 0.1")]
17 float m_fOutlineScaleCurveDistance;
19 SCR_EForestGeneratorLevelType m_eType;
20 ref array<float> m_aGroupProbas = {};
22 static const float SCALE_CURVE_MAX_VALUE = 1;
23 static const float SCALE_CURVE_MIN_VALUE = 0;
29 [
Attribute(defvalue:
"1", uiwidget: UIWidgets.SpinBox,
desc:
"How separated are the tree groups?")]
30 float m_fClusterStrength;
32 [
Attribute(defvalue:
"15", uiwidget: UIWidgets.SpinBox,
desc:
"In what radius should trees around be taken into count for clusters?")]
33 float m_fClusterRadius;
35 [
Attribute(
"0", UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(SCR_EForestGeneratorOutlineType),
desc:
"Which type of outline is this?")]
36 SCR_EForestGeneratorOutlineType m_eOutlineType;
38 [
Attribute(defvalue:
"1", uiwidget: UIWidgets.SpinBox,
desc:
"Minimal distance from spline")]
41 [
Attribute(defvalue:
"1", uiwidget: UIWidgets.SpinBox,
desc:
"Maximal distance from spline")]
45 void ForestGeneratorOutline()
47 m_eType = SCR_EForestGeneratorLevelType.OUTLINE;
54 [
Attribute(defvalue:
"1", uiwidget: UIWidgets.SpinBox,
desc:
"How separated are the tree groups?")]
55 float m_fClusterStrength;
57 [
Attribute(defvalue:
"15", uiwidget: UIWidgets.SpinBox,
desc:
"In what radius should trees around be taken into count for clusters?")]
58 float m_fClusterRadius;
61 void ForestGeneratorTopLevel()
63 m_eType = SCR_EForestGeneratorLevelType.TOP;
70 void ForestGeneratorBottomLevel()
72 m_eType = SCR_EForestGeneratorLevelType.BOTTOM;
76 enum SCR_EForestGeneratorLevelType
83 enum SCR_EForestGeneratorOutlineType