Eliminate ConsoleFunction and ConsoleMethod, replace with DefineEngineStringlyVariadic

This commit is contained in:
Lukas Joergensen 2018-04-20 22:09:58 +02:00
parent 6b524ae58a
commit 7d91d0a577
18 changed files with 112 additions and 84 deletions

View file

@ -212,7 +212,7 @@ ConsoleDocClass( RemoteCommandEvent,
ConsoleFunctionGroupBegin( Net, "Functions for use with the network; tagged strings and remote commands.");
ConsoleFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandArgs + 1, "(string func, ...)"
DefineEngineStringlyVariadicFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandArgs + 1, "(string func, ...)"
"@brief Send a command to the server.\n\n"
"@param func Name of the server command being called\n"
@ -255,7 +255,7 @@ ConsoleFunction( commandToServer, void, 2, RemoteCommandEvent::MaxRemoteCommandA
RemoteCommandEvent::sendRemoteCommand(conn, args.count(), args);
}
ConsoleFunction( commandToClient, void, 3, RemoteCommandEvent::MaxRemoteCommandArgs + 2, "(NetConnection client, string func, ...)"
DefineEngineStringlyVariadicFunction( commandToClient, void, 3, RemoteCommandEvent::MaxRemoteCommandArgs + 2, "(NetConnection client, string func, ...)"
"@brief Send a command from the server to the client\n\n"
"@param client The numeric ID of a client GameConnection\n"
@ -349,7 +349,7 @@ DefineEngineFunction(getTaggedString, const char* , (const char *tag), (""),
ConsoleFunction( buildTaggedString, const char*, 2, 11, "(string format, ...)"
DefineEngineStringlyVariadicFunction( buildTaggedString, const char*, 2, 11, "(string format, ...)"
"@brief Build a string using the specified tagged string format.\n\n"
"This function takes an already tagged string (passed in as a tagged string ID) and one "