コード例 #1
0
ファイル: Workshop.cs プロジェクト: creazyboyone/DSTEd-C
        public void GetPublishedMods(int app_id, Action <WorkshopItem[]> callback)
        {
            this.Call(delegate() {
                EUserUGCList list           = EUserUGCList.k_EUserUGCList_Published;
                EUGCMatchingUGCType type    = EUGCMatchingUGCType.k_EUGCMatchingUGCType_All;
                EUserUGCListSortOrder order = EUserUGCListSortOrder.k_EUserUGCListSortOrder_CreationOrderAsc;
                uint page = 1; //@ToDo iterate/count up! A single page has a maximum of 50 items. is the result-count under 50, it's the last page!
                UGCQueryHandle_t handle = SteamUGC.CreateQueryUserUGCRequest(this.GetAccountID(), list, type, order, this.GetCreatorApp(), new AppId_t((uint)((uint)app_id & 0xFFFFFFul)), page);

                CallResult <SteamUGCQueryCompleted_t> .Create(delegate(SteamUGCQueryCompleted_t pCallback, bool bIOFailure) {
                    WorkshopItem[] result = new WorkshopItem[pCallback.m_unTotalMatchingResults];

                    for (uint index = 0; index < pCallback.m_unTotalMatchingResults; index++)
                    {
                        SteamUGCDetails_t details;

                        if (SteamUGC.GetQueryUGCResult(handle, index, out details))
                        {
                            result[index] = new WorkshopItem(details);
                        }
                    }

                    callback(result);
                    SteamUGC.ReleaseQueryUGCRequest(handle);
                }).Set(SteamUGC.SendQueryUGCRequest(handle));
            });
        }
コード例 #2
0
 internal WorkshopQueryUser(uint unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder)
 {
     _accountID = new AccountID_t(unAccountID);
     _listType  = eListType;
     _type      = eMatchingUGCType;
     _sortOrder = eSortOrder;
 }
コード例 #3
0
 public void SubscribedTypeOnClick()
 {
     currentPage = 1;
     pageType    = EUserUGCList.k_EUserUGCList_Subscribed;
     refreshUI();
     loadUIData();
 }
コード例 #4
0
 public void MyCreateTypeOnClick()
 {
     currentPage = 1;
     pageType    = EUserUGCList.k_EUserUGCList_Published;
     refreshUI();
     loadUIData();
 }
コード例 #5
0
 /// <summary>
 /// 查询创意工坊本地安装文件信息
 /// </summary>
 /// <param name="content"></param>
 /// <param name="pageNumber">页数 初始页为1 每页查询50条数据</param>
 /// <param name="callBack"></param>
 public static void QueryInstallInfo(BaseMonoBehaviour content, uint pageNumber, EUserUGCList type, ISteamWorkshopQueryInstallInfoCallBack callBack)
 {
     if (SteamManager.Initialized)
     {
         ISteamWorkshopQuery query = new SteamWorkshopQueryImpl(content);
         query.QueryInstallInfo(pageNumber, type, callBack);
     }
 }
コード例 #6
0
    public void QueryInstallInfo(uint pageNumber, EUserUGCList type, ISteamWorkshopQueryInstallInfoCallBack callBack)
    {
        this.mQueryInstallInfoCallBack = callBack;

        //UGCQueryHandle_t handle = SteamUGC.CreateQueryAllUGCRequest(EUGCQuery.k_EUGCQuery_RankedByVote,EUGCMatchingUGCType.k_EUGCMatchingUGCType_All,mAppId, mAppId, pageNumber);
        UGCQueryHandle_t handle = SteamUGC.CreateQueryUserUGCRequest(SteamUser.GetSteamID().GetAccountID(), type, EUGCMatchingUGCType.k_EUGCMatchingUGCType_All, EUserUGCListSortOrder.k_EUserUGCListSortOrder_CreationOrderAsc, mAppId, mAppId, pageNumber);

        SteamUGC.SetReturnMetadata(handle, true);
        CallResult <SteamUGCQueryCompleted_t> callResult = CallResult <SteamUGCQueryCompleted_t> .Create(QueryUserUGCCallBack);

        SteamAPICall_t apiCall = SteamUGC.SendQueryUGCRequest(handle);

        callResult.Set(apiCall);
    }
コード例 #7
0
        public static HeathenWorkshopItemQuery Create(AccountID_t account, EUserUGCList listType, EUGCMatchingUGCType matchingType, EUserUGCListSortOrder sortOrder, AppId_t creatorApp, AppId_t consumerApp)
        {
            HeathenWorkshopItemQuery nQuery = new HeathenWorkshopItemQuery
            {
                matchedRecordCount = 0,
                PageCount          = 1,
                isAllQuery         = false,
                isUserQuery        = true,
                listType           = listType,
                sortOrder          = sortOrder,
                matchingType       = matchingType,
                creatorApp         = creatorApp,
                consumerApp        = consumerApp,
                account            = account,
                Page   = 1,
                handle = SteamUGC.CreateQueryUserUGCRequest(account, listType, matchingType, sortOrder, creatorApp, consumerApp, 1)
            };

            return(nQuery);
        }
コード例 #8
0
 /// <summary>
 /// <para> Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.</para>
 /// </summary>
 public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUserUGCRequest(CSteamGameServerAPIContext.GetSteamUGC(), unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage));
 }
コード例 #9
0
		/// <summary>
		/// <para> Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.</para>
		/// </summary>
		public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) {
			InteropHelp.TestIfAvailableGameServer();
			return (UGCQueryHandle_t)NativeMethods.ISteamGameServerUGC_CreateQueryUserUGCRequest(unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage);
		}
コード例 #10
0
 public UInt64 CreateQueryUserUGCRequest(UInt32 unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, UInt32 nCreatorAppID, UInt32 nConsumerAppID, UInt32 unPage)
 {
     return(this.GetFunction <NativeCreateQueryUserUGCRequestUEEEUUU>(this.Functions.CreateQueryUserUGCRequest0)(this.ObjectAddress, unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage));
 }
コード例 #11
0
		public static extern ulong ISteamGameServerUGC_CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage);
コード例 #12
0
ファイル: isteamugc.cs プロジェクト: rfht/Steamworks-nosteam
 /// Query UGC associated with a user. Creator app id or consumer app id must be valid and be set to the current running app. unPage should start at 1.
 public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage)
 {
     return((UGCQueryHandle_t)0);
 }
コード例 #13
0
 public void GetInstallItemInfo(uint page, EUserUGCList type)
 {
     SteamWorkshopHandle.QueryInstallInfo(this, page, type, new InstallItemListCallBack(this));
 }
コード例 #14
0
 // Methods
 public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) => default; // 0x000000018079A220-0x000000018079A310