|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.sql.SQLPeerDatum
org.starhope.appius.game.InventoryItem
org.starhope.appius.game.NamedInventoryItem
org.starhope.appius.game.Pet
public class Pet
TODO: The documentation for this type (Pet) is incomplete. (brpocock, Nov 24, 2009)
| 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 |
|---|
private static int maxTick
private static int minTick
private static final long serialVersionUID
private final ConcurrentLinkedQueue<PetBehaviour> behaviourQueue
private PetBehaviour currentBehaviour
private List<Pet> flock
private final double hyperactivity
private Room myRoom
private final TrainCar nextInTrain
private User owner
private double ownerExitX
private double ownerExitY
private final ExistsInWorld personToBother
private final TrainCar priorInTrain
private double speed
private double targetX
private double targetY
private long tBother
private TrainCar trainLeader
private double travelRate
private long travelStart
private double x
private double y
| Constructor Detail |
|---|
public Pet()
| Method Detail |
|---|
private static void realConfigUpdated()
public void acceptAdminMessage(Integer room,
String string)
acceptAdminMessage in interface ExistsInWorldroom - The room in which the administrative message is being
sent (often ignored)string - The administrative message.ExistsInWorld.acceptAdminMessage(java.lang.Integer,
java.lang.String)
public void acceptAdminMessage(Room room,
String string)
acceptAdminMessage in interface ExistsInWorldroom - The room in which the administrative message is being
sent (often ignored)string - The administrative message.ExistsInWorld.acceptAdminMessage(org.starhope.appius.game.Room,
java.lang.String)
public void acceptGameAction(User sender,
org.json.JSONObject action)
acceptGameAction in interface RoomListenersender - the senderaction - The game action. The verb is in
action.getString("action").RoomListener.acceptGameAction(org.starhope.appius.user.User,
org.json.JSONObject)
public void acceptGameStateChange(GameEvent gameCode,
GameStateFlag gameState)
acceptGameStateChange in interface RoomListenergameCode - The GameEvent whose state is changinggameState - The new stateRoomListener.acceptGameStateChange(org.starhope.appius.game.GameEvent,
org.starhope.appius.game.GameStateFlag)
public void acceptObjectJoinRoom(Room room,
ExistsInWorld object)
acceptObjectJoinRoom in interface RoomListenerroom - The roomobject - The thing (probably user) enteringRoomListener.acceptObjectJoinRoom(org.starhope.appius.game.Room,
org.starhope.appius.util.AbstractUser)
public void acceptObjectPartRoom(Room room,
ExistsInWorld object)
acceptObjectPartRoom in interface RoomListenerroom - The roomobject - The thing (probably user) departingRoomListener.acceptObjectPartRoom(org.starhope.appius.game.Room,
org.starhope.appius.util.AbstractUser)
public void acceptOutOfBandMessage(ExistsInWorld sender,
Room room,
org.json.JSONObject body)
acceptOutOfBandMessage in interface RoomListenersender - The sender of the OOB messageroom - The room in which the OOB message is being broadcastbody - A JSON object containing the OOB message. The
contents of this message are not constrained.RoomListener.acceptOutOfBandMessage(org.starhope.appius.util.AbstractUser,
org.starhope.appius.game.Room, org.json.JSONObject)
public void acceptPublicMessage(User sender,
Room room,
String message)
acceptPublicMessage in interface RoomListenersender - The speakerroom - The room in which the words were spokenmessage - The spoken text or /emoteRoomListener.acceptPublicMessage(org.starhope.appius.user.User,
org.starhope.appius.game.Room, java.lang.String)
public void acceptPublicMessage(User sender,
String message)
acceptPublicMessage in interface RoomListenersender - The speakermessage - The spoken text or /emoteRoomListener.acceptPublicMessage(org.starhope.appius.user.User,
java.lang.String)
protected void assertValidType(InventoryItemType t)
throws GameLogicException
assertValidType in class InventoryItemt - WRITEME
GameLogicException - WRITEMEInventoryItem.assertValidType(org.starhope.appius.types.InventoryItemType)public void configUpdated()
configUpdated in interface GetsConfigReloadGetsConfigReload.configUpdated()private void endBehaviour()
public void equip()
equip in class InventoryItemInventoryItem.equip()public PetBehaviour getActiveBehaviour()
getActiveBehaviour in interface PetFromInventoryPetFromInventory.getActiveBehaviour()public String getAvatarLabel()
getAvatarLabel in interface ExistsInWorldExistsInWorld.getAvatarLabel()public TrainCar getCaboose()
getCaboose in interface TrainCarTrainCar.getCaboose()public String getDisplayPrefixForType()
getDisplayPrefixForType in class NamedInventoryItemNamedInventoryItem.getDisplayPrefixForType()public String getFacing()
getFacing in interface ExistsInWorldExistsInWorld.getFacing()public RoomAndZone getLocation()
getLocation in interface RoomListenerRoomListener.getLocation()public String getName()
getName in interface HasNameHasName.getName()public TrainCar getNextInTrain()
getNextInTrain in interface TrainCarTrainCar.getNextInTrain()public TrainCar getPriorInTrain()
getPriorInTrain in interface TrainCarTrainCar.getPriorInTrain()public org.json.JSONObject getPublicInfo()
getPublicInfo in interface ExistsInWorldExistsInWorld.getPublicInfo()public Room getRoom()
getRoom in interface RoomListenerRoomListener.getRoom()public double getTargetX()
getTargetX in interface ExistsInWorldExistsInWorld.getTargetX()public double getTargetY()
getTargetY in interface ExistsInWorldExistsInWorld.getTargetY()public TrainCar getTrainLeader()
getTrainLeader in interface TrainCarTrainCar.getTrainLeader()public double getTravelRate()
getTravelRate in interface ExistsInWorldExistsInWorld.getTravelRate()public long getTravelStart()
getTravelStart in interface ExistsInWorldExistsInWorld.getTravelStart()public ExistsInWorld getUserBeingFollowed()
getUserBeingFollowed in interface PetFromInventoryPetFromInventory.getUserBeingFollowed()public int getUserID()
getUserID in interface ExistsInWorldExistsInWorld.getUserID()public String getVariable(String string)
getVariable in interface ExistsInWorldstring - WRITEME
ExistsInWorld.getVariable(java.lang.String)public double getX()
getX in interface ExistsInWorldExistsInWorld.getX()public double getY()
getY in interface ExistsInWorldExistsInWorld.getY()public AbstractZone getZone()
getZone in interface RoomListenerRoomListener.getZone()public boolean hasVariable(String string)
hasVariable in interface ExistsInWorldstring - WRITEME
ExistsInWorld.hasVariable(java.lang.String)public boolean isFollowingUser()
isFollowingUser in interface PetFromInventoryPetFromInventory.isFollowingUser()public boolean isInFlock()
isInFlock in interface PetFromInventoryPetFromInventory.isInFlock()public boolean isInTrain()
isInTrain in interface PetFromInventoryisInTrain in interface TrainCarPetFromInventory.isInTrain()public boolean isInTrain(TrainCar leader)
isInTrain in interface TrainCarleader - WRITEME
TrainCar.isInTrain(org.starhope.appius.game.TrainCar)public boolean isNPC()
isNPC in interface ExistsInWorldExistsInWorld.isNPC()public boolean isOnline()
isOnline in interface ExistsInWorldExistsInWorld.isOnline()public boolean isPet()
isPet in class InventoryItemInventoryItem.isPet()public void joinFlock(ExistsInWorld member)
joinFlock in interface PetFromInventorymember - WRITEMEPetFromInventory.joinFlock(org.starhope.appius.util.AbstractUser)public void joinTrain(ExistsInWorld member)
joinTrain in interface PetFromInventorymember - WRITEMEPetFromInventory.joinTrain(org.starhope.appius.util.AbstractUser)public void joinTrain(TrainCar member)
member - WRITEMEPetFromInventory.joinTrain(org.starhope.appius.util.AbstractUser)private void pickSomeoneToBother()
private void seek(double goalX,
double goalY)
goalX - WRITEMEgoalY - WRITEMEprivate void seek(ExistsInWorld target)
target - WRITEME
protected void set(ResultSet rs)
throws SQLException
set in class SQLPeerDatumrs - The result of an SQL query, with the cursor already
pointed at the row describing this specific instance
of the object.
SQLException - if the database fails somehowSQLPeerDatum.set(java.sql.ResultSet)private void setBehaviour(PetBehaviour behaviour)
behaviour - the new behaviour to pre-empt all others
protected void setFromInventory(ResultSet inv)
throws SQLException
setFromInventory in class InventoryIteminv - WRITEME
SQLException - WRITEMEInventoryItem.setFromInventory(java.sql.ResultSet)public void setNextBehaviour(PetBehaviour behaviour)
setNextBehaviour in interface PetFromInventorybehaviour - WRITEMEPetFromInventory.setNextBehaviour(org.starhope.appius.game.PetBehaviour)public void setNextInTrain(TrainCar car)
setNextInTrain in interface TrainCarcar - WRITEMETrainCar.setNextInTrain(org.starhope.appius.game.TrainCar)public void setPriorInTrain(TrainCar car)
setPriorInTrain in interface TrainCarcar - WRITEMETrainCar.setPriorInTrain(org.starhope.appius.game.TrainCar)public void setStartT(long when)
setStartT in interface ExistsInWorldwhen - WRITEMEExistsInWorld.setStartT(long)private void setTargetX(double tX)
tX - WRITEMEprivate void setTargetY(double tY)
tY - WRITEMEpublic void setTrainLeader(TrainCar who)
setTrainLeader in interface TrainCarwho - The thing to be followingTrainCar.setTrainLeader(org.starhope.appius.game.TrainCar)public void setTravelRate(double rate)
setTravelRate in interface ExistsInWorldrate - WRITEMEExistsInWorld.setTravelRate(double)public void setX(double x2)
setX in interface ExistsInWorldx2 - WRITEMEExistsInWorld.setX(double)public void setY(double y2)
setY in interface ExistsInWorldy2 - WRITEMEExistsInWorld.setY(double)private void spaz()
public void tick(long currentTime,
long deltaTime)
throws UserDeadException
tick in interface AcceptsMetronomeTickscurrentTime - 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
UserDeadException - if a user has died during this tickAcceptsMetronomeTicks.tick(long,
long)public String toSFSXML()
toSFSXML in interface ExistsInWorldExistsInWorld.toSFSXML()public void unequip()
InventoryItem
unequip in class InventoryItemInventoryItem.unequip()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||