11 if (!IsGameMode(item))
16 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
20 return SCR_BaseEditorAttributeVar.CreateBool(weatherManager.IsWindSpeedOverridden() || weatherManager.IsWindDirectionOverridden());
23 override void UpdateInterlinkedVariables(
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
bool isInit =
false)
34 bool overrideWeather = var && var.GetBool();
40 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
47 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
56 if (!weatherTransitionManager)
71 SCR_WindDirectionInfo windDirectionInfo;
72 if (!weatherManager.GetWindDirectionInfoFromIndex(windDirectionVar.GetInt(), windDirectionInfo))
75 weatherManager.SetWindPreview(
true, windSpeedVar.GetFloat(), windDirectionInfo.GetWindDirectionValue());
78 else if (weatherTransitionManager.IsPreviewingWind())
80 weatherManager.SetWindPreview(
false);
87 if (weatherTransitionManager && weatherTransitionManager.IsPreviewingWind())
88 weatherManager.SetWindPreview(
false);
90 weatherManager.DelayedSetWindOverride(var.GetBool(), playerID);
93 override void PreviewVariable(
bool setPreview, SCR_AttributesManagerEditorComponent manager)
98 WriteVariable(
null, GetVariable(), manager, -1);
104 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
109 if (!weatherTransitionManager)
112 if (weatherTransitionManager.IsPreviewingWind())
113 weatherManager.SetWindPreview(
false);