10 if (!IsGameMode(item))
15 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
19 int CurrentWindDirectionIndex;
20 SCR_WindDirectionInfo windDirectionInfo;
22 weatherManager.GetWindDirectionInfoFromFloat(weatherManager.GetWindDirection(), CurrentWindDirectionIndex, windDirectionInfo);
27 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
34 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
38 int windDirectionIndex = var.GetInt();
39 int CurrentWindDirectionIndex;
40 SCR_WindDirectionInfo windDirectionInfo;
41 weatherManager.GetWindDirectionInfoFromFloat(weatherManager.GetWindDirection(), CurrentWindDirectionIndex, windDirectionInfo);
44 if (CurrentWindDirectionIndex == windDirectionIndex)
47 weatherManager.GetWindDirectionInfoFromIndex(windDirectionIndex, windDirectionInfo);
48 weatherManager.DelayedOverrideWindDirection(windDirectionInfo.GetWindDirectionValue(), playerID);
51 protected void CreatePresets()
54 TimeAndWeatherManagerEntity timeManager = world.GetTimeAndWeatherManager();
60 array<SCR_WindDirectionInfo> orderedWindDirectionInfo =
new array<SCR_WindDirectionInfo>;
61 timeManager.GetOrderedWindDirectionInfoArray(orderedWindDirectionInfo);
64 foreach (SCR_WindDirectionInfo windDirectionInfo: orderedWindDirectionInfo)
67 value.SetName(windDirectionInfo.GetUIInfo().GetName());
68 value.SetFloatValue(windDirectionInfo.GetWindDirectionValue());
75 override void PreviewVariable(
bool setPreview, SCR_AttributesManagerEditorComponent manager)
81 if (!overrideAttribute)
84 overrideAttribute.PreviewVariable(setPreview, manager);
87 override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
91 return super.GetEntries(outEntries);