11 ref array<ref SCR_WorkshopItem> m_aProvidedDependencies;
17 if (dependencies.Count() > 0)
20 m_aProvidedDependencies =
new array<ref SCR_WorkshopItem>;
21 foreach (
auto dep : dependencies)
22 m_aProvidedDependencies.Insert(dep);
26 _print(
"New() Creating actions:");
31 if (!dep.GetOffline() || dep.GetUpdateAvailable())
34 _print(
string.Format(
" Dependency: %1 - Creating action", dep.GetName()));
43 _print(
string.Format(
" Dependency: %1 - Download is not required.", dep.GetName()));
51 protected override bool OnActivate()
58 if (action.IsPaused())
59 success = success && action.Resume();
60 else if (action.IsInactive())
61 success = success && action.Activate();
68 protected override bool OnReactivate()
74 protected override bool OnCancel()
81 protected override bool OnPause()
88 protected override bool OnResume()
95 override void Internal_Update(
float timeSlice)
103 if (m_Wrapper.GetRequestFailed())
108 array<SCR_WorkshopItemAction> removeActions =
new array<SCR_WorkshopItemAction>;
111 if (action.IsCanceled() || action.IsPaused() || action.IsFailed())
112 removeActions.Insert(action);
114 UnregisterActions(removeActions);
131 protected bool OnActivateInternal();
134 protected override bool OnActivate()
137 m_Callback.m_OnTimeout.Insert(Callback_OnTimeout);
138 m_Callback.m_OnError.Insert(Callback_OnError);
139 m_Callback.m_OnSuccess.Insert(Callback_OnSuccess);
141 bool success = OnActivateInternal();
147 protected override bool OnReactivate()
149 return this.OnActivate();
153 protected void Callback_OnError()
160 protected void Callback_OnTimeout()
167 protected void Callback_OnSuccess()
177 protected EWorkshopReportType m_eReportType;
178 protected string m_sMessage;
183 m_eReportType = eReport;
184 m_sMessage = sMessage;
189 protected override bool OnActivateInternal()
191 return m_Wrapper.Internal_Report(m_eReportType, m_sMessage,
m_Callback);
201 protected override bool OnActivateInternal()
203 return m_Wrapper.Internal_CancelReport(
m_Callback);
212 protected override bool OnActivateInternal()
214 return m_Wrapper.Internal_AddAuthorBlock(
m_Callback);
222 protected override bool OnActivateInternal()
224 return m_Wrapper.Internal_RemoveAuthorBlock(
m_Callback);