|
20 | 20 | #endif |
21 | 21 |
|
22 | 22 | #include <iostream> |
23 | | -#include <string> |
24 | 23 |
|
25 | 24 | // Enumerated constants ///////////////////////// |
26 | 25 | enum { |
@@ -268,7 +267,6 @@ SW_PY void GetFileDetails(const char* filename){ |
268 | 267 | SteamApps()->GetFileDetails(filename); |
269 | 268 | } |
270 | 269 |
|
271 | | - |
272 | 270 | ///////////////////////////////////////////////// |
273 | 271 | ///// CONTROLLERS//////////////////////////////// |
274 | 272 | ///////////////////////////////////////////////// |
@@ -550,186 +548,6 @@ SW_PY void TriggerScreenshot(){ |
550 | 548 | SteamScreenshots()->TriggerScreenshot(); |
551 | 549 | } |
552 | 550 |
|
553 | | -///////////////////////////////////////////////// |
554 | | -///// UGC /////////////////////////////////////// |
555 | | -///////////////////////////////////////////////// |
556 | | -// |
557 | | -// Download new or update already installed item. If returns true, wait for DownloadItemResult_t. If item is already installed, then files on disk should not be used until callback received. |
558 | | -// If item is not subscribed to, it will be cached for some time. If bHighPriority is set, any other item download will be suspended and this item downloaded ASAP. |
559 | | -SW_PY bool DownloadItem(int publishedFileID, bool highPriority){ |
560 | | - if(SteamUGC() == NULL){ |
561 | | - return 0; |
562 | | - } |
563 | | - PublishedFileId_t fileID = (int)publishedFileID; |
564 | | - return SteamUGC()->DownloadItem(fileID, highPriority); |
565 | | -} |
566 | | -// SuspendDownloads( true ) will suspend all workshop downloads until SuspendDownloads( false ) is called or the game ends. |
567 | | -SW_PY void SuspendDownloads(bool suspend){ |
568 | | - return SteamUGC()->SuspendDownloads(suspend); |
569 | | -} |
570 | | -// Starts the item update process. |
571 | | -SW_PY uint64_t StartItemUpdate(AppId_t appID, int publishedFileID){ |
572 | | - PublishedFileId_t fileID = (int)publishedFileID; |
573 | | - return SteamUGC()->StartItemUpdate(appID, fileID); |
574 | | -} |
575 | | -// Gets the current state of a workshop item on this client. |
576 | | -SW_PY int GetItemState(int publishedFileID){ |
577 | | - if(SteamUGC() == NULL){ |
578 | | - return 0; |
579 | | - } |
580 | | - PublishedFileId_t fileID = (int)publishedFileID; |
581 | | - return SteamUGC()->GetItemState(fileID); |
582 | | -} |
583 | | -// Creating a workshop item |
584 | | -SW_PY void CreateItem(AppId_t appID, int fileType){ |
585 | | - if(SteamUGC() == NULL){ |
586 | | - return; |
587 | | - } |
588 | | - EWorkshopFileType workshopType; |
589 | | - // Convert the file type back over. |
590 | | - if(fileType == UGC_ITEM_MAX){ |
591 | | - workshopType = k_EWorkshopFileTypeMax; |
592 | | - } |
593 | | - else if(fileType == UGC_ITEM_MICROTRANSACTION){ |
594 | | - workshopType = k_EWorkshopFileTypeMicrotransaction; |
595 | | - } |
596 | | - else if(fileType == UGC_ITEM_COLLECTION){ |
597 | | - workshopType = k_EWorkshopFileTypeCollection; |
598 | | - } |
599 | | - else if(fileType == UGC_ITEM_ART){ |
600 | | - workshopType = k_EWorkshopFileTypeArt; |
601 | | - } |
602 | | - else if(fileType == UGC_ITEM_VIDEO){ |
603 | | - workshopType = k_EWorkshopFileTypeVideo; |
604 | | - } |
605 | | - else if(fileType == UGC_ITEM_SCREENSHOT){ |
606 | | - workshopType = k_EWorkshopFileTypeScreenshot; |
607 | | - } |
608 | | - else if(fileType == UGC_ITEM_GAME){ |
609 | | - workshopType = k_EWorkshopFileTypeGame; |
610 | | - } |
611 | | - else if(fileType == UGC_ITEM_SOFTWARE){ |
612 | | - workshopType = k_EWorkshopFileTypeSoftware; |
613 | | - } |
614 | | - else if(fileType == UGC_ITEM_CONCEPT){ |
615 | | - workshopType = k_EWorkshopFileTypeConcept; |
616 | | - } |
617 | | - else if(fileType == UGC_ITEM_WEBGUIDE){ |
618 | | - workshopType = k_EWorkshopFileTypeWebGuide; |
619 | | - } |
620 | | - else if(fileType == UGC_ITEM_INTEGRATEDGUIDE){ |
621 | | - workshopType = k_EWorkshopFileTypeIntegratedGuide; |
622 | | - } |
623 | | - else if(fileType == UGC_ITEM_MERCH){ |
624 | | - workshopType = k_EWorkshopFileTypeMerch; |
625 | | - } |
626 | | - else if(fileType == UGC_ITEM_CONTROLLERBINDING){ |
627 | | - workshopType = k_EWorkshopFileTypeControllerBinding; |
628 | | - } |
629 | | - else if(fileType == UGC_ITEM_STEAMWORKSACCESSINVITE){ |
630 | | - workshopType = k_EWorkshopFileTypeSteamworksAccessInvite; |
631 | | - } |
632 | | - else if(fileType == UGC_ITEM_STEAMVIDEO){ |
633 | | - workshopType = k_EWorkshopFileTypeSteamVideo; |
634 | | - } |
635 | | - else if(fileType == UGC_ITEM_GAMEMANAGEDITEM){ |
636 | | - workshopType = k_EWorkshopFileTypeGameManagedItem; |
637 | | - } |
638 | | - else{ |
639 | | - workshopType = k_EWorkshopFileTypeCommunity; |
640 | | - } |
641 | | - // Callbacks must be functional |
642 | | -// SteamAPICall_t apiCall = SteamUGC()->CreateItem(appID, workshopType); |
643 | | -// callResultItemCreate.Set(apiCall, this, &_item_created); |
644 | | -} |
645 | | -// Sets a new title for an item. |
646 | | -SW_PY bool SetItemTitle(uint64_t updateHandle, const char *title){ |
647 | | - if(SteamUGC() == NULL){ |
648 | | - return false; |
649 | | - } |
650 | | - if (strlen(title) > UGC_MAX_TITLE_CHARS){ |
651 | | - printf("Title cannot have more than %ld ASCII characters. Title not set.", UGC_MAX_TITLE_CHARS); |
652 | | - return false; |
653 | | - } |
654 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
655 | | - return SteamUGC()->SetItemTitle(handle, title); |
656 | | -} |
657 | | -// Sets a new description for an item. |
658 | | -SW_PY bool SetItemDescription(uint64_t updateHandle, const char *description){ |
659 | | - if(SteamUGC() == NULL){ |
660 | | - return false; |
661 | | - } |
662 | | - if (strlen(description) > UGC_MAX_DESC_CHARS){ |
663 | | - printf("Description cannot have more than %ld ASCII characters. Description not set.", UGC_MAX_DESC_CHARS); |
664 | | - return false; |
665 | | - } |
666 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
667 | | - return SteamUGC()->SetItemDescription(handle, description); |
668 | | -} |
669 | | -// Sets the language of the title and description that will be set in this item update. |
670 | | -SW_PY bool SetItemUpdateLanguage(uint64_t updateHandle, const char *language){ |
671 | | - if(SteamUGC() == NULL){ |
672 | | - return false; |
673 | | - } |
674 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
675 | | - return SteamUGC()->SetItemUpdateLanguage(handle, language); |
676 | | -} |
677 | | -// Sets arbitrary metadata for an item. This metadata can be returned from queries without having to download and install the actual content. |
678 | | -SW_PY bool SetItemMetadata(uint64_t updateHandle, const char *metadata){ |
679 | | - if(SteamUGC() == NULL){ |
680 | | - return false; |
681 | | - } |
682 | | - if (strlen(metadata) > UGC_MAX_METADATA_CHARS){ |
683 | | - printf("Metadata cannot have more than %ld ASCII characters. Metadata not set.", UGC_MAX_METADATA_CHARS); |
684 | | - } |
685 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
686 | | - return SteamUGC()->SetItemMetadata(handle, metadata); |
687 | | -} |
688 | | -// Sets the visibility of an item. |
689 | | -SW_PY bool SetItemVisibility(uint64_t updateHandle, int visibility){ |
690 | | - if(SteamUGC() == NULL){ |
691 | | - return false; |
692 | | - } |
693 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
694 | | - ERemoteStoragePublishedFileVisibility itemVisibility; |
695 | | - // Convert the visibility type back over. |
696 | | - if(visibility == UGC_FILE_VISIBLE_PUBLIC){ |
697 | | - itemVisibility = k_ERemoteStoragePublishedFileVisibilityPublic; |
698 | | - } |
699 | | - else if(visibility == UGC_FILE_VISIBLE_FRIENDS){ |
700 | | - itemVisibility = k_ERemoteStoragePublishedFileVisibilityFriendsOnly; |
701 | | - } |
702 | | - else{ |
703 | | - itemVisibility = k_ERemoteStoragePublishedFileVisibilityPrivate; |
704 | | - } |
705 | | - return SteamUGC()->SetItemVisibility(handle, itemVisibility); |
706 | | -} |
707 | | -// Sets the folder that will be stored as the content for an item. |
708 | | -SW_PY bool SetItemContent(uint64_t updateHandle, const char *contentFolder){ |
709 | | - if(SteamUGC() == NULL){ |
710 | | - return false; |
711 | | - } |
712 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
713 | | - return SteamUGC()->SetItemContent(handle, contentFolder); |
714 | | -} |
715 | | -// Sets the primary preview image for the item. |
716 | | -SW_PY bool SetItemPreview(uint64_t updateHandle, const char *previewFile){ |
717 | | - if(SteamUGC() == NULL){ |
718 | | - return false; |
719 | | - } |
720 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
721 | | - return SteamUGC()->SetItemPreview(handle, previewFile); |
722 | | -} |
723 | | -// Uploads the changes made to an item to the Steam Workshop; to be called after setting your changes. |
724 | | -SW_PY void SubmitItemUpdate(uint64_t updateHandle, const char *changeNote){ |
725 | | - if(SteamUGC() == NULL){ |
726 | | - return; |
727 | | - } |
728 | | - UGCUpdateHandle_t handle = uint64(updateHandle); |
729 | | -// SteamAPICall_t apiCall = SteamUGC()->SubmitItemUpdate(handle, changeNote); |
730 | | -// callResultItemUpdate.Set(apiCall, this, &_item_updated); |
731 | | -} |
732 | | - |
733 | 551 | ///////////////////////////////////////////////// |
734 | 552 | ///// USERS ///////////////////////////////////// |
735 | 553 | ///////////////////////////////////////////////// |
|
0 commit comments