nwnintf
Class ScriptInstaller
java.lang.Object
|
+--nwnintf.ScriptInstaller
- public class ScriptInstaller
- extends java.lang.Object
Compile scripts and attach them to a module file.
Method Summary |
void |
addIncludeFiles(java.util.HashMap includeFiles)
|
byte[] |
compileFile(java.lang.String contents)
Compile a neverwinter script file. |
void |
installScript(java.lang.String resname,
java.lang.String contents)
Install a script into the module using the given resource name.
|
void |
installScripts(java.util.Collection scriptslots)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptInstaller
public ScriptInstaller(NwnModule nwnmodule,
java.util.HashMap includeFiles)
throws java.lang.Exception
addIncludeFiles
public void addIncludeFiles(java.util.HashMap includeFiles)
throws java.lang.Exception
java.lang.Exception
compileFile
public byte[] compileFile(java.lang.String contents)
throws java.lang.Exception
- Compile a neverwinter script file. The file is only allowed to
include "i_se_atoms". The return value will be the compile bytecode
(.ncs format).
Throws Exception if there was a compile error.
- Parameters:
contents
- Script file text
- Returns:
- bytecode string.
java.lang.Exception
installScript
public void installScript(java.lang.String resname,
java.lang.String contents)
throws java.lang.Exception
- Install a script into the module using the given resource name.
Don't put .nss or anything on the resname.
- Parameters:
resname
- Name to use for this resource. If a script resource already
exists by this name, it will be overwritten.contents
- String containing the script text.
java.lang.Exception
installScripts
public void installScripts(java.util.Collection scriptslots)
throws java.lang.Exception
- Parameters:
scriptslots
- Contains ScriptSlot instances.
java.lang.Exception
- See Also:
attachScript( String, String, String )
,
compileFile( String )