com.planet_ink.coffee_mud.Common.interfaces
Interface Social

All Superinterfaces:
Behavable, java.lang.Cloneable, CMCommon, CMModifiable, CMObject, java.lang.Comparable<CMObject>, Environmental, MsgListener, StatsAffecting, Tickable
All Known Implementing Classes:
DefaultSocial

public interface Social
extends Environmental, CMCommon

Although at one time a simple public variable object, the Social became an environmental when it became import to be able to pass it as a tool of a message for various purposes. It still retains much of its original awkwardness as can be seen in the method names. Today the social is still mostly a variable storage unit, with a few methods to make use of those variables. A social object exists not simply as one for each social command (smile, wiggy) but one for each social variation (smile, smile self, smile bob). The Name() field holds the full unique name of each social object, with ID only having "DefaultSocial".

See Also:
Environmental.Name(), Managed by the SocialsList library., Social, SocialsList

Field Summary
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MOB, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SPELL_AFFECT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET, TICKMASK_SOLITARY, TICKS_PER_RLMIN, TIME_MILIS_PER_MUDHOUR, TIME_TICK, TIME_TICK_DOUBLE
 
Method Summary
 java.lang.String baseName()
          Base name is the name of the social's command word.
 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.
 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
 java.lang.String MSPfile()
          Returns the name of the MSP sound file associated with this social.
 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 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 setMSPfile(java.lang.String newFile)
          Sets the name of the MSP sound file associated with this social.
 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 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 Third_party_sees()
          Third_party_sees: what everyone but the player and their target sees when a player uses this social.
 java.lang.String You_see()
          You_see: what the player themself sees when they use this social.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
addEffect, addNonUninvokableEffect, amDestroyed, baseEnvStats, delEffect, description, destroy, displayText, envStats, expirationDate, fetchEffect, fetchEffect, image, isGeneric, maxRange, minRange, miscTextFormat, name, Name, numEffects, rawImage, recoverEnvStats, sameAs, savable, setBaseEnvStats, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectEnvStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener
executeMsg, okMessage
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMModifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, delBehavior, delScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts
 

Method Detail

baseName

java.lang.String baseName()
Base name is the name of the social's command word. It is NOT unique to a social object however, since a socials name usually includes its target extension.

Returns:
the base name

You_see

java.lang.String You_see()
You_see: what the player themself sees when they use this social.

Returns:
what the player themself sees when they use this social.
See Also:
setYou_see(String)

setYou_see

void setYou_see(java.lang.String str)
You_see: what the player themself sees when they use this social.

Parameters:
str - what the player themself sees when they use this social.
See Also:
You_see()

Third_party_sees

java.lang.String Third_party_sees()
Third_party_sees: what everyone but the player and their target sees when a player uses this social.

Returns:
the string everyone else sees
See Also:
setThird_party_sees(String)

setThird_party_sees

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.

Parameters:
str - the string everyone else sees
See Also:
Third_party_sees()

Target_sees

java.lang.String Target_sees()
Target_sees: what the target of this social sees when social is used on them.

Returns:
what the target of this social sees when social is used on them
See Also:
setTarget_sees(String)

setTarget_sees

void setTarget_sees(java.lang.String str)
Target_sees: what the target of this social sees when social is used on them.

Parameters:
str - what the target of this social sees when social is used on them
See Also:
Target_sees()

See_when_no_target

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.

Returns:
the string seen by the player when the target has left
See Also:
setSee_when_no_target(String)

setSee_when_no_target

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.

Parameters:
str - the string seen by the player when the target has left
See Also:
See_when_no_target()

sourceCode

int sourceCode()
The official CoffeeMud message code used as the source code for this social, which reflects what the player is doing. Only certain codes allowed.

Returns:
the CMMsg social code, fully formed
See Also:
setSourceCode(int), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT

setSourceCode

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. Only certain codes allowed.

Parameters:
code - the CMMsg social code, fully formed
See Also:
sourceCode(), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT

othersCode

int othersCode()
The official CoffeeMud message code used as the others code for this social, which reflects what the player appears to be doing. Only certain codes allowed.

Returns:
the CMMsg social code, fully formed
See Also:
setOthersCode(int), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT, CMMsg.MSG_OK_VISUAL

setOthersCode

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. Only certain codes allowed.

Parameters:
code - the CMMsg social code, fully formed
See Also:
othersCode(), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT, CMMsg.MSG_OK_VISUAL

targetCode

int targetCode()
The official CoffeeMud message code used as the target code for this social, which reflects what is being done to the target. Only certain codes allowed.

Returns:
the CMMsg social code, fully formed
See Also:
setTargetCode(int), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT, CMMsg.MSG_OK_VISUAL

setTargetCode

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. Only certain codes allowed.

Parameters:
code - the CMMsg social code, fully formed
See Also:
targetCode(), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT, CMMsg.MSG_OK_VISUAL

targetable

boolean targetable()
Whether this social variation can be targeted. Is determined by whether there is a target parameter in the name.

Returns:
true, if it can be targeted
See Also:
Environmental.Name()

MSPfile

java.lang.String MSPfile()
Returns the name of the MSP sound file associated with this social.

Returns:
the msp sound file name
See Also:
setMSPfile(String)

setMSPfile

void setMSPfile(java.lang.String newFile)
Sets the name of the MSP sound file associated with this social.

Parameters:
newFile - the msp sound file name
See Also:
MSPfile()

invoke

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. It will generate a proper message and send it to the same room as the mob.

Parameters:
mob - the source of the social action
commands - the vector of strings
target - the target of the social
auto - true to override physical constraints of the source or target
Returns:
true, if successful

makeChannelMsg

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.

Parameters:
mob - the mob doing the social
channelInt - the channel int representing which chat channel
channelName - the channel name of the chat channel
commands - the commands as a string vector entered by the user
makeTarget - true to create a fake target, or false to find a real one.
Returns:
the CMMsg that can now be sent to the world as a chat channel message
See Also:
CMMsg, makeMessage(MOB, String, String, int, int, Vector, String, boolean)

makeMessage

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

Parameters:
mob - the mob doing the social
str - the str an optional "header" string for the msg, usually mxp related
end - the end an optional "trailer" string for the msg, usually mxp related
srcMask - the src mask to logically OR with the generated message source code
fullCode - the override target and others code from the one in this social
commands - the commands as a string vector entered by the user
I3channelName - the i3channel name or null if n/a
makeTarget - true to manufacture a target, or false to use a real one
Returns:
the CMMsg that can now be sent to the world as a chat channel message
See Also:
CMMsg, makeChannelMsg(MOB, int, String, Vector, boolean)