public class AOObject extends Entity
Modifier and Type | Class and Description |
---|---|
static class |
AOObject.StateMap |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
aoidKey
this is the master account id for this user (unique to each register
atavism user)
|
static java.lang.String |
dcKey |
static java.lang.String |
perceiverKey |
static java.lang.String |
stateMapKey |
static java.util.concurrent.locks.Lock |
transferLock
use this global object to synchronize all object transfers. if you drop
and object, pick up an object, destory an object, trade an object, etc,
you must grab this lock to make sure there is no race condition. eg,
someone sees that the obj is "free" on the ground THEN picks it up. there
is a race condition there
|
static java.lang.String |
wnodeKey |
log, staticLock, subObjectNamespacesInt, transientPropertyKeys, type
lock, name
Constructor and Description |
---|
AOObject() |
AOObject(OID oid) |
AOObject(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
OID |
atavismID() |
void |
atavismID(OID id)
sets the atavismID for this user.
|
BasicWorldNode |
baseWorldNode()
returns a newly-created BasicWorldNode, with loc/dir/orient from
the object's world node
|
DisplayContext |
displayContext() |
void |
displayContext(DisplayContext dc) |
static java.util.Collection<AOObject> |
getAllObjects()
returns all entities in this server
|
Point |
getCurrentLoc() |
AOVector |
getDirection() |
InterpolatedWorldNode.InterpolatedDirLocOrientTime |
getDirLocOrientTime()
Returns all the values from the interpolated world node
atomically
|
Point |
getLoc()
helper function - returns the location of this object by calling into the
world node
|
OID |
getMasterOid() |
static AOObjectCreateHook |
getObjCreateHook() |
static AOObject |
getObject(OID oid) |
Quaternion |
getOrientation() |
ObjState |
getState(java.lang.String s) |
boolean |
isItem() |
boolean |
isLight() |
boolean |
isMob() |
boolean |
isStructure() |
boolean |
isUser() |
MobilePerceiver<WMWorldNode> |
perceiver() |
void |
perceiver(MobilePerceiver<WMWorldNode> p) |
PermissionCallback |
permissionCallback() |
void |
permissionCallback(PermissionCallback cb)
sets the permissioncallback, which gets called whenever something is
trying to 'access' this object either by picking it up, dropping it,
trading, etc.
|
static java.lang.Object |
readObject(java.io.ObjectInput in) |
static void |
registerObjCreateHook(AOObjectCreateHook hook) |
AOVector |
scale() |
void |
scale(AOVector scale)
sets the scale of this object (how much bigger to make it)
|
void |
scale(float scale) |
void |
sendEvent(Event event) |
ObjState |
setState(java.lang.String state,
ObjState obj)
sets a state for the object. all states set here are transmitted to the
client. examples would be when the player is dead.
|
java.lang.String |
toString()
Returns the string describing this entity, useful for logging.
|
WorldNode |
worldNode()
returns the object's world node
|
void |
worldNode(WorldNode worldNode)
sets which world node is associated with this object.
|
static void |
writeObject(java.io.ObjectOutput out,
java.lang.Object obj)
helper method which can handle writing a null object to the output
stream. it first writes whether the obj is null, followed by the obj if
it isnt null.. otherwise doesnt write the obj
|
static void |
writeString(java.io.ObjectOutput out,
java.lang.String string)
helper method that writes a null string as an empty string
|
addSubObjectNamespace, equals, equals, getLock, getNamespace, getOid, getPersistenceFlag, getProperty, getSubObjectNamespaces, getSubObjectNamespacesInt, getTransientDataRef, getType, hashCode, hasSubObjectNamespace, isDeleted, registerTransientPropertyKey, removeProperty, removeSubObjectNamespace, setDeleted, setNamespace, setOid, setPersistenceFlag, setProperty, setSubObjectNamespaces, setSubObjectNamespacesInt, setType, toBytes, unregisterTransientPropertyKey
getBooleanProperty, getIntProperty, getName, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setPropertyMap, setupTransient, unlock
public static final java.lang.String stateMapKey
public static final java.lang.String wnodeKey
public static final java.lang.String perceiverKey
public static final java.lang.String aoidKey
public static final java.lang.String dcKey
public static java.util.concurrent.locks.Lock transferLock
public AOObject()
public AOObject(java.lang.String name)
public AOObject(OID oid)
public OID getMasterOid()
public boolean isMob()
public boolean isItem()
public boolean isLight()
public boolean isUser()
public boolean isStructure()
public java.lang.String toString()
Entity
public ObjState setState(java.lang.String state, ObjState obj)
public ObjState getState(java.lang.String s)
public void sendEvent(Event event)
public WorldNode worldNode()
public void worldNode(WorldNode worldNode)
public BasicWorldNode baseWorldNode()
public Point getLoc()
public Point getCurrentLoc()
public Quaternion getOrientation()
public AOVector getDirection()
public InterpolatedWorldNode.InterpolatedDirLocOrientTime getDirLocOrientTime()
public MobilePerceiver<WMWorldNode> perceiver()
public void perceiver(MobilePerceiver<WMWorldNode> p)
public OID atavismID()
public void atavismID(OID id)
public void displayContext(DisplayContext dc)
public DisplayContext displayContext()
public void scale(float scale)
public void scale(AOVector scale)
public AOVector scale()
public static void registerObjCreateHook(AOObjectCreateHook hook)
public static AOObjectCreateHook getObjCreateHook()
public void permissionCallback(PermissionCallback cb)
PermissionCallback
public PermissionCallback permissionCallback()
public static void writeObject(java.io.ObjectOutput out, java.lang.Object obj) throws java.io.IOException
java.io.IOException
public static java.lang.Object readObject(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public static void writeString(java.io.ObjectOutput out, java.lang.String string) throws java.io.IOException
java.io.IOException
public static java.util.Collection<AOObject> getAllObjects()