10 if (!IsGameMode(item))
15 TimeAndWeatherManagerEntity timeManager = world.GetTimeAndWeatherManager();
16 if (!timeManager)
return null;
21 override void UpdateInterlinkedVariables(
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
bool isInit =
false)
30 override void WriteVariable(Managed item,
SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager,
int playerID)
35 BaseGameMode gameMode =
GetGame().GetGameMode();
43 TimeAndWeatherManagerEntity timeManager = world.GetTimeAndWeatherManager();
48 if (!weatherTransitionManager)
51 float daytime = var.GetFloat() / 3600;
67 vector date = dateVar.GetVector();
68 timeManager.SetDateTimePreview(
true, dateAttribute.GetYearByIndex(date[2]), date[1] +1, date[0] +1, daytime / 24);
73 if (weatherTransitionManager.IsPreviewingDateTime())
74 timeManager.SetDateTimePreview(
false);
76 timeManager.SetTimeOfTheDay(daytime);
82 SCR_NotificationsComponent.SendToUnlimitedEditorPlayers(
ENotification.EDITOR_ATTRIBUTES_TIME_CHANGED, playerID, time[0].ToInt(), time[1].ToInt(), time[3].ToInt(), time[4].ToInt());
85 override void PreviewVariable(
bool setPreview, SCR_AttributesManagerEditorComponent manager)
89 WriteVariable(
null, GetVariable(), manager, -1);
94 TimeAndWeatherManagerEntity weatherManager = world.GetTimeAndWeatherManager();
99 if (!weatherTransitionManager)
103 if (weatherTransitionManager.IsPreviewingDateTime())
104 weatherManager.SetDateTimePreview(
false);
108 override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
111 return super.GetEntries(outEntries);