Difference between revisions of "Wintermute/Plugins"

Jump to navigation Jump to search
470 bytes removed ,  23:44, 18 February 2020
Line 126: Line 126:
Commandline helper plugin by Corbomite Games
Commandline helper plugin by Corbomite Games


GetSupportedClasses() exports one class: '''CommandLineHelper'''.
GetSupportedClasses() exports one class: '''CommandLineHelper'''


Required property: '''Parameters'''.
Required property: '''Parameters''' (passed to String(), then Split(" ") is called )
 
Usage:
<nowiki>
global HelperObject = new CommandLineHelper();
global CommandLineParams = HelperObject.Parameters;
global TestLength = 0;
CommandLineParams = new String(CommandLineParams);
...
var paramArray = CommandLineParams.Split(" ");
DEBUG(("params" + CommandLineParams));
var arrayLength = paramArray.Length;
DEBUG(("paramArray[1]: " + paramArray[(arrayLength - 1)]));
switch(paramArray[(arrayLength - 1)]) {
case "FULL":
TestLength = 1;
Game.RegWriteNumber("Registered", 1);
...
</nowiki>


TODO: reimplement this for ResidualVM.
TODO: reimplement this for ResidualVM.
234

edits

Navigation menu