Parametrize script extension, default to 'tscript'

This commit is contained in:
Lukas Aldershaab 2020-12-12 16:54:16 +01:00
parent b8b62292bd
commit 099dd4f1f3
542 changed files with 774 additions and 783 deletions

View file

@ -220,7 +220,7 @@ DefineEngineStringlyVariadicFunction( commandToServer, void, 2, RemoteCommandEve
"@tsexample\n"
"// Create a standard function. Needs to be executed on the client, such \n"
"// as within scripts/client/default.bind.cs\n"
"// as within scripts/client/default.bind." TORQUE_SCRIPT_EXTENSION "\n"
"function toggleCamera(%val)\n"
"{\n"
" // If key was down, call a server command named 'ToggleCamera'\n"
@ -228,7 +228,7 @@ DefineEngineStringlyVariadicFunction( commandToServer, void, 2, RemoteCommandEve
" commandToServer('ToggleCamera');\n"
"}\n\n"
"// Server command being called from above. Needs to be executed on the \n"
"// server, such as within scripts/server/commands.cs\n"
"// server, such as within scripts/server/commands." TORQUE_SCRIPT_EXTENSION "\n"
"function serverCmdToggleCamera(%client)\n"
"{\n"
" if (%client.getControlObject() == %client.player)\n"
@ -264,7 +264,7 @@ DefineEngineStringlyVariadicFunction( commandToClient, void, 3, RemoteCommandEve
"@tsexample\n"
"// Set up the client command. Needs to be executed on the client, such as\n"
"// within scripts/client/client.cs\n"
"// within scripts/client/client." TORQUE_SCRIPT_EXTENSION "\n"
"// Update the Ammo Counter with current ammo, if not any then hide the counter.\n"
"function clientCmdSetAmmoAmountHud(%amount)\n"
"{\n"
@ -277,7 +277,7 @@ DefineEngineStringlyVariadicFunction( commandToClient, void, 3, RemoteCommandEve
" }\n"
"}\n\n"
"// Call it from a server function. Needs to be executed on the server, \n"
"//such as within scripts/server/game.cs\n"
"//such as within scripts/server/game." TORQUE_SCRIPT_EXTENSION "\n"
"function GameConnection::setAmmoAmountHud(%client, %amount)\n"
"{\n"
" commandToClient(%client, 'SetAmmoAmountHud', %amount);\n"