com.planet_ink.coffee_mud.Libraries
Class MUDHelp
java.lang.Object
com.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.MUDHelp
- All Implemented Interfaces:
- CMObject, Tickable, CMLibrary, HelpLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>
public class MUDHelp
- extends StdLibrary
- implements HelpLibrary
Field Summary |
protected java.util.Map<java.lang.String,java.lang.String> |
genUsageCost
|
protected static java.lang.String[] |
SKILL_PREFIXES
|
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 |
void |
addHelpEntry(java.lang.String ID,
java.lang.String text,
boolean archon)
|
protected java.lang.String |
columnHelper(java.lang.String word,
java.lang.String msg,
int wrap)
|
java.lang.String |
fixHelp(java.lang.String tag,
java.lang.String str,
MOB forMOB)
|
java.lang.String |
getAbilityCostDesc(Ability A,
MOB forMOB)
|
java.lang.String |
getAbilityQualityDesc(Ability A)
|
java.lang.String |
getAbilityRangeDesc(Ability A)
|
java.lang.String |
getAbilityTargetDesc(Ability A)
|
java.lang.String |
getActualAbilityUsageDesc(Ability A,
int whichUsageCode,
MOB forMOB)
Returns a description of the amount of a particular cost is required
by the given mob to use the given ability. |
protected java.lang.String |
getActualUsage(Ability A,
int whichUsageCode)
|
protected java.lang.String |
getActualUsageInternal(Ability A,
int whichUsageCode,
MOB forMOB)
|
java.util.Properties |
getArcHelpFile()
|
java.util.Properties |
getHelpFile()
|
java.lang.StringBuilder |
getHelpList(java.lang.String helpStr,
java.util.Properties rHelpFile1,
java.util.Properties rHelpFile2,
MOB forMOB)
|
java.lang.StringBuilder |
getHelpText(java.lang.String helpStr,
MOB forMOB,
boolean favorAHelp)
|
java.lang.StringBuilder |
getHelpText(java.lang.String helpStr,
MOB forMOB,
boolean favorAHelp,
boolean noFix)
|
java.lang.StringBuilder |
getHelpText(java.lang.String helpStr,
java.util.Properties rHelpFile,
MOB forMOB)
|
java.lang.StringBuilder |
getHelpText(java.lang.String helpStr,
java.util.Properties rHelpFile,
MOB forMOB,
boolean noFix)
|
java.util.List<java.lang.String> |
getTopics(boolean archonHelp,
boolean standardHelp)
|
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of
this object. |
boolean |
isPlayerSkill(java.lang.String helpStr)
|
boolean |
shutdown()
Shuts down the library. |
void |
unloadHelpFile(MOB mob)
|
Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary |
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, tick |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
genUsageCost
protected java.util.Map<java.lang.String,java.lang.String> genUsageCost
SKILL_PREFIXES
protected static final java.lang.String[] SKILL_PREFIXES
MUDHelp
public MUDHelp()
ID
public java.lang.String ID()
- Description copied from interface:
CMObject
- The CoffeeMud Java Class ID shared by all instances of
this object. Unlike the Java Class name, this method
does not include package information. However, it must
return a String value unique to its class category in
the ClassLoader. Class categories include Libraries, Common,
Areas, Abilities, Behaviors, CharClasses, Commands, Exits
Locales, MOBS, Races, WebMacros, Basic Items, Armor,
Weapons, ClanItems, Tech. The name is typically identical
to the class name.
- Specified by:
ID
in interface CMObject
- Overrides:
ID
in class StdLibrary
- Returns:
- the name of this class
isPlayerSkill
public boolean isPlayerSkill(java.lang.String helpStr)
- Specified by:
isPlayerSkill
in interface HelpLibrary
getHelpText
public java.lang.StringBuilder getHelpText(java.lang.String helpStr,
MOB forMOB,
boolean favorAHelp)
- Specified by:
getHelpText
in interface HelpLibrary
getHelpText
public java.lang.StringBuilder getHelpText(java.lang.String helpStr,
MOB forMOB,
boolean favorAHelp,
boolean noFix)
- Specified by:
getHelpText
in interface HelpLibrary
getTopics
public java.util.List<java.lang.String> getTopics(boolean archonHelp,
boolean standardHelp)
- Specified by:
getTopics
in interface HelpLibrary
getActualUsageInternal
protected java.lang.String getActualUsageInternal(Ability A,
int whichUsageCode,
MOB forMOB)
getAbilityQualityDesc
public java.lang.String getAbilityQualityDesc(Ability A)
- Specified by:
getAbilityQualityDesc
in interface HelpLibrary
getAbilityCostDesc
public java.lang.String getAbilityCostDesc(Ability A,
MOB forMOB)
- Specified by:
getAbilityCostDesc
in interface HelpLibrary
getAbilityRangeDesc
public java.lang.String getAbilityRangeDesc(Ability A)
- Specified by:
getAbilityRangeDesc
in interface HelpLibrary
getAbilityTargetDesc
public java.lang.String getAbilityTargetDesc(Ability A)
- Specified by:
getAbilityTargetDesc
in interface HelpLibrary
getActualAbilityUsageDesc
public java.lang.String getActualAbilityUsageDesc(Ability A,
int whichUsageCode,
MOB forMOB)
- Description copied from interface:
HelpLibrary
- Returns a description of the amount of a particular cost is required
by the given mob to use the given ability.
- Specified by:
getActualAbilityUsageDesc
in interface HelpLibrary
- Parameters:
A
- the Ability to find usage forwhichUsageCode
- the Ability.USAGE_ code.forMOB
- null, or a mob to make the report more specific
- Returns:
- either the word "all" or a number in string form
- See Also:
Ability.USAGE_DESCS
getActualUsage
protected java.lang.String getActualUsage(Ability A,
int whichUsageCode)
addHelpEntry
public void addHelpEntry(java.lang.String ID,
java.lang.String text,
boolean archon)
- Specified by:
addHelpEntry
in interface HelpLibrary
columnHelper
protected java.lang.String columnHelper(java.lang.String word,
java.lang.String msg,
int wrap)
fixHelp
public java.lang.String fixHelp(java.lang.String tag,
java.lang.String str,
MOB forMOB)
- Specified by:
fixHelp
in interface HelpLibrary
getHelpText
public java.lang.StringBuilder getHelpText(java.lang.String helpStr,
java.util.Properties rHelpFile,
MOB forMOB)
- Specified by:
getHelpText
in interface HelpLibrary
getHelpText
public java.lang.StringBuilder getHelpText(java.lang.String helpStr,
java.util.Properties rHelpFile,
MOB forMOB,
boolean noFix)
- Specified by:
getHelpText
in interface HelpLibrary
getHelpList
public java.lang.StringBuilder getHelpList(java.lang.String helpStr,
java.util.Properties rHelpFile1,
java.util.Properties rHelpFile2,
MOB forMOB)
- Specified by:
getHelpList
in interface HelpLibrary
getArcHelpFile
public java.util.Properties getArcHelpFile()
- Specified by:
getArcHelpFile
in interface HelpLibrary
getHelpFile
public java.util.Properties getHelpFile()
- Specified by:
getHelpFile
in interface HelpLibrary
shutdown
public boolean shutdown()
- Description copied from interface:
CMLibrary
- Shuts down the library. Called at system shutdown time
obviously, but is sometimes called just to reset the library.
- Specified by:
shutdown
in interface CMLibrary
- Overrides:
shutdown
in class StdLibrary
- Returns:
- true if shutdown was successful, false if there's nothing you can do about it
- See Also:
CMLibrary.activate()
unloadHelpFile
public void unloadHelpFile(MOB mob)
- Specified by:
unloadHelpFile
in interface HelpLibrary