|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultSocial
public class DefaultSocial
| Field Summary | |
|---|---|
protected boolean |
amDestroyed
|
protected int |
othersCode
|
protected java.lang.String |
See_when_no_target
|
protected java.lang.String |
Social_name
|
protected int |
sourceCode
|
EnvStats |
stats
|
protected java.lang.String |
Target_sees
|
protected int |
targetCode
|
protected java.lang.String |
Third_party_sees
|
protected java.lang.String |
You_see
|
| Constructor Summary | |
|---|---|
DefaultSocial()
|
|
| Method Summary | |
|---|---|
void |
addBehavior(Behavior to)
Add a new behavior to this object. |
void |
addEffect(Ability to)
Add a new effect to this object, whether permanent or temporary. |
void |
addNonUninvokableEffect(Ability to)
Same as addEffect(Ability), but will set the Ability object as never being able to be uninvoked. |
void |
addScript(ScriptingEngine S)
Add a new runnable script to this object. |
void |
affectCharState(MOB affectedMob,
CharState affectableMaxState)
This method is called by the recoverCharState() method on other MOB objects. |
void |
affectCharStats(MOB affectedMob,
CharStats affectableStats)
This method is called by the recoverCharStats() method on other MOB objects. |
void |
affectEnvStats(Environmental affected,
EnvStats affectableStats)
This method is called by the recoverEnvStats() method on other Environmental objects. |
boolean |
amDestroyed()
Whether the destroy() method has been previousy called on this object. |
EnvStats |
baseEnvStats()
Object containing a set of base, unmodified, mostly numeric fields. |
java.lang.String |
baseName()
Base name is the name of the social's command word. |
protected void |
cloneFix(Social E)
|
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
void |
delBehavior(Behavior to)
Delete a behavior from this object. |
void |
delEffect(Ability to)
Delete an effect from this object, whether permanent or temporary. |
void |
delScript(ScriptingEngine S)
Remove a running script from this object. |
java.lang.String |
description()
The basic description of this object, as shown when the item is directly LOOKed at. |
void |
destroy()
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. |
java.lang.String |
displayText()
Gets the raw string used to show what this object looks like in the room. |
EnvStats |
envStats()
Object containing a set of current, modified, usable, mostly numeric fields. |
void |
executeMsg(Environmental myHost,
CMMsg msg)
The general message event handler for the object. |
long |
expirationDate()
If this object expires, it should have a timestamp saying when it expires, in real time. |
Behavior |
fetchBehavior(int index)
Returns a behavior object on this object. |
Behavior |
fetchBehavior(java.lang.String ID)
Returns a behavior object listed on this object. |
Ability |
fetchEffect(int index)
Returns an ability object listed as an effect on this object. |
Ability |
fetchEffect(java.lang.String ID)
Returns an ability object listed as an effect on this object. |
ScriptingEngine |
fetchScript(int x)
Retreive one of the enumerated scripts running on this object |
protected int |
getCodeNum(java.lang.String code)
|
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
java.lang.String |
getStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
java.lang.String[] |
getStatCodes()
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders. |
long |
getTickStatus()
A coded status for this object during the period where its tick method is being called. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
java.lang.String |
image()
Returns the fully qualified and determined name of the image file displayed for this object when MXP is used. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
boolean |
invoke(MOB mob,
java.util.Vector commands,
Environmental target,
boolean auto)
Executes this social by the given mob, using the target provided, with help from the provided command line strings in a vector, and with override message code flag. |
boolean |
isGeneric()
Whether the fields of this item are set in code, or set by builders. |
boolean |
isStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
CMMsg |
makeChannelMsg(MOB mob,
int channelInt,
java.lang.String channelName,
java.util.Vector commands,
boolean makeTarget)
Manufactures a proper channel message that represents executing this social over a public chat channel. |
CMMsg |
makeMessage(MOB mob,
java.lang.String str,
java.lang.String end,
int srcMask,
int fullCode,
java.util.Vector commands,
java.lang.String I3channelName,
boolean makeTarget)
Manufactures a proper message that represents executing this social as an action |
int |
maxRange()
the maximum range of this object, if applicable. |
int |
minRange()
the minimum range of this object, if applicable. |
java.lang.String |
miscTextFormat()
Unimplemented as of yet, but will hold a string telling the system what the proper format of any miscText data. |
java.lang.String |
MSPfile()
Returns the name of the MSP sound file associated with this social. |
java.lang.String |
name()
The displayable name of this object. |
java.lang.String |
Name()
The raw unmodified name of this object as stored in the database. |
CMObject |
newInstance()
Returns a new instance of this class. |
int |
numBehaviors()
The number of behaviors this object has. |
int |
numEffects()
Returns the number of ability objects listed as effects on this object. |
int |
numScripts()
Return the number of scripts running on this object |
boolean |
okMessage(Environmental myHost,
CMMsg msg)
The general message event previewer for the object. |
int |
othersCode()
The official CoffeeMud message code used as the others code for this social, which reflects what the player appears to be doing. |
java.lang.String |
rawImage()
Returns the raw name of the image file to display for this object when MXP is used. |
void |
recoverEnvStats()
This method copies the baseEnvStats() object into the envStats() object, then makes repeated calls to all surrounding objects with affectEnvStats(Environmental,EnvStats) method. |
boolean |
sameAs(Environmental E)
Whether this object instance is functionally identical to the object passed in. |
boolean |
savable()
Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container. |
java.lang.String |
See_when_no_target()
See_when_no_target: what the player sees when this social is used targeted, but the target is not available. |
void |
setBaseEnvStats(EnvStats newBaseEnvStats)
Re-sets the object containing a set of base, unmodified, mostly numeric fields. |
void |
setDescription(java.lang.String str)
Sets the basic description of this object, as shown when the item is directly LOOKed at. |
void |
setDisplayText(java.lang.String str)
Sets the raw string used to show what this object looks like in the room. |
void |
setExpirationDate(long time)
If this object expires, it should have a timestamp saying when it expires, in real time. |
void |
setImage(java.lang.String newImage)
Sets the raw name of the image file to display for this object when MXP is used. |
void |
setMiscText(java.lang.String newMiscText)
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. |
void |
setMSPfile(java.lang.String newFile)
Sets the name of the MSP sound file associated with this social. |
void |
setName(java.lang.String newName)
Sets the raw unmodified name of this object as stored in the database. |
void |
setOthersCode(int code)
Sets the official CoffeeMud message code used as the others code for this social, which reflects what the player appears to be doing. |
void |
setSee_when_no_target(java.lang.String str)
See_when_no_target: what the player sees when this social is used targeted, but the target is not available. |
void |
setSourceCode(int code)
Sets the official CoffeeMud message code used as the source code for this social, which reflects what the player is doing. |
void |
setStat(java.lang.String code,
java.lang.String val)
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. |
void |
setTarget_sees(java.lang.String str)
Target_sees: what the target of this social sees when social is used on them. |
void |
setTargetCode(int code)
Sets the official CoffeeMud message code used as the target code for this social, which reflects what is being done to the target. |
void |
setThird_party_sees(java.lang.String str)
Third_party_sees: what everyone but the player and their target sees when a player uses this social. |
void |
setYou_see(java.lang.String str)
You_see: what the player themself sees when they use this social. |
int |
sourceCode()
The official CoffeeMud message code used as the source code for this social, which reflects what the player is doing. |
java.lang.String |
Target_sees()
Target_sees: what the target of this social sees when social is used on them. |
boolean |
targetable()
Whether this social variation can be targeted. |
int |
targetCode()
The official CoffeeMud message code used as the target code for this social, which reflects what is being done to the target. |
java.lang.String |
text()
For objects which have false for their isGeneric method, this is used to set any internally coded strings to change the nature or behavior of the object. |
java.lang.String |
Third_party_sees()
Third_party_sees: what everyone but the player and their target sees when a player uses this social. |
boolean |
tick(Tickable ticking,
int tickID)
this is the method which is called periodically by the threading engine. |
java.lang.String |
You_see()
You_see: what the player themself sees when they use this social. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String Social_name
protected java.lang.String You_see
protected java.lang.String Third_party_sees
protected java.lang.String Target_sees
protected java.lang.String See_when_no_target
protected int sourceCode
protected int othersCode
protected int targetCode
public EnvStats stats
protected boolean amDestroyed
| Constructor Detail |
|---|
public DefaultSocial()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
Environmental
name in interface Environmentalname in interface TickableEnvironmental.Name()public java.lang.String Name()
Environmental
Name in interface EnvironmentalEnvironmental.name()public java.lang.String baseName()
Social
baseName in interface Socialpublic void setName(java.lang.String newName)
Environmental
setName in interface EnvironmentalnewName - the raw base name of this object on the map.Environmental.Name()public java.lang.String You_see()
Social
You_see in interface SocialSocial.setYou_see(String)public java.lang.String Third_party_sees()
Social
Third_party_sees in interface SocialSocial.setThird_party_sees(String)public java.lang.String Target_sees()
Social
Target_sees in interface SocialSocial.setTarget_sees(String)public java.lang.String See_when_no_target()
Social
See_when_no_target in interface SocialSocial.setSee_when_no_target(String)public int sourceCode()
Social
sourceCode in interface SocialSocial.setSourceCode(int),
CMMsg.MSG_SPEAK,
CMMsg.MSG_HANDS,
CMMsg.MSG_NOISE,
CMMsg.MSG_NOISYMOVEMENTpublic int othersCode()
Social
othersCode in interface SocialSocial.setOthersCode(int),
CMMsg.MSG_SPEAK,
CMMsg.MSG_HANDS,
CMMsg.MSG_NOISE,
CMMsg.MSG_NOISYMOVEMENT,
CMMsg.MSG_OK_VISUALpublic int targetCode()
Social
targetCode in interface SocialSocial.setTargetCode(int),
CMMsg.MSG_SPEAK,
CMMsg.MSG_HANDS,
CMMsg.MSG_NOISE,
CMMsg.MSG_NOISYMOVEMENT,
CMMsg.MSG_OK_VISUALpublic void setYou_see(java.lang.String str)
Social
setYou_see in interface Socialstr - what the player themself sees when they use this social.Social.You_see()public void setThird_party_sees(java.lang.String str)
Social
setThird_party_sees in interface Socialstr - the string everyone else seesSocial.Third_party_sees()public void setTarget_sees(java.lang.String str)
Social
setTarget_sees in interface Socialstr - what the target of this social sees when social is used on themSocial.Target_sees()public void setSee_when_no_target(java.lang.String str)
Social
setSee_when_no_target in interface Socialstr - the string seen by the player when the target has leftSocial.See_when_no_target()public void setSourceCode(int code)
Social
setSourceCode in interface Socialcode - the CMMsg social code, fully formedSocial.sourceCode(),
CMMsg.MSG_SPEAK,
CMMsg.MSG_HANDS,
CMMsg.MSG_NOISE,
CMMsg.MSG_NOISYMOVEMENTpublic void setOthersCode(int code)
Social
setOthersCode in interface Socialcode - the CMMsg social code, fully formedSocial.othersCode(),
CMMsg.MSG_SPEAK,
CMMsg.MSG_HANDS,
CMMsg.MSG_NOISE,
CMMsg.MSG_NOISYMOVEMENT,
CMMsg.MSG_OK_VISUALpublic void setTargetCode(int code)
Social
setTargetCode in interface Socialcode - the CMMsg social code, fully formedSocial.targetCode(),
CMMsg.MSG_SPEAK,
CMMsg.MSG_HANDS,
CMMsg.MSG_NOISE,
CMMsg.MSG_NOISYMOVEMENT,
CMMsg.MSG_OK_VISUALpublic boolean targetable()
Social
targetable in interface SocialEnvironmental.Name()public long getTickStatus()
Tickable
getTickStatus in interface TickableTickable.tick(Tickable, int)public java.lang.String MSPfile()
Social
MSPfile in interface SocialSocial.setMSPfile(String)public void setMSPfile(java.lang.String newFile)
Social
setMSPfile in interface SocialnewFile - the msp sound file nameSocial.MSPfile()public long expirationDate()
Environmental
expirationDate in interface EnvironmentalEnvironmental.setExpirationDate(long)public void setExpirationDate(long time)
Environmental
setExpirationDate in interface Environmentaltime - the time stamp when this thing expiresEnvironmental.expirationDate()
public boolean invoke(MOB mob,
java.util.Vector commands,
Environmental target,
boolean auto)
Social
invoke in interface Socialmob - the source of the social actioncommands - the vector of stringstarget - the target of the socialauto - true to override physical constraints of the source or target
public CMMsg makeChannelMsg(MOB mob,
int channelInt,
java.lang.String channelName,
java.util.Vector commands,
boolean makeTarget)
Social
makeChannelMsg in interface Socialmob - the mob doing the socialchannelInt - the channel int representing which chat channelchannelName - the channel name of the chat channelcommands - the commands as a string vector entered by the usermakeTarget - true to create a fake target, or false to find a real one.
CMMsg,
Social.makeMessage(MOB, String, String, int, int, Vector, String, boolean)
public CMMsg makeMessage(MOB mob,
java.lang.String str,
java.lang.String end,
int srcMask,
int fullCode,
java.util.Vector commands,
java.lang.String I3channelName,
boolean makeTarget)
Social
makeMessage in interface Socialmob - the mob doing the socialstr - the str an optional "header" string for the msg, usually mxp relatedend - the end an optional "trailer" string for the msg, usually mxp relatedsrcMask - the src mask to logically OR with the generated message source codefullCode - the override target and others code from the one in this socialcommands - the commands as a string vector entered by the userI3channelName - the i3channel name or null if n/amakeTarget - true to manufacture a target, or false to use a real one
CMMsg,
Social.makeChannelMsg(MOB, int, String, Vector, boolean)public java.lang.String description()
Environmental
description in interface Environmentalpublic void setDescription(java.lang.String str)
Environmental
setDescription in interface Environmentalstr - the basic detail description of this objectpublic java.lang.String displayText()
Environmental
displayText in interface Environmentalpublic void setDisplayText(java.lang.String str)
Environmental
setDisplayText in interface Environmentalstr - the string describing how this object looks in the roompublic EnvStats envStats()
Environmental
envStats in interface EnvironmentalEnvironmental.baseEnvStats(),
Environmental.recoverEnvStats(),
EnvStatspublic EnvStats baseEnvStats()
Environmental
baseEnvStats in interface EnvironmentalEnvironmental.envStats(),
Environmental.recoverEnvStats(),
EnvStatspublic void recoverEnvStats()
Environmental
recoverEnvStats in interface EnvironmentalEnvironmental.baseEnvStats(),
Environmental.envStats(),
Environmental.addEffect(Ability),
Behavable.addBehavior(Behavior),
EnvStatspublic void setBaseEnvStats(EnvStats newBaseEnvStats)
Environmental
setBaseEnvStats in interface EnvironmentalnewBaseEnvStats - a set of state fieldsEnvironmental.envStats(),
Environmental.recoverEnvStats(),
EnvStatspublic CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public void destroy()
Environmental
destroy in interface Environmentalpublic boolean amDestroyed()
Environmental
amDestroyed in interface Environmentalpublic boolean savable()
Environmental
savable in interface Environmentalpublic int getSaveStatIndex()
CMModifiable
getSaveStatIndex in interface CMModifiableCMModifiable.getStatCodes(),
CMModifiable.getStat(String),
CMModifiable.setStat(String, String)public java.lang.String[] getStatCodes()
CMModifiable
getStatCodes in interface CMModifiableCMModifiable.getStat(String),
CMModifiable.setStat(String, String)public boolean isStat(java.lang.String code)
CMModifiable
isStat in interface CMModifiablecode - the name of the field to read.
CMModifiable.getStatCodes()protected int getCodeNum(java.lang.String code)
public java.lang.String getStat(java.lang.String code)
CMModifiable
getStat in interface CMModifiablecode - the name of the field to read.
CMModifiable.getStatCodes()
public void setStat(java.lang.String code,
java.lang.String val)
CMModifiable
setStat in interface CMModifiablecode - the name of the field to setval - the value to set the field toCMModifiable.getStatCodes()public boolean sameAs(Environmental E)
Environmental
sameAs in interface EnvironmentalE - the object to compare this one to
CMModifiable.getStatCodes(),
CMModifiable.getStat(String)protected void cloneFix(Social E)
public CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic void setMiscText(java.lang.String newMiscText)