Package org.rspeer.game.component
Class ComponentConfig
java.lang.Object
org.rspeer.game.component.ComponentConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
allowsSpells
(int config) static boolean
allowsUsability
(int config) static int
getScriptEventDepth
(int config) static int
getSpellTargets
(int config) static boolean
isActionEnabled
(int config, int actionIndex) If an option is not allowed, it will not appear in the context menu.static boolean
isBitSet
(int config, int bit) static boolean
isDefinitionActions
(int config) static boolean
isDialogOption
(int config) This does not work for the old style tutorial island components Note: To differentiate between continue and a chat option, text color can be used.
-
Constructor Details
-
ComponentConfig
public ComponentConfig()
-
-
Method Details
-
isDialogOption
public static boolean isDialogOption(int config) This does not work for the old style tutorial island components Note: To differentiate between continue and a chat option, text color can be used.- Parameters:
config
- The InterfaceComponent config- Returns:
true
if the component is a dialog option. This also includes the continue options
-
isActionEnabled
public static boolean isActionEnabled(int config, int actionIndex) If an option is not allowed, it will not appear in the context menu. I can't think of anything this applies to in Oldschool, however the summoning orb in the main game has a "dismiss" option which isn't shown when a familiar is not summoned.- Parameters:
config
- The InterfaceComponent configactionIndex
- The index of the menu option- Returns:
true
if a right click option is enabled or not.
-
getSpellTargets
public static int getSpellTargets(int config) - Parameters:
config
- The InterfaceComponent config- Returns:
- The application targets (what can the component be used on?). e.g. for spells, strike spells can be cast on npcs and other players. enchant can be cast on interface components, charge orb can be cast on objects
-
getScriptEventDepth
public static int getScriptEventDepth(int config) - Parameters:
config
- The InterfaceComponent config- Returns:
- The script event invocation depth. A higher depth means higher interfaces in the hierarchy will have scripts invoked on them too
-
allowsSpells
public static boolean allowsSpells(int config) -
isBitSet
public static boolean isBitSet(int config, int bit) -
isDefinitionActions
public static boolean isDefinitionActions(int config) -
allowsUsability
public static boolean allowsUsability(int config)
-