java.io.Serializable
, java.lang.Cloneable
, java.util.Map<java.lang.Object,java.lang.Object>
public class CMProps
extends java.util.Properties
Modifier and Type | Class | Description |
---|---|---|
static class |
CMProps.Bool |
Enums for Boolean entries in the coffeemud.ini file
|
static class |
CMProps.Int |
Enums for Integer entries in the coffeemud.ini file
|
static class |
CMProps.ListFile |
Enums for localizeable string list entries in lists.ini
|
static class |
CMProps.Str |
Enums for String entries in the coffeemud.ini file
|
static class |
CMProps.StrList |
Enums for String list entries
|
static class |
CMProps.WhiteList |
Enum for white lists for various purposes
|
Modifier and Type | Field | Description |
---|---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
ableArgs |
|
protected java.util.List<java.lang.String> |
channelFilter |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
cmdActionCostExceptions |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
cmdComActionCostExceptions |
|
protected java.util.Map<java.lang.String,CostDef> |
commonCost |
|
static int |
DEFAULT_MOB_HP_BASE |
|
protected java.util.List<java.lang.String> |
emoteFilter |
|
protected static char[] |
FILTER_CHARS |
|
protected static java.lang.String |
FILTER_PATTERN |
|
protected java.lang.String[][] |
genderDefs |
|
protected java.util.Map<java.lang.String,CostDef> |
languageCost |
|
protected long |
lastReset |
|
protected boolean |
loaded |
|
protected java.util.Map<java.lang.String,java.lang.Integer> |
maxClanCatsMap |
|
protected long |
MILLIS_PER_MUDHOUR |
|
protected PairVector<java.lang.String,java.lang.Long> |
newusersByIP |
|
protected int |
pkillLevelDiff |
|
protected java.util.List<java.lang.String> |
poseFilter |
|
protected java.util.Map<java.lang.String,java.lang.ThreadGroup> |
privateSet |
|
protected byte[] |
promptSuffix |
|
static java.lang.Class<? extends java.lang.Enum<?>>[] |
PROP_CLASSES |
|
protected java.util.Set<java.lang.String> |
publicClanCats |
|
protected java.util.Set<java.lang.String> |
rpChannels |
|
protected java.util.List<java.lang.String> |
sayFilter |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
skillActionCostExceptions |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
skillComActionCostExceptions |
|
protected java.lang.Object |
skillMaxManaDefault |
|
protected java.util.Map<java.lang.String,java.lang.Object> |
skillMaxManaExceptions |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
skillMinManaExceptions |
|
protected java.util.Map<java.lang.String,CostDef> |
skillsCost |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
socActionCostExceptions |
|
protected java.util.Map<java.lang.String,java.lang.Double> |
socComActionCostExceptions |
|
protected double |
speedAdj |
|
protected java.lang.String[][] |
statCodeExtensions |
|
protected java.lang.Boolean[] |
sysBools |
|
protected java.lang.Integer[] |
sysInts |
|
protected java.lang.Double[] |
sysIntsAsFloat |
|
protected java.lang.String[][] |
sysLists |
|
protected java.lang.Object[] |
sysLstFileLists |
|
protected java.util.Set<java.lang.String>[] |
sysLstFileSet |
|
protected java.lang.String[] |
sysVars |
|
protected long |
TICKS_PER_RLDAY |
|
protected long |
TICKS_PER_RLHOUR |
|
protected long |
TICKS_PER_RLMIN |
|
protected long |
TIME_TICK |
|
protected double |
TIME_TICK_DOUBLE |
|
protected java.util.Map<CMProps.WhiteList,java.util.regex.Pattern[]> |
whiteLists |
Constructor | Description |
---|---|
CMProps() |
Constructor for a property object that applies only to this thread group.
|
CMProps(java.io.InputStream in) |
Creates a properties object for the callers thread group using the given input stream
as input for the properties.
|
CMProps(java.lang.String filename) |
Creates a properties object for the callers thread group using the given file path
as input for the properties.
|
CMProps(java.util.Properties p,
java.lang.String filename) |
Creates a properties object for the callers thread group using the given file path
as input for the properties and the given properties as a baseline.
|
Modifier and Type | Method | Description |
---|---|---|
int[] |
_getListFileIntList(CMProps.ListFile var) |
Returns the entire int list from the lists.ini file of the
given ListFile entry, for the callers thread group.
|
static void |
addListVar(CMProps.StrList varType,
java.lang.String var) |
Add to the end of one of the pre-processed coffeemud.ini list entries for
the callers thread group.
|
static void |
addNewUserByIP(java.lang.String address) |
Adds a new new user entry for the callers thread group, and the given address.
|
static java.lang.String |
applyINIFilter(java.lang.String msg,
CMProps.Str whichFilter) |
Alters the given message according to the given filter, by replacing any words
found in the given filter with garbage characters.
|
static CMProps |
get(Session session) |
Returns an instance of CMProps appropriate to either
the given session, or otherwise the current thread,
as normal.
|
static java.lang.String |
getAbleArg(java.lang.String abilityID) |
Returns any default arguments for the given ability id.
|
static java.lang.String |
getAnyListFileValue(CMProps.ListFile varCode) |
Given the specific lists.ini entry, grabs the indexed string list, returns a random
string choice from a random index in the list.
|
boolean |
getBool(CMProps.Bool varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
this prop object.
|
boolean |
getBoolean(java.lang.String tagToGet) |
retrieve a particular .ini file entry as a boolean
Usage: boolean i=getBoolean("TAG");
|
static boolean |
getBoolVar(CMProps.Bool varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static double |
getCommandActionCost(java.lang.String ID) |
Return the action cost associated with a specific Command ID(), or the default value if
no exception is found for that command.
|
static double |
getCommandActionCost(java.lang.String ID,
double defaultValue) |
Return the action cost associated with a specific Command ID(), or the default value if
no exception is found for that command.
|
static double |
getCommandCombatActionCost(java.lang.String ID) |
Return the action cost associated with a specific Command ID() during combat, or
the default value if no exception is found for that command.
|
static double |
getCommandCombatActionCost(java.lang.String ID,
double defaultValue) |
Return the action cost associated with a specific Command ID() during combat, or
the default value if no exception is found for that command.
|
static CostDef |
getCommonSkillGainCost(java.lang.String id) |
Returns the cost of gaining the given common skill, by Ability id, for the callers
thread group.
|
static int |
getCountNewUserByIP(java.lang.String address) |
Returns the number of times the given ip address has created a new user in the callers
thread group properties, within a given amount of time.
|
double |
getDouble(java.lang.String tagToGet) |
retrieve a particular .ini file entry as a double
Usage: double i=getDouble("TAG");
|
static java.lang.String[] |
getExtraStatCodesHolder(CMObject O) |
Checks the properties for any "extra" properties attached to an object of
the given object type, and if found, constructs a string array to hold
all of the extra values to go with the extra properties, and returns it.
|
static java.lang.String |
getFilterPattern() |
Returns the dirty word filter pattern
|
static java.lang.String[] |
getGenderDef(int index) |
Returns a pre-parsed version of the GENDER entry from the INI file
corresponding to the given gender code, which must be an uppercase
letter.
|
int |
getInt(CMProps.Int varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
theis props object.
|
int |
getInt(java.lang.String tagToGet) |
retrieve a particular .ini file entry as an integer
Usage: int i=getInt("TAG");
|
static int |
getIntVar(CMProps.Int varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static double |
getIntVarAsDouble(CMProps.Int varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static double |
getIntVarAsPct(CMProps.Int varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static CostDef |
getLangSkillGainCost(java.lang.String id) |
Returns the cost of gaining the given language skill, by Ability id, for the callers
thread group.
|
static long |
getLastResetTime() |
Returns the last time the properties for the callers thread group has
been loaded.
|
static java.lang.String |
getListFileChoiceFromIndexedList(CMProps.ListFile varCode,
int listIndex) |
Given the specific lists.ini entry, grabs the indexed string list, and then returns a random string from
that choices available at the given index in the string list.
|
static java.lang.String |
getListFileChoiceFromIndexedListByHash(CMProps.ListFile varCode,
int hash) |
Given the specific lists.ini entry, grabs the indexed string list, and then returns a random string from
that choices available at the hash index in the string list.
|
static int |
getListFileFirstInt(CMProps.ListFile var) |
Returns the first integer in the integer array from the lists.ini file of
the given ListFile entry, for the callers thread group.
|
static java.lang.Object[][][] |
getListFileGrid(CMProps.ListFile var) |
Returns the entire object grid from the lists.ini file of the
given ListFile entry, for the callers thread group.
|
static int |
getListFileIndexedListSize(CMProps.ListFile varCode) |
Given the specific lists.ini entry, grabs the indexed string list, and it's size.
|
static int[] |
getListFileIntList(CMProps.ListFile var) |
Returns the entire int list from the lists.ini file of the
given ListFile entry, for the callers thread group.
|
static java.lang.Object[][] |
getListFileStringChoices(CMProps.ListFile var) |
Returns a two dimensional list of string terms from the list file
|
static java.lang.String[] |
getListFileStringList(CMProps.ListFile var) |
Returns the entire string list from the lists.ini file of the
given ListFile entry, for the callers thread group.
|
static Pair<java.lang.String,java.lang.String>[] |
getListFileStringPairsList(CMProps.ListFile var) |
Returns the entire string list from the lists.ini file of the
given ListFile entry, for the callers thread group.
|
static java.util.Set<java.lang.String> |
getListFileVarSet(CMProps.ListFile varType) |
Retrieve one of the pre-processed coffeemud.ini lists for
the callers thread group, as a hashed set of values.
|
static java.lang.String[] |
getListVar(CMProps.StrList varType) |
Retrieve one of the pre-processed coffeemud.ini lists for
the callers thread group.
|
long |
getLong(java.lang.String tagToGet) |
retrieve a particular .ini file entry as a long
Usage: long i=getInt("TAG");
|
static java.lang.Object |
getManaCostExceptionObject(java.lang.String skillID) |
Returns the amount of usage cost (mana) for the given ability ID().
|
static java.lang.Object |
getManaCostObject(java.lang.String skillID) |
Returns the amount of usage cost (mana) for the given ability ID().
|
static int |
getMaxClansThisCategory(java.lang.String clanCategory) |
Returns maximum the maximum number of clans of this category a player
can belong to according to the callers properties.
|
static long |
getMillisPerMudHour() |
Returns the number of real milliseconds that occur every in-game "hour"
|
static int |
getMinManaException(java.lang.String skillID) |
Returns the minimum amount of usage cost (mana) for the given ability ID().
|
static int |
getMobHPBase() |
Retrieve the base MOB hit point base
|
static CostDef |
getNormalSkillGainCost(java.lang.String id) |
Returns the cost of gaining the given skill, by Ability id, for the callers
thread group.
|
static int |
getPKillLevelDiff() |
Returns the maximum level difference between players who want to PVP each other.
|
static java.lang.ThreadGroup |
getPrivateOwner(java.lang.String s) |
Returns the first thread group available that privately owns the given property,
excepting the base group.
|
java.lang.String |
getPrivateStr(java.lang.String tagToGet) |
retrieve a local .ini file entry as a string
Usage: String s=getPrivateStr("TAG");
|
static java.util.Set<java.lang.String> |
getPrivateSubSet(java.lang.String mask) |
Returns the set of properties that are private to the callers thread group.
|
static byte[] |
getPromptSuffix() |
Returns the array of bytes that must be sent after every prompt.
|
static java.lang.String |
getProp(java.lang.String varName) |
Returns a string representation of the given property, as best it can.
|
java.lang.String |
getRawPrivateStr(java.lang.String tagToGet) |
retrieve raw local .ini file entry as a string
Usage: String s=getRawPrivateStr("TAG");
|
static double |
getSkillActionCost(java.lang.String ID) |
Return the action cost associated with a specific Ability ID(), or the default value if
no exception is found for that Ability.
|
static double |
getSkillActionCost(java.lang.String ID,
double defaultValue) |
Return the action cost associated with a specific Ability ID(), or the default value if
no exception is found for that Ability.
|
static double |
getSkillCombatActionCost(java.lang.String ID) |
Return the action cost associated with a specific Ability ID() during combat, or
the default value if no exception is found for that Ability.
|
static double |
getSkillCombatActionCost(java.lang.String ID,
double defaultValue) |
Return the action cost associated with a specific Ability ID() during combat, or
the default value if no exception is found for that Ability.
|
static double |
getSocialActionCost(java.lang.String baseName) |
Return the action cost associated with a specific Social base name, or
the default value if no exception is found for that Social.
|
static double |
getSocialCombatActionCost(java.lang.String baseName) |
Return the action cost associated with a specific Social base name during combat, or
the default value if no exception is found for that Social.
|
static double |
getSpeedAdjustment() |
Returns a multiplier adjustment for speed bonuses from all causes
|
static java.lang.String |
getStatCodeExtensionValue(java.lang.String[] codes,
java.lang.String[] xtraValues,
java.lang.String code) |
This method searches the given codes array for an entry matching the given code, and returns the value
in xtraValues, or "" if not found.
|
static java.lang.String[] |
getStatCodesList(java.lang.String[] baseStatCodes,
CMObject O) |
Checks the properties for any "extra" properties attached to an object of
the given object type, and if found, constructs a string array to hold
all of the object "base" stat codes, and the extra stat codes, and returns it.
|
java.lang.String |
getStr(CMProps.Str varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
this prop object
|
java.lang.String |
getStr(java.lang.String tagToGet) |
retrieve a particular .ini file entry as a string
Usage: String s=getStr(p,"TAG");
|
java.lang.String |
getStr(java.lang.String tagToGet,
java.lang.String defaultVal) |
retrieve a particular .ini file entry as a string, or use a default
Usage: String s=getStr(p,"TAG");
|
java.lang.String[][] |
getStrsStarting(java.lang.String tagStartersToGet) |
retrieve particular .ini file entrys as a string array
Usage: String s=getStrsStarting(p,"TAG");
|
static long |
getTickMillis() |
Returns the amount of milliseconds per mud tick.
|
static double |
getTickMillisD() |
Returns the amount of milliseconds per mud tick, as a double.
|
static long |
getTicksPerDay() |
Returns the number of game ticks that occur every real life day
|
static long |
getTicksPerHour() |
Returns the number of game ticks that occur every real life hour (60 min)
|
static long |
getTicksPerMinute() |
Returns the number of game ticks that occur every real life minute
|
static long |
getTicksPerMudHour() |
Returns the number of game ticks that occur every in-game "hour"
|
static java.lang.String |
getVar(CMProps.Str varNum) |
Retrieve one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static CMProps |
instance() |
Returns the property object that applies to the callers thread group.
|
static CMProps |
instance(char c) |
Returns the property object that applies to the given thread group.
|
static CMProps |
instance(Session session) |
Returns the property object that applies to the given session.
|
static CMProps |
instance(MOB mob) |
Returns the property object that applies to the given mob.
|
static boolean |
isAnyINIFiltered(java.lang.String msg) |
Returns true if the given msg contains words which would be filtered out by any of the filters, for
the callers thread group.
|
static boolean |
isINIFiltered(java.lang.String msg,
CMProps.Str whichFilter) |
Returns true if the given msg contains words which would be filtered out by the given filter for
the callers thread group.
|
boolean |
isLoaded() |
Returns true if this properties object has been loaded from
a stream or ini file, and false otherwise.
|
static boolean |
isOnWhiteList(CMProps.WhiteList listType,
java.lang.String chk) |
Retrurns true if the given chk string matches one of the entries in the given WhiteList type for the
callers thread group.
|
static boolean |
isOnWhiteList(CMProps props,
CMProps.WhiteList listType,
java.lang.String chk) |
Retrurns true if the given chk string matches one of the entries in the given WhiteList type for the
given properties object.
|
static boolean |
isPrivateToMe(java.lang.String s) |
Returns true if the given property name is private to the callers thread group,
and false if it is shared with the base thread group.
|
static boolean |
isPropName(java.lang.String varName) |
Returns whether the given string is a valid property name,
referring to the names of the various enums in the static
CMProps class.
|
static boolean |
isPublicClanGvtCategory(java.lang.String clanCategory) |
Returns true if, according to the callers properties, the given clan category
makes it classified as a "Public Clan".
|
static boolean |
isSpecialRPChannel(java.lang.String named) |
For the CHANNEL-NAMED option in RPAWARDS ini entry, this will check the
list of those channels for the given name.
|
static boolean |
isTheme(int themeMask) |
Returns true if the global mud theme includes the them given
by the themeMask passed in.
|
static boolean |
isUsingAccountSystem() |
|
static java.util.List<java.lang.String> |
loadEnumerablePage(java.lang.String iniFile) |
Loads the given iniFile by mud path, combines any multi-line entries, and returns all the
lines in the file in a list.
|
static CMProps |
loadPropPage(java.lang.String iniFile) |
Creates a new properties object for the callers thread group
and loads the given ini file.
|
static CostDef |
makeCostDefinition(CostDef.CostType costType,
java.lang.String currency,
java.lang.String costDefinition) |
Creates a simple CostDef object from the given type and formula.
|
void |
resetSecurityVars() |
Reads this properties objects and sets security variables.
|
void |
resetSystemVars() |
Reads this properties objects and sets ALL internal variables.
|
static void |
setBoolAllVar(CMProps.Bool varNum,
boolean val) |
Sets one of the pre-processed coffeemud.ini entries for
all thread groups.
|
static void |
setBoolVar(CMProps.Bool varNum,
boolean val) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static void |
setIntVar(CMProps.Int varNum,
int val) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static void |
setIntVar(CMProps.Int varNum,
java.lang.String val) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group, only in this case, the entry
needs to be converted to an int first.
|
static void |
setIntVar(CMProps.Int varNum,
java.lang.String val,
int defaultValue) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group, only in this case, the entry
needs to be converted to an int first, if it can.
|
static void |
setListVar(CMProps.StrList varType,
java.lang.String[] var) |
Sets one of the pre-processed coffeemud.ini list entries for
the callers thread group.
|
static boolean |
setProp(java.lang.String varName,
java.lang.String value) |
Sets a property from a string representation of the given property, as best it can.
|
protected void |
setStartStateStuff(CMProps.Int startState,
CMProps.Str addState,
java.lang.String var) |
|
static void |
setStatCodeExtensionValue(java.lang.String[] codes,
java.lang.String[] xtraValues,
java.lang.String code,
java.lang.String val) |
This method searches the given codes array for an entry matching the given code, and set the value
in xtraValues when found.
|
static void |
setUpAllLowVar(CMProps.Str varNum,
java.lang.String val) |
Sets one of the pre-processed coffeemud.ini entries for
all thread groups.
|
static void |
setUpCosts(java.lang.String fieldName,
java.util.Map<java.lang.String,CostDef> map,
java.util.List<java.lang.String> fields) |
Given the list of skill cost definitions, this method will parse
out the ID and the data, build a cost definition object
and store the cost definition in the given map.
|
static void |
setUpLowVar(CMProps.Str varNum,
java.lang.String val) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group, without making the value uppercase.
|
static void |
setVar(CMProps.Str varNum,
java.lang.String val) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group, forcing the value to uppercase.
|
static void |
setVar(CMProps.Str varNum,
java.lang.String val,
boolean upperFy) |
Sets one of the pre-processed coffeemud.ini entries for
the callers thread group.
|
static void |
setWhitelist(CMProps.WhiteList listType,
java.lang.String list) |
Parses and sets one of the properties whitelist entries by parsing the given string by commands,
and compiling them into Patterns, all for the callers thread group.
|
static void |
setWhitelist(CMProps props,
CMProps.WhiteList listType,
java.lang.String list) |
Parses and sets one of the properties whitelist entries by parsing the given string by commands,
and compiling them into Patterns.
|
long |
tickMillis() |
Returns the amount of milliseconds per mud tick.
|
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
protected static final java.lang.String FILTER_PATTERN
protected static final char[] FILTER_CHARS
public static final int DEFAULT_MOB_HP_BASE
public static final java.lang.Class<? extends java.lang.Enum<?>>[] PROP_CLASSES
protected final java.util.Set<java.lang.String>[] sysLstFileSet
protected final java.lang.String[] sysVars
protected final java.lang.Integer[] sysInts
protected final java.lang.Double[] sysIntsAsFloat
protected final java.lang.Boolean[] sysBools
protected final java.lang.String[][] sysLists
protected final java.lang.Object[] sysLstFileLists
protected final java.util.List<java.lang.String> sayFilter
protected final java.util.List<java.lang.String> channelFilter
protected final java.util.List<java.lang.String> emoteFilter
protected final java.util.List<java.lang.String> poseFilter
protected final java.util.Set<java.lang.String> rpChannels
protected java.lang.String[][] statCodeExtensions
protected int pkillLevelDiff
protected boolean loaded
protected byte[] promptSuffix
protected final java.lang.String[][] genderDefs
protected long lastReset
protected long TIME_TICK
protected long MILLIS_PER_MUDHOUR
protected long TICKS_PER_RLMIN
protected long TICKS_PER_RLHOUR
protected long TICKS_PER_RLDAY
protected double TIME_TICK_DOUBLE
protected final java.util.Map<java.lang.String,java.lang.Integer> maxClanCatsMap
protected final java.util.Set<java.lang.String> publicClanCats
protected volatile java.lang.Object skillMaxManaDefault
protected final java.util.Map<java.lang.String,java.lang.Object> skillMaxManaExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> skillMinManaExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> skillActionCostExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> skillComActionCostExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> cmdActionCostExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> cmdComActionCostExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> socActionCostExceptions
protected final java.util.Map<java.lang.String,java.lang.Double> socComActionCostExceptions
protected final java.util.Map<CMProps.WhiteList,java.util.regex.Pattern[]> whiteLists
protected final PairVector<java.lang.String,java.lang.Long> newusersByIP
protected final java.util.Map<java.lang.String,java.lang.ThreadGroup> privateSet
protected final java.util.Map<java.lang.String,CostDef> commonCost
protected final java.util.Map<java.lang.String,CostDef> skillsCost
protected final java.util.Map<java.lang.String,CostDef> languageCost
protected final java.util.Map<java.lang.String,java.lang.String> ableArgs
protected double speedAdj
public CMProps()
public CMProps(java.io.InputStream in)
in
- a stream from which to draw the properties.public CMProps(java.lang.String filename)
filename
- a file from which to draw the properties.public CMProps(java.util.Properties p, java.lang.String filename)
p
- loads these properties into this object firstfilename
- a file from which to draw the rest of the properties.public static final CMProps instance()
public static final CMProps instance(char c)
c
- thread group code to return properties for. Base = '0'.public static final CMProps instance(Session session)
session
- session to return properties for. Base = '0'.public static final CMProps instance(MOB mob)
mob
- mob to return properties for. Base = '0'.public static final CMProps loadPropPage(java.lang.String iniFile)
iniFile
- the path and name of the ini file to loadpublic static final CMProps get(Session session)
session
- the session to get a thread id for, or nullpublic boolean isLoaded()
public static java.lang.String getFilterPattern()
public final java.lang.String getPrivateStr(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public final java.lang.String getRawPrivateStr(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public final java.lang.String getStr(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public final java.lang.String getStr(java.lang.String tagToGet, java.lang.String defaultVal)
tagToGet
- the property tag to retrieve.defaultVal
- the value to return if the property does not existpublic final java.lang.String[][] getStrsStarting(java.lang.String tagStartersToGet)
tagStartersToGet
- the property tag to retrieve.public final boolean getBoolean(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public final double getDouble(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public final int getInt(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public final long getLong(java.lang.String tagToGet)
tagToGet
- the property tag to retrieve.public static final boolean isUsingAccountSystem()
public static final double getCommandActionCost(java.lang.String ID, double defaultValue)
ID
- the commands ID()defaultValue
- the value to return if the override does not existpublic static final double getSpeedAdjustment()
public static final double getCommandCombatActionCost(java.lang.String ID, double defaultValue)
ID
- the commands ID()defaultValue
- the default action cost to usepublic static final double getCommandActionCost(java.lang.String ID)
ID
- the commands ID()public static final double getCommandCombatActionCost(java.lang.String ID)
ID
- the commands ID()public static final double getSkillActionCost(java.lang.String ID, double defaultValue)
ID
- the Ability ID()defaultValue
- the default action cost to usepublic static final double getSkillCombatActionCost(java.lang.String ID, double defaultValue)
ID
- the Ability ID()defaultValue
- the default action cost to usepublic static final double getSkillActionCost(java.lang.String ID)
ID
- the Ability ID()public static final double getSkillCombatActionCost(java.lang.String ID)
ID
- the Ability ID()public static final double getSocialActionCost(java.lang.String baseName)
baseName
- the Social Base Namepublic static final double getSocialCombatActionCost(java.lang.String baseName)
baseName
- the Social Base Namepublic static final int getPKillLevelDiff()
public static final java.lang.String getVar(CMProps.Str varNum)
varNum
- the Str enum of the entry to getpublic static boolean isPropName(java.lang.String varName)
varName
- the possible name of a propertypublic static java.lang.String getProp(java.lang.String varName)
varName
- the name of a propertypublic static boolean setProp(java.lang.String varName, java.lang.String value)
varName
- the name of a propertyvalue
- the string value of that propertypublic final java.lang.String getStr(CMProps.Str varNum)
varNum
- the Str enum of the entry to getpublic static final int getIntVar(CMProps.Int varNum)
varNum
- the Int enum of the entry to getpublic static final int getMobHPBase()
public static final double getIntVarAsDouble(CMProps.Int varNum)
varNum
- the Int enum of the entry to getpublic static final double getIntVarAsPct(CMProps.Int varNum)
varNum
- the Int enum of the entry to getpublic final int getInt(CMProps.Int varNum)
varNum
- the Int enum of the entry to getpublic static final java.lang.String[] getListVar(CMProps.StrList varType)
varType
- the StrList enum of the list to getpublic static final java.util.Set<java.lang.String> getListFileVarSet(CMProps.ListFile varType)
varType
- the StrList enum of the set list to getpublic static final boolean getBoolVar(CMProps.Bool varNum)
varNum
- the Bool enum of the entry to getpublic final boolean getBool(CMProps.Bool varNum)
varNum
- the Bool enum of the entry to getpublic static final void setBoolVar(CMProps.Bool varNum, boolean val)
varNum
- the Bool enum of the entry to setval
- the new value of the entrypublic static final void setBoolAllVar(CMProps.Bool varNum, boolean val)
varNum
- the Bool enum of the entries to setval
- the new value of the entriespublic static final void setIntVar(CMProps.Int varNum, int val)
varNum
- the Int enum of the entry to setval
- the new value of the entrypublic static final void setIntVar(CMProps.Int varNum, java.lang.String val)
varNum
- the Int enum of the entry to setval
- the new value of the entry, as a string.public static final void setIntVar(CMProps.Int varNum, java.lang.String val, int defaultValue)
varNum
- the Int enum of the entry to setval
- the new value of the entry, as a string.defaultValue
- the default value to use when the property doesn't existpublic static final void setListVar(CMProps.StrList varType, java.lang.String[] var)
varType
- the StrList enum of the entry to setvar
- the new value of the entry listpublic static final void addListVar(CMProps.StrList varType, java.lang.String var)
varType
- the StrList enum of the entry to add tovar
- the value to add to the entry listpublic static final void setVar(CMProps.Str varNum, java.lang.String val, boolean upperFy)
varNum
- the Str enum of the entry to setval
- the new value of the entryupperFy
- true to make the value uppercase first, false otherwisepublic static final void setVar(CMProps.Str varNum, java.lang.String val)
varNum
- the Str enum of the entry to setval
- the new value of the entrypublic static final void setUpLowVar(CMProps.Str varNum, java.lang.String val)
varNum
- the Str enum of the entry to setval
- the new value of the entrypublic static final void setUpAllLowVar(CMProps.Str varNum, java.lang.String val)
varNum
- the Str enum of the entries to setval
- the new value of the entriespublic static final void setWhitelist(CMProps props, CMProps.WhiteList listType, java.lang.String list)
props
- the properties object to set the whitelist onlistType
- the WhiteList type to setlist
- the unparsed whitelist entriespublic static final void setWhitelist(CMProps.WhiteList listType, java.lang.String list)
listType
- the WhiteList type to setlist
- the unparsed whitelist entriespublic static final java.lang.String getAbleArg(java.lang.String abilityID)
abilityID
- the ability id to get args forpublic static final boolean isOnWhiteList(CMProps props, CMProps.WhiteList listType, java.lang.String chk)
props
- the properties to check the whitelist onlistType
- the WhiteList typechk
- the string to search forpublic static final boolean isOnWhiteList(CMProps.WhiteList listType, java.lang.String chk)
listType
- the WhiteList typechk
- the string to search forpublic static final void setUpCosts(java.lang.String fieldName, java.util.Map<java.lang.String,CostDef> map, java.util.List<java.lang.String> fields)
fieldName
- the name of the field being parsed, for error messagesmap
- the map to store the cost definitions infields
- the pre-separated list of cost definitions to finish parsingpublic static final CostDef makeCostDefinition(CostDef.CostType costType, java.lang.String currency, java.lang.String costDefinition)
costType
- the cost typecurrency
- null, "", or a currency typecostDefinition
- the definition formulapublic static final CostDef getNormalSkillGainCost(java.lang.String id)
id
- the Ability id to find a cost forpublic static final CostDef getCommonSkillGainCost(java.lang.String id)
id
- the common skill Ability id to find a cost forpublic static final CostDef getLangSkillGainCost(java.lang.String id)
id
- the language skill Ability id to find a cost forpublic static final int getCountNewUserByIP(java.lang.String address)
address
- the address to look for.public static final void addNewUserByIP(java.lang.String address)
address
- the address to register a new user forpublic static final int getMinManaException(java.lang.String skillID)
skillID
- the Ability ID to find a minimum cost for.public static final java.lang.Object getManaCostObject(java.lang.String skillID)
skillID
- the Ability ID to find a cost for.public static final java.lang.Object getManaCostExceptionObject(java.lang.String skillID)
skillID
- the Ability ID to find a cost for.public static java.lang.String[] getGenderDef(int index)
index
- the uppercase letter codepublic static final int getListFileFirstInt(CMProps.ListFile var)
var
- the ListFile entry to return the first integer frompublic static final java.lang.String[] getListFileStringList(CMProps.ListFile var)
var
- the ListFile entry to return the string list frompublic static final Pair<java.lang.String,java.lang.String>[] getListFileStringPairsList(CMProps.ListFile var)
var
- the ListFile entry to return the string list frompublic final int[] _getListFileIntList(CMProps.ListFile var)
var
- the ListFile entry to return the int list frompublic static final int[] getListFileIntList(CMProps.ListFile var)
var
- the ListFile entry to return the int list frompublic static final java.lang.Object[][] getListFileStringChoices(CMProps.ListFile var)
var
- the list entry to returnpublic static final java.lang.Object[][][] getListFileGrid(CMProps.ListFile var)
var
- the ListFile entry to return the object grid frompublic static final java.lang.String getListFileChoiceFromIndexedList(CMProps.ListFile varCode, int listIndex)
varCode
- the lists.ini string list entrylistIndex
- the index into the string list, to determine which choices to usepublic static final java.lang.String getListFileChoiceFromIndexedListByHash(CMProps.ListFile varCode, int hash)
varCode
- the lists.ini string list entryhash
- the hash to use to determine the index in the list to use.public static final int getListFileIndexedListSize(CMProps.ListFile varCode)
varCode
- the lists.ini string list entrypublic static final java.lang.String getAnyListFileValue(CMProps.ListFile varCode)
varCode
- the lists.ini string list entrypublic static boolean isPrivateToMe(java.lang.String s)
s
- the name of the coffeemud.ini file propertypublic static java.util.Set<java.lang.String> getPrivateSubSet(java.lang.String mask)
mask
- a regular expression mask to limit the setpublic static java.lang.ThreadGroup getPrivateOwner(java.lang.String s)
s
- the name of the property to look forpublic final void resetSystemVars()
protected void setStartStateStuff(CMProps.Int startState, CMProps.Str addState, java.lang.String var)
public static byte[] getPromptSuffix()
public static long getLastResetTime()
public final void resetSecurityVars()
public static boolean isAnyINIFiltered(java.lang.String msg)
msg
- the message to apply the filter topublic static boolean isINIFiltered(java.lang.String msg, CMProps.Str whichFilter)
msg
- the message to apply the filter towhichFilter
- the filter to apply, such as EMOTEFILTER, POSEFILTER, SAYFILTER, or CHANNELFILTERpublic static java.lang.String applyINIFilter(java.lang.String msg, CMProps.Str whichFilter)
msg
- the message to apply the filter towhichFilter
- the filter to apply, such as EMOTEFILTER, POSEFILTER, SAYFILTER, or CHANNELFILTERpublic static final boolean isPublicClanGvtCategory(java.lang.String clanCategory)
clanCategory
- the category to check data forpublic static final int getMaxClansThisCategory(java.lang.String clanCategory)
clanCategory
- the category to check data forpublic static final long getTickMillis()
public final long tickMillis()
public static final double getTickMillisD()
public static final long getMillisPerMudHour()
public static final long getTicksPerMudHour()
public static final long getTicksPerMinute()
public static final long getTicksPerHour()
public static final long getTicksPerDay()
public static final boolean isTheme(int themeMask)
themeMask
- the theme mask to check forpublic static final java.util.List<java.lang.String> loadEnumerablePage(java.lang.String iniFile)
iniFile
- the file to loadpublic static final java.lang.String getStatCodeExtensionValue(java.lang.String[] codes, java.lang.String[] xtraValues, java.lang.String code)
codes
- the code names to searchxtraValues
- the values matching the codes, or null if unsupportedcode
- the code to search forpublic static void setStatCodeExtensionValue(java.lang.String[] codes, java.lang.String[] xtraValues, java.lang.String code, java.lang.String val)
codes
- the code names to searchxtraValues
- the values matching the codes, or null if unsupportedcode
- the code to search forval
- the value to set the stat topublic static final boolean isSpecialRPChannel(java.lang.String named)
named
- the channel to look forpublic static final java.lang.String[] getExtraStatCodesHolder(CMObject O)
O
- the object to find extra properties forpublic static final java.lang.String[] getStatCodesList(java.lang.String[] baseStatCodes, CMObject O)
baseStatCodes
- the base set of stat codes that apply to this objectO
- the object to find extra properties for