Atavism Version 2018.1AGIS API

atavism.agis.core
Class RecipeItemActivateHook

java.lang.Object
  extended by 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

Field Summary
protected  int recipeID
           
 
Constructor Summary
RecipeItemActivateHook()
           
RecipeItemActivateHook(int recipeID)
           
 
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
 

Field Detail

recipeID

protected int recipeID
Constructor Detail

RecipeItemActivateHook

public RecipeItemActivateHook()

RecipeItemActivateHook

public RecipeItemActivateHook(int recipeID)
Method Detail

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


Copyright © 2018 Dragonsan Studios Sp. z o.o.