org.starhope.appius.game
Class Pet

java.lang.Object
  extended by org.starhope.appius.sql.SQLPeerDatum
      extended by org.starhope.appius.game.InventoryItem
          extended by org.starhope.appius.game.NamedInventoryItem
              extended by org.starhope.appius.game.Pet
All Implemented Interfaces:
Serializable, PetFromInventory, RoomListener, TrainCar, AcceptsMetronomeTicks, ExistsInWorld, GetsConfigReload, HasName

public class Pet
extends NamedInventoryItem
implements TrainCar, PetFromInventory, GetsConfigReload

TODO: The documentation for this type (Pet) is incomplete. (brpocock, Nov 24, 2009)

Author:
brpocock
See Also:
Serialized Form

Field Summary
private  ConcurrentLinkedQueue<PetBehaviour> behaviourQueue
          Queue of future behaviours to execute.
private  PetBehaviour currentBehaviour
          TODO: document this field (brpocock, Nov 24, 2009) currentBehaviour (Pet)
private  List<Pet> flock
          TODO: document this field (brpocock, Nov 24, 2009) flock (Pet)
private  double hyperactivity
          TODO: document this field (brpocock, Nov 24, 2009) hyperactivity (Pet)
private static int maxTick
          TODO: document this field (brpocock, Nov 24, 2009) maxTick (Pet)
private static int minTick
          TODO: document this field (brpocock, Nov 24, 2009) minTick (Pet)
private  Room myRoom
          TODO: document this field (brpocock, Nov 24, 2009) myRoom (Pet)
private  TrainCar nextInTrain
          WRITEME: document this field (brpocock, Dec 14, 2009) nextInTrain (Pet)
private  User owner
          TODO: document this field (brpocock, Dec 1, 2009) owner (Pet)
private  double ownerExitX
          TODO: document this field (brpocock, Dec 1, 2009) ownerExitX (Pet)
private  double ownerExitY
          TODO: document this field (brpocock, Dec 1, 2009) ownerExitY (Pet)
private  ExistsInWorld personToBother
          TODO: document this field (brpocock, Nov 24, 2009) personToBother (Pet)
private  TrainCar priorInTrain
          WRITEME: document this field (brpocock, Dec 14, 2009) priorInTrain (Pet)
private static long serialVersionUID
          Java serialization version unique ID serialVersionUID (long)
private  double speed
          TODO: document this field (brpocock, Dec 1, 2009) speed (Pet)
private  double targetX
          WRITEME: document this field (brpocock, Dec 14, 2009) targetX (Pet)
private  double targetY
          WRITEME: document this field (brpocock, Dec 14, 2009) targetY (Pet)
private  long tBother
          TODO: document this field (brpocock, Nov 24, 2009) tBother (Pet)
private  TrainCar trainLeader
          WRITEME: document this field (brpocock, Dec 14, 2009) trainLeader (Pet)
private  double travelRate
          WRITEME: document this field (brpocock, Dec 14, 2009) travelRate (Pet)
private  long travelStart
          WRITEME: document this field (brpocock, Dec 14, 2009) travelStart (Pet)
private  double x
          WRITEME: document this field (brpocock, Dec 14, 2009) x (Pet)
private  double y
          WRITEME: document this field (brpocock, Dec 14, 2009) y (Pet)
 
Fields inherited from class org.starhope.appius.game.NamedInventoryItem
health
 
Fields inherited from class org.starhope.appius.game.InventoryItem
active, CLOTHES, FURNITURE, GAME_EQUIP_ITEM, id, MUSIC, ownerID, PATTERNS, PIVITZ, slotNumber, STATIONERY, STRUCTURE, T_Backpacks, T_Ceiling, T_Ceiling_Furniture, T_Dresses, T_Ears, T_Eyes, T_Floor_Furniture, T_Flooring, T_Game_Equip_Item, T_Music, T_Neck, T_Orbitz, T_Pants, T_Pattern, T_Pet, T_Pivitz, T_Shirts, T_Stationery, T_TootBook_Avatar_BG, T_TootBook_Box_Style, T_TootBook_Icon, T_TootBook_Page_BG, T_TootBook_Title_BG, T_TootBookTheme, T_Tops, T_Vehicle, T_Wall_Furniture, T_Wallpaper, TB_AVATAR_BG, TB_BOX_STYLES, TB_ICON, TB_PAGE_BG, TB_TITLE_BG, type, Type_Backpacks, Type_Ceiling, Type_Ceiling_Furniture, Type_Dresses, Type_Ears, Type_Eyes, Type_Floor_Furniture, Type_Flooring, Type_Music, Type_Neck, Type_Orbitz, Type_Pants, Type_Pattern, Type_Pivitz, Type_Shirts, Type_Tops, Type_Wall_Furniture, Type_Wallpaper
 
Fields inherited from class org.starhope.appius.sql.SQLPeerDatum
hackyDatabaseConnection
 
Constructor Summary
Pet()
          A pet is an inventory item which can be “set free” and follow the player around as an NPC.
 
Method Summary
 void acceptAdminMessage(Integer room, String string)
          This is an overriding method.
 void acceptAdminMessage(Room room, String string)
          This is an overriding method.
 void acceptGameAction(User sender, org.json.JSONObject action)
          WRITEME
 void acceptGameStateChange(GameEvent gameCode, GameStateFlag gameState)
          WRITEME
 void acceptObjectJoinRoom(Room room, ExistsInWorld object)
          WRITEME
 void acceptObjectPartRoom(Room room, ExistsInWorld object)
          WRITEME
 void acceptOutOfBandMessage(ExistsInWorld sender, Room room, org.json.JSONObject body)
          WRITEME
 void acceptPublicMessage(User sender, Room room, String message)
          This is an overriding method.
 void acceptPublicMessage(User sender, String message)
          WRITEME
protected  void assertValidType(InventoryItemType t)
          WRITEME
 void configUpdated()
          This is an overriding method.
private  void endBehaviour()
          TODO: document this method (brpocock, Nov 24, 2009)
 void equip()
          This is an overriding method.
 PetBehaviour getActiveBehaviour()
          WRITEME
 String getAvatarLabel()
          WRITEME
 TrainCar getCaboose()
          This is an overriding method.
 String getDisplayPrefixForType()
          WRITEME
 String getFacing()
          WRITEME
 RoomAndZone getLocation()
          WRITEME
 String getName()
          This is an overriding method.
 TrainCar getNextInTrain()
          This is an overriding method.
 TrainCar getPriorInTrain()
          This is an overriding method.
 org.json.JSONObject getPublicInfo()
          WRITEME
 Room getRoom()
          WRITEME
 double getTargetX()
          WRITEME
 double getTargetY()
          WRITEME
 TrainCar getTrainLeader()
          This is an overriding method.
 double getTravelRate()
          This is an overriding method.
 long getTravelStart()
          This is an overriding method.
 ExistsInWorld getUserBeingFollowed()
          WRITEME
 int getUserID()
          WRITEME
 String getVariable(String string)
          WRITEME
 double getX()
          WRITEME
 double getY()
          WRITEME
 AbstractZone getZone()
          WRITEME
 boolean hasVariable(String string)
          This is an overriding method.
 boolean isFollowingUser()
          WRITEME
 boolean isInFlock()
          WRITEME
 boolean isInTrain()
          WRITEME
 boolean isInTrain(TrainCar leader)
          This is an overriding method.
 boolean isNPC()
          WRITEME
 boolean isOnline()
          WRITEME
 boolean isPet()
          This is an overriding method.
 void joinFlock(ExistsInWorld member)
          WRITEME
 void joinTrain(ExistsInWorld member)
          This is an overriding method.
 void joinTrain(TrainCar member)
          WRITEME
private  void pickSomeoneToBother()
          TODO: document this method (brpocock, Nov 24, 2009)
private static void realConfigUpdated()
          TODO: document this method (brpocock, Nov 24, 2009)
private  void seek(double goalX, double goalY)
          TODO: document this method (brpocock, Nov 24, 2009)
private  void seek(ExistsInWorld target)
          TODO: document this method (brpocock, Nov 24, 2009)
protected  void set(ResultSet rs)
          This is an overriding method.
private  void setBehaviour(PetBehaviour behaviour)
          TODO: document this method (brpocock, Nov 24, 2009)
protected  void setFromInventory(ResultSet inv)
          WRITEME
 void setNextBehaviour(PetBehaviour behaviour)
          Add a behaviour to the bottm of the queue.
 void setNextInTrain(TrainCar car)
          This is an overriding method.
 void setPriorInTrain(TrainCar car)
          This is an overriding method.
 void setStartT(long when)
          This is an overriding method.
private  void setTargetX(double tX)
          TODO: document this method (brpocock, Nov 24, 2009)
private  void setTargetY(double tY)
          TODO: document this method (brpocock, Nov 24, 2009)
 void setTrainLeader(TrainCar who)
          TODO: document this method (brpocock, Nov 24, 2009)
 void setTravelRate(double rate)
          This is an overriding method.
 void setX(double x2)
          This is an overriding method.
 void setY(double y2)
          This is an overriding method.
private  void spaz()
          TODO: document this method (brpocock, Nov 24, 2009)
 void tick(long currentTime, long deltaTime)
          This is an overriding method.
 String toSFSXML()
          WRITEME
 void unequip()
          TODO: document this method (brpocock, Nov 24, 2009)
 
Methods inherited from class org.starhope.appius.game.NamedInventoryItem
adjustItemHealth, adjustItemHealth, adjustItemHealthGeom, getDisplayName, getItemHealth, getMoniker, getNomen, setItemHealth, setNomen
 
Methods inherited from class org.starhope.appius.game.InventoryItem
asClothing, asHomeDecorItem, assertValidTypeID, equals, flush, getByID, getByID, getCacheUniqueID, getClassForThisType, getClassForType, getClassForType, getFromInventory, getID, getItemClass, getMountPoint, getOwner, getOwnerID, getSlotNumber, getType, getTypeID, getTypesOfClothingT, getTypesOfFurnitureT, getTypesOfHomeDecorT, getTypesOfStructureT, getTypesOfWearablesT, hasANomen, hashCode, identifiesAs, isActive, isAPet, isClothingOnly, isFurniture, isMusic, isPattern, isPivitz, isStructure, isVehicle, isWearable, pullFromInventory, setActive, setOwner, setOwnerID, setSlotHarsh, setSlotNumber, setType, setTypeID, toJSON, toString
 
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum
changed, findInCache, get, prepareX, prepareX, saveInCache, set
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

maxTick

private static int maxTick
TODO: document this field (brpocock, Nov 24, 2009) maxTick (Pet)


minTick

private static int minTick
TODO: document this field (brpocock, Nov 24, 2009) minTick (Pet)


serialVersionUID

private static final long serialVersionUID
Java serialization version unique ID serialVersionUID (long)

See Also:
Constant Field Values

behaviourQueue

private final ConcurrentLinkedQueue<PetBehaviour> behaviourQueue
Queue of future behaviours to execute.


currentBehaviour

private PetBehaviour currentBehaviour
TODO: document this field (brpocock, Nov 24, 2009) currentBehaviour (Pet)


flock

private List<Pet> flock
TODO: document this field (brpocock, Nov 24, 2009) flock (Pet)


hyperactivity

private final double hyperactivity
TODO: document this field (brpocock, Nov 24, 2009) hyperactivity (Pet)

See Also:
Constant Field Values

myRoom

private Room myRoom
TODO: document this field (brpocock, Nov 24, 2009) myRoom (Pet)


nextInTrain

private final TrainCar nextInTrain
WRITEME: document this field (brpocock, Dec 14, 2009) nextInTrain (Pet)


owner

private User owner
TODO: document this field (brpocock, Dec 1, 2009) owner (Pet)


ownerExitX

private double ownerExitX
TODO: document this field (brpocock, Dec 1, 2009) ownerExitX (Pet)


ownerExitY

private double ownerExitY
TODO: document this field (brpocock, Dec 1, 2009) ownerExitY (Pet)


personToBother

private final ExistsInWorld personToBother
TODO: document this field (brpocock, Nov 24, 2009) personToBother (Pet)


priorInTrain

private final TrainCar priorInTrain
WRITEME: document this field (brpocock, Dec 14, 2009) priorInTrain (Pet)


speed

private double speed
TODO: document this field (brpocock, Dec 1, 2009) speed (Pet)


targetX

private double targetX
WRITEME: document this field (brpocock, Dec 14, 2009) targetX (Pet)


targetY

private double targetY
WRITEME: document this field (brpocock, Dec 14, 2009) targetY (Pet)


tBother

private long tBother
TODO: document this field (brpocock, Nov 24, 2009) tBother (Pet)


trainLeader

private TrainCar trainLeader
WRITEME: document this field (brpocock, Dec 14, 2009) trainLeader (Pet)


travelRate

private double travelRate
WRITEME: document this field (brpocock, Dec 14, 2009) travelRate (Pet)


travelStart

private long travelStart
WRITEME: document this field (brpocock, Dec 14, 2009) travelStart (Pet)


x

private double x
WRITEME: document this field (brpocock, Dec 14, 2009) x (Pet)


y

private double y
WRITEME: document this field (brpocock, Dec 14, 2009) y (Pet)

Constructor Detail

Pet

public Pet()
A pet is an inventory item which can be “set free” and follow the player around as an NPC. It defaults to being instantiated as just an inventory item in an abstract sense.

Method Detail

realConfigUpdated

private static void realConfigUpdated()
TODO: document this method (brpocock, Nov 24, 2009)


acceptAdminMessage

public void acceptAdminMessage(Integer room,
                               String string)
This is an overriding method.

Specified by:
acceptAdminMessage in interface ExistsInWorld
Parameters:
room - The room in which the administrative message is being sent (often ignored)
string - The administrative message.
See Also:
ExistsInWorld.acceptAdminMessage(java.lang.Integer, java.lang.String)

acceptAdminMessage

public void acceptAdminMessage(Room room,
                               String string)
This is an overriding method.

Specified by:
acceptAdminMessage in interface ExistsInWorld
Parameters:
room - The room in which the administrative message is being sent (often ignored)
string - The administrative message.
See Also:
ExistsInWorld.acceptAdminMessage(org.starhope.appius.game.Room, java.lang.String)

acceptGameAction

public void acceptGameAction(User sender,
                             org.json.JSONObject action)
WRITEME

Specified by:
acceptGameAction in interface RoomListener
Parameters:
sender - the sender
action - The game action. The verb is in action.getString("action").
See Also:
RoomListener.acceptGameAction(org.starhope.appius.user.User, org.json.JSONObject)

acceptGameStateChange

public void acceptGameStateChange(GameEvent gameCode,
                                  GameStateFlag gameState)
WRITEME

Specified by:
acceptGameStateChange in interface RoomListener
Parameters:
gameCode - The GameEvent whose state is changing
gameState - The new state
See Also:
RoomListener.acceptGameStateChange(org.starhope.appius.game.GameEvent, org.starhope.appius.game.GameStateFlag)

acceptObjectJoinRoom

public void acceptObjectJoinRoom(Room room,
                                 ExistsInWorld object)
WRITEME

Specified by:
acceptObjectJoinRoom in interface RoomListener
Parameters:
room - The room
object - The thing (probably user) entering
See Also:
RoomListener.acceptObjectJoinRoom(org.starhope.appius.game.Room, org.starhope.appius.util.AbstractUser)

acceptObjectPartRoom

public void acceptObjectPartRoom(Room room,
                                 ExistsInWorld object)
WRITEME

Specified by:
acceptObjectPartRoom in interface RoomListener
Parameters:
room - The room
object - The thing (probably user) departing
See Also:
RoomListener.acceptObjectPartRoom(org.starhope.appius.game.Room, org.starhope.appius.util.AbstractUser)

acceptOutOfBandMessage

public void acceptOutOfBandMessage(ExistsInWorld sender,
                                   Room room,
                                   org.json.JSONObject body)
WRITEME

Specified by:
acceptOutOfBandMessage in interface RoomListener
Parameters:
sender - The sender of the OOB message
room - The room in which the OOB message is being broadcast
body - A JSON object containing the OOB message. The contents of this message are not constrained.
See Also:
RoomListener.acceptOutOfBandMessage(org.starhope.appius.util.AbstractUser, org.starhope.appius.game.Room, org.json.JSONObject)

acceptPublicMessage

public void acceptPublicMessage(User sender,
                                Room room,
                                String message)
This is an overriding method.

Specified by:
acceptPublicMessage in interface RoomListener
Parameters:
sender - The speaker
room - The room in which the words were spoken
message - The spoken text or /emote
See Also:
RoomListener.acceptPublicMessage(org.starhope.appius.user.User, org.starhope.appius.game.Room, java.lang.String)

acceptPublicMessage

public void acceptPublicMessage(User sender,
                                String message)
WRITEME

Specified by:
acceptPublicMessage in interface RoomListener
Parameters:
sender - The speaker
message - The spoken text or /emote
See Also:
RoomListener.acceptPublicMessage(org.starhope.appius.user.User, java.lang.String)

assertValidType

protected void assertValidType(InventoryItemType t)
                        throws GameLogicException
WRITEME

Specified by:
assertValidType in class InventoryItem
Parameters:
t - WRITEME
Throws:
GameLogicException - WRITEME
See Also:
InventoryItem.assertValidType(org.starhope.appius.types.InventoryItemType)

configUpdated

public void configUpdated()
This is an overriding method.

Specified by:
configUpdated in interface GetsConfigReload
See Also:
GetsConfigReload.configUpdated()

endBehaviour

private void endBehaviour()
TODO: document this method (brpocock, Nov 24, 2009)


equip

public void equip()
This is an overriding method.

Overrides:
equip in class InventoryItem
See Also:
InventoryItem.equip()

getActiveBehaviour

public PetBehaviour getActiveBehaviour()
WRITEME

Specified by:
getActiveBehaviour in interface PetFromInventory
Returns:
WRITEME
See Also:
PetFromInventory.getActiveBehaviour()

getAvatarLabel

public String getAvatarLabel()
WRITEME

Specified by:
getAvatarLabel in interface ExistsInWorld
Returns:
The avatar label
See Also:
ExistsInWorld.getAvatarLabel()

getCaboose

public TrainCar getCaboose()
This is an overriding method.

Specified by:
getCaboose in interface TrainCar
Returns:
WRITEME
See Also:
TrainCar.getCaboose()

getDisplayPrefixForType

public String getDisplayPrefixForType()
WRITEME

Specified by:
getDisplayPrefixForType in class NamedInventoryItem
Returns:
WRITEME
See Also:
NamedInventoryItem.getDisplayPrefixForType()

getFacing

public String getFacing()
WRITEME

Specified by:
getFacing in interface ExistsInWorld
Returns:
The facing direction of this object
See Also:
ExistsInWorld.getFacing()

getLocation

public RoomAndZone getLocation()
WRITEME

Specified by:
getLocation in interface RoomListener
Returns:
WRITEME
See Also:
RoomListener.getLocation()

getName

public String getName()
This is an overriding method.

Specified by:
getName in interface HasName
Returns:
a user-visible string name for this instance
See Also:
HasName.getName()

getNextInTrain

public TrainCar getNextInTrain()
This is an overriding method.

Specified by:
getNextInTrain in interface TrainCar
Returns:
WRITEME
See Also:
TrainCar.getNextInTrain()

getPriorInTrain

public TrainCar getPriorInTrain()
This is an overriding method.

Specified by:
getPriorInTrain in interface TrainCar
Returns:
WRITEME
See Also:
TrainCar.getPriorInTrain()

getPublicInfo

public org.json.JSONObject getPublicInfo()
WRITEME

Specified by:
getPublicInfo in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getPublicInfo()

getRoom

public Room getRoom()
WRITEME

Specified by:
getRoom in interface RoomListener
Returns:
the Room in which this NPC can be found. This can be null.
See Also:
RoomListener.getRoom()

getTargetX

public double getTargetX()
WRITEME

Specified by:
getTargetX in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getTargetX()

getTargetY

public double getTargetY()
WRITEME

Specified by:
getTargetY in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getTargetY()

getTrainLeader

public TrainCar getTrainLeader()
This is an overriding method.

Specified by:
getTrainLeader in interface TrainCar
Returns:
WRITEME
See Also:
TrainCar.getTrainLeader()

getTravelRate

public double getTravelRate()
This is an overriding method.

Specified by:
getTravelRate in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getTravelRate()

getTravelStart

public long getTravelStart()
This is an overriding method.

Specified by:
getTravelStart in interface ExistsInWorld
Returns:
the time at which the object started moving (msec since epoch)
See Also:
ExistsInWorld.getTravelStart()

getUserBeingFollowed

public ExistsInWorld getUserBeingFollowed()
WRITEME

Specified by:
getUserBeingFollowed in interface PetFromInventory
Returns:
WRITEME
See Also:
PetFromInventory.getUserBeingFollowed()

getUserID

public int getUserID()
WRITEME

Specified by:
getUserID in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getUserID()

getVariable

public String getVariable(String string)
WRITEME

Specified by:
getVariable in interface ExistsInWorld
Parameters:
string - WRITEME
Returns:
WRITEME
See Also:
ExistsInWorld.getVariable(java.lang.String)

getX

public double getX()
WRITEME

Specified by:
getX in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getX()

getY

public double getY()
WRITEME

Specified by:
getY in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.getY()

getZone

public AbstractZone getZone()
WRITEME

Specified by:
getZone in interface RoomListener
Returns:
the Zone in which this NPC can be found
See Also:
RoomListener.getZone()

hasVariable

public boolean hasVariable(String string)
This is an overriding method.

Specified by:
hasVariable in interface ExistsInWorld
Parameters:
string - WRITEME
Returns:
WRITEME
See Also:
ExistsInWorld.hasVariable(java.lang.String)

isFollowingUser

public boolean isFollowingUser()
WRITEME

Specified by:
isFollowingUser in interface PetFromInventory
Returns:
WRITEME
See Also:
PetFromInventory.isFollowingUser()

isInFlock

public boolean isInFlock()
WRITEME

Specified by:
isInFlock in interface PetFromInventory
Returns:
WRITEME
See Also:
PetFromInventory.isInFlock()

isInTrain

public boolean isInTrain()
WRITEME

Specified by:
isInTrain in interface PetFromInventory
Specified by:
isInTrain in interface TrainCar
Returns:
WRITEME
See Also:
PetFromInventory.isInTrain()

isInTrain

public boolean isInTrain(TrainCar leader)
This is an overriding method.

Specified by:
isInTrain in interface TrainCar
Parameters:
leader - WRITEME
Returns:
WRITEME
See Also:
TrainCar.isInTrain(org.starhope.appius.game.TrainCar)

isNPC

public boolean isNPC()
WRITEME

Specified by:
isNPC in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.isNPC()

isOnline

public boolean isOnline()
WRITEME

Specified by:
isOnline in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.isOnline()

isPet

public boolean isPet()
This is an overriding method.

Overrides:
isPet in class InventoryItem
Returns:
true, if this is a pet
See Also:
InventoryItem.isPet()

joinFlock

public void joinFlock(ExistsInWorld member)
WRITEME

Specified by:
joinFlock in interface PetFromInventory
Parameters:
member - WRITEME
See Also:
PetFromInventory.joinFlock(org.starhope.appius.util.AbstractUser)

joinTrain

public void joinTrain(ExistsInWorld member)
This is an overriding method.

Specified by:
joinTrain in interface PetFromInventory
Parameters:
member - WRITEME
See Also:
PetFromInventory.joinTrain(org.starhope.appius.util.AbstractUser)

joinTrain

public void joinTrain(TrainCar member)
WRITEME

Parameters:
member - WRITEME
See Also:
PetFromInventory.joinTrain(org.starhope.appius.util.AbstractUser)

pickSomeoneToBother

private void pickSomeoneToBother()
TODO: document this method (brpocock, Nov 24, 2009)


seek

private void seek(double goalX,
                  double goalY)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
goalX - WRITEME
goalY - WRITEME

seek

private void seek(ExistsInWorld target)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
target - WRITEME

set

protected void set(ResultSet rs)
            throws SQLException
This is an overriding method.

Specified by:
set in class SQLPeerDatum
Parameters:
rs - The result of an SQL query, with the cursor already pointed at the row describing this specific instance of the object.
Throws:
SQLException - if the database fails somehow
See Also:
SQLPeerDatum.set(java.sql.ResultSet)

setBehaviour

private void setBehaviour(PetBehaviour behaviour)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
behaviour - the new behaviour to pre-empt all others

setFromInventory

protected void setFromInventory(ResultSet inv)
                         throws SQLException
WRITEME

Specified by:
setFromInventory in class InventoryItem
Parameters:
inv - WRITEME
Throws:
SQLException - WRITEME
See Also:
InventoryItem.setFromInventory(java.sql.ResultSet)

setNextBehaviour

public void setNextBehaviour(PetBehaviour behaviour)
Add a behaviour to the bottm of the queue.

Specified by:
setNextBehaviour in interface PetFromInventory
Parameters:
behaviour - WRITEME
See Also:
PetFromInventory.setNextBehaviour(org.starhope.appius.game.PetBehaviour)

setNextInTrain

public void setNextInTrain(TrainCar car)
This is an overriding method.

Specified by:
setNextInTrain in interface TrainCar
Parameters:
car - WRITEME
See Also:
TrainCar.setNextInTrain(org.starhope.appius.game.TrainCar)

setPriorInTrain

public void setPriorInTrain(TrainCar car)
This is an overriding method.

Specified by:
setPriorInTrain in interface TrainCar
Parameters:
car - WRITEME
See Also:
TrainCar.setPriorInTrain(org.starhope.appius.game.TrainCar)

setStartT

public void setStartT(long when)
This is an overriding method.

Specified by:
setStartT in interface ExistsInWorld
Parameters:
when - WRITEME
See Also:
ExistsInWorld.setStartT(long)

setTargetX

private void setTargetX(double tX)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
tX - WRITEME

setTargetY

private void setTargetY(double tY)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
tY - WRITEME

setTrainLeader

public void setTrainLeader(TrainCar who)
TODO: document this method (brpocock, Nov 24, 2009)

Specified by:
setTrainLeader in interface TrainCar
Parameters:
who - The thing to be following
See Also:
TrainCar.setTrainLeader(org.starhope.appius.game.TrainCar)

setTravelRate

public void setTravelRate(double rate)
This is an overriding method.

Specified by:
setTravelRate in interface ExistsInWorld
Parameters:
rate - WRITEME
See Also:
ExistsInWorld.setTravelRate(double)

setX

public void setX(double x2)
This is an overriding method.

Specified by:
setX in interface ExistsInWorld
Parameters:
x2 - WRITEME
See Also:
ExistsInWorld.setX(double)

setY

public void setY(double y2)
This is an overriding method.

Specified by:
setY in interface ExistsInWorld
Parameters:
y2 - WRITEME
See Also:
ExistsInWorld.setY(double)

spaz

private void spaz()
TODO: document this method (brpocock, Nov 24, 2009)


tick

public void tick(long currentTime,
                 long deltaTime)
          throws UserDeadException
This is an overriding method.

Specified by:
tick in interface AcceptsMetronomeTicks
Parameters:
currentTime - Time since epoch at the start of the global metronome propagation, as per System.currentTimeMillis()
deltaTime - Delta-time in milliseconds since the prior global metronome tick
Throws:
UserDeadException - if a user has died during this tick
See Also:
AcceptsMetronomeTicks.tick(long, long)

toSFSXML

public String toSFSXML()
WRITEME

Specified by:
toSFSXML in interface ExistsInWorld
Returns:
WRITEME
See Also:
ExistsInWorld.toSFSXML()

unequip

public void unequip()
Description copied from class: InventoryItem
TODO: document this method (brpocock, Nov 24, 2009)

Overrides:
unequip in class InventoryItem
See Also:
InventoryItem.unequip()