Skip to content

Commit

Permalink
Closes #119 and closes #121
Browse files Browse the repository at this point in the history
Removed deprecated stuff
  • Loading branch information
Scribble authored and Scribble committed Oct 24, 2021
1 parent e30003d commit 9a31119
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class InputContainer {
private BigArrayList<TickInputContainer> inputs = new BigArrayList<TickInputContainer>(directory + File.separator + "temp");

public DesyncMonitoring dMonitor = new DesyncMonitoring();

// =====================================================================================================

private String authors = "Insert author here";
Expand Down Expand Up @@ -123,6 +123,7 @@ public String setTASState(TASstate stateIn, boolean verbose) {
return verbose ? TextFormatting.RED + "An error occured while reading the start location of the TAS. The file might be broken" : "";
}
}
Minecraft.getMinecraft().gameSettings.chatLinks = false; // #119
index = 0;
state = TASstate.PLAYBACK;
return verbose ? TextFormatting.GREEN + "Starting playback" : "";
Expand Down Expand Up @@ -177,76 +178,6 @@ public TASstate getState() {
return state;
}

@Deprecated
public String setRecording(boolean enabled) {
return setRecording(enabled, true);
}

/**
* Starts/Stops a recording
*
* @param enabled If true: starts a recording, else stops a running recording
* @return Chat message depending on the state
*/
@Deprecated
public String setRecording(boolean enabled, boolean verbose) {
if (state == TASstate.PLAYBACK) {
return verbose ? TextFormatting.RED + "A playback is already running" : "";
}
if (enabled) {
state = TASstate.RECORDING;
} else {
state = TASstate.NONE;
}

if (state == TASstate.RECORDING) {
if (Minecraft.getMinecraft().player != null) {
startLocation = getStartLocation(Minecraft.getMinecraft().player); // TODO #99 Make this a secondary command
}
return verbose ? TextFormatting.GREEN + "Starting the recording" : "";
} else if (state == TASstate.NONE) {
return verbose ? TextFormatting.GREEN + "Stopping the recording" : "";
}
return "";
}

@Deprecated
public String setPlayback(boolean enabled) {
return setPlayback(enabled, true);
}

/**
* Starts/Stops a playback
*
* @param enabled If true: start a playback, else aborts a running playback
* @return Chat message depending on the state
*/
@Deprecated
public String setPlayback(boolean enabled, boolean verbose) {
if (state == TASstate.RECORDING)
return verbose ? TextFormatting.RED + "A recording is already running" : "";
if (enabled) {
state = TASstate.PLAYBACK;
} else {
state = TASstate.NONE;
}
if (state == TASstate.PLAYBACK) {
if (Minecraft.getMinecraft().player != null && !startLocation.isEmpty()) {
try {
tpPlayer(startLocation);
} catch (NumberFormatException e) {
state = TASstate.NONE;
e.printStackTrace();
return verbose ? TextFormatting.RED + "An error occured while reading the start location of the TAS. The file might be broken" : "";
}
}
index = 0;
return verbose ? TextFormatting.GREEN + "Starting playback" : "";
} else {
return verbose ? TextFormatting.GREEN + "Aborting playback" : "";
}
}

// =====================================================================================================
// Methods to update the temporary variables of the container.
// These act as an input and output, depending if a recording or a playback is
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/de/scribble/lp/tasmod/virtual/VirtualMouse.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ public VirtualMouse() {
keyList.put(-100, new VirtualKey("LC", -100));
keyList.put(-99, new VirtualKey("RC", -99));
keyList.put(-98, new VirtualKey("MC", -98));
keyList.put(-97, new VirtualKey("MBUTTON3", -97));
keyList.put(-96, new VirtualKey("MBUTTON4", -96));
keyList.put(-95, new VirtualKey("MBUTTON5", -95));
keyList.put(-94, new VirtualKey("MBUTTON6", -94));
keyList.put(-93, new VirtualKey("MBUTTON7", -93));
keyList.put(-92, new VirtualKey("MBUTTON8", -92));
keyList.put(-91, new VirtualKey("MBUTTON9", -91));
keyList.put(-90, new VirtualKey("MBUTTON10", -90));
keyList.put(-89, new VirtualKey("MBUTTON11", -89));
keyList.put(-88, new VirtualKey("MBUTTON12", -88));
keyList.put(-87, new VirtualKey("MBUTTON13", -87));
keyList.put(-86, new VirtualKey("MBUTTON14", -86));
keyList.put(-85, new VirtualKey("MBUTTON15", -85));
keyList.put(-97, new VirtualKey("MBUTTON4", -97));
keyList.put(-96, new VirtualKey("MBUTTON5", -96));
keyList.put(-95, new VirtualKey("MBUTTON6", -95));
keyList.put(-94, new VirtualKey("MBUTTON7", -94));
keyList.put(-93, new VirtualKey("MBUTTON8", -93));
keyList.put(-92, new VirtualKey("MBUTTON9", -92));
keyList.put(-91, new VirtualKey("MBUTTON10", -91));
keyList.put(-90, new VirtualKey("MBUTTON11", -90));
keyList.put(-89, new VirtualKey("MBUTTON12", -89));
keyList.put(-88, new VirtualKey("MBUTTON13", -88));
keyList.put(-87, new VirtualKey("MBUTTON14", -87));
keyList.put(-86, new VirtualKey("MBUTTON15", -86));
keyList.put(-85, new VirtualKey("MBUTTON16", -85));

this.scrollwheel = 0;

Expand Down

0 comments on commit 9a31119

Please sign in to comment.