api/client: various (MenuEntry api stuff, agility/translate plugin stuff to use that) (#1748)
* Standardize MenuEntry methods, make MenuEntry events extend MenuEntry * Make agility plugin only change entries it needs to * Clean up chat translator by a lot, also implement cloneable instead of just adding a ranodm copy method smh * actions: allow slash in PR title * devtools: Fix checkstyle * examineplugin: Fix tests
This commit is contained in:
@@ -729,27 +729,25 @@ public abstract class RSClientMixin implements RSClient
|
||||
if (newCount == oldCount + 1)
|
||||
{
|
||||
MenuEntryAdded event = new MenuEntryAdded(
|
||||
new MenuEntry(
|
||||
options[oldCount],
|
||||
targets[oldCount],
|
||||
identifiers[oldCount],
|
||||
opcodes[oldCount],
|
||||
arguments1[oldCount],
|
||||
arguments2[oldCount],
|
||||
forceLeftClick[oldCount]
|
||||
)
|
||||
options[oldCount],
|
||||
targets[oldCount],
|
||||
identifiers[oldCount],
|
||||
opcodes[oldCount],
|
||||
arguments1[oldCount],
|
||||
arguments2[oldCount],
|
||||
forceLeftClick[oldCount]
|
||||
);
|
||||
|
||||
client.getCallbacks().post(MenuEntryAdded.class, event);
|
||||
|
||||
if (event.isWasModified() && client.getMenuOptionCount() == newCount)
|
||||
if (event.hasBeenModified() && client.getMenuOptionCount() == newCount)
|
||||
{
|
||||
options[oldCount] = event.getOption();
|
||||
targets[oldCount] = event.getTarget();
|
||||
identifiers[oldCount] = event.getIdentifier();
|
||||
opcodes[oldCount] = event.getType();
|
||||
arguments1[oldCount] = event.getActionParam0();
|
||||
arguments2[oldCount] = event.getActionParam1();
|
||||
opcodes[oldCount] = event.getOpcode();
|
||||
arguments1[oldCount] = event.getParam0();
|
||||
arguments2[oldCount] = event.getParam1();
|
||||
forceLeftClick[oldCount] = event.isForceLeftClick();
|
||||
}
|
||||
}
|
||||
@@ -1346,15 +1344,13 @@ public abstract class RSClientMixin implements RSClient
|
||||
}
|
||||
|
||||
final MenuOptionClicked menuOptionClicked = new MenuOptionClicked(
|
||||
new MenuEntry(
|
||||
menuOption,
|
||||
menuTarget,
|
||||
id,
|
||||
menuAction,
|
||||
actionParam,
|
||||
widgetId,
|
||||
false
|
||||
),
|
||||
menuOption,
|
||||
menuTarget,
|
||||
id,
|
||||
menuAction,
|
||||
actionParam,
|
||||
widgetId,
|
||||
false,
|
||||
authentic,
|
||||
client.getMouseCurrentButton()
|
||||
);
|
||||
@@ -1366,7 +1362,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
return;
|
||||
}
|
||||
|
||||
rs$menuAction(menuOptionClicked.getActionParam0(), menuOptionClicked.getActionParam1(), menuOptionClicked.getOpcode(),
|
||||
rs$menuAction(menuOptionClicked.getParam0(), menuOptionClicked.getParam1(), menuOptionClicked.getOpcode(),
|
||||
menuOptionClicked.getIdentifier(), menuOptionClicked.getOption(), menuOptionClicked.getTarget(), var6, var7);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user