CMObject
, Tickable
, AutoAwardsLibrary
, CMLibrary
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class AutoAwards extends StdLibrary implements AutoAwardsLibrary
Modifier and Type | Class | Description |
---|---|---|
protected static class |
AutoAwards.AutoPropertiesImpl |
AutoAwardsLibrary.AutoProperties, AutoAwardsLibrary.AutoTitle
idConverter
isDebugging, name, serviceClient, tickStatus
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_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, 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_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
AutoAwards() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
addProp(PairList<java.lang.String,java.lang.String> fprops,
java.lang.String propID,
java.lang.String arg,
java.lang.String s) |
|
void |
appendAutoTitle(java.lang.String text) |
Appends to the list of titles from the given text and
refreshes the cache.
|
java.util.Enumeration<java.lang.String> |
autoTitles() |
Returns an enumerator of the auto-title strings themselves.
|
java.lang.String |
deleteTitleAndResave(java.lang.String title) |
Removes the given title from all affected players,
removes the given title from the titles properties file,
and refreshes the titles cache.
|
protected void |
dispossessOldTimers(AutoAwardsLibrary.AutoTitle A,
MOB mob) |
|
protected void |
dispossesTitle(java.lang.String title) |
|
java.lang.String |
evaluateAutoTitle(java.lang.String row,
boolean addIfPossible) |
Scans an admin-given auto-title definition string to see
if it is properly formatted for adding to the list of
auto-titles.
|
boolean |
evaluateAutoTitles(MOB mob) |
Scans all existing titles to see if any should be added to the
given mob.
|
protected java.util.Vector<AutoAwardsLibrary.AutoProperties> |
getAllAutoAwards() |
|
java.lang.String |
getAutoAwardInstructions(java.lang.String filename) |
Reads the auto-award recipe file given and
returns the instructions from it (basically,
the comments)
|
java.util.Enumeration<AutoAwardsLibrary.AutoProperties> |
getAutoProperties() |
Returns an enumeration of all defined auto-properties
|
int |
getAutoPropertiesHash() |
Returns a hash of the auto-properties, allowing quick
checks for changes.
|
java.lang.String |
getAutoPropsFilename() |
Returns the filename of the auto-properties
recipe file.
|
AutoAwardsLibrary.AutoTitle |
getAutoTitle(java.lang.String title) |
Returns the full auto-title definition for the given title/id.
|
java.lang.String |
getAutoTitleFilename() |
Returns the filename of the auto-title recipe
file.
|
java.lang.String |
getAutoTitleMask(java.lang.String title) |
Returns the string mask attributed to a particular
title string.
|
protected int |
getTitleIndex(java.util.List<java.lang.String> ptV,
java.lang.String title,
java.lang.String fixedTitle) |
|
void |
giveAutoProperties(MOB mob) |
Allows the given mob to start participating in
auto-properties.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isExistingAutoTitle(java.lang.String title) |
Returns whether the given string matches one of the defined
player titles.
|
boolean |
modifyAutoProperty(int lineNum,
java.lang.String newLine) |
In auto properties, this will allow it to be modified on a line-by-line
basis automatically, either adding, replacing or deleting a line numbered 1..n.
|
void |
reloadAutoTitles() |
Forces this library to re-load its list of titles from
the resource file titles.ini.
|
protected void |
updateTitleMax(AutoAwardsLibrary.AutoTitle A) |
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, initializeClass, name, newInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
public java.lang.String getAutoTitleFilename()
AutoAwardsLibrary
getAutoTitleFilename
in interface AutoAwardsLibrary
public java.lang.String getAutoPropsFilename()
AutoAwardsLibrary
getAutoPropsFilename
in interface AutoAwardsLibrary
public java.lang.String evaluateAutoTitle(java.lang.String row, boolean addIfPossible)
AutoAwardsLibrary
evaluateAutoTitle
in interface AutoAwardsLibrary
row
- the admin-entered command stringaddIfPossible
- true to add it to the list, false to scan-onlypublic boolean isExistingAutoTitle(java.lang.String title)
AutoAwardsLibrary
isExistingAutoTitle
in interface AutoAwardsLibrary
title
- the strong to matchpublic java.util.Enumeration<java.lang.String> autoTitles()
AutoAwardsLibrary
autoTitles
in interface AutoAwardsLibrary
public java.lang.String getAutoTitleMask(java.lang.String title)
AutoAwardsLibrary
getAutoTitleMask
in interface AutoAwardsLibrary
title
- the title itselfMaskingLibrary
public boolean evaluateAutoTitles(MOB mob)
AutoAwardsLibrary
evaluateAutoTitles
in interface AutoAwardsLibrary
mob
- the mob to check for new titles forprotected int getTitleIndex(java.util.List<java.lang.String> ptV, java.lang.String title, java.lang.String fixedTitle)
protected void updateTitleMax(AutoAwardsLibrary.AutoTitle A)
protected void dispossessOldTimers(AutoAwardsLibrary.AutoTitle A, MOB mob)
protected void dispossesTitle(java.lang.String title)
public AutoAwardsLibrary.AutoTitle getAutoTitle(java.lang.String title)
AutoAwardsLibrary
getAutoTitle
in interface AutoAwardsLibrary
title
- the title itselfpublic void appendAutoTitle(java.lang.String text)
AutoAwardsLibrary
appendAutoTitle
in interface AutoAwardsLibrary
text
- the text of the new title definitionpublic java.lang.String deleteTitleAndResave(java.lang.String title)
AutoAwardsLibrary
deleteTitleAndResave
in interface AutoAwardsLibrary
title
- the title to removepublic void reloadAutoTitles()
AutoAwardsLibrary
reloadAutoTitles
in interface AutoAwardsLibrary
public java.lang.String getAutoAwardInstructions(java.lang.String filename)
AutoAwardsLibrary
getAutoAwardInstructions
in interface AutoAwardsLibrary
filename
- the file to readpublic java.util.Enumeration<AutoAwardsLibrary.AutoProperties> getAutoProperties()
AutoAwardsLibrary
getAutoProperties
in interface AutoAwardsLibrary
public int getAutoPropertiesHash()
AutoAwardsLibrary
getAutoPropertiesHash
in interface AutoAwardsLibrary
protected boolean addProp(PairList<java.lang.String,java.lang.String> fprops, java.lang.String propID, java.lang.String arg, java.lang.String s)
protected java.util.Vector<AutoAwardsLibrary.AutoProperties> getAllAutoAwards()
public void giveAutoProperties(MOB mob)
AutoAwardsLibrary
giveAutoProperties
in interface AutoAwardsLibrary
mob
- the mob who wants auto propertiespublic boolean modifyAutoProperty(int lineNum, java.lang.String newLine)
AutoAwardsLibrary
modifyAutoProperty
in interface AutoAwardsLibrary
lineNum
- the line to editnewLine
- null to delete the line, or the new line