11 static float GetModListSize(array<Dependency> dependencies)
14 if (dependencies.IsEmpty())
20 foreach (Dependency dependency : dependencies)
22 size += dependency.TotalFileSize();
31 static float GetModListSize(array<ref SCR_WorkshopItem> items)
42 size += item.GetSizeBytes();
53 static bool AllItemsCached(array<Dependency> aDependencies, out array<Dependency> aDepsToLoad)
55 for (
int i = 0; i < aDependencies.Count(); i++)
57 WorkshopItem item = aDependencies[i].GetCachedItem();
63 aDepsToLoad.Insert(aDependencies[i]);
69 if (aDepsToLoad.Count() == 0)
78 static bool AllModsUpdated(array<Dependency> dependencies)
81 if (dependencies.Count() == 0)
85 array<WorkshopItem> aRoomItems =
new array<WorkshopItem>;
87 foreach (Dependency dependency : dependencies)
89 WorkshopItem item = dependency.GetCachedItem();
92 aRoomItems.Insert(item);
96 foreach (WorkshopItem item : aRoomItems)
98 int flags = item.GetStateFlags();
100 if (flags & EWorkshopItemState.EWSTATE_OFFLINE)
102 if (flags & EWorkshopItemState.EWSTATE_OUTDATED)
114 static void SetupDebug()
129 WorkshopItem wsItem = item.GetWorkshopItem();
134 Dependency dependency = item.GetDependency();
139 return Revision.AreEqual(item.GetCurrentLocalRevision(), dependency.GetRevision());