internal static void OnItemInstalled(ItemInstalled_t result) { if (IsOurAppId(result.m_unAppID)) { if (Prefs.LogVerbose) { Log.Message("Workshop: Item installed: " + result.m_nPublishedFileId); } WorkshopItems.Notify_Installed(result.m_nPublishedFileId); } }
internal static void OnItemSubscribed(RemoteStoragePublishedFileSubscribed_t result) { if (IsOurAppId(result.m_nAppID)) { if (Prefs.LogVerbose) { Log.Message("Workshop: Item subscribed: " + result.m_nPublishedFileId); } WorkshopItems.Notify_Subscribed(result.m_nPublishedFileId); } }
internal static void OnItemUnsubscribed(RemoteStoragePublishedFileUnsubscribed_t result) { if (IsOurAppId(result.m_nAppID)) { if (Prefs.LogVerbose) { Log.Message("Workshop: Item unsubscribed: " + result.m_nPublishedFileId); } Find.WindowStack.WindowOfType <Page_ModsConfig>()?.Notify_SteamItemUnsubscribed(result.m_nPublishedFileId); Find.WindowStack.WindowOfType <Page_SelectScenario>()?.Notify_SteamItemUnsubscribed(result.m_nPublishedFileId); WorkshopItems.Notify_Unsubscribed(result.m_nPublishedFileId); } }
internal static void OnItemUnsubscribed(RemoteStoragePublishedFileUnsubscribed_t result) { if (!Workshop.IsOurAppId(result.m_nAppID)) { return; } if (Prefs.LogVerbose) { Log.Message("Workshop: Item unsubscribed: " + result.m_nPublishedFileId); } Page_ModsConfig page_ModsConfig = Find.WindowStack.WindowOfType <Page_ModsConfig>(); if (page_ModsConfig != null) { page_ModsConfig.Notify_SteamItemUnsubscribed(result.m_nPublishedFileId); } Page_SelectScenario page_SelectScenario = Find.WindowStack.WindowOfType <Page_SelectScenario>(); if (page_SelectScenario != null) { page_SelectScenario.Notify_SteamItemUnsubscribed(result.m_nPublishedFileId); } WorkshopItems.Notify_Unsubscribed(result.m_nPublishedFileId); }
internal static void Notify_Unsubscribed(PublishedFileId_t pfid) { WorkshopItems.RebuildItemsList(); }
internal static void Notify_Installed(PublishedFileId_t pfid) { WorkshopItems.RebuildItemsList(); }
public static bool HasItem(PublishedFileId_t pfid) { return(WorkshopItems.GetItem(pfid) != null); }
static WorkshopItems() { WorkshopItems.RebuildItemsList(); }
static WorkshopItems() { WorkshopItems.subbedItems = new List <WorkshopItem>(); WorkshopItems.RebuildItemsList(); }