13 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
18 if (!weatherTransitionManager)
21 array<ref WeatherState> weatherStates =
new array<ref WeatherState>;
24 weatherManager.GetWeatherStatesList(weatherStates);
25 if (weatherStates.IsEmpty())
28 WeatherStateTransitionNode currentStateTransition = weatherTransitionManager.GetCurrentStateTransitionNode();
33 override void UpdateInterlinkedVariables(
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
bool isInit =
false)
42 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
50 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
55 if (!weatherTransitionManager)
61 WeatherStateTransitionNode currentStateTransition = weatherTransitionManager.GetCurrentStateTransitionNode();
63 bool setAutomatic = var.GetBool();
66 if (weatherTransitionManager.IsPreviewingState())
67 weatherManager.SetWeatherStatePreview(
false);
72 weatherManager.ForceWeatherTo(!setAutomatic,
string.Empty, 0, 0.001, playerID);
77 float transitionTime = 0;
81 transitionTime = transitionVar.GetInt();
83 weatherManager.ForceWeatherTo(!setAutomatic,
string.Empty, transitionTime / 3600, 0.001, playerID);
87 override void PreviewVariable(
bool setPreview, SCR_AttributesManagerEditorComponent manager)
92 bool SetAutomatic = GetVariable().GetBool();
94 if (SetAutomatic || !setPreview)
97 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
102 if (!weatherTransitionManager)
106 if (weatherTransitionManager.IsPreviewingState())
107 weatherManager.SetWeatherStatePreview(
false);
112 if (!weatherInstantAttribute)
115 weatherInstantAttribute.PreviewVariable(setPreview, manager);