template index file review

remove redundant referenes to $TorqueScriptFileExtension. exec and queueExec both handle those internaly.
as pointed out in #511, we were already executing the guimusicpayer.gui in the ut.tscript module via queue. as that case allows folks to bolt a true at the end of the method to override the file-call and replace it with a personalized variant in another module, removed the redundant exec
This commit is contained in:
AzaezelX 2021-07-20 11:02:38 -05:00
parent 18a7e31991
commit c640d8823d
4 changed files with 20 additions and 27 deletions

View file

@ -33,7 +33,7 @@ function ExampleModule::onDestroy(%this)
function ExampleModule::initServer(%this)
{
//This script contains our ExampleGameMode logic
%this.queueExec("./scripts/ExampleGamemodeScript." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/ExampleGamemodeScript");
}
//This is called when a game session server is actually created so the game may be played. It's called
@ -74,13 +74,13 @@ function ExampleModule::initClient(%this)
//client scripts
//Here, we exec out keybind scripts so the player is able to move when they get into a game
%this.queueExec("./scripts/default.keybinds." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/default.keybinds");
%prefPath = getPrefpath();
if(isFile(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension))
exec(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/inputCommands." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/inputCommands");
}
//This is called when a game session client successfuly connects to a game server.