mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 08:39:09 +00:00
Added dump mode
This commit is contained in:
@@ -88,6 +88,9 @@ public final class Landing {
|
||||
case "-loadlocal":
|
||||
Core.setLoadLocal(true);
|
||||
break;
|
||||
case "-dump":
|
||||
Core.setDump(true);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.parabot.environment.servers.ServerProvider;
|
||||
|
||||
import java.applet.Applet;
|
||||
import java.awt.Dimension;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.TimerTask;
|
||||
@@ -157,6 +158,11 @@ public class Context {
|
||||
serverProvider.injectHooks();
|
||||
Core.verbose("Done.");
|
||||
Core.verbose("Fetching game applet...");
|
||||
if(Core.shouldDump()) {
|
||||
Core.verbose("Dumping injected client...");
|
||||
classPath.dump(new File(Directories.getWorkspace(), "dump.jar"));
|
||||
Core.verbose("Done.");
|
||||
}
|
||||
gameApplet = serverProvider.fetchApplet();
|
||||
if (getClient() == null) {
|
||||
setClientInstance(gameApplet);
|
||||
|
||||
@@ -13,6 +13,7 @@ import java.io.IOException;
|
||||
public class Core {
|
||||
private static boolean debug;
|
||||
private static boolean verbose;
|
||||
private static boolean dump;
|
||||
private static boolean loadLocal; //Loads both local and public scripts/servers
|
||||
|
||||
/**
|
||||
@@ -39,6 +40,15 @@ public class Core {
|
||||
public static void setDebug(final boolean debug) {
|
||||
Core.debug = debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables dump mode
|
||||
*
|
||||
* @param dump
|
||||
*/
|
||||
public static void setDump(final boolean dump) {
|
||||
Core.dump = dump;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if the client is in debug mode.
|
||||
@@ -53,6 +63,13 @@ public class Core {
|
||||
public static boolean inVerboseMode() {
|
||||
return verbose;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return if parabot should dump injected jar
|
||||
*/
|
||||
public static boolean shouldDump() {
|
||||
return dump;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets verbose mode
|
||||
|
||||
Reference in New Issue
Block a user