Exemplo n.º 1
0
 internal Editor(WorkshopFileType filetype)
 {
     this = new Editor()
     {
         creatingNew  = true,
         creatingType = filetype
     };
 }
Exemplo n.º 2
0
            public void CreateItem(WorkshopFileType fileType)
            {
                AssertDisposed();

                NativeMethods.Workshop_CreateItem(pointer, fileType);

                CancelCallback(ref polledCallback);
                WaitForDone(this, OnCreateItem);
            }
 public void PublishWorkshopFile(string fileName, string previewFile, AppID consumerAppId,
                                 string title, string description, RemoteStoragePublishedFileVisibility visibility,
                                 IList <string> tags, WorkshopFileType workshopFileType)
 {
     CheckIfUsable();
     using (SteamParamStringArray tagsArray = new SteamParamStringArray(tags))
     {
         NativeMethods.Cloud_PublishWorkshopFile(fileName, previewFile, consumerAppId.AsUInt32,
                                                 title, description, (int)visibility, tagsArray.UnmanagedMemory, (int)workshopFileType);
     }
 }
        // SteamAPICall_t
        public CallbackHandle CreateItem(AppId_t nConsumerAppId /*AppId_t*/, WorkshopFileType eFileType /*EWorkshopFileType*/, Action <CreateItemResult_t, bool> CallbackFunction = null /*Action<CreateItemResult_t, bool>*/)
        {
            SteamAPICall_t callback = 0;

            callback = platform.ISteamUGC_CreateItem(nConsumerAppId.Value, eFileType);

            if (CallbackFunction == null)
            {
                return(null);
            }

            return(CreateItemResult_t.CallResult(steamworks, callback, CallbackFunction));
        }
Exemplo n.º 5
0
        // SteamAPICall_t
        // using: Detect_StringArray
        public CallbackHandle PublishWorkshopFile(string pchFile /*const char **/, string pchPreviewFile /*const char **/, AppId_t nConsumerAppId /*AppId_t*/, string pchTitle /*const char **/, string pchDescription /*const char **/, RemoteStoragePublishedFileVisibility eVisibility /*ERemoteStoragePublishedFileVisibility*/, string[] pTags /*struct SteamParamStringArray_t **/, WorkshopFileType eWorkshopFileType /*EWorkshopFileType*/, Action <RemoteStoragePublishFileProgress_t, bool> CallbackFunction = null /*Action<RemoteStoragePublishFileProgress_t, bool>*/)
        {
            SteamAPICall_t callback = 0;
            // Create strings
            var nativeStrings = new IntPtr[pTags.Length];

            for (int i = 0; i < pTags.Length; i++)
            {
                nativeStrings[i] = Marshal.StringToHGlobalAnsi(pTags[i]);
            }
            try
            {
                // Create string array
                var size        = Marshal.SizeOf(typeof(IntPtr)) * nativeStrings.Length;
                var nativeArray = Marshal.AllocHGlobal(size);
                Marshal.Copy(nativeStrings, 0, nativeArray, nativeStrings.Length);

                // Create SteamParamStringArray_t
                var tags = new SteamParamStringArray_t();
                tags.Strings    = nativeArray;
                tags.NumStrings = pTags.Length;
                callback        = platform.ISteamRemoteStorage_PublishWorkshopFile(pchFile, pchPreviewFile, nConsumerAppId.Value, pchTitle, pchDescription, eVisibility, ref tags, eWorkshopFileType);
            }
            finally
            {
                foreach (var x in nativeStrings)
                {
                    Marshal.FreeHGlobal(x);
                }
            }

            if (CallbackFunction == null)
            {
                return(null);
            }

            return(RemoteStoragePublishFileProgress_t.CallResult(steamworks, callback, CallbackFunction));
        }
 /// <summary>
 /// <para> Steam Workshop Creator API</para>
 /// <para> create new item for this app with no content attached yet</para>
 /// </summary>
 public static SteamAPICall CreateItem(AppId nConsumerAppId, WorkshopFileType fileType)
 {
     InteropHelp.TestIfAvailableGameServer();
     return((SteamAPICall)NativeMethods.ISteamGameServerUGC_CreateItem(nConsumerAppId, fileType));
 }
Exemplo n.º 7
0
 internal Editor(WorkshopFileType filetype) : this()
 {
     this.creatingNew  = true;
     this.creatingType = filetype;
 }
Exemplo n.º 8
0
//         public unsafe void RequestUGCDetails(ulong publishedFileID, uint maxAgeSeconds, Action<bool, SteamUGCRequestUGCDetailsResult> onCallResult)
//         {
//             ISteamUGC* this2 = <Module>.SteamUGC();
//             <Module>.SteamSDK.?A0x57ffc328.MakeCall<struct SteamUGCRequestUGCDetailsResult_t,class System::Action<bool,struct SteamSDK::SteamUGCRequestUGCDetailsResult> >(calli(System.UInt64 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt64,System.UInt32), this2, publishedFileID, maxAgeSeconds, *(*(long*)this2 + 112L)), ldftn(OnRequestUGCDetails), onCallResult);
//         }

        public unsafe void CreateItem(uint appId, WorkshopFileType workshopFileType, Action <bool, CreateItemResult> onCallResult)
        {
//             ISteamUGC* this2 = <Module>.SteamUGC();
//             <Module>.SteamSDK.?A0x57ffc328.MakeCall<struct CreateItemResult_t,class System::Action<bool,struct SteamSDK::CreateItemResult> >(calli(System.UInt64 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,EWorkshopFileType), this2, appId, workshopFileType, *(*(long*)this2 + 120L)), ldftn(OnCreateItem), onCallResult);
        }
 public void PublishWorkshopFile(string fileName, string previewFile, AppID consumerAppId,
     string title, string description, RemoteStoragePublishedFileVisibility visibility,
     IList<string> tags, WorkshopFileType workshopFileType)
 {
     CheckIfUsable();
     using (SteamParamStringArray tagsArray = new SteamParamStringArray(tags))
     {
         NativeMethods.Cloud_PublishWorkshopFile(fileName, previewFile, consumerAppId.AsUInt32,
             title, description, (int)visibility, tagsArray.UnmanagedMemory, (int)workshopFileType);
     }
 }
Exemplo n.º 10
0
 /// <summary>
 /// <para> publishing UGC</para>
 /// </summary>
 public static SteamAPICall PublishWorkshopFile(string File, string PreviewFile, AppId nConsumerAppId, string Title, string Description, Visibility eVisibility, System.Collections.Generic.IList <string> pTags, WorkshopFileType workshopFileType)
 {
     InteropHelp.TestIfAvailableClient();
     using (var File2 = new InteropHelp.UTF8StringHandle(File))
         using (var PreviewFile2 = new InteropHelp.UTF8StringHandle(PreviewFile))
             using (var Title2 = new InteropHelp.UTF8StringHandle(Title))
                 using (var Description2 = new InteropHelp.UTF8StringHandle(Description)) {
                     return((SteamAPICall)NativeMethods.ISteamRemoteStorage_PublishWorkshopFile(File2, PreviewFile2, nConsumerAppId, Title2, Description2, eVisibility, new InteropHelp.SteamParamStringArray(pTags), workshopFileType));
                 }
 }
Exemplo n.º 11
0
//         public unsafe void RequestUGCDetails(ulong publishedFileID, uint maxAgeSeconds, Action<bool, SteamUGCRequestUGCDetailsResult> onCallResult)
//         {
//             ISteamUGC* this2 = <Module>.SteamUGC();
//             <Module>.SteamSDK.?A0x57ffc328.MakeCall<struct SteamUGCRequestUGCDetailsResult_t,class System::Action<bool,struct SteamSDK::SteamUGCRequestUGCDetailsResult> >(calli(System.UInt64 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt64,System.UInt32), this2, publishedFileID, maxAgeSeconds, *(*(long*)this2 + 112L)), ldftn(OnRequestUGCDetails), onCallResult);
//         }

         public unsafe void CreateItem(uint appId, WorkshopFileType workshopFileType, Action<bool, CreateItemResult> onCallResult)
         {
//             ISteamUGC* this2 = <Module>.SteamUGC();
//             <Module>.SteamSDK.?A0x57ffc328.MakeCall<struct CreateItemResult_t,class System::Action<bool,struct SteamSDK::CreateItemResult> >(calli(System.UInt64 modopt(System.Runtime.CompilerServices.CallConvCdecl)(System.IntPtr,System.UInt32,EWorkshopFileType), this2, appId, workshopFileType, *(*(long*)this2 + 120L)), ldftn(OnCreateItem), onCallResult);
         }
Exemplo n.º 12
0
 public extern static void Workshop_CreateItem(IntPtr workshop, WorkshopFileType fileType);