Merge pull request #2576 from open-osrs/api-mirror

api: add mirror api
This commit is contained in:
Tyler Bochard
2020-05-12 23:11:40 -04:00
committed by GitHub
3 changed files with 32 additions and 2 deletions

View File

@@ -2035,4 +2035,14 @@ public interface Client extends GameShell
* Gets values related to jagex compliance * Gets values related to jagex compliance
*/ */
boolean getComplianceValue(@Nonnull String key); boolean getComplianceValue(@Nonnull String key);
/**
* Gets the status of client mirror
*/
boolean isMirrored();
/**
* Sets the status of client mirror
*/
void setMirrored(boolean isMirrored);
} }

View File

@@ -395,8 +395,11 @@ public class Hooks implements Callbacks
finalImage = image; finalImage = image;
} }
drawFinishedEvent.image = finalImage; if (client.isMirrored())
eventBus.post(DrawFinished.class, drawFinishedEvent); {
drawFinishedEvent.image = finalImage;
eventBus.post(DrawFinished.class, drawFinishedEvent);
}
try try
{ {

View File

@@ -222,6 +222,9 @@ public abstract class RSClientMixin implements RSClient
@Inject @Inject
private static Set<String> unhiddenCasts = new HashSet<String>(); private static Set<String> unhiddenCasts = new HashSet<String>();
@Inject
private boolean isMirrored = false;
@Inject @Inject
@Override @Override
public void setPrintMenuActions(boolean yes) public void setPrintMenuActions(boolean yes)
@@ -1937,5 +1940,19 @@ public abstract class RSClientMixin implements RSClient
{ {
setStopTimeMs(1); setStopTimeMs(1);
} }
@Inject
@Override
public boolean isMirrored()
{
return isMirrored;
};
@Inject
@Override
public void setMirrored(boolean isMirrored)
{
this.isMirrored = isMirrored;
};
} }