Interface to give an object the ability to be ‘obtained’ and ‘invoked’ (activated). All implementing classes must make two functions:
void onInvoke(Player p, Map m)
Called when a player tries to use or activate an item.
i.e. Using a magic lamp might start a conversation with an NPC or change the player’s location.
void onObtain(Player p, Map m)
Called when a player tries to obtain or get an item from within the current room. The most useful implementation of this method is to also check if a player is ABLE to get the item.
i.e. Can’t pull a doorknob off of a door without a screwdriver