Add PackageLib.setLuaPath() utility method.
This commit is contained in:
@@ -96,6 +96,10 @@ public class PackageLib extends LFunction {
|
||||
globals.put( "package", pckg );
|
||||
}
|
||||
|
||||
public static void setLuaPath( String newLuaPath ) {
|
||||
pckg.put( _PATH, _LUA_PATH );
|
||||
}
|
||||
|
||||
private final int id;
|
||||
|
||||
private PackageLib( int id ) {
|
||||
@@ -144,7 +148,7 @@ public class PackageLib extends LFunction {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
throw new RuntimeException( "bad id: "+id );
|
||||
LuaState.vmerror( "bad package id" );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user