com.planet_ink.coffee_mud.MOBS.interfaces
Interface Librarian

All Superinterfaces:
java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Economics, Environmental, Modifiable, MsgListener, ShopKeeper, StatsAffecting, Tickable
All Known Implementing Classes:
GenLibrarian, StdLibrarian

public interface Librarian
extends ShopKeeper

A Librarian is a kind of shopkeeper that belongs to a "chain" which shares access to a common store of shop items. Players can go to a librarian in a chain to borrow items available to the chain. Librarians respond to new commands such as DEPOSIT and WITHDRAW that normal shopkeepers do not. Borrowed items not re-deposited within the proper amount of time are auto-returned, and the borrower charged a penalty. Since they lend and retrieve any item in the shop inventory, they do not have a shopkeeper type, but respect whatever type they are.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
ShopKeeper.ShopPrice
 
Field Summary
static int DEFAULT_MAX_BORROWED
          The default maximum number of items that one person can have checked out at any given time.
static int DEFAULT_MAX_OVERDUE_DAYS
          The default maximum number of mud-days that an item can be checked out.
static double DEFAULT_MIN_OVERDUE_CHARGE
          The daily minimum base currency charge due the moment a withdrawn item becomes overdue.
static double DEFAULT_MIN_OVERDUE_DAILY
          The default daily base currency charge due every day a withdrawn item remains overdue.
static int DEFAULT_MIN_OVERDUE_DAYS
          The default number of mud-days that an item can be checked out before being overdue.
static double DEFAULT_PCT_OVERDUE_CHARGE
          The default percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due the moment a withdrawn item becomes overdue.
static double DEFAULT_PCT_OVERDUE_DAILY
          The default percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due every day that a withdrawn item remains overdue.
 
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
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, 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_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 java.lang.String contributorMask()
          Returns the mask used to determine if a contributor is ignored by the Librarian for contribution.
 CoffeeShop getBaseLibrary()
          Returns the underlying basic book stock of the library, as opposed to the current shop, which reflects only what is there at the moment.
 double getDailyOverdueCharge()
          Gets the daily base currency charge due every day a withdrawn item remains overdue.
 double getDailyOverdueChargePct()
          Gets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due every day that a withdrawn item remains overdue.
 int getMaxBorrowed()
          Gets the maximum number of items that one person can have checked out at any given time.
 int getMaxOverdueDays()
          Gets the maximum number of mud-days that an item can be checked out.
 int getMinOverdueDays()
          Gets the number of mud-days that an item can be checked out before being overdue.
 double getOverdueCharge()
          Gets the minimum base currency charge due the moment a withdrawn item becomes overdue.
 double getOverdueChargePct()
          Gets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due the moment a withdrawn item becomes overdue.
 java.lang.String libraryChain()
          Gets the name of the library chain to which this librarian belongs.
 void setContributorMask(java.lang.String mask)
          Sets the mask used to determine if a contributor is ignored by the Librarian for contribution.
 void setDailyOverdueCharge(double charge)
          Sets the daily base currency charge due every day a withdrawn item remains overdue.
 void setDailyOverdueChargePct(double pct)
          Sets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due every day that a withdrawn item remains overdue.
 void setLibraryChain(java.lang.String name)
          Sets the name of the library chain to which this librarian belongs.
 void setMaxBorrowed(int items)
          Sets the maximum number of items that one person can have checked out at any given time.
 void setMaxOverdueDays(int days)
          Sets the maximum number of mud-days that an item can be checked out.
 void setMinOverdueDays(int days)
          Sets the number of mud-days that an item can be checked out before being overdue.
 void setOverdueCharge(double charge)
          Sets the minimum base currency charge due the moment a withdrawn item becomes overdue.
 void setOverdueChargePct(double pct)
          Sets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due the moment a withdrawn item becomes overdue.
 
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
 

Field Detail

DEFAULT_MIN_OVERDUE_CHARGE

static final double DEFAULT_MIN_OVERDUE_CHARGE
The daily minimum base currency charge due the moment a withdrawn item becomes overdue.

See Also:
Constant Field Values

DEFAULT_PCT_OVERDUE_CHARGE

static final double DEFAULT_PCT_OVERDUE_CHARGE
The default percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due the moment a withdrawn item becomes overdue.

See Also:
Constant Field Values

DEFAULT_MIN_OVERDUE_DAILY

static final double DEFAULT_MIN_OVERDUE_DAILY
The default daily base currency charge due every day a withdrawn item remains overdue.

See Also:
Constant Field Values

DEFAULT_PCT_OVERDUE_DAILY

static final double DEFAULT_PCT_OVERDUE_DAILY
The default percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due every day that a withdrawn item remains overdue.

See Also:
Constant Field Values

DEFAULT_MIN_OVERDUE_DAYS

static final int DEFAULT_MIN_OVERDUE_DAYS
The default number of mud-days that an item can be checked out before being overdue. After this number of days, the item is considered overdue and charges begin accruing.

See Also:
Constant Field Values

DEFAULT_MAX_OVERDUE_DAYS

static final int DEFAULT_MAX_OVERDUE_DAYS
The default maximum number of mud-days that an item can be checked out. After this number of days, the item is automatically returned to the librarian, and the charges made.

See Also:
Constant Field Values

DEFAULT_MAX_BORROWED

static final int DEFAULT_MAX_BORROWED
The default maximum number of items that one person can have checked out at any given time.

See Also:
Constant Field Values
Method Detail

getOverdueCharge

double getOverdueCharge()
Gets the minimum base currency charge due the moment a withdrawn item becomes overdue.

Returns:
the base charge
See Also:
setOverdueCharge(double)

setOverdueCharge

void setOverdueCharge(double charge)
Sets the minimum base currency charge due the moment a withdrawn item becomes overdue.

Parameters:
charge - the base charge
See Also:
setOverdueCharge(double)

getDailyOverdueCharge

double getDailyOverdueCharge()
Gets the daily base currency charge due every day a withdrawn item remains overdue.

Returns:
the daily charge from 0-1
See Also:
setDailyOverdueCharge(double)

setDailyOverdueCharge

void setDailyOverdueCharge(double charge)
Sets the daily base currency charge due every day a withdrawn item remains overdue. Value 0-1.

Parameters:
charge - the daily charge from 0-1
See Also:
setDailyOverdueCharge(double)

getOverdueChargePct

double getOverdueChargePct()
Gets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due the moment a withdrawn item becomes overdue.

Returns:
the base charge as pct of item value from 0-1
See Also:
setOverdueChargePct(double)

setOverdueChargePct

void setOverdueChargePct(double pct)
Sets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due the moment a withdrawn item becomes overdue.

Parameters:
pct - the base charge as pct of item value from 0-1
See Also:
setOverdueChargePct(double)

getDailyOverdueChargePct

double getDailyOverdueChargePct()
Gets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due every day that a withdrawn item remains overdue.

Returns:
the base charge as pct of item value from 0-1
See Also:
setDailyOverdueChargePct(double)

setDailyOverdueChargePct

void setDailyOverdueChargePct(double pct)
Sets the percent from 0 to 1, of the value of a withdrawn item, in base currency charge, due every day that a withdrawn item remains overdue.

Parameters:
pct - the base charge as pct of item value from 0-1
See Also:
setDailyOverdueChargePct(double)

getMinOverdueDays

int getMinOverdueDays()
Gets the number of mud-days that an item can be checked out before being overdue. After this number of days, the item is considered overdue and charges begin accruing.

Returns:
mud-days before its overdue
See Also:
setMinOverdueDays(int), getMaxOverdueDays(), setMaxOverdueDays(int)

setMinOverdueDays

void setMinOverdueDays(int days)
Sets the number of mud-days that an item can be checked out before being overdue. After this number of days, the item is considered overdue and charges begin accruing.

Parameters:
days - mud-days before its overdue
See Also:
getMinOverdueDays(), getMaxOverdueDays(), setMaxOverdueDays(int)

getMaxOverdueDays

int getMaxOverdueDays()
Gets the maximum number of mud-days that an item can be checked out. After this number of days, the item is automatically returned to the librarian, and the charges made.

Returns:
mud-days to be overdue
See Also:
setMaxOverdueDays(int), getMinOverdueDays(), setMinOverdueDays(int)

setMaxOverdueDays

void setMaxOverdueDays(int days)
Sets the maximum number of mud-days that an item can be checked out. After this number of days, the item is automatically returned to the librarian, and the charges made.

Parameters:
days - mud-days to be overdue
See Also:
getMaxOverdueDays(), getMinOverdueDays(), setMinOverdueDays(int)

getMaxBorrowed

int getMaxBorrowed()
Gets the maximum number of items that one person can have checked out at any given time.

Returns:
number of items
See Also:
setMaxBorrowed(int)

setMaxBorrowed

void setMaxBorrowed(int items)
Sets the maximum number of items that one person can have checked out at any given time.

Parameters:
items - number of items
See Also:
getMaxBorrowed()

libraryChain

java.lang.String libraryChain()
Gets the name of the library chain to which this librarian belongs.

Returns:
the library chain name
See Also:
setLibraryChain(String)

setLibraryChain

void setLibraryChain(java.lang.String name)
Sets the name of the library chain to which this librarian belongs.

Parameters:
name - the library chain name
See Also:
libraryChain()

contributorMask

java.lang.String contributorMask()
Returns the mask used to determine if a contributor is ignored by the Librarian for contribution.

Returns:
the mask used
See Also:
MaskingLibrary, Librarian#finalContributorMask(), setContributorMask(String)

setContributorMask

void setContributorMask(java.lang.String mask)
Sets the mask used to determine if a contributor is ignored by the Librarian for contribution.

Parameters:
mask - the mask to use
See Also:
MaskingLibrary, Librarian#finalContributorMask(), contributorMask()

getBaseLibrary

CoffeeShop getBaseLibrary()
Returns the underlying basic book stock of the library, as opposed to the current shop, which reflects only what is there at the moment.