|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultLawSet
public class DefaultLawSet
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.Law |
|---|
Law.TreasurySet |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
DefaultLawSet()
|
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String[]> |
abilityCrimes()
Method for accessing the crimes, flags, and consequences involving the use of spells, chants, skills, etc. |
boolean |
arrestMobs()
Returns whether this legal system allows mobs to be arrested (as opposed to just players) |
java.util.List<java.lang.String[]> |
bannedBits()
Combined with bannedSubstances, this method returns the definition of "substance" crimes involving manipulating an illegal substance in public. |
java.util.List<java.util.List<java.lang.String>> |
bannedSubstances()
Combined with bannedBits, this method returns the definition of "illegal substance carrying" crimes. |
java.util.Map<java.lang.String,java.lang.String[]> |
basicCrimes()
Method for accessing the crimes, flags, and consequences defined as the most basic law. |
void |
changeStates(LegalWarrant W,
int state)
Changes the action state of the given warrant (and all dependent warrants) |
java.util.List<java.lang.String> |
chitChat()
A list of strings denoting random things an officer will say while taking an arrested criminal to the judge. |
java.util.List<java.lang.String> |
chitChat2()
A list of strings denoting random things an officer will say while taking an arrested criminal to the jail. |
java.util.List<java.lang.String> |
chitChat3()
A list of strings denoting random things an officer will say while taking an arrested criminal to the detention center. |
java.util.List<java.lang.String> |
chitChat4()
A list of strings denoting random things an officer will say while taking an arrested criminal to banishment. |
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
LegalWarrant |
getCopkiller(Area A,
LegalBehavior behav,
MOB mob)
Returns a warrant if the given mob or player mob object represents someone accused of killing an officer. |
java.lang.String |
getInternalStr(java.lang.String msg)
Returns one of the raw property entries used to construct the legal definitions. |
LegalWarrant |
getLawResister(Area A,
LegalBehavior behav,
MOB mob)
Returns a warrant if the given mob or player mob object represents someone accused of resisting arrest. |
java.lang.String |
getMessage(int which)
Returns a string of one of the messages given by officers and or judges during various stages of the legal adjudication process. |
LegalWarrant |
getOldWarrant(MOB criminal,
java.lang.String crime,
boolean pull)
Returns an old warrant object matching the given criteria. |
Law.TreasurySet |
getTreasuryNSafe(Area A)
If defined and found, this method returns an Environmental array with two elements. |
LegalWarrant |
getWarrant(MOB mob,
int which)
Returns a iterated LegalWarrant object for the given mob. |
LegalWarrant |
getWarrant(MOB criminal,
java.lang.String crime,
boolean pull,
boolean debugging)
|
boolean |
hasModifiableLaws()
Whether the legal definitions can be changed |
boolean |
hasModifiableNames()
Whether the officials can be changed (officers judges) |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
void |
initialize(LegalBehavior details,
java.util.Properties laws,
boolean modifiableNames,
boolean modifiableLaws)
Initializes a new Law object with information from a given Properties file, along with the LegalBehavior which will enforce the laws, and flags denoting how maleable these laws are. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
boolean |
isInternalStr(java.lang.String msg)
Returns whether or not the given property name is one of the raw property entries used to construct the legal definitions. |
java.lang.String[] |
jailMessages()
Returns a 4-dimensional String[] array for each of the 4 levels of jail. |
java.lang.String |
jailMessages(int which)
Returns one of the 4 messages given by the judge for each of the four jail punishments. |
java.util.List<java.lang.String> |
jailRooms()
A list of strings denoting which rooms are considered jails. |
java.lang.Integer[] |
jailTimes()
A parole time is a number of ticks for each of the four levels of jail punishments. |
int |
jailTimes(int which)
A parole time is a number of ticks for each of the four levels of jail punishments. |
java.util.List<java.lang.String> |
judgeNames()
A list a strings denoting which mobs are considered judges of the law in the legal area. |
boolean |
lawIsActivated()
Whether the legal system on the legal behavior is active. |
java.lang.String[] |
messages()
A String array of various messages given by officers and or judges during various stages of the legal adjudication process. |
java.lang.String |
name()
The displayable name of this object. |
CMObject |
newInstance()
Returns a new instance of this class. |
protected boolean |
notifyPlayer(java.lang.String ownerName,
java.lang.String owerName,
double owed,
java.lang.String fourWord,
java.lang.String subject,
java.lang.String message)
|
java.util.List<java.lang.String> |
officerNames()
A list a strings denoting which mobs are considered officers of the law in the legal area. |
java.util.List<LegalWarrant> |
oldWarrants()
Returns a list of all old LegalWarrant objects for all criminals and crimes since the last MUD reboot. |
java.util.List<java.lang.String[]> |
otherBits()
Combined with otherCrimes, this method returns the definition of "miscellaneous" crimes involving emotes and similar random phenomenon. |
java.util.List<java.util.List<java.lang.String>> |
otherCrimes()
Combined with otherBits, this method returns the definition of "miscellaneous" crimes involving emotes and similar random phenomenon. |
java.lang.String[] |
paroleMessages()
Returns a 4-dimensional String[] array for each of the 4 levels of Parole. |
java.lang.String |
paroleMessages(int which)
Returns one of the 4 messages given by the judge for each of the four parole punishments. |
java.lang.Integer[] |
paroleTimes()
A parole time is a number of ticks for each of the four levels of parole punishments. |
int |
paroleTimes(int which)
A parole time is a number of ticks for each of the four levels of parole punishments. |
void |
propertyTaxTick(Area A,
boolean debugging)
Called by an Area periodically to update its records on property taxes owed, to withdraw money from accounts to pay said taxes if applicable, and issue a warrant if necessary. |
java.lang.String |
rawLawString()
Returns the entire raw legal definition as a ~ delimited string. |
java.util.List<java.lang.String> |
releaseRooms()
A list of strings denoting which rooms are considered release rooms for after a prisoner has served jail time. |
void |
resetLaw()
Forces the legal definitions to be re-read from their primary storage, usually an INI file, or the database, depending on how the legalbehavior is defined. |
protected boolean |
sendGameMail(java.lang.String mailBox,
java.lang.String subject,
java.lang.String message)
|
void |
setInternalStr(java.lang.String tag,
java.lang.String value)
Sets one of the raw property entries used to construct the legal definitions. |
java.util.Map<java.lang.String,java.lang.Object> |
taxLaws()
Returns a map of various catch-all properties and variables associated with the tax laws. |
java.util.List<LegalWarrant> |
warrants()
Returns a list of all current LegalWarrant objects still considered to be active and relevant. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultLawSet()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
CMObject
name in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject copyOf()
CMObject
copyOf in interface CMObject
public void initialize(LegalBehavior details,
java.util.Properties laws,
boolean modifiableNames,
boolean modifiableLaws)
Law
initialize in interface Lawdetails - the behavior governing this lawlaws - the properties file containing all the legal definitionsmodifiableNames - whether officials (judges/officers) are modifiablemodifiableLaws - whether the laws themselves are modifiableLegalBehavior,
Law.resetLaw(),
Law.hasModifiableNames(),
Law.hasModifiableLaws()public java.util.List<java.util.List<java.lang.String>> otherCrimes()
Law
otherCrimes in interface LawLaw.otherBits()public java.util.List<java.lang.String[]> otherBits()
Law
otherBits in interface LawLaw.BIT_CRIMENAME,
Law.otherBits()public java.util.List<java.util.List<java.lang.String>> bannedSubstances()
Law
bannedSubstances in interface LawRawMaterial,
Law.bannedBits()public java.util.List<java.lang.String[]> bannedBits()
Law
bannedBits in interface LawLaw.BIT_CRIMENAME,
Law.bannedSubstances()public java.util.Map<java.lang.String,java.lang.String[]> abilityCrimes()
Law
abilityCrimes in interface LawAbility,
Law.BIT_CRIMENAMEpublic java.util.Map<java.lang.String,java.lang.String[]> basicCrimes()
Law
basicCrimes in interface LawLaw.BIT_CRIMENAMEpublic java.util.Map<java.lang.String,java.lang.Object> taxLaws()
Law
taxLaws in interface LawLaw.BIT_CRIMENAMEpublic boolean hasModifiableNames()
Law
hasModifiableNames in interface LawLaw.initialize(LegalBehavior, Properties, boolean, boolean)public boolean hasModifiableLaws()
Law
hasModifiableLaws in interface LawLaw.initialize(LegalBehavior, Properties, boolean, boolean)public java.util.List<java.lang.String> chitChat()
Law
chitChat in interface Lawpublic java.util.List<java.lang.String> chitChat2()
Law
chitChat2 in interface Lawpublic java.util.List<java.lang.String> chitChat3()
Law
chitChat3 in interface Lawpublic java.util.List<java.lang.String> chitChat4()
Law
chitChat4 in interface Lawpublic java.util.List<java.lang.String> jailRooms()
Law
jailRooms in interface Lawpublic java.util.List<java.lang.String> releaseRooms()
Law
releaseRooms in interface Lawpublic java.util.List<java.lang.String> officerNames()
Law
officerNames in interface Lawpublic java.util.List<java.lang.String> judgeNames()
Law
judgeNames in interface Lawpublic java.lang.String[] messages()
Law
messages in interface LawLaw.getMessage(int),
Law.MSG_COPKILLER,
Law.MSG_TOTALpublic java.util.List<LegalWarrant> oldWarrants()
Law
oldWarrants in interface LawLegalWarrant,
Law.getOldWarrant(MOB, String, boolean)public java.util.List<LegalWarrant> warrants()
Law
warrants in interface LawLegalWarrant,
Law.getWarrant(MOB, int)public boolean arrestMobs()
Law
arrestMobs in interface Lawpublic java.lang.String[] paroleMessages()
Law
paroleMessages in interface LawLaw.PUNISHMENT_PAROLE1,
Law.PUNISHMENT_PAROLE2,
Law.PUNISHMENT_PAROLE3,
Law.PUNISHMENT_PAROLE4,
Law.paroleMessages(int)public java.lang.Integer[] paroleTimes()
Law
paroleTimes in interface LawLaw.PUNISHMENT_PAROLE1,
Law.PUNISHMENT_PAROLE2,
Law.PUNISHMENT_PAROLE3,
Law.PUNISHMENT_PAROLE4,
Law.paroleTimes(int)public java.lang.String[] jailMessages()
Law
jailMessages in interface LawLaw.PUNISHMENT_JAIL1,
Law.PUNISHMENT_JAIL2,
Law.PUNISHMENT_JAIL3,
Law.PUNISHMENT_JAIL4,
Law.jailMessages(int)public java.lang.Integer[] jailTimes()
Law
jailTimes in interface LawLaw.PUNISHMENT_JAIL1,
Law.PUNISHMENT_JAIL2,
Law.PUNISHMENT_JAIL3,
Law.PUNISHMENT_JAIL4,
Law.jailTimes(int)
public void changeStates(LegalWarrant W,
int state)
Law
changeStates in interface LawW - the warrant to change the state ofstate - the new action stateLegalWarrant,
Law.PUNISHMENT_DESCSpublic Law.TreasurySet getTreasuryNSafe(Area A)
Law
getTreasuryNSafe in interface LawA - the legal Area to look for a treasury in.
protected boolean sendGameMail(java.lang.String mailBox,
java.lang.String subject,
java.lang.String message)
protected boolean notifyPlayer(java.lang.String ownerName,
java.lang.String owerName,
double owed,
java.lang.String fourWord,
java.lang.String subject,
java.lang.String message)
public void propertyTaxTick(Area A,
boolean debugging)
Law
propertyTaxTick in interface LawA - the Legal Area governed by this law for property taxesdebugging - whether internal debugging msgs should be generatedpublic java.lang.String getMessage(int which)
Law
getMessage in interface Lawwhich - a number, as indexed by the MSG_* constants
Law.messages(),
Law.MSG_COPKILLER,
Law.MSG_TOTALpublic java.lang.String paroleMessages(int which)
Law
paroleMessages in interface Lawwhich - which of the 4 messages to return (0-3)
Law.paroleMessages()public int paroleTimes(int which)
Law
paroleTimes in interface Lawwhich - which of the four to return (0-3)
Law.paroleTimes()public java.lang.String jailMessages(int which)
Law
jailMessages in interface Lawwhich - which of the 4 messages to return (0-3)
Law.jailMessages()public int jailTimes(int which)
Law
jailTimes in interface Lawwhich - which of the four to return (0-3)
Law.jailTimes()public java.lang.String getInternalStr(java.lang.String msg)
Law
getInternalStr in interface Lawmsg - the name of the raw property to return
Law.initialize(LegalBehavior, Properties, boolean, boolean)public boolean isInternalStr(java.lang.String msg)
Law
isInternalStr in interface Lawmsg - the name of the raw property to look for
Law.initialize(LegalBehavior, Properties, boolean, boolean)
public void setInternalStr(java.lang.String tag,
java.lang.String value)
Law
setInternalStr in interface Lawtag - the name of the raw property to setvalue - the new value of the propertyLaw.initialize(LegalBehavior, Properties, boolean, boolean)public boolean lawIsActivated()
Law
lawIsActivated in interface Lawpublic void resetLaw()
Law
resetLaw in interface LawLaw.initialize(LegalBehavior, Properties, boolean, boolean)public java.lang.String rawLawString()
Law
rawLawString in interface Law
public LegalWarrant getWarrant(MOB criminal,
java.lang.String crime,
boolean pull,
boolean debugging)
public LegalWarrant getCopkiller(Area A,
LegalBehavior behav,
MOB mob)
Law
getCopkiller in interface LawA - the Legal Area governed by the Legal Behaviorbehav - the legal behavior governing the lawmob - the mob or player to inspect
LegalBehavior
public LegalWarrant getLawResister(Area A,
LegalBehavior behav,
MOB mob)
Law
getLawResister in interface LawA - the Legal Area governed by the Legal Behaviorbehav - the legal behavior governing the lawmob - the mob or player to inspect
LegalBehavior
public LegalWarrant getWarrant(MOB mob,
int which)
Law
getWarrant in interface Lawmob - the mob to get a warrant forwhich - the iteration number (from 0)
LegalWarrant,
Law.warrants()
public LegalWarrant getOldWarrant(MOB criminal,
java.lang.String crime,
boolean pull)
Law
getOldWarrant in interface Lawcriminal - the old criminalcrime - the old crime ID (from taxlaw, basiclaw, or other)pull - true to remove the old warrant from the list, false no
LegalWarrant,
Law.oldWarrants()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||