atavism.agis.core
Class BuildingResourceAcquireHook
java.lang.Object
atavism.agis.core.BuildingResourceAcquireHook
- All Implemented Interfaces:
- AcquireHook, java.io.Serializable
public class BuildingResourceAcquireHook
- extends java.lang.Object
- implements AcquireHook
An acquire hook for items that turn into a building resource
when acquired.
- See Also:
- Serialized Form
Method Summary |
boolean |
acquired(OID activatorOid,
AgisItem item)
Adds the item to the Building Resources map for the player and returns true telling the item to be
destroyed. |
int |
getResourceID()
|
static void |
sendBuildingResources(OID oid,
java.util.HashMap<java.lang.String,java.lang.Integer> resources)
Sends down the map of Building Resources the player has to the client. |
void |
setResourceID(int resourceID)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
resourceID
protected int resourceID
BuildingResourceAcquireHook
public BuildingResourceAcquireHook()
BuildingResourceAcquireHook
public BuildingResourceAcquireHook(int resourceID)
setResourceID
public void setResourceID(int resourceID)
getResourceID
public int getResourceID()
acquired
public boolean acquired(OID activatorOid,
AgisItem item)
- Adds the item to the Building Resources map for the player and returns true telling the item to be
destroyed.
- Specified by:
acquired
in interface AcquireHook
sendBuildingResources
public static void sendBuildingResources(OID oid,
java.util.HashMap<java.lang.String,java.lang.Integer> resources)
- 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