openrune: MenuOpcode -> MenuAction
This commit is contained in:
@@ -30,7 +30,7 @@ import java.util.Map;
|
||||
/**
|
||||
* An enumeration of right-click menu actions.
|
||||
*/
|
||||
public enum MenuOpcode
|
||||
public enum MenuAction
|
||||
{
|
||||
/**
|
||||
* Menu action for using an item in your inventory on a tile object (GameObject or GroundObject).
|
||||
@@ -299,19 +299,19 @@ public enum MenuOpcode
|
||||
|
||||
public static final int MENU_ACTION_DEPRIORITIZE_OFFSET = 2000;
|
||||
|
||||
private static final Map<Integer, MenuOpcode> map = new HashMap<>();
|
||||
private static final Map<Integer, MenuAction> map = new HashMap<>();
|
||||
|
||||
static
|
||||
{
|
||||
for (MenuOpcode menuOpcode : values())
|
||||
for (MenuAction menuAction : values())
|
||||
{
|
||||
map.put(menuOpcode.getId(), menuOpcode);
|
||||
map.put(menuAction.getId(), menuAction);
|
||||
}
|
||||
}
|
||||
|
||||
private final int id;
|
||||
|
||||
MenuOpcode(int id)
|
||||
MenuAction(int id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ public enum MenuOpcode
|
||||
return id;
|
||||
}
|
||||
|
||||
public static MenuOpcode of(int id)
|
||||
public static MenuAction of(int id)
|
||||
{
|
||||
return map.getOrDefault(id, UNKNOWN);
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class MenuEntry implements Cloneable
|
||||
private int identifier;
|
||||
/**
|
||||
* The action the entry will trigger.
|
||||
* {@link net.runelite.api.MenuOpcode}
|
||||
* {@link MenuAction}
|
||||
*/
|
||||
private int opcode;
|
||||
/**
|
||||
@@ -97,8 +97,8 @@ public class MenuEntry implements Cloneable
|
||||
/**
|
||||
* Get opcode, but as it's enum counterpart
|
||||
*/
|
||||
public MenuOpcode getMenuOpcode()
|
||||
public MenuAction getMenuOpcode()
|
||||
{
|
||||
return MenuOpcode.of(getOpcode());
|
||||
return MenuAction.of(getOpcode());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ public interface NPCDefinition
|
||||
|
||||
/**
|
||||
* The 5 menuops this NPC has when in world. Index 0 corresponds to
|
||||
* {@link MenuOpcode#NPC_FIRST_OPTION}, Index 2 to
|
||||
* {@link MenuOpcode#NPC_SECOND_OPTION} and so on.
|
||||
* {@link MenuAction#NPC_FIRST_OPTION}, Index 2 to
|
||||
* {@link MenuAction#NPC_SECOND_OPTION} and so on.
|
||||
*/
|
||||
String[] getActions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user