|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PostOffice
A PostOffice is a kind of shopkeeper that belongs to a "chain" which shares access to a common store of post office boxes to hold items for players. Post officers simulate delivery by transferring the items given to them into the appropriate boxes. Players must then go to a post office in the same chain to retrieve items delivered to them. Post offices can serve an entire clan, or a single player. They can handle several different types of charges, including COD.
Nested Class Summary | |
---|---|
static class |
PostOffice.MailPiece
Represents a complete mail package/letter, postal object. |
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper |
---|
ShopKeeper.ShopPrice |
Field Summary |
---|
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper |
---|
DEAL_ALCHEMIST, DEAL_ANYTECHNOLOGY, DEAL_ANYTHING, DEAL_ARMOR, DEAL_AUCTIONEER, DEAL_BANKER, DEAL_BOOKS, DEAL_BUTCHER, DEAL_CASTER, DEAL_CLANBANKER, DEAL_CLANDSELLER, DEAL_CLANPOSTMAN, DEAL_CONFLICTS, DEAL_CSHIPSELLER, DEAL_DESCS, DEAL_FOODSELLER, DEAL_GENERAL, DEAL_GROWER, DEAL_HIDESELLER, DEAL_INNKEEPER, DEAL_INSTRUMENTS, DEAL_INVENTORYONLY, DEAL_JEWELLER, DEAL_LANDSELLER, DEAL_LEATHER, DEAL_LUMBERER, DEAL_MAGIC, DEAL_METALSMITH, DEAL_PETS, DEAL_POSTMAN, DEAL_READABLES, DEAL_SHIPSELLER, DEAL_SLAVES, DEAL_STONEYARDER, DEAL_TRAINER, DEAL_WEAPONS |
Method Summary | |
---|---|
void |
addToBox(java.lang.String boxName,
Item thisThang,
java.lang.String from,
java.lang.String to,
long holdTime,
double COD)
Low level method to add an item directly to a postal box. |
void |
createBoxHere(java.lang.String boxName,
java.lang.String forward)
Creates a new post office box for the given player or clan name, with the given forwarding address. |
void |
deleteBoxHere(java.lang.String boxName)
Removes the given post office box for the given player or clan name. |
boolean |
delFromBox(java.lang.String boxName,
Item thisThang)
Low level method to remove an item from a postal box |
void |
emptyBox(java.lang.String boxName)
Removes all items from the given post office box |
double |
feeForNewBox()
Gets the fee to open a new postal box at this branch. |
Item |
findBoxContents(java.lang.String boxName,
java.lang.String likeThis)
Searches the given postal box for an item with the given name, or one with the given string as a substring. |
java.lang.String |
findProperBranch(java.lang.String name)
Returns the proper branch of this postal chain to which to deliver packages belonging to the given mob or clan name. |
java.util.Map<java.lang.String,java.lang.String> |
getOurOpenBoxes(java.lang.String boxName)
Returns a mapping of postal branches in this chain to forwarding addresses, for the given postal box. |
java.lang.String |
getSenderName(MOB mob,
Clan.Function func,
boolean checked)
When the given mob tries to send or withdraw a package, this method is called to get the proper FROM address, which is either the mob themselves or their clan, if they are (optionally) permitted by their rank. |
double |
holdFeePerPound()
Gets the fee charged per pound per mud month to hold a package in a postal box at this branch. |
int |
maxMudMonthsHeld()
Returns the maximum number of mud-months that a package will be held before it gets put on sale at this branch. |
double |
minimumPostage()
Gets the minimum postage to send a package from this branch. |
PostOffice.MailPiece |
parsePostalItemData(java.lang.String data)
Parses an postal package entry, which is formatted as item xml preceded by various semicolon-delimited numbers and data. |
double |
postagePerPound()
Gets the postage charged per pound after the first, to send packages from this branch. |
java.lang.String |
postalBranch()
Returns the branch of the postal chain that this specific postoffice employee belongs to. |
java.lang.String |
postalChain()
Returns the postal chain, a string shared by all post offices that deal with the same postal boxes and customers, able to send mail to each other. |
void |
setFeeForNewBox(double d)
Sets the fee to open a new postal box at this branch. |
void |
setHoldFeePerPound(double d)
Sets the fee charged per pound per mud month to hold a package in a postal box at this branch. |
void |
setMaxMudMonthsHeld(int months)
Sets the maximum number of mud-months that a package will be held before it gets put on sale at this branch. |
void |
setMinimumPostage(double d)
Sets the minimum postage to send a package from this branch. |
void |
setPostagePerPound(double d)
Sets the postage charged per pound after the first, to send packages from this branch. |
void |
setPostalChain(java.lang.String name)
Sets the postal chain, a string shared by all post offices that deal with the same postal boxes and customers, able to send mail to each other. |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper |
---|
addSoldType, doISellThis, getShop, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setWhatIsSoldMask, setWhatIsSoldZappermask, storeKeeperString |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Economics |
---|
budget, devalueRate, finalBudget, finalDevalueRate, finalIgnoreMask, finalInvResetRate, finalItemPricingAdjustments, finalPrejudiceFactors, ignoreMask, invResetRate, itemPricingAdjustments, prejudiceFactors, setBudget, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental |
---|
description, displayText, expirationDate, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setExpirationDate, setImage, setMiscText, setName, text |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
---|
getTickStatus, name, tick |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.StatsAffecting |
---|
affectCharState, affectCharStats, affectPhyStats |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.MsgListener |
---|
executeMsg, okMessage |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Contingent |
---|
amDestroyed, destroy, isSavable, setSavable |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
---|
copyOf, ID, initializeClass, newInstance |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable |
---|
getSaveStatIndex, getStat, getStatCodes, isStat, setStat |
Method Detail |
---|
java.lang.String getSenderName(MOB mob, Clan.Function func, boolean checked)
mob
- the mob who is trying to send the packagefunc
- either Clan.Function.WITHDRAW or Clan.FUNCTION.DEPOSITchecked
- true if the mob must have clan privileges, false if not.
Clan.Function
void addToBox(java.lang.String boxName, Item thisThang, java.lang.String from, java.lang.String to, long holdTime, double COD)
boxName
- the box name, such as a player or clan namethisThang
- the item to add to the postal boxfrom
- player or clan the item is fromto
- player or clan the item is toholdTime
- when the package was sent, real time, in millisecondsCOD
- the amount of money which must be paid to withdraw the itemdelFromBox(String, Item)
,
emptyBox(String)
boolean delFromBox(java.lang.String boxName, Item thisThang)
boxName
- the box name, such as a player or clan namethisThang
- the item to remove from the postal box
addToBox(String, Item, String, String, long, double)
,
emptyBox(String)
void emptyBox(java.lang.String boxName)
boxName
- the box name, such as a player or clan nameaddToBox(String, Item, String, String, long, double)
,
delFromBox(String, Item)
Item findBoxContents(java.lang.String boxName, java.lang.String likeThis)
boxName
- the player or clan name of the postal boxlikeThis
- the search string for the item name
java.util.Map<java.lang.String,java.lang.String> getOurOpenBoxes(java.lang.String boxName)
boxName
- the player or clan name of the box
deleteBoxHere(String)
,
createBoxHere(String, String)
void createBoxHere(java.lang.String boxName, java.lang.String forward)
boxName
- the player or clan name of the new boxforward
- the player or clan name of the forwardingdeleteBoxHere(String)
,
getOurOpenBoxes(String)
void deleteBoxHere(java.lang.String boxName)
boxName
- the player or clan name of the new boxcreateBoxHere(String, String)
,
getOurOpenBoxes(String)
PostOffice.MailPiece parsePostalItemData(java.lang.String data)
data
- the postal package formatted string
PostOffice.MailPiece
java.lang.String postalChain()
setPostalChain(String)
void setPostalChain(java.lang.String name)
name
- the name of the postal chainpostalChain()
java.lang.String postalBranch()
findProperBranch(String)
java.lang.String findProperBranch(java.lang.String name)
name
- the player or clan name receiving the package
postalBranch()
double minimumPostage()
setMinimumPostage(double)
void setMinimumPostage(double d)
d
- the minimum postage to send a package from this branch.minimumPostage()
double postagePerPound()
setPostagePerPound(double)
void setPostagePerPound(double d)
d
- the postage charged per pound after the firstpostagePerPound()
double holdFeePerPound()
setHoldFeePerPound(double)
void setHoldFeePerPound(double d)
d
- the fee charged per pound per mud monthholdFeePerPound()
double feeForNewBox()
setFeeForNewBox(double)
void setFeeForNewBox(double d)
d
- the fee to open a new postal box at this branch.feeForNewBox()
int maxMudMonthsHeld()
setMaxMudMonthsHeld(int)
void setMaxMudMonthsHeld(int months)
months
- the maximum number of mud-months to holdsetMaxMudMonthsHeld(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |