8 if (!IsGameMode(item))
return null;
12 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
13 if (!weatherManager)
return null;
18 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
25 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
29 weatherManager.DelayedOverrideWindSpeed(var.GetFloat(), playerID);
32 override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
36 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
39 array<ref WeatherState> weatherStates =
new array<ref WeatherState>;
40 weatherManager.GetWeatherStatesList(weatherStates);
42 float maxValue = m_baseValues.GetMaxValue();
43 array<ref WeatherVariant> variants = {};
46 foreach (WeatherState state: weatherStates)
48 state.GetVariantsList(variants);
50 foreach (WeatherVariant variant: variants)
52 WeatherWindPattern windPattern = variant.GetWindPattern();
57 newMax = windPattern.GetMaxSpeed();
59 if (newMax > maxValue)
64 m_baseValues.SetMaxValue(Math.Ceil(maxValue));
67 return super.GetEntries(outEntries);
71 override void PreviewVariable(
bool setPreview, SCR_AttributesManagerEditorComponent manager)
77 if (!overrideAttribute)
80 overrideAttribute.PreviewVariable(setPreview, manager);