|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AbstractRoom
WRITEME: The documentation for this type (AbstractRoom) is incomplete. (brpocock@star-hope.org, Jan 11, 2010)
| Method Summary | |
|---|---|
void |
add(GameEvent game)
|
void |
broadcast(String string,
org.json.JSONObject results)
Broadcast a “success reply” to all listeners in a room |
boolean |
canWalk(AbstractUser u,
org.starhope.appius.geometry.Coord3D coord3d)
WRITEME: Document this method brpocock@star-hope.org |
boolean |
contains(AbstractUser user)
WRITEME: document this method (brpocock@star-hope.org, Oct 28, 2009) |
void |
deleteVariable(String string)
|
void |
destroySelf()
WRITEME |
void |
fromJSON(org.json.JSONObject jso)
WRITEME: document this method (brpocock@star-hope.org, Oct 21, 2009) |
Set<RoomListener> |
getAllListeners()
|
Collection<AbstractUser> |
getAllUsers()
|
String |
getDebugName()
Get the debugging version of the room's name. |
String |
getFilename()
|
GameEvent |
getGameEvent(String string)
WRITEME: document this method (brpocock@star-hope.org, Mar 9, 2010) |
Collection<GameEvent> |
getGameEvents()
WRITEME: document this method (brpocock@star-hope.org, Mar 2, 2010) |
int |
getID()
|
long |
getLag()
WRITEME: Document this method brpocock@star-hope.org |
Collection<RoomListener> |
getListeners()
WRITEME: document this method (brpocock@star-hope.org, Nov 24, 2009) |
int |
getMaxUsers()
|
String |
getMoniker()
|
String |
getMusic()
WRITEME: document this method (brpocock@star-hope.org, Oct 13, 2009) |
String |
getName()
|
String |
getOverlay()
|
AbstractUser |
getOwner()
|
String |
getPlaceZoneNumber()
WRITEME: Document this method brpocock@star-hope.org |
int |
getRoomIndex()
Get the index of this room within the set of rooms to which it belongs. |
String |
getSky()
|
String |
getTitle()
Get the room's string title |
int |
getUserCount()
|
String |
getVariable(String string)
|
HashMap<String,String> |
getVariables()
Get the set of all variables which are attached to this room |
GeneralPath |
getWalkableSpace()
|
AbstractZone |
getZone()
|
void |
goTo(AbstractUser u,
double destX,
double destY,
double destZ,
String facing,
String verb)
Instruct a user to move to a new place in a room via walking or a similar transportation mechanism. |
int |
hashCode()
This is an overriding method. |
boolean |
isIndoors()
WRITEME: Document this method brpocock@star-hope.org |
boolean |
isLimbo()
A “limbo” room is a room in which no public messaging is carried out. |
boolean |
isSkyVisible()
|
void |
join(RoomListener thing)
Notify this room (and anyone in it) that someone has joined |
void |
join(RoomListener thing,
String from)
WRITEME: Document this method brpocock@star-hope.org |
void |
notifyUserAction(AbstractUser thing)
notify all room listeners of a user movement / placement action |
void |
part(RoomListener roomListener)
|
void |
pushToAllZones()
copy room variables from this instance of a room to its clones in any other zones |
void |
pushToZone(AbstractZone otherZone)
copy room variables from this instance of a room to its clones in one other zone |
void |
putHere(AbstractUser who,
org.starhope.appius.geometry.Coord3D where)
Position an avatar at a given coördinates |
void |
resetVariables(Map<String,String> roomVariables)
reset room variables to only those found in the map supplied |
void |
saveRoomVars()
save room variables currently set to the database, to be the template for future instances of the room |
void |
sendGameAction(AbstractUser u,
org.json.JSONObject data)
Propagate a game event to every user in the room. |
void |
sendPublicMessage(AbstractUser from,
String speech)
|
void |
setFilename(String filename1)
|
void |
setIndoors(boolean b)
WRITEME: Document this method brpocock@star-hope.org |
void |
setLimbo(boolean b)
|
void |
setMoniker(String moniker1)
|
void |
setMusic(String music1)
|
void |
setOverlay(String overlay1)
|
void |
setOwner(AbstractUser newHomeOwner)
WRITEME: document this method (brpocock@star-hope.org, Jan 13, 2010) |
void |
setRoomIndex(int roomIndex)
WRITEME: Document this method brpocock@star-hope.org |
void |
setRoomVars()
WRITEME |
void |
setSky(String sky1)
|
void |
setSkyVisible(boolean skyVisible1)
|
void |
setTitle(String newTitle)
WRITEME: document this method (brpocock@star-hope.org, Oct 5, 2009) |
void |
setVariable(Map.Entry<String,String> var)
|
void |
setVariable(String varName,
String varValue)
Set a room variable. |
void |
setVariables(Map<String,String> map)
|
void |
speak_actually(AbstractUser u,
String speech,
FilterResult carlSays)
|
org.json.JSONObject |
toJSON()
|
AbstractUser |
userNearest(org.starhope.appius.geometry.Coord3D target)
Find an user under a mouse click |
| Method Detail |
|---|
void add(GameEvent game)
game - WRITEME
void broadcast(String string,
org.json.JSONObject results)
string - the method returning a replyresults - the JSON data to be broadcast
boolean canWalk(AbstractUser u,
org.starhope.appius.geometry.Coord3D coord3d)
u - WRITEMEcoord3d - WRITEME
boolean contains(AbstractUser user)
user - who
void deleteVariable(String string)
string - WRITEMEvoid destroySelf()
void fromJSON(org.json.JSONObject jso)
throws org.json.JSONException
jso - Serialized form
org.json.JSONException - if the incoming data isn't in the right
formSet<RoomListener> getAllListeners()
Collection<AbstractUser> getAllUsers()
String getDebugName()
Get the debugging version of the room's name. This is based upon the moniker and zone, or identifies the room as an abstract room if it is not a part of a zone.
String getFilename()
GameEvent getGameEvent(String string)
string - WRITEME
Collection<GameEvent> getGameEvents()
int getID()
long getLag()
Collection<RoomListener> getListeners()
int getMaxUsers()
String getMoniker()
String getMusic()
String getName()
String getOverlay()
AbstractUser getOwner()
String getPlaceZoneNumber()
int getRoomIndex()
Get the index of this room within the set of rooms to which it belongs.
For user-created rooms, this is the index of the room number within the user's “house,” typically 0 for the first room, 1 for the yard, and 2 or more for additional rooms.
The meaning of this index varies depending upon context; presently, it is only meaningful for user houses.
String getSky()
String getTitle()
int getUserCount()
String getVariable(String string)
string - the variable name for which the value is requested
HashMap<String,String> getVariables()
GeneralPath getWalkableSpace()
AbstractZone getZone()
void goTo(AbstractUser u,
double destX,
double destY,
double destZ,
String facing,
String verb)
u - The user to movedestX - destination XdestY - destination YdestZ - destination Zfacing - the forced facing direction for the user; this can
(and usually should) be “null”verb - the means of transportation; the default is “Walk”
but other verbs can be used (game- and/or
character-specific)int hashCode()
hashCode in class ObjectObject.hashCode()boolean isIndoors()
boolean isLimbo()
A “limbo” room is a room in which no public messaging is carried out. Users are unaware of one another's presence, comings and goings, and there are no public messages. The default “limbo” room is named “nowhere”
boolean isSkyVisible()
void join(RoomListener thing)
thing - the thing that has joined the room
void join(RoomListener thing,
String from)
thing - whofrom - from wherevoid notifyUserAction(AbstractUser thing)
thing - the user moving/actingvoid part(RoomListener roomListener)
roomListener - the thing which wants to stop listening to
the roomvoid pushToAllZones()
void pushToZone(AbstractZone otherZone)
otherZone - the zone name
void putHere(AbstractUser who,
org.starhope.appius.geometry.Coord3D where)
who - who is to be placedwhere - where to place themvoid resetVariables(Map<String,String> roomVariables)
roomVariables - new set of room variablesvoid saveRoomVars()
void sendGameAction(AbstractUser u,
org.json.JSONObject data)
throws org.json.JSONException
u - WRITEMEdata - WRITEME
org.json.JSONException - if the action can't be represented in JSON
void sendPublicMessage(AbstractUser from,
String speech)
from - WRITEMEspeech - WRITEMEvoid setFilename(String filename1)
filename1 - the filename to setvoid setIndoors(boolean b)
b - WRITEMEvoid setLimbo(boolean b)
b - true, if this is a limbo roomvoid setMoniker(String moniker1)
moniker1 - the moniker to setvoid setMusic(String music1)
music1 - the new background musicvoid setOverlay(String overlay1)
overlay1 - the overlay to setvoid setOwner(AbstractUser newHomeOwner)
newHomeOwner - new home ownervoid setRoomIndex(int roomIndex)
roomIndex - WRITEMEvoid setRoomVars()
void setSky(String sky1)
sky1 - the sky to setvoid setSkyVisible(boolean skyVisible1)
skyVisible1 - the skyVisible to setvoid setTitle(String newTitle)
newTitle - WRITEMEvoid setVariable(Map.Entry<String,String> var)
var - A Hash type Entry object containing a key-value pair
to be used to set a variable.
void setVariable(String varName,
String varValue)
varName - the name of the room variable to altervarValue - the new valuevoid setVariables(Map<String,String> map)
map - a map containing variables and
void speak_actually(AbstractUser u,
String speech,
FilterResult carlSays)
u - WRITEMEspeech - WRITEMEcarlSays - WRITEMEorg.json.JSONObject toJSON()
AbstractUser userNearest(org.starhope.appius.geometry.Coord3D target)
target - the coördinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||