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
*/
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;
}
drawFinishedEvent.image = finalImage;
eventBus.post(DrawFinished.class, drawFinishedEvent);
if (client.isMirrored())
{
drawFinishedEvent.image = finalImage;
eventBus.post(DrawFinished.class, drawFinishedEvent);
}
try
{

View File

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