org.starhope.appius.util
Interface ExistsInWorld

All Superinterfaces:
RoomListener
All Known Subinterfaces:
NPCInterface, TrainCar
All Known Implementing Classes:
AbstractNonPlayerCharacter, AbstractScriptedNPC, ExistsInRemoteWorld, LuaNPC, PerlNPC, PythonNPC, RubyNPC, User

public interface ExistsInWorld
extends RoomListener

Any “thing” that exists in the game world and participates therein should implement the ExistsInWorld interface. This interface provides the “physicality” (no, that's not a word) necessary for something to participate in the game rooms.

Author:
brpocock

Method Summary
 void acceptAdminMessage(Integer room, String string)
          Accept a message from an administrator or the system.
 void acceptAdminMessage(Room room, String string)
           
 String getAvatarLabel()
          The avatar label is the text block that is displayed with the avatar for this object.
 String getFacing()
          Get the string identifying the direction which this object is facing.
 org.json.JSONObject getPublicInfo()
          TODO: document this method (brpocock, Oct 31, 2009) avatar, userName, clothes, colors
 double getTargetX()
          TODO: document this method (brpocock, Oct 31, 2009)
 double getTargetY()
          TODO: document this method (brpocock, Oct 31, 2009)
 double getTravelRate()
          TODO: document this method (brpocock, Nov 24, 2009)
 long getTravelStart()
          TODO: document this method (brpocock, Nov 24, 2009)
 int getUserID()
          TODO: document this method (brpocock, Oct 31, 2009)
 String getVariable(String string)
          TODO: document this method (brpocock, Oct 31, 2009)
 double getX()
          TODO: document this method (brpocock, Oct 31, 2009)
 double getY()
          TODO: document this method (brpocock, Oct 31, 2009)
 boolean hasVariable(String string)
          TODO: document this method (brpocock, Nov 30, 2009)
 boolean isNPC()
          TODO: document this method (brpocock, Oct 31, 2009)
 boolean isOnline()
          TODO: document this method (brpocock, Oct 31, 2009)
 void setStartT(long when)
          TODO: document this method (brpocock, Nov 24, 2009)
 void setTravelRate(double rate)
          TODO: document this method (brpocock, Nov 24, 2009)
 void setX(double x2)
          TODO: document this method (brpocock, Nov 24, 2009)
 void setY(double y2)
          TODO: document this method (brpocock, Nov 24, 2009)
 String toSFSXML()
          TODO: document this method (brpocock, Oct 31, 2009)
 
Methods inherited from interface org.starhope.appius.game.RoomListener
acceptGameAction, acceptGameStateChange, acceptObjectJoinRoom, acceptObjectPartRoom, acceptOutOfBandMessage, acceptPublicMessage, acceptPublicMessage, getLocation, getRoom, getZone
 

Method Detail

acceptAdminMessage

void acceptAdminMessage(Integer room,
                        String string)
Accept a message from an administrator or the system. If the user is connected, propagate that message to their client.

Parameters:
room - The room in which the administrative message is being sent (often ignored)
string - The administrative message.

acceptAdminMessage

void acceptAdminMessage(Room room,
                        String string)
Parameters:
room - The room in which the administrative message is being sent (often ignored)
string - The administrative message.
See Also:
acceptAdminMessage(Integer, String)

getAvatarLabel

String getAvatarLabel()
The avatar label is the text block that is displayed with the avatar for this object. It should be unique but isn't guaranteed to be distinct as user names are. (At any given moment, there can be only one object with a given avatar label in the room, but there can be only one user with a given name in the multiverse.) For users, this is the user name.

Returns:
The avatar label

getFacing

String getFacing()
Get the string identifying the direction which this object is facing. One of: N,S,E,W,NE,NW,SW,SE.

Returns:
The facing direction of this object

getPublicInfo

org.json.JSONObject getPublicInfo()
TODO: document this method (brpocock, Oct 31, 2009) avatar, userName, clothes, colors

Returns:
WRITEME

getTargetX

double getTargetX()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

getTargetY

double getTargetY()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

getTravelRate

double getTravelRate()
TODO: document this method (brpocock, Nov 24, 2009)

Returns:
WRITEME

getTravelStart

long getTravelStart()
TODO: document this method (brpocock, Nov 24, 2009)

Returns:
the time at which the object started moving (msec since epoch)

getUserID

int getUserID()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

getVariable

String getVariable(String string)
TODO: document this method (brpocock, Oct 31, 2009)

Parameters:
string - WRITEME
Returns:
WRITEME

getX

double getX()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

getY

double getY()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

hasVariable

boolean hasVariable(String string)
TODO: document this method (brpocock, Nov 30, 2009)

Parameters:
string - WRITEME
Returns:
WRITEME

isNPC

boolean isNPC()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

isOnline

boolean isOnline()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME

setStartT

void setStartT(long when)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
when - WRITEME

setTravelRate

void setTravelRate(double rate)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
rate - WRITEME

setX

void setX(double x2)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
x2 - WRITEME

setY

void setY(double y2)
TODO: document this method (brpocock, Nov 24, 2009)

Parameters:
y2 - WRITEME

toSFSXML

String toSFSXML()
TODO: document this method (brpocock, Oct 31, 2009)

Returns:
WRITEME