atavism.agis.core
Class RecipeItemActivateHook
java.lang.Object
atavism.agis.core.RecipeItemActivateHook
- All Implemented Interfaces:
- ActivateHook, java.io.Serializable
public class RecipeItemActivateHook
- extends java.lang.Object
- implements ActivateHook
An acquire hook for items that turn into a building resource
when acquired.
- See Also:
- Serialized Form
Method Summary |
boolean |
activate(OID activatorOid,
AgisItem item,
OID targetOid)
Adds the item to the Building Resources map for the player and returns true telling the item to be
destroyed. |
int |
getRecipeID()
|
static void |
sendRecipes(OID oid,
java.util.LinkedList<java.lang.String> recipes)
Sends down the map of Building Resources the player has to the client. |
void |
setRecipeID(int recipeID)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
recipeID
protected int recipeID
RecipeItemActivateHook
public RecipeItemActivateHook()
RecipeItemActivateHook
public RecipeItemActivateHook(int recipeID)
setRecipeID
public void setRecipeID(int recipeID)
getRecipeID
public int getRecipeID()
activate
public boolean activate(OID activatorOid,
AgisItem item,
OID targetOid)
- Adds the item to the Building Resources map for the player and returns true telling the item to be
destroyed.
- Specified by:
activate
in interface ActivateHook
sendRecipes
public static void sendRecipes(OID oid,
java.util.LinkedList<java.lang.String> recipes)
- Sends down the map of Building Resources the player has to the client. Static function so can be called from anywhere.
- Parameters:
oid
- resources
-
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object