Fixed incorrect banker NPC look-up behavior for bank booths
Banker interactions are now properly restricted for Ultimate Ironmen Added theme-appropriate banker NPCs to booths at Void Knights' Outpost Island Added missing Canifis banker NPCs Fixed incorrect handling of Arnold Lydspor banking-related logic Added Arnold Lydspor dialogue Consolidated banker NPC listener logic into BankerNPC class itself Added ContentAPI call to check if a node offers an interaction option
This commit is contained in:
@@ -445,6 +445,25 @@ fun itemDefinition(id: Int): ItemDefinition {
|
||||
return ItemDefinition.forId(id)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a node contains an interaction option.
|
||||
*
|
||||
* @param node: An NPC, a scenery object or an item to inspect.
|
||||
* @param option: The name of the interaction option to check for existence of.
|
||||
*
|
||||
* @return A Boolean value indicating the presence of the specified option in the given node.
|
||||
*
|
||||
* @author vddCore
|
||||
*/
|
||||
fun hasOption(node: Node, option: String): Boolean {
|
||||
return when(node) {
|
||||
is NPC -> node.definition.hasAction(option)
|
||||
is Scenery -> node.definition.hasAction(option)
|
||||
is Item -> node.definition.hasAction(option)
|
||||
else -> throw IllegalArgumentException("Expected an NPC, Scenery or an Item, got ${node.javaClass.simpleName}.")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send an object animation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user