Rework clanmanmode attack option hiding (#746)

* A whole bunch of refactoring

* Api/mixins/injector additions for hiding attack options

* Rework clanmanmode attack hiding

* Update Client.java
This commit is contained in:
Lucwousin
2019-06-26 01:01:21 +02:00
committed by Kyleeld
parent ae6274a16f
commit 39a4cb2266
118 changed files with 2038 additions and 1955 deletions

View File

@@ -199,6 +199,16 @@ public abstract class RSClientMixin implements RSClient
printMenuActions = yes;
}
@Inject
private static boolean hideFriendAttackOptions;
@Inject
@Override
public void setHideFriendAttackOptions(boolean yes)
{
hideFriendAttackOptions = yes;
}
@Inject
public RSClientMixin()
{
@@ -1570,4 +1580,10 @@ public abstract class RSClientMixin implements RSClient
getHealthBarCache().reset();
getHealthBarSpriteCache().reset();
}
@Inject
static boolean shouldHideAttackOptionFor(RSPlayer p)
{
return hideFriendAttackOptions && p.isFriended() || p.isClanMember();
}
}