Fix finder not submitting via DivaBot.
This commit is contained in:
parent
29d3368743
commit
95e7049dce
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
467
|
437
|
||||||
285
|
289
|
||||||
1599
|
1330
|
||||||
925
|
793
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 898 KiB After Width: | Height: | Size: 886 KiB |
Binary file not shown.
Before Width: | Height: | Size: 834 KiB After Width: | Height: | Size: 232 KiB |
Binary file not shown.
Before Width: | Height: | Size: 897 KiB After Width: | Height: | Size: 880 KiB |
@ -375,6 +375,15 @@ public class MyRobot{
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final Result data = typeface1.getAllData(MYROBOT.createScoreScreenCapture());
|
final Result data = typeface1.getAllData(MYROBOT.createScoreScreenCapture());
|
||||||
|
MYROBOT.setAutoDelay(0);
|
||||||
|
if (NEWSONGS.length==0) {
|
||||||
|
MYROBOT.keyPress(KeyEvent.VK_CONTROL);
|
||||||
|
MYROBOT.keyPress(KeyEvent.VK_SHIFT);
|
||||||
|
MYROBOT.keyPress(KeyEvent.VK_F11);
|
||||||
|
MYROBOT.keyRelease(KeyEvent.VK_F11);
|
||||||
|
MYROBOT.keyRelease(KeyEvent.VK_SHIFT);
|
||||||
|
MYROBOT.keyRelease(KeyEvent.VK_CONTROL);
|
||||||
|
}
|
||||||
if (data.cool==-1 || data.fine==-1 || data.safe==-1 || data.sad==-1 || data.worst==-1 || data.percent<0f || data.percent>110f || data.combo==-1 || data.score==-1) {
|
if (data.cool==-1 || data.fine==-1 || data.safe==-1 || data.sad==-1 || data.worst==-1 || data.percent<0f || data.percent>110f || data.combo==-1 || data.score==-1) {
|
||||||
if (lastData==null || (lastData.cool!=data.cool || data.fine!=lastData.fine || data.safe!=lastData.safe || data.sad!=lastData.sad || data.worst!=lastData.worst || data.percent!=lastData.percent || data.combo!=lastData.combo || data.score!=lastData.score)) {
|
if (lastData==null || (lastData.cool!=data.cool || data.fine!=lastData.fine || data.safe!=lastData.safe || data.sad!=lastData.sad || data.worst!=lastData.worst || data.percent!=lastData.percent || data.combo!=lastData.combo || data.score!=lastData.score)) {
|
||||||
System.out.println("Waiting for results to populate...");
|
System.out.println("Waiting for results to populate...");
|
||||||
@ -396,13 +405,13 @@ public class MyRobot{
|
|||||||
&& data.score!=lastscore /*|| lastpercent!=percent*/){
|
&& data.score!=lastscore /*|| lastpercent!=percent*/){
|
||||||
System.out.println("Results for "+selectedSong.title+" "+data.difficulty+": "+data.display());
|
System.out.println("Results for "+selectedSong.title+" "+data.difficulty+": "+data.display());
|
||||||
TypeFace2.deepCopyOfficialYPointersFromPointers();
|
TypeFace2.deepCopyOfficialYPointersFromPointers();
|
||||||
File songFolder = new File(selectedSong.title+"/"+data.difficulty);
|
File songFolder = new File(selectedSong.title.replace(":","")+"/"+data.difficulty);
|
||||||
if (!songFolder.exists()) {
|
if (!songFolder.exists()) {
|
||||||
songFolder.mkdirs();
|
songFolder.mkdirs();
|
||||||
}
|
}
|
||||||
File[] songFolderFiles = songFolder.listFiles();
|
File[] songFolderFiles = songFolder.listFiles();
|
||||||
int playId = songFolderFiles.length;
|
int playId = songFolderFiles.length;
|
||||||
final File playFolder = new File(selectedSong.title+"/"+data.difficulty+"/"+playId);
|
final File playFolder = new File(selectedSong.title.replace(":","")+"/"+data.difficulty+"/"+playId);
|
||||||
playFolder.mkdir();
|
playFolder.mkdir();
|
||||||
recordedResults=true;
|
recordedResults=true;
|
||||||
lastcool=data.cool;
|
lastcool=data.cool;
|
||||||
@ -414,7 +423,7 @@ public class MyRobot{
|
|||||||
lastcombo=data.combo;
|
lastcombo=data.combo;
|
||||||
lastscore=data.score;
|
lastscore=data.score;
|
||||||
lastfail=data.fail;
|
lastfail=data.fail;
|
||||||
File resultImage=new File(playFolder,selectedSong.title+"_"+data.difficulty+"play_"+data.cool+"_"+data.fine+"_"+data.safe+"_"+data.sad+"_"+data.worst+"_"+data.percent+""
|
File resultImage=new File(playFolder,selectedSong.title.replace(":","")+"_"+data.difficulty+"play_"+data.cool+"_"+data.fine+"_"+data.safe+"_"+data.sad+"_"+data.worst+"_"+data.percent+""
|
||||||
+ "_"+data.combo+"_"+data.score+".png");
|
+ "_"+data.combo+"_"+data.score+".png");
|
||||||
new File("scoreimage.png").renameTo(resultImage);
|
new File("scoreimage.png").renameTo(resultImage);
|
||||||
results.add(new Result(selectedSong.title,data.difficulty,data.cool,data.fine,data.safe,data.sad,data.worst,data.percent,data.mod,data.combo,data.score,data.fail,resultImage));
|
results.add(new Result(selectedSong.title,data.difficulty,data.cool,data.fine,data.safe,data.sad,data.worst,data.percent,data.mod,data.combo,data.score,data.fail,resultImage));
|
||||||
@ -422,15 +431,6 @@ public class MyRobot{
|
|||||||
|
|
||||||
//gotoxy(800,64);
|
//gotoxy(800,64);
|
||||||
//click();
|
//click();
|
||||||
MYROBOT.setAutoDelay(0);
|
|
||||||
if (NEWSONGS.length==0) {
|
|
||||||
MYROBOT.keyPress(KeyEvent.VK_CONTROL);
|
|
||||||
MYROBOT.keyPress(KeyEvent.VK_SHIFT);
|
|
||||||
MYROBOT.keyPress(KeyEvent.VK_F11);
|
|
||||||
MYROBOT.keyRelease(KeyEvent.VK_F11);
|
|
||||||
MYROBOT.keyRelease(KeyEvent.VK_SHIFT);
|
|
||||||
MYROBOT.keyRelease(KeyEvent.VK_CONTROL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (IOException|NumberFormatException|IndexOutOfBoundsException e) {
|
} catch (IOException|NumberFormatException|IndexOutOfBoundsException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -88,6 +88,15 @@ public class TypeFace2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isClass(String className) {
|
||||||
|
try {
|
||||||
|
Class.forName(className);
|
||||||
|
return true;
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Result getAllData(BufferedImage img, boolean debug) throws IOException {
|
public Result getAllData(BufferedImage img, boolean debug) throws IOException {
|
||||||
deepCopyDefaultYPointers();
|
deepCopyDefaultYPointers();
|
||||||
BufferedImage img2 = ImageUtils.toBufferedImage(img.getScaledInstance(1280 , 720, Image.SCALE_SMOOTH));
|
BufferedImage img2 = ImageUtils.toBufferedImage(img.getScaledInstance(1280 , 720, Image.SCALE_SMOOTH));
|
||||||
@ -100,6 +109,7 @@ public class TypeFace2 {
|
|||||||
|
|
||||||
result.mode = getMode(img2,debug);
|
result.mode = getMode(img2,debug);
|
||||||
|
|
||||||
|
if (isClass("sig.MyRobot")) {
|
||||||
if (MyRobot.FUTURETONE) {
|
if (MyRobot.FUTURETONE) {
|
||||||
/*if (result.mode!=Mode.FUTURETONE) {
|
/*if (result.mode!=Mode.FUTURETONE) {
|
||||||
System.out.println("The current mode is "+result.mode+", but the results screen thinks this is Megamix... We're going to manually fix it for now. Let sig know this is appearing.");
|
System.out.println("The current mode is "+result.mode+", but the results screen thinks this is Megamix... We're going to manually fix it for now. Let sig know this is appearing.");
|
||||||
@ -111,6 +121,7 @@ public class TypeFace2 {
|
|||||||
}*/
|
}*/
|
||||||
result.mode=Mode.MEGAMIX;
|
result.mode=Mode.MEGAMIX;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (result.mode) {
|
switch (result.mode) {
|
||||||
case MEGAMIX:{
|
case MEGAMIX:{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user