CMObject
, Tickable
, CMLibrary
, MoneyLibrary
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class BeanCounter extends StdLibrary implements MoneyLibrary
MoneyLibrary.DebtItem, MoneyLibrary.MoneyDefinition, MoneyLibrary.MoneyDenomination
Modifier and Type | Field | Description |
---|---|---|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
allCurrencyDenominationNames |
|
java.util.List<java.lang.String> |
allCurrencyNames |
|
java.lang.String |
copperStandard |
|
java.lang.String |
creditStandard |
|
java.util.Map<java.lang.String,MoneyLibrary.MoneyDefinition> |
currencies |
|
static java.util.Map<java.lang.String,MoneyLibrary.MoneyDefinition> |
defaultCurrencies |
|
java.lang.String |
defaultCurrency |
|
java.lang.String |
dollarStandard |
|
java.lang.String |
goldStandard |
|
java.lang.String |
victoryStandard |
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 |
---|---|
BeanCounter() |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
abbreviatedPrice(MOB shopkeeper,
double absoluteAmount) |
Given a mob to get a currency from and a total money value, this
will return a very brief representation of the money in a single
denomination of the currency that best matches.
|
java.lang.String |
abbreviatedPrice(java.lang.String currency,
double absoluteAmount) |
Given a currency and a total money value, this will return a very
brief representation of the money in a single denomination of the
currency that best matches.
|
double |
abbreviatedRePrice(MOB shopkeeper,
double absoluteAmount) |
Given a mob to get a currency from and a total money value, this
will return final value of the given value after finding a single
denomination of the currency that best matches.
|
double |
abbreviatedRePrice(java.lang.String currency,
double absoluteAmount) |
Given a currency and a total money value, this will return the
final value of the given value after finding a single denomination
of the currency that best matches.
|
void |
addMoney(ItemCollection IP,
double deltaValue) |
Adds the given amount of money to the given holders items in their native currency.
|
void |
addMoney(ItemCollection IP,
int deltaValue) |
Adds the given amount of money to the given holders items in their native currency.
|
void |
addMoney(ItemCollection IP,
Container container,
java.lang.String currency,
double deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items,
in the given container.
|
void |
addMoney(ItemCollection IP,
Container container,
java.lang.String currency,
int deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items,
in the given container.
|
void |
addMoney(ItemCollection IP,
java.lang.String currency,
double deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items.
|
void |
addMoney(ItemCollection IP,
java.lang.String currency,
int deltaValue) |
Adds the given amount of money, in the given currency, to the given holders items.
|
void |
addToBankLedger(java.lang.String bankName,
java.lang.String owner,
java.lang.String explanation) |
Adds a new record to the bank account ledger, which is an accounting of deposits
and withdrawls.
|
void |
adjustDebt(java.lang.String name,
java.lang.String owedTo,
double adjustAmt,
java.lang.String reason,
double interest,
long due) |
Adds or alters a debt record between the given debtor,
and lender.
|
void |
clearInventoryMoney(MOB mob,
java.lang.String currency) |
Removes all item money from the given mob, of
the given currency.
|
void |
clearZeroMoney(MOB mob,
java.lang.String currency) |
Removes all money from the given mob, item and
npc numeric of the given currency.
|
MoneyLibrary.MoneyDefinition |
createCurrencySet(java.lang.String currency) |
Creates and registers a new currency definition.
|
protected MoneyLibrary.MoneyDefinition |
createCurrencySet(java.util.Map<java.lang.String,MoneyLibrary.MoneyDefinition> currencies,
java.lang.String currency) |
|
void |
delAllDebt(java.lang.String name,
java.lang.String owedTo) |
Deletes a particular debt record.
|
void |
dropMoney(Room R,
Container container,
java.lang.String currency,
double absoluteValue) |
Adds the amount of money items to the given room, in the given container, of the
given currency, and the given total absolute value.
|
java.util.List<java.lang.String> |
getAllCurrencies() |
Returns the list of all known currency names.
|
java.util.Set<java.lang.String> |
getBankAccountChains(java.lang.String owner) |
Returns the set of all bank chains that have accounts for the
given bank account owner.
|
Pair<java.lang.String,java.lang.Double> |
getBankBalance(java.lang.String bankName,
java.lang.String owner,
java.lang.String optionalCurrency) |
For the given bank chain and given bank account owner name, and optionally a
currency, this will return the found currency and bank balance.
|
java.lang.String |
getBankChainCurrency(java.lang.String bankChain) |
Given a bank chain, which may deal in many currencies due to having
branches in many areas, this method will return the chains most
popular currency.
|
double |
getBestDenomination(java.lang.String currency,
double absoluteValue) |
Given a currency and a total money value in that currency, this will return
the denomination which will most evenly divide into the given value.
|
double |
getBestDenomination(java.lang.String currency,
int numberOfCoins,
double absoluteValue) |
Given a currency, a total money value, and a number of currency coins, this
will find the denomination that is closest to the total money value in that
given number of coins
|
double[] |
getBestDenominations(java.lang.String currency,
double absoluteValue) |
Given a currency and a total money value in that currency, this will return
the denominations whose combination will produce the total value evenly.
|
java.lang.String |
getConvertableDescription(java.lang.String currency,
double denomination) |
Given a currency, returns the string "Equal to" followed by the conversion
of the given duration into the lowest denomination in the currency.
|
java.lang.String |
getCurrency(CMObject E) |
Returns the currency code/name most applicable to the given object.
|
MoneyLibrary.MoneyDefinition |
getCurrencySet(java.lang.String currency) |
Returns the official MoneyDefinition object for the
given currency.
|
java.util.List<MoneyLibrary.DebtItem> |
getDebt(java.lang.String name) |
Returns all debt records owed by the given debtor.
|
java.util.List<MoneyLibrary.DebtItem> |
getDebt(java.lang.String name,
java.lang.String owedTo) |
Returns all debt records between the given debtor and
the given lender.
|
java.util.List<MoneyLibrary.DebtItem> |
getDebtOwed(java.lang.String owedTo) |
Returns all debt records owed to the given lender.
|
double |
getDebtOwed(java.lang.String name,
java.lang.String owedTo) |
Returns total debt amount owed between the given debtor and
the given lender.
|
MoneyLibrary.MoneyDenomination |
getDenomination(java.lang.String currency,
java.lang.String name) |
Returns the denomination of the given currency and given
abbreviation or name.
|
int |
getDenominationIndex(java.lang.String currency,
double value) |
Returns the ordinal index of the given denomination value in the
given currency definitions list of denominations.
|
java.lang.String |
getDenominationName(MOB mob,
double denomination) |
Returns the name of the denomination that matches the given mobs
currency, and the given denomination value
|
java.lang.String |
getDenominationName(java.lang.String currency) |
Returns the name of the lowest denomination in the given currency.
|
java.lang.String |
getDenominationName(java.lang.String currency,
double denomination) |
Returns the name of the denomination that matches the given
currency and the given denomination value.
|
java.lang.String |
getDenominationName(java.lang.String currency,
double denomination,
long number) |
Returns the amount and name of the denomination that matches the given
currency and the given denomination value, in the given amount.
|
java.util.List<java.lang.String> |
getDenominationNameSet(java.lang.String currency) |
Returns the names of all the denominations in the given currency.
|
java.lang.String |
getDenominationShortCode(java.lang.String currency,
double denomination) |
Given a currency and a denomination value, this will return the short
code/char of the denomination.
|
double |
getLowestDenomination(java.lang.String currency) |
Returns the value of the lowest denomination in the given
currency.
|
int |
getMoney(MOB mob) |
If the given mob/room is an npc with native parameter-value
money set, this will return that value.
|
java.util.List<Coins> |
getMoneyItems(ItemCollection IP,
Item container,
java.lang.String currency) |
Scans the given mob/room and returns any money items in the given
currency and given container.
|
java.util.List<Coins> |
getMoneyItems(ItemCollection IP,
java.lang.String currency) |
/**
Scans the given mob and returns any money items in the given
currency and NOT in a container.
|
long |
getNumberOfCoins(MOB mob,
java.lang.String currency,
double denomination) |
Returns the number of coins that the given mob has in the given currency
and the given denomination.
|
double |
getTotalAbsoluteNativeValue(MOB mob) |
Returns the accumulated total value of the money on the given
mob, in that mobs native currency.
|
double |
getTotalAbsoluteShopKeepersValue(MOB mob,
MOB shopkeeper) |
Returns the accumulated total value of the money on the given
mob, in the given shopkeepers native currency.
|
double |
getTotalAbsoluteValue(ItemCollection IP,
Item container,
java.lang.String currency) |
Returns the accumulated total value of the money of the given
currency, in the given container, on the given mob/room.
|
double |
getTotalAbsoluteValue(ItemCollection IP,
java.lang.String currency) |
Returns the accumulated total value of the money of the given
currency, on the given mob/room.
|
double |
getTotalAbsoluteValueAllCurrencies(ItemCollection IP) |
Returns the accumulated total value of the money on the given
holder, counting all currencies.
|
void |
giveSomeoneMoney(MOB recipient,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in their native currency from themselves.
|
void |
giveSomeoneMoney(MOB banker,
MOB customer,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in the banker's currency from the given banker/giver.
|
void |
giveSomeoneMoney(MOB banker,
MOB customer,
java.lang.String currency,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in the given currency from the given banker/giver.
|
void |
giveSomeoneMoney(MOB recipient,
java.lang.String currency,
double absoluteValue) |
Generates a visible message of the given recipient receiving the given amount
of money in the given currency from themselves.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isCurrencyMatch(java.lang.String curr1,
java.lang.String curr2) |
Because a currency code could include an entire definition, or maybe
just the name/code itself, this method exists to resolve those
differences and compare just the codes
|
double |
lowestAbbreviatedDenomination(java.lang.String currency) |
Returns the lowest denomination in the given currency that
has an abbreviation char/code.
|
double |
lowestAbbreviatedDenomination(java.lang.String currency,
double absoluteAmount) |
Given a currency type and an absolute value, this will return the lowest
denomination that best divides into the given absolute amount AND which
has a abbreviation char/code.
|
java.util.List<Coins> |
makeAllCurrency(java.lang.String currency,
double absoluteValue) |
This great workhorse generates the individual denomination coins necessary
to properly represent the given absolute value in the given currency.
|
Coins |
makeBestCurrency(MOB mob,
double absoluteValue) |
Given a mob to derive a currency from, this will find the denomination
in that currency which is capable to generating a stack of money closest
to the given value.
|
Coins |
makeBestCurrency(MOB mob,
double absoluteValue,
ItemCollection owner,
Container container) |
Given a mob to derive a currency from, this will find the denomination
in that currency which is capable to generating a stack of money closest
to the given value.
|
Coins |
makeBestCurrency(java.lang.String currency,
double absoluteValue) |
Given a currency type, this will find the denomination in that currency which
is capable to generating a stack of money closest to the given value.
|
Coins |
makeBestCurrency(java.lang.String currency,
double absoluteValue,
ItemCollection owner,
Container container) |
Given a currency type, this will find the denomination in that currency which
is capable to generating a stack of money closest to the given value.
|
Coins |
makeCurrency(java.lang.String currency,
double denomination,
long numberOfCoins) |
Generates an individual currency item of the given type, denomination, and
number, as an item stack of currency item.
|
boolean |
modifyBankGold(java.lang.String bankName,
java.lang.String owner,
java.lang.String explanation,
java.lang.String currency,
double deltaAmount) |
Modifies the amount of money in the bank account of the given
account name owner and the given bank name.
|
boolean |
modifyLocalBankGold(Area A,
java.lang.String owner,
java.lang.String explanation,
double deltaAmount) |
Starting with the given area, and proceeding to parent areas,
this will attempt to alter the amount of money in any bank chains
account associated with the given account name owner.
|
boolean |
modifyThisAreaBankGold(Area A,
java.util.Set<java.lang.String> triedBanks,
java.lang.String owner,
java.lang.String explanation,
double deltaAmount) |
Loops through all bank chains in the given area and attempts to
find an account for the given account name owner and modify the
amount of money in the bank account.
|
java.lang.String |
nameCurrencyLong(MOB mob,
double absoluteValue) |
Given a mob whose currency to use, this will split the given
amount of value into denominations of that currency and
return a string with the number and denoms, comma delimited,
necessary to produce the value.
|
java.lang.String |
nameCurrencyLong(MOB mob,
int absoluteValue) |
Given a mob whose currency to use, this will split the given
amount of value into denominations of that currency and
return a string with the number and denoms, comma delimited,
necessary to produce the value.
|
java.lang.String |
nameCurrencyLong(java.lang.String currency,
double absoluteValue) |
Given a currency, this will split the given amount of value into
denominations and return a string with the number and denoms,
comma delimited, necessary to produce the value.
|
java.lang.String |
nameCurrencyShort(MOB mob,
double absoluteValue) |
Given a mob to get a currency, this will determine the denomination in
that currency closest to the given total value, and return a string
denoting that denomination and the amount, in x.xx form, of that
denomination.
|
java.lang.String |
nameCurrencyShort(MOB mob,
int absoluteValue) |
Given a mob to get a currency, this will determine the denomination in
that currency closest to the given total value, and return a string
denoting that denomination and the amount, in x.xx form, of that
denomination.
|
java.lang.String |
nameCurrencyShort(java.lang.String currency,
double absoluteValue) |
Given a particular currency, this will determine the denomination in
that currency closest to the given total value, and return a string
denoting that denomination and the amount, in x.xx form, of that
denomination.
|
protected void |
parseDebt(java.util.List<MoneyLibrary.DebtItem> debt,
java.lang.String debtor,
java.lang.String xml) |
|
boolean |
putCoinsBack(Coins C,
ItemCollection coll) |
When a Coins item is dropped into a new collection,
this method will seek out a similar denominated pile
and update it, thus destroying the given coins, and
return true, otherwise it does nothing and returns false.
|
void |
removeMoney(Room R,
Container container,
java.lang.String currency,
double absoluteValue) |
Removes the amount of money items from the given room, in the given container, of the
given currency, and the given total absolute value.
|
void |
setMoney(MOB mob,
double absoluteAmount) |
Sets the total amount of money the given mob has in their native
currency to the given absolute value.
|
void |
setMoney(MOB mob,
int amount) |
Called only on npcs saved to the database, and primarily for legacy
use, this method destroys any money items and sets the npc money
property to the given absolute value.
|
void |
setMoney(MOB mob,
java.lang.String currency,
double absoluteAmount) |
Sets the total amount of money the given mob has in the given
currency to the given absolute value.
|
void |
subtractMoney(ItemCollection IP,
double positiveDeltaAmount) |
Removes the given total amount of money from the given mob/room.
|
void |
subtractMoney(ItemCollection IP,
double denomination,
double deltaAmount) |
Removes the given total amount of money from the given IP, in their native
currency and the given denomination of that currency.
|
void |
subtractMoney(ItemCollection IP,
Container container,
java.lang.String currency,
double positiveDeltaAmount) |
Removes the given total amount of money from the given IP, in the given
currency and the given container of that currency.
|
void |
subtractMoney(ItemCollection IP,
java.lang.String currency,
double positiveDeltaAmount) |
Removes the given total amount of money from the given IP, in the given
currency.
|
void |
subtractMoney(ItemCollection IP,
java.lang.String currency,
double denomination,
double deltaAmount) |
Removes the given total amount of money from the given IP, in the given
currency and the given denomination of that currency.
|
void |
subtractMoneyGiveChange(MOB banker,
MOB mob,
double positiveDeltaAmount) |
This strange method takes away all the money from the given mob, of the bankers
native currency, and then has the given banker hand money back to the mob equal
to the total money minus the given amount.
|
void |
subtractMoneyGiveChange(MOB banker,
MOB mob,
int positiveDeltaAmount) |
This strange method takes away all the money from the given mob, of the bankers
native currency, and then has the given banker hand money back to the mob equal
to the total money minus the given amount.
|
void |
subtractMoneyGiveChange(MOB banker,
MOB mob,
java.lang.String currency,
double positiveDeltaAmount) |
This strange method takes away all the money from the given mob, of the given
currency, and then has the given banker hand money back to the mob equal to the
total money minus the given amount.
|
void |
unloadCurrencySet(java.lang.String currency) |
Unregisters the given currency
|
protected java.lang.String |
unparseDebt(java.util.List<MoneyLibrary.DebtItem> debt,
java.lang.String name,
java.lang.String owedTo) |
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 static java.util.Map<java.lang.String,MoneyLibrary.MoneyDefinition> defaultCurrencies
public java.util.Map<java.lang.String,MoneyLibrary.MoneyDefinition> currencies
public java.util.List<java.lang.String> allCurrencyNames
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> allCurrencyDenominationNames
public final java.lang.String defaultCurrency
public final java.lang.String goldStandard
public final java.lang.String copperStandard
public final java.lang.String creditStandard
public final java.lang.String dollarStandard
public final java.lang.String victoryStandard
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
public void unloadCurrencySet(java.lang.String currency)
MoneyLibrary
unloadCurrencySet
in interface MoneyLibrary
currency
- the currency to killpublic MoneyLibrary.MoneyDefinition createCurrencySet(java.lang.String currency)
MoneyLibrary
createCurrencySet
in interface MoneyLibrary
currency
- the encoded currency definitionprotected MoneyLibrary.MoneyDefinition createCurrencySet(java.util.Map<java.lang.String,MoneyLibrary.MoneyDefinition> currencies, java.lang.String currency)
public int getDenominationIndex(java.lang.String currency, double value)
MoneyLibrary
getDenominationIndex
in interface MoneyLibrary
currency
- the currency to usevalue
- the denomination valuepublic MoneyLibrary.MoneyDefinition getCurrencySet(java.lang.String currency)
MoneyLibrary
getCurrencySet
in interface MoneyLibrary
currency
- the currencypublic java.util.List<java.lang.String> getAllCurrencies()
MoneyLibrary
getAllCurrencies
in interface MoneyLibrary
public java.util.List<java.lang.String> getDenominationNameSet(java.lang.String currency)
MoneyLibrary
getDenominationNameSet
in interface MoneyLibrary
currency
- the currency to get denominations forpublic double lowestAbbreviatedDenomination(java.lang.String currency)
MoneyLibrary
lowestAbbreviatedDenomination
in interface MoneyLibrary
currency
- the currency to find a denomination forMoneyLibrary.lowestAbbreviatedDenomination(String, double)
,
MoneyLibrary.getLowestDenomination(String)
public MoneyLibrary.MoneyDenomination getDenomination(java.lang.String currency, java.lang.String name)
MoneyLibrary
getDenomination
in interface MoneyLibrary
currency
- the currencyname
- the abbreviation or namepublic double lowestAbbreviatedDenomination(java.lang.String currency, double absoluteAmount)
MoneyLibrary
lowestAbbreviatedDenomination
in interface MoneyLibrary
currency
- the currency typeabsoluteAmount
- the total amount to divide intoMoneyLibrary.lowestAbbreviatedDenomination(String)
,
MoneyLibrary.getLowestDenomination(String)
,
MoneyLibrary.getDenominationName(String)
public double abbreviatedRePrice(MOB shopkeeper, double absoluteAmount)
MoneyLibrary
abbreviatedRePrice
in interface MoneyLibrary
shopkeeper
- the mob to get a currency from to useabsoluteAmount
- the total amount of value to useMoneyLibrary.lowestAbbreviatedDenomination(String, double)
,
MoneyLibrary.abbreviatedPrice(MOB, double)
,
MoneyLibrary.abbreviatedPrice(String, double)
,
MoneyLibrary.abbreviatedRePrice(MOB, double)
,
MoneyLibrary.abbreviatedRePrice(String, double)
public double abbreviatedRePrice(java.lang.String currency, double absoluteAmount)
MoneyLibrary
abbreviatedRePrice
in interface MoneyLibrary
currency
- the currency to useabsoluteAmount
- the total amount of value to useMoneyLibrary.lowestAbbreviatedDenomination(String, double)
,
MoneyLibrary.abbreviatedPrice(MOB, double)
,
MoneyLibrary.abbreviatedPrice(String, double)
,
MoneyLibrary.abbreviatedRePrice(MOB, double)
,
MoneyLibrary.abbreviatedRePrice(String, double)
public java.lang.String abbreviatedPrice(MOB shopkeeper, double absoluteAmount)
MoneyLibrary
abbreviatedPrice
in interface MoneyLibrary
shopkeeper
- the mob to get a currency from to useabsoluteAmount
- the total amount of value to nameMoneyLibrary.lowestAbbreviatedDenomination(String, double)
,
MoneyLibrary.abbreviatedPrice(MOB, double)
,
MoneyLibrary.abbreviatedPrice(String, double)
,
MoneyLibrary.abbreviatedRePrice(MOB, double)
,
MoneyLibrary.abbreviatedRePrice(String, double)
public java.lang.String abbreviatedPrice(java.lang.String currency, double absoluteAmount)
MoneyLibrary
abbreviatedPrice
in interface MoneyLibrary
currency
- the currency to useabsoluteAmount
- the total amount of value to nameMoneyLibrary.lowestAbbreviatedDenomination(String, double)
,
MoneyLibrary.abbreviatedPrice(MOB, double)
,
MoneyLibrary.abbreviatedPrice(String, double)
,
MoneyLibrary.abbreviatedRePrice(MOB, double)
,
MoneyLibrary.abbreviatedRePrice(String, double)
public java.lang.String getDenominationShortCode(java.lang.String currency, double denomination)
MoneyLibrary
getDenominationShortCode
in interface MoneyLibrary
currency
- the currency to usedenomination
- the denomination valueMoneyLibrary.getDenominationName(String, double)
public double getLowestDenomination(java.lang.String currency)
MoneyLibrary
getLowestDenomination
in interface MoneyLibrary
currency
- the currency to useMoneyLibrary.lowestAbbreviatedDenomination(String, double)
,
MoneyLibrary.lowestAbbreviatedDenomination(String)
public java.lang.String getDenominationName(java.lang.String currency)
MoneyLibrary
getDenominationName
in interface MoneyLibrary
currency
- the currency to useMoneyLibrary.getDenominationName(String, double, long)
,
MoneyLibrary.getDenominationName(String, double)
,
MoneyLibrary.getDenominationName(MOB, double)
,
MoneyLibrary.getLowestDenomination(String)
public java.lang.String getDenominationName(java.lang.String currency, double denomination, long number)
MoneyLibrary
getDenominationName
in interface MoneyLibrary
currency
- the currency type to usedenomination
- the denomination value to matchnumber
- the amount of the denomination to nameMoneyLibrary.getDenominationName(String)
,
MoneyLibrary.getDenominationName(String, double)
,
MoneyLibrary.getDenominationName(MOB, double)
public double getBestDenomination(java.lang.String currency, double absoluteValue)
MoneyLibrary
getBestDenomination
in interface MoneyLibrary
currency
- the currency to get denominations fromabsoluteValue
- the total value to parse outMoneyLibrary.getBestDenomination(String, int, double)
,
MoneyLibrary.getBestDenominations(String, double)
public double getBestDenomination(java.lang.String currency, int numberOfCoins, double absoluteValue)
MoneyLibrary
getBestDenomination
in interface MoneyLibrary
currency
- the currency to usenumberOfCoins
- the number of coins that MUST be usedabsoluteValue
- the total value to get cloest toMoneyLibrary.getBestDenomination(String, double)
,
MoneyLibrary.getBestDenominations(String, double)
public double[] getBestDenominations(java.lang.String currency, double absoluteValue)
MoneyLibrary
getBestDenominations
in interface MoneyLibrary
currency
- the currency to get denominations fromabsoluteValue
- the total value to parse outMoneyLibrary.getBestDenomination(String, double)
,
MoneyLibrary.getBestDenomination(String, int, double)
public java.lang.String getConvertableDescription(java.lang.String currency, double denomination)
MoneyLibrary
getConvertableDescription
in interface MoneyLibrary
currency
- the currency to get a conversion fordenomination
- the denomination to get a conversion to lowest forpublic java.lang.String getDenominationName(MOB mob, double denomination)
MoneyLibrary
getDenominationName
in interface MoneyLibrary
mob
- the mob to get a currency fromdenomination
- the denomination value to matchMoneyLibrary.getDenominationName(String)
,
MoneyLibrary.getDenominationName(String, double, long)
,
MoneyLibrary.getDenominationName(String, double)
public java.lang.String getDenominationName(java.lang.String currency, double denomination)
MoneyLibrary
getDenominationName
in interface MoneyLibrary
currency
- the currency type to usedenomination
- the denomination value to matchMoneyLibrary.getDenominationName(String)
,
MoneyLibrary.getDenominationName(String, double, long)
,
MoneyLibrary.getDenominationName(MOB, double)
,
MoneyLibrary.getDenominationShortCode(String, double)
public java.lang.String nameCurrencyShort(MOB mob, double absoluteValue)
MoneyLibrary
nameCurrencyShort
in interface MoneyLibrary
mob
- the mob from whom to get a currency to useabsoluteValue
- the total value to showMoneyLibrary.nameCurrencyLong(String, double)
,
MoneyLibrary.nameCurrencyShort(String, double)
,
MoneyLibrary.nameCurrencyShort(MOB, int)
public java.lang.String nameCurrencyShort(MOB mob, int absoluteValue)
MoneyLibrary
nameCurrencyShort
in interface MoneyLibrary
mob
- the mob from which to get the currency to useabsoluteValue
- the total value to showMoneyLibrary.nameCurrencyLong(String, double)
,
MoneyLibrary.nameCurrencyShort(String, double)
,
MoneyLibrary.nameCurrencyShort(MOB, double)
public java.lang.String nameCurrencyShort(java.lang.String currency, double absoluteValue)
MoneyLibrary
nameCurrencyShort
in interface MoneyLibrary
currency
- the currency to useabsoluteValue
- the total value to showMoneyLibrary.nameCurrencyLong(String, double)
,
MoneyLibrary.nameCurrencyShort(MOB, double)
,
MoneyLibrary.nameCurrencyShort(MOB, int)
public java.lang.String nameCurrencyLong(MOB mob, double absoluteValue)
MoneyLibrary
nameCurrencyLong
in interface MoneyLibrary
mob
- the mob whose currency to useabsoluteValue
- the total value of the moneyMoneyLibrary.nameCurrencyLong(MOB, int)
,
MoneyLibrary.nameCurrencyLong(String, double)
,
MoneyLibrary.nameCurrencyShort(String, double)
public java.lang.String nameCurrencyLong(MOB mob, int absoluteValue)
MoneyLibrary
nameCurrencyLong
in interface MoneyLibrary
mob
- the mob whose currency to useabsoluteValue
- the total value of the moneyMoneyLibrary.nameCurrencyLong(MOB, double)
,
MoneyLibrary.nameCurrencyLong(String, double)
,
MoneyLibrary.nameCurrencyShort(String, double)
public java.lang.String nameCurrencyLong(java.lang.String currency, double absoluteValue)
MoneyLibrary
nameCurrencyLong
in interface MoneyLibrary
currency
- the currency to useabsoluteValue
- the total value of the moneyMoneyLibrary.nameCurrencyLong(MOB, double)
,
MoneyLibrary.nameCurrencyLong(MOB, int)
,
MoneyLibrary.nameCurrencyShort(String, double)
public Coins makeBestCurrency(MOB mob, double absoluteValue, ItemCollection owner, Container container)
MoneyLibrary
makeBestCurrency
in interface MoneyLibrary
mob
- the mob from whom to get a currency to useabsoluteValue
- the amount to approximateowner
- the new owner of the returned itemcontainer
- the container to put the item inMoneyLibrary.makeBestCurrency(MOB, double)
,
MoneyLibrary.makeBestCurrency(String, double)
,
MoneyLibrary.makeBestCurrency(String, double, ItemCollection, Container)
,
MoneyLibrary.makeAllCurrency(String, double)
,
MoneyLibrary.makeCurrency(String, double, long)
public Coins makeBestCurrency(java.lang.String currency, double absoluteValue, ItemCollection owner, Container container)
MoneyLibrary
makeBestCurrency
in interface MoneyLibrary
currency
- the currency to useabsoluteValue
- the amount to approximateowner
- the new owner of the returned itemcontainer
- the container to put the item inMoneyLibrary.makeBestCurrency(MOB, double)
,
MoneyLibrary.makeBestCurrency(String, double)
,
MoneyLibrary.makeBestCurrency(MOB, double, ItemCollection, Container)
,
MoneyLibrary.makeAllCurrency(String, double)
,
MoneyLibrary.makeCurrency(String, double, long)
protected void parseDebt(java.util.List<MoneyLibrary.DebtItem> debt, java.lang.String debtor, java.lang.String xml)
protected java.lang.String unparseDebt(java.util.List<MoneyLibrary.DebtItem> debt, java.lang.String name, java.lang.String owedTo)
public double getDebtOwed(java.lang.String name, java.lang.String owedTo)
MoneyLibrary
getDebtOwed
in interface MoneyLibrary
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chainMoneyLibrary.getDebt(String)
,
MoneyLibrary.getDebt(String, String)
,
MoneyLibrary.getDebtOwed(String)
,
MoneyLibrary.adjustDebt(String, String, double, String, double, long)
,
MoneyLibrary.delAllDebt(String, String)
public void delAllDebt(java.lang.String name, java.lang.String owedTo)
MoneyLibrary
delAllDebt
in interface MoneyLibrary
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chainMoneyLibrary.getDebt(String)
,
MoneyLibrary.getDebt(String, String)
,
MoneyLibrary.getDebtOwed(String)
,
MoneyLibrary.getDebtOwed(String, String)
,
MoneyLibrary.adjustDebt(String, String, double, String, double, long)
public java.util.List<MoneyLibrary.DebtItem> getDebtOwed(java.lang.String owedTo)
MoneyLibrary
getDebtOwed
in interface MoneyLibrary
owedTo
- the money lender, usually a bank chainMoneyLibrary.DebtItem
,
MoneyLibrary.getDebt(String)
,
MoneyLibrary.getDebt(String, String)
,
MoneyLibrary.getDebtOwed(String, String)
,
MoneyLibrary.adjustDebt(String, String, double, String, double, long)
,
MoneyLibrary.delAllDebt(String, String)
public void adjustDebt(java.lang.String name, java.lang.String owedTo, double adjustAmt, java.lang.String reason, double interest, long due)
MoneyLibrary
adjustDebt
in interface MoneyLibrary
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chainadjustAmt
- the amount to add/remove to the debtreason
- the short debt description, like "Bank Loan"interest
- the interest rate to charge on new loans/mudmonthdue
- the real life due datestamp in millisecondsMoneyLibrary.getDebt(String)
,
MoneyLibrary.getDebt(String, String)
,
MoneyLibrary.getDebtOwed(String)
,
MoneyLibrary.getDebtOwed(String, String)
,
MoneyLibrary.delAllDebt(String, String)
public java.util.List<MoneyLibrary.DebtItem> getDebt(java.lang.String name, java.lang.String owedTo)
MoneyLibrary
getDebt
in interface MoneyLibrary
name
- the debtor, usually a player nameowedTo
- the money lender, usually a bank chainMoneyLibrary.DebtItem
,
MoneyLibrary.getDebt(String)
,
MoneyLibrary.getDebtOwed(String, String)
,
MoneyLibrary.getDebtOwed(String)
,
MoneyLibrary.adjustDebt(String, String, double, String, double, long)
,
MoneyLibrary.delAllDebt(String, String)
public java.util.List<MoneyLibrary.DebtItem> getDebt(java.lang.String name)
MoneyLibrary
getDebt
in interface MoneyLibrary
name
- the debtor, usually a player nameMoneyLibrary.DebtItem
,
MoneyLibrary.getDebt(String, String)
,
MoneyLibrary.getDebtOwed(String)
,
MoneyLibrary.getDebtOwed(String, String)
,
MoneyLibrary.adjustDebt(String, String, double, String, double, long)
,
MoneyLibrary.delAllDebt(String, String)
public Coins makeBestCurrency(MOB mob, double absoluteValue)
MoneyLibrary
makeBestCurrency
in interface MoneyLibrary
mob
- the mob to get the native currency fromabsoluteValue
- the amount to approximateMoneyLibrary.makeBestCurrency(String, double)
,
MoneyLibrary.makeBestCurrency(MOB, double, ItemCollection, Container)
,
MoneyLibrary.makeBestCurrency(String, double, ItemCollection, Container)
,
MoneyLibrary.makeAllCurrency(String, double)
,
MoneyLibrary.makeCurrency(String, double, long)
public Coins makeCurrency(java.lang.String currency, double denomination, long numberOfCoins)
MoneyLibrary
makeCurrency
in interface MoneyLibrary
currency
- the currency of the moneydenomination
- the denomination of that moneynumberOfCoins
- the number of coins of that denomination in the stackMoneyLibrary.makeAllCurrency(String, double)
,
MoneyLibrary.makeBestCurrency(String, double)
public Coins makeBestCurrency(java.lang.String currency, double absoluteValue)
MoneyLibrary
makeBestCurrency
in interface MoneyLibrary
currency
- the currency to useabsoluteValue
- the amount to approximateMoneyLibrary.makeBestCurrency(MOB, double)
,
MoneyLibrary.makeBestCurrency(MOB, double, ItemCollection, Container)
,
MoneyLibrary.makeBestCurrency(String, double, ItemCollection, Container)
,
MoneyLibrary.makeAllCurrency(String, double)
,
MoneyLibrary.makeCurrency(String, double, long)
public java.util.List<Coins> makeAllCurrency(java.lang.String currency, double absoluteValue)
MoneyLibrary
makeAllCurrency
in interface MoneyLibrary
currency
- the currency to make the money inabsoluteValue
- the absolute value of all the money to make combinedMoneyLibrary.makeCurrency(String, double, long)
,
MoneyLibrary.makeBestCurrency(String, double)
public void addMoney(ItemCollection IP, int deltaValue)
MoneyLibrary
addMoney
in interface MoneyLibrary
IP
- the holder to have more moneydeltaValue
- the amount of total value to addMoneyLibrary.addMoney(ItemCollection, double)
,
MoneyLibrary.addMoney(ItemCollection, String, double)
,
MoneyLibrary.addMoney(ItemCollection, String, int)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, int)
public void addMoney(ItemCollection IP, double deltaValue)
MoneyLibrary
addMoney
in interface MoneyLibrary
IP
- the mob to have more moneydeltaValue
- the amount of total value to addMoneyLibrary.addMoney(ItemCollection, int)
,
MoneyLibrary.addMoney(ItemCollection, String, double)
,
MoneyLibrary.addMoney(ItemCollection, String, int)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, int)
public void addMoney(ItemCollection IP, java.lang.String currency, int deltaValue)
MoneyLibrary
addMoney
in interface MoneyLibrary
IP
- the mob to have more moneycurrency
- the currency of the money to makedeltaValue
- the amount of total value to addMoneyLibrary.addMoney(ItemCollection, double)
,
MoneyLibrary.addMoney(ItemCollection, int)
,
MoneyLibrary.addMoney(ItemCollection, String, double)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, int)
public void addMoney(ItemCollection IP, Container container, java.lang.String currency, int deltaValue)
MoneyLibrary
addMoney
in interface MoneyLibrary
IP
- the mob to have more moneycontainer
- null, or the container to put the money incurrency
- the currency of the money to makedeltaValue
- the amount of total value to addMoneyLibrary.addMoney(ItemCollection, double)
,
MoneyLibrary.addMoney(ItemCollection, int)
,
MoneyLibrary.addMoney(ItemCollection, String, double)
,
MoneyLibrary.addMoney(ItemCollection, String, int)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, double)
public void addMoney(ItemCollection IP, java.lang.String currency, double deltaValue)
MoneyLibrary
addMoney
in interface MoneyLibrary
IP
- the mob to have more moneycurrency
- the currency of the money to makedeltaValue
- the amount of total value to addMoneyLibrary.addMoney(ItemCollection, double)
,
MoneyLibrary.addMoney(ItemCollection, int)
,
MoneyLibrary.addMoney(ItemCollection, String, int)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, int)
public void addMoney(ItemCollection IP, Container container, java.lang.String currency, double deltaValue)
MoneyLibrary
addMoney
in interface MoneyLibrary
IP
- the mob to have more moneycontainer
- null, or the container to put the money incurrency
- the currency of the money to makedeltaValue
- the amount of total value to addMoneyLibrary.addMoney(ItemCollection, double)
,
MoneyLibrary.addMoney(ItemCollection, int)
,
MoneyLibrary.addMoney(ItemCollection, String, double)
,
MoneyLibrary.addMoney(ItemCollection, String, int)
,
MoneyLibrary.addMoney(ItemCollection, Container, String, int)
public void giveSomeoneMoney(MOB recipient, double absoluteValue)
MoneyLibrary
giveSomeoneMoney
in interface MoneyLibrary
recipient
- the recipient of the moneyabsoluteValue
- the absolute amount of the money to giveMoneyLibrary.giveSomeoneMoney(MOB, MOB, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, String, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, MOB, String, double)
public void giveSomeoneMoney(MOB recipient, java.lang.String currency, double absoluteValue)
MoneyLibrary
giveSomeoneMoney
in interface MoneyLibrary
recipient
- the recipient of the moneycurrency
- the currency the money is inabsoluteValue
- the absolute amount of the money to giveMoneyLibrary.giveSomeoneMoney(MOB, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, MOB, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, MOB, String, double)
public void giveSomeoneMoney(MOB banker, MOB customer, double absoluteValue)
MoneyLibrary
giveSomeoneMoney
in interface MoneyLibrary
banker
- the giver of the moneycustomer
- the recipient of the moneyabsoluteValue
- the absolute amount of the money to giveMoneyLibrary.giveSomeoneMoney(MOB, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, String, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, MOB, String, double)
public boolean putCoinsBack(Coins C, ItemCollection coll)
MoneyLibrary
putCoinsBack
in interface MoneyLibrary
C
- the coins already droppedcoll
- the collection that might have a duppublic void giveSomeoneMoney(MOB banker, MOB customer, java.lang.String currency, double absoluteValue)
MoneyLibrary
giveSomeoneMoney
in interface MoneyLibrary
banker
- the giver of the moneycustomer
- the recipient of the moneycurrency
- the currency the money is inabsoluteValue
- the absolute amount of the money to giveMoneyLibrary.giveSomeoneMoney(MOB, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, MOB, double)
,
MoneyLibrary.giveSomeoneMoney(MOB, String, double)
public void dropMoney(Room R, Container container, java.lang.String currency, double absoluteValue)
MoneyLibrary
dropMoney
in interface MoneyLibrary
R
- the room to add value tocontainer
- null, or the container the money must be put incurrency
- the currency of the value to addabsoluteValue
- the total value of the currency items to addMoneyLibrary.removeMoney(Room, Container, String, double)
public void removeMoney(Room R, Container container, java.lang.String currency, double absoluteValue)
MoneyLibrary
removeMoney
in interface MoneyLibrary
R
- the room to remove value fromcontainer
- null, or the container the money must be incurrency
- null, or the currency of the value to removeabsoluteValue
- the total value of the currency items to removeMoneyLibrary.dropMoney(Room, Container, String, double)
public void addToBankLedger(java.lang.String bankName, java.lang.String owner, java.lang.String explanation)
MoneyLibrary
addToBankLedger
in interface MoneyLibrary
bankName
- the bank chain nameowner
- the account owner name (a player usually)explanation
- a brief explanation of what happenedMoneyLibrary.getBankAccountChains(String)
,
MoneyLibrary.getBankBalance(String, String, String)
,
MoneyLibrary.modifyBankGold(String, String, String, String, double)
,
MoneyLibrary.modifyThisAreaBankGold(Area, Set, String, String, double)
,
MoneyLibrary.modifyLocalBankGold(Area, String, String, double)
,
MoneyLibrary.getBankChainCurrency(String)
public java.util.Set<java.lang.String> getBankAccountChains(java.lang.String owner)
MoneyLibrary
getBankAccountChains
in interface MoneyLibrary
owner
- the bank account owner, typically a playerMoneyLibrary.addToBankLedger(String, String, String)
,
MoneyLibrary.getBankBalance(String, String, String)
,
MoneyLibrary.modifyBankGold(String, String, String, String, double)
,
MoneyLibrary.modifyThisAreaBankGold(Area, Set, String, String, double)
,
MoneyLibrary.modifyLocalBankGold(Area, String, String, double)
,
MoneyLibrary.getBankChainCurrency(String)
public Pair<java.lang.String,java.lang.Double> getBankBalance(java.lang.String bankName, java.lang.String owner, java.lang.String optionalCurrency)
MoneyLibrary
getBankBalance
in interface MoneyLibrary
bankName
- the bank chain nameowner
- the account owner name (usually a player)optionalCurrency
- null, or a currency to ensure is returnedMoneyLibrary.addToBankLedger(String, String, String)
,
MoneyLibrary.getBankAccountChains(String)
,
MoneyLibrary.modifyBankGold(String, String, String, String, double)
,
MoneyLibrary.modifyThisAreaBankGold(Area, Set, String, String, double)
,
MoneyLibrary.modifyLocalBankGold(Area, String, String, double)
,
MoneyLibrary.getBankChainCurrency(String)
public boolean modifyBankGold(java.lang.String bankName, java.lang.String owner, java.lang.String explanation, java.lang.String currency, double deltaAmount)
MoneyLibrary
modifyBankGold
in interface MoneyLibrary
bankName
- the name of the bank chainowner
- the account name (player) to alter money inexplanation
- the reason for the change, for the ledgercurrency
- the currency to usedeltaAmount
- an amount to change local money byMoneyLibrary.addToBankLedger(String, String, String)
,
MoneyLibrary.getBankAccountChains(String)
,
MoneyLibrary.getBankBalance(String, String, String)
,
MoneyLibrary.modifyThisAreaBankGold(Area, Set, String, String, double)
,
MoneyLibrary.modifyLocalBankGold(Area, String, String, double)
,
MoneyLibrary.getBankChainCurrency(String)
public boolean modifyThisAreaBankGold(Area A, java.util.Set<java.lang.String> triedBanks, java.lang.String owner, java.lang.String explanation, double deltaAmount)
MoneyLibrary
modifyThisAreaBankGold
in interface MoneyLibrary
A
- null or the area to find chains intriedBanks
- set of bank chains already tried (don't try again)owner
- the account name (player) to alter money inexplanation
- the reason for the change, for the ledgerdeltaAmount
- an amount to change local money byMoneyLibrary.addToBankLedger(String, String, String)
,
MoneyLibrary.getBankAccountChains(String)
,
MoneyLibrary.getBankBalance(String, String, String)
,
MoneyLibrary.modifyBankGold(String, String, String, String, double)
,
MoneyLibrary.modifyLocalBankGold(Area, String, String, double)
,
MoneyLibrary.getBankChainCurrency(String)
public boolean modifyLocalBankGold(Area A, java.lang.String owner, java.lang.String explanation, double deltaAmount)
MoneyLibrary
modifyLocalBankGold
in interface MoneyLibrary
A
- the area to start finding chains inowner
- the account name (player) to alter money inexplanation
- the reason for the change, for the ledgerdeltaAmount
- an amount to change local money byMoneyLibrary.addToBankLedger(String, String, String)
,
MoneyLibrary.getBankAccountChains(String)
,
MoneyLibrary.getBankBalance(String, String, String)
,
MoneyLibrary.modifyBankGold(String, String, String, String, double)
,
MoneyLibrary.modifyThisAreaBankGold(Area, Set, String, String, double)
,
MoneyLibrary.getBankChainCurrency(String)
public void subtractMoneyGiveChange(MOB banker, MOB mob, int positiveDeltaAmount)
MoneyLibrary
subtractMoneyGiveChange
in interface MoneyLibrary
banker
- the banker who gives changemob
- the mob losing their money, but maybe getting some backpositiveDeltaAmount
- the amount to NOT give backMoneyLibrary.subtractMoneyGiveChange(MOB, MOB, int)
,
MoneyLibrary.subtractMoneyGiveChange(MOB, MOB, double)
,
MoneyLibrary.subtractMoneyGiveChange(MOB, MOB, String, double)
public void subtractMoneyGiveChange(MOB banker, MOB mob, double positiveDeltaAmount)
MoneyLibrary
subtractMoneyGiveChange
in interface MoneyLibrary
banker
- the banker who gives changemob
- the mob losing their money, but maybe getting some backpositiveDeltaAmount
- the amount to NOT give backMoneyLibrary.subtractMoneyGiveChange(MOB, MOB, int)
,
MoneyLibrary.subtractMoneyGiveChange(MOB, MOB, double)
,
MoneyLibrary.subtractMoneyGiveChange(MOB, MOB, String, double)
public void subtractMoneyGiveChange(MOB banker, MOB mob, java.lang.String currency, double positiveDeltaAmount)
MoneyLibrary
subtractMoneyGiveChange
in interface MoneyLibrary
banker
- the banker who gives changemob
- the mob losing their money, but maybe getting some backcurrency
- the currency of the money to losepositiveDeltaAmount
- the amount to NOT give backMoneyLibrary.subtractMoneyGiveChange(MOB, MOB, int)
,
MoneyLibrary.subtractMoneyGiveChange(MOB, MOB, double)
,
MoneyLibrary.subtractMoneyGiveChange(MOB, MOB, String, double)
public void setMoney(MOB mob, double absoluteAmount)
MoneyLibrary
setMoney
in interface MoneyLibrary
mob
- the mob to have their money setabsoluteAmount
- the amount for the mob to haveMoneyLibrary.setMoney(MOB, int)
,
MoneyLibrary.setMoney(MOB, String, double)
public void setMoney(MOB mob, java.lang.String currency, double absoluteAmount)
MoneyLibrary
setMoney
in interface MoneyLibrary
mob
- the mob to have their money setcurrency
- the required currency to setabsoluteAmount
- the amount for the mob to haveMoneyLibrary.setMoney(MOB, double)
,
MoneyLibrary.setMoney(MOB, int)
public void subtractMoney(ItemCollection IP, double positiveDeltaAmount)
MoneyLibrary
subtractMoney
in interface MoneyLibrary
IP
- the mob/room/item holder losing moneypositiveDeltaAmount
- the total value to removeMoneyLibrary.subtractMoney(ItemCollection, double, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double, double)
public void subtractMoney(ItemCollection IP, java.lang.String currency, double positiveDeltaAmount)
MoneyLibrary
subtractMoney
in interface MoneyLibrary
IP
- the mob/room/item holder losing moneycurrency
- the type of currency to removepositiveDeltaAmount
- the total value to removeMoneyLibrary.subtractMoney(ItemCollection, double)
,
MoneyLibrary.subtractMoney(ItemCollection, double, double)
,
MoneyLibrary.subtractMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double, double)
public void subtractMoney(ItemCollection IP, Container container, java.lang.String currency, double positiveDeltaAmount)
MoneyLibrary
subtractMoney
in interface MoneyLibrary
IP
- the mob/room/item holder losing moneycontainer
- null, or the container with the money in itcurrency
- the type of currency to removepositiveDeltaAmount
- the total value to removeMoneyLibrary.subtractMoney(ItemCollection, double)
,
MoneyLibrary.subtractMoney(ItemCollection, double, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double, double)
public int getMoney(MOB mob)
MoneyLibrary
getMoney
in interface MoneyLibrary
mob
- the mob whose money to getpublic void setMoney(MOB mob, int amount)
MoneyLibrary
setMoney
in interface MoneyLibrary
mob
- the npc to have their money setamount
- the amount of their currency to set it toMoneyLibrary.setMoney(MOB, double)
,
MoneyLibrary.setMoney(MOB, String, double)
public void clearZeroMoney(MOB mob, java.lang.String currency)
MoneyLibrary
clearZeroMoney
in interface MoneyLibrary
mob
- the mob to make poorcurrency
- null, or the currency items to killMoneyLibrary.clearInventoryMoney(MOB, String)
public void clearInventoryMoney(MOB mob, java.lang.String currency)
MoneyLibrary
clearInventoryMoney
in interface MoneyLibrary
mob
- the mob to make poorcurrency
- null, or the currency to killMoneyLibrary.clearZeroMoney(MOB, String)
public void subtractMoney(ItemCollection IP, double denomination, double deltaAmount)
MoneyLibrary
subtractMoney
in interface MoneyLibrary
IP
- the mob/room/item holder losing moneydenomination
- the denomination of the currency to removedeltaAmount
- the total value to removeMoneyLibrary.subtractMoney(ItemCollection, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, Container, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double, double)
public void subtractMoney(ItemCollection IP, java.lang.String currency, double denomination, double deltaAmount)
MoneyLibrary
subtractMoney
in interface MoneyLibrary
IP
- the mob/room/item holder losing moneycurrency
- the type of currency to removedenomination
- the denomination of the currency to removedeltaAmount
- the total value to removeMoneyLibrary.subtractMoney(ItemCollection, double)
,
MoneyLibrary.subtractMoney(ItemCollection, double, double)
,
MoneyLibrary.subtractMoney(ItemCollection, String, double)
,
MoneyLibrary.subtractMoney(ItemCollection, Container, String, double)
public java.util.List<Coins> getMoneyItems(ItemCollection IP, java.lang.String currency)
MoneyLibrary
getMoneyItems
in interface MoneyLibrary
IP
- the mob/room to scancurrency
- null, or the currency the money must be inMoneyLibrary.getMoney(MOB)
,
MoneyLibrary.getMoneyItems(ItemCollection, Item, String)
public boolean isCurrencyMatch(java.lang.String curr1, java.lang.String curr2)
MoneyLibrary
isCurrencyMatch
in interface MoneyLibrary
curr1
- the first currency code or definitioncurr2
- the second currency code or definitionpublic java.util.List<Coins> getMoneyItems(ItemCollection IP, Item container, java.lang.String currency)
MoneyLibrary
getMoneyItems
in interface MoneyLibrary
IP
- the mob/room to scancontainer
- null, or the container the money must be incurrency
- null, or the currency the money must be inMoneyLibrary.getMoney(MOB)
,
MoneyLibrary.getMoneyItems(ItemCollection, String)
public long getNumberOfCoins(MOB mob, java.lang.String currency, double denomination)
MoneyLibrary
getNumberOfCoins
in interface MoneyLibrary
mob
- the mob to count the money ofcurrency
- null for all, or the currency of the money to countdenomination
- the denomination of the money to countpublic java.lang.String getCurrency(CMObject E)
MoneyLibrary
getCurrency
in interface MoneyLibrary
E
- the object to find a currency forpublic java.lang.String getBankChainCurrency(java.lang.String bankChain)
MoneyLibrary
getBankChainCurrency
in interface MoneyLibrary
bankChain
- the bank chain nameMoneyLibrary.addToBankLedger(String, String, String)
,
MoneyLibrary.getBankAccountChains(String)
,
MoneyLibrary.getBankBalance(String, String, String)
,
MoneyLibrary.modifyBankGold(String, String, String, String, double)
,
MoneyLibrary.modifyThisAreaBankGold(Area, Set, String, String, double)
,
MoneyLibrary.modifyLocalBankGold(Area, String, String, double)
public double getTotalAbsoluteValue(ItemCollection IP, java.lang.String currency)
MoneyLibrary
getTotalAbsoluteValue
in interface MoneyLibrary
IP
- the money holder to count the money ofcurrency
- null for all, or the current type to filter the money throughMoneyLibrary.getTotalAbsoluteNativeValue(MOB)
,
MoneyLibrary.getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, Item, String)
,
MoneyLibrary.getTotalAbsoluteValueAllCurrencies(ItemCollection)
public double getTotalAbsoluteValue(ItemCollection IP, Item container, java.lang.String currency)
MoneyLibrary
getTotalAbsoluteValue
in interface MoneyLibrary
IP
- the money holder to count the money ofcontainer
- null, or the container that the currency must be incurrency
- null for all, or the current type to filter the money throughMoneyLibrary.getTotalAbsoluteNativeValue(MOB)
,
MoneyLibrary.getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, String)
,
MoneyLibrary.getTotalAbsoluteValueAllCurrencies(ItemCollection)
public double getTotalAbsoluteNativeValue(MOB mob)
MoneyLibrary
getTotalAbsoluteNativeValue
in interface MoneyLibrary
mob
- the mob to count the money ofMoneyLibrary.getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, String)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, Item, String)
,
MoneyLibrary.getTotalAbsoluteValueAllCurrencies(ItemCollection)
public double getTotalAbsoluteShopKeepersValue(MOB mob, MOB shopkeeper)
MoneyLibrary
getTotalAbsoluteShopKeepersValue
in interface MoneyLibrary
mob
- the mob to count the money ofshopkeeper
- the shopkeeper to get the currency type fromMoneyLibrary.getTotalAbsoluteNativeValue(MOB)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, String)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, Item, String)
,
MoneyLibrary.getTotalAbsoluteValueAllCurrencies(ItemCollection)
public double getTotalAbsoluteValueAllCurrencies(ItemCollection IP)
MoneyLibrary
getTotalAbsoluteValueAllCurrencies
in interface MoneyLibrary
IP
- the holder to count the money ofMoneyLibrary.getTotalAbsoluteNativeValue(MOB)
,
MoneyLibrary.getTotalAbsoluteShopKeepersValue(MOB, MOB)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, String)
,
MoneyLibrary.getTotalAbsoluteValue(ItemCollection, Item, String)