2 #include "addon_types.h"
3 #include "vg/vg_steam_remote_storage.h"
5 #include "vg/vg_steam_auth.h"
6 #include "vg/vg_steam_ugc.h"
7 #include "vg/vg_steam_friends.h"
9 #include "ent_skateshop.h"
11 struct async_workshop_filepath_info
{
17 struct async_workshop_installed_files_info
{
18 PublishedFileId_t
*buffer
;
22 struct async_workshop_metadata_info
{
23 struct workshop_file_info
*info
;
28 #define WORKSHOP_VIEW_PER_PAGE 15
33 k_workshop_op_downloading_submission
,
34 k_workshop_op_publishing_update
,
35 k_workshop_op_loading_model
41 char description
[512];
43 i32 submission_type_selection
;
46 PublishedFileId_t file_id
; /* 0 if not published yet */
49 int submit_title
, /* set if the respective controls are touched */
51 submit_file_and_image
;
55 enum workshop_form_page
{
56 k_workshop_form_hidden
,
57 k_workshop_form_open
, /* open but not looking at anything */
58 k_workshop_form_edit
, /* editing a submission */
59 k_workshop_form_cclosing
,
60 k_workshop_form_closing_good
, /* post upload screen */
61 k_workshop_form_closing_bad
,
66 * -----------------------------
69 char addon_folder
[128];
70 struct player_board board_model
;
71 struct player_model player_model
;
73 /* what does the user want to do with the image preview? */
74 enum workshop_form_file_intent
{
75 k_workshop_form_file_intent_none
, /* loading probably */
76 k_workshop_form_file_intent_new
, /* board_model is valid */
77 k_workshop_form_file_intent_keep_old
/* just browsing */
81 world_instance
*view_world
;
82 ent_swspreview
*ptr_ent
;
92 * published UGC request
93 * ------------------------------
97 UGCQueryHandle_t handle
;
107 * ------------------------------------------
110 const char *failure_or_success_string
;
116 int view_published_page_count
,
117 view_published_page_id
;
119 struct published_file
{
124 published_files_list
[WORKSHOP_VIEW_PER_PAGE
];
125 int published_files_list_length
;
127 extern workshop_form
;
129 void workshop_init(void);
130 int workshop_submit_command( int argc
, const char *argv
[] );
131 void async_workshop_get_filepath( void *data
, u32 len
);
132 void async_workshop_get_installed_files( void *data
, u32 len
);
133 void workshop_load_metadata( const char *path
,struct workshop_file_info
*info
);
134 void workshop_form_gui(void);