Add completion for pak decompress

* Renamed 'rtech_decompress' to 'pak_decompress'.
* Added completion func for 'pak_decompress'.
This commit is contained in:
Kawe Mazidjatari 2023-02-19 13:38:06 +01:00
parent 7649d16e6a
commit 3f2216337e
3 changed files with 14 additions and 1 deletions

View File

@ -374,7 +374,7 @@ void ConCommand::Init(void)
//-------------------------------------------------------------------------
// RTECH API |
ConCommand::Create("rtech_strtoguid", "Calculates the GUID from input data.", FCVAR_DEVELOPMENTONLY, RTech_StringToGUID_f, nullptr);
ConCommand::Create("rtech_decompress", "Decompresses the specified RPAK file.", FCVAR_DEVELOPMENTONLY, RTech_Decompress_f, nullptr);
ConCommand::Create("pak_decompress", "Decompresses specified RPAK file.", FCVAR_DEVELOPMENTONLY, RTech_Decompress_f, RTech_PakDecompress_f_CompletionFunc);
ConCommand::Create("pak_requestload", "Requests asynchronous load for specified RPAK file.", FCVAR_DEVELOPMENTONLY, Pak_RequestLoad_f, RTech_PakLoad_f_CompletionFunc);
ConCommand::Create("pak_requestunload", "Requests unload for specified RPAK file or ID.", FCVAR_DEVELOPMENTONLY, Pak_RequestUnload_f, RTech_PakUnload_f_CompletionFunc);
ConCommand::Create("pak_swap", "Requests swap for specified RPAK file or ID", FCVAR_DEVELOPMENTONLY, Pak_Swap_f, nullptr);

View File

@ -163,3 +163,15 @@ int RTech_PakUnload_f_CompletionFunc(char const* partial, char commands[COMMAND_
{
return _Host_Pak_f_CompletionFunc(&s_PakUnloadAutoFileList, partial, commands);
}
static CBaseAutoCompleteFileList s_PakDecompress("pak_decompress", "paks/Win64", "rpak");
//-----------------------------------------------------------------------------
// Purpose:
// Input : *partial -
// **commands -
// Output : int
//-----------------------------------------------------------------------------
int RTech_PakDecompress_f_CompletionFunc(char const* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH])
{
return _Host_Pak_f_CompletionFunc(&s_PakDecompress, partial, commands);
}

View File

@ -11,6 +11,7 @@ int Game_Give_f_CompletionFunc(char const* partial, char commands[COMMAND_COMPLE
int RTech_PakLoad_f_CompletionFunc(char const* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
int RTech_PakUnload_f_CompletionFunc(char const* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
int RTech_PakDecompress_f_CompletionFunc(char const* partial, char commands[COMMAND_COMPLETION_MAXITEMS][COMMAND_COMPLETION_ITEM_LENGTH]);
inline CMemory p_CBaseAutoCompleteFileList_AutoCompletionFunc;
inline auto v_CBaseAutoCompleteFileList_AutoCompletionFunc = p_CBaseAutoCompleteFileList_AutoCompletionFunc.RCast<int(*)(