com.planet_ink.coffee_mud.Common.interfaces
Interface Social

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Contingent, Environmental, Modifiable, 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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 double actionsCost(MOB mob, java.util.List<java.lang.String> cmds)
          Returns the number of actions required to completely activate this social.
 java.lang.String argumentName()
          Argument name is the social's optional remaining argument.
 java.lang.String baseName()
          Base name is the name of the social's command word.
 double checkedActionsCost(MOB mob, java.util.List<java.lang.String> cmds)
          Returns the number of actions required to completely activate this social.
 double combatActionsCost(MOB mob, java.util.List<java.lang.String> cmds)
          Returns the number of actions required to completely activate this social.
 java.lang.String getFailedTargetMessage()
          See_when_no_target: what the player sees when this social is used targeted, but the target is not available.
 int getOthersCode()
          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 getOthersMessage()
          Third_party_sees: what everyone but the player and their target sees when a player uses this social.
 java.lang.String getSoundFile()
          Returns the name of the MSP sound file associated with this social.
 int getSourceCode()
          The official CoffeeMud message code used as the source code for this social, which reflects what the player is doing.
 java.lang.String getSourceMessage()
          You_see: what the player themself sees when they use this social.
 int getTargetCode()
          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 getTargetMessage()
          Target_sees: what the target of this social sees when social is used on them.
 boolean invoke(MOB mob, java.util.List<java.lang.String> commands, Physical 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 isTargetable()
          Returns whether targetName is an -NAME> code, meaning it is targettable at a person or mob or something.
 CMMsg makeChannelMsg(MOB mob, int channelInt, java.lang.String channelName, java.util.List<java.lang.String> 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.List<java.lang.String> commands, java.lang.String I3channelName, boolean makeTarget)
          Manufactures a proper message that represents executing this social as an action
 void setFailedMessage(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 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 setOthersMessage(java.lang.String str)
          Third_party_sees: what everyone but the player and their target sees when a player uses this social.
 void setSoundFile(java.lang.String newFile)
          Sets the name of the MSP sound file associated with this social.
 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 setSourceMessage(java.lang.String str)
          You_see: what the player themself sees when they use this social.
 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 setTargetMessage(java.lang.String str)
          Target_sees: what the target of this social sees when social is used on them.
 java.lang.String tailName()
          Tail name is the full remainder of the social's target AND optional argument(s).
 boolean targetable(Environmental E)
          Whether this social variation can be targeted.
 java.lang.String targetName()
          Target name is the social's target argument only, such as .
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting
affectCharState, affectCharStats, affectPhyStats
 
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.Contingent
amDestroyed, destroy, isSavable, setSavable
 
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.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

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

tailName

java.lang.String tailName()
Tail name is the full remainder of the social's target AND optional argument(s). It is NOT unique to a social object however, since a socials name usually includes its target extension.

Returns:
the full tail name

targetName

java.lang.String targetName()
Target name is the social's target argument only, such as . It is NOT unique to a social object however, since a socials name usually includes their target extension.

Returns:
the target name, if any

isTargetable

boolean isTargetable()
Returns whether targetName is an -NAME> code, meaning it is targettable at a person or mob or something.

Returns:
true if this social is targetable at someone other than the user

argumentName

java.lang.String argumentName()
Argument name is the social's optional remaining argument. This requires that the social be targetable, and further specifies something about the target, or a qualifier. It is NOT unique to a social object however, since a socials name usually includes their target extension and name and stuff.

Returns:
the socials optional remaining argument.

getSourceMessage

java.lang.String getSourceMessage()
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:
setSourceMessage(String)

setSourceMessage

void setSourceMessage(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:
getSourceMessage()

getOthersMessage

java.lang.String getOthersMessage()
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:
setOthersMessage(String)

setOthersMessage

void setOthersMessage(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:
getOthersMessage()

getTargetMessage

java.lang.String getTargetMessage()
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:
setTargetMessage(String)

setTargetMessage

void setTargetMessage(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:
getTargetMessage()

getFailedTargetMessage

java.lang.String getFailedTargetMessage()
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:
setFailedMessage(String)

setFailedMessage

void setFailedMessage(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:
getFailedTargetMessage()

getSourceCode

int getSourceCode()
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:
getSourceCode(), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT

getOthersCode

int getOthersCode()
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:
getOthersCode(), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT, CMMsg.MSG_OK_VISUAL

getTargetCode

int getTargetCode()
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:
getTargetCode(), CMMsg.MSG_SPEAK, CMMsg.MSG_HANDS, CMMsg.MSG_NOISE, CMMsg.MSG_NOISYMOVEMENT, CMMsg.MSG_OK_VISUAL

targetable

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

Parameters:
E - The object to check to see if this is targetable against.
Returns:
true, if it can be targeted
See Also:
Environmental.Name()

getSoundFile

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

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

setSoundFile

void setSoundFile(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:
getSoundFile()

invoke

boolean invoke(MOB mob,
               java.util.List<java.lang.String> commands,
               Physical 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.List<java.lang.String> 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, List, String, boolean)

makeMessage

CMMsg makeMessage(MOB mob,
                  java.lang.String str,
                  java.lang.String end,
                  int srcMask,
                  int fullCode,
                  java.util.List<java.lang.String> 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, List, boolean)

actionsCost

double actionsCost(MOB mob,
                   java.util.List<java.lang.String> cmds)
Returns the number of actions required to completely activate this social. A value of 0.0 means perform instantly. This method only applies when the user is not in combat.

Parameters:
mob - the mob executing the social, if any
cmds - the parameters to be passed to the social, if any
Returns:
the number of player free actions required to do this
See Also:
combatActionsCost(MOB, List), checkedActionsCost(MOB, List)

combatActionsCost

double combatActionsCost(MOB mob,
                         java.util.List<java.lang.String> cmds)
Returns the number of actions required to completely activate this social. A value of 0.0 means perform instantly. This method only applies when the user is fighting in social.

Parameters:
mob - the mob executing the social, if any
cmds - the parameters to be passed to the social, if any
Returns:
the number of player free actions required to do this
See Also:
actionsCost(MOB, List), checkedActionsCost(MOB, List)

checkedActionsCost

double checkedActionsCost(MOB mob,
                          java.util.List<java.lang.String> cmds)
Returns the number of actions required to completely activate this social. A value of 0.0 means perform instantly. This method only should check whether the user is in combat and return a proper value.

Parameters:
mob - the mob executing the social, if any
cmds - the parameters to be passed to the social, if any
Returns:
the number of player free actions required to do this
See Also:
combatActionsCost(MOB, List), actionsCost(MOB, List)