com.planet_ink.coffee_mud.MOBS
Class StdLibrarian

java.lang.Object
  extended by com.planet_ink.coffee_mud.MOBS.StdMOB
      extended by com.planet_ink.coffee_mud.MOBS.StdShopKeeper
          extended by com.planet_ink.coffee_mud.MOBS.StdLibrarian
All Implemented Interfaces:
AbilityContainer, Affectable, Behavable, CMObject, Combatant, Contingent, DBIdentifiable, Economics, Environmental, FactionMember, Followable<MOB>, ItemCollection, ItemPossessor, Modifiable, MsgListener, MUDCmdProcessor, Physical, PhysicalAgent, Rider, ShopKeeper, StatsAffecting, Tattooable, Tickable, Librarian, MOB, java.lang.Cloneable, java.lang.Comparable<CMObject>
Direct Known Subclasses:
GenLibrarian

public class StdLibrarian
extends StdShopKeeper
implements Librarian


Nested Class Summary
static class StdLibrarian.CheckedOutRecord
           
 
Nested classes/interfaces inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
StdMOB.ApplyAffectCharState<T extends StatsAffecting>, StdMOB.ApplyAffectCharStats<T extends StatsAffecting>, StdMOB.ApplyRecAffectPhyStats<T extends StatsAffecting>
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
ShopKeeper.ShopPrice
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
MOB.Attrib
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.core.interfaces.ItemPossessor
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.Move
 
Field Summary
protected  java.lang.String contributorMask
           
protected  CoffeeShop curShop
           
protected  double dailyOverdueCharge
           
protected  double dailyOverdueChargePct
           
protected  long lastShopTime
           
protected  int maxBorrowedItems
           
protected  int maxOverdueDays
           
protected  int minOverdueDays
           
protected  double overdueCharge
           
protected  double overdueChargePct
           
protected  boolean shopApply
           
 
Fields inherited from class com.planet_ink.coffee_mud.MOBS.StdShopKeeper
budget, budgetMax, budgetRemaining, budgetTickDown, devalueRate, invResetRate, invResetTickDown, itemZapperMask, pricingAdjustments, shop, whatIsSoldMask
 
Fields inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
abilitys, abilityUseCache, abilityUseTrig, affectCharState, affectCharStats, affectPhyStats, affects, ageMinutes, amDead, amDestroyed, amFollowing, atRange, attributesBitmap, baseCharStats, basePhyStats, baseState, behaviors, cachedImageName, charStats, clanAffects, clans, CODES, commandQue, curState, databaseID, description, displayText, experience, expertises, factions, followers, inventory, kickFlag, lastLocation, liegeID, location, maxState, me, miscText, money, moneyVariation, mySession, peaceTime, phyStats, playerStats, possHeldItem, possStartRoom, possWieldedItem, practices, questPoint, racialAffects, rawImageName, recoverAffectP, recoverTickCter, removeFromGame, riding, scripts, soulMate, tattoos, tickAgeCounter, tickStatus, trains, username, victim, wimpHitPoint, worshipCharID, xtraValues
 
Fields inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.Librarian
DEFAULT_MAX_BORROWED, DEFAULT_MAX_OVERDUE_DAYS, DEFAULT_MIN_OVERDUE_CHARGE, DEFAULT_MIN_OVERDUE_DAILY, DEFAULT_MIN_OVERDUE_DAYS, DEFAULT_PCT_OVERDUE_CHARGE, DEFAULT_PCT_OVERDUE_DAILY
 
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
 
Fields inherited from interface com.planet_ink.coffee_mud.MOBS.interfaces.MOB
AGE_MILLIS_THRESHOLD, END_SHEATH_TIME, START_SHEATH_TIME
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.MUDCmdProcessor
METAFLAG_AS, METAFLAG_ASMESSAGE, METAFLAG_FORCED, METAFLAG_INORDER, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_SNOOPED
 
Constructor Summary
StdLibrarian()
           
 
Method Summary
 void autoGive(MOB src, MOB tgt, Item I)
           
protected  void cloneFix(MOB E)
           
 java.lang.String contributorMask()
          Returns the mask used to determine if a contributor is ignored by the Librarian for contribution.
 void destroy()
          Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java.
protected  void doInventoryReset()
           
 void executeMsg(Environmental myHost, CMMsg msg)
          The general message event handler for the object.
 java.util.List<StdLibrarian.CheckedOutRecord> getAllMyRecords(java.lang.String name)
           
 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.
protected  java.util.List<StdLibrarian.CheckedOutRecord> getCheckedOutRecords()
           
 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.
 java.util.List<StdLibrarian.CheckedOutRecord> getItemRecords(java.lang.String itemName)
           
protected  java.lang.String getLibraryRecordKey()
           
protected  java.lang.String getLibraryShopKey()
           
 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.
protected  TimeClock getMyClock()
           
 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.
 StdLibrarian.CheckedOutRecord getRecord(java.lang.String playerName, java.lang.String itemName)
           
protected  long[] getRecordChangeIndexes()
           
 CoffeeShop getShop()
          the CoffeeShop method to access the shopkeepers store of goods
protected  double getTotalOverdueCharges(java.lang.String name)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 java.lang.String libraryChain()
          Gets the name of the library chain to which this librarian belongs.
 boolean okMessage(Environmental myHost, CMMsg msg)
          The general message event previewer for the object.
protected  boolean processCheckedOutRecord(StdLibrarian.CheckedOutRecord rec)
           
 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.
 boolean tick(Tickable ticking, int tickID)
          this is the method which is called periodically by the threading engine.
protected  void updateCheckedOutRecords()
           
 
Methods inherited from class com.planet_ink.coffee_mud.MOBS.StdShopKeeper
addSoldType, budget, devalueRate, doISellThis, finalBudget, finalDevalueRate, finalIgnoreMask, finalInvResetRate, finalItemPricingAdjustments, finalPrejudiceFactors, getStartArea, getWhatIsSoldMask, getWhatIsSoldZappermask, ignoreMask, invResetRate, isSold, itemPricingAdjustments, prejudiceFactors, setBudget, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors, setWhatIsSoldMask, setWhatIsSoldZappermask, storeKeeperString
 
Methods inherited from class com.planet_ink.coffee_mud.MOBS.StdMOB
abilities, actions, addAbility, addBehavior, addEffect, addExpertise, addFaction, addFollower, addItem, addItem, addNonUninvokableEffect, addPriorityEffect, addScript, addTattoo, addTattoo, addTattoo, adjustFaction, affectCharState, affectCharStats, affectPhyStats, allAbilities, amActive, amDead, amDestroyed, amFollowing, amUltimatelyFollowing, baseCharStats, basePhyStats, baseState, baseWeight, behaviors, bringToLife, bringToLife, calculateActionCost, canSaveDatabaseID, charStats, clanEffects, clans, clearCommandQueue, commandQueSize, compareTo, confirmLocation, copyFactions, copyOf, curState, databaseID, delAbility, delAllAbilities, delAllBehaviors, delAllEffects, delAllExpertises, delAllItems, delAllScripts, delBehavior, delEffect, delExpertise, delFollower, delItem, delScript, delTattoo, delTattoo, dequeCommand, description, description, displayText, displayText, dispossess, doCommand, doCommand, eachBehavior, eachEffect, eachItem, eachScript, effects, enqueCommand, enqueCommands, expertises, expirationDate, factions, fetchAbility, fetchAbility, fetchBehavior, fetchBehavior, fetchEffect, fetchEffect, fetchExpertise, fetchFaction, fetchFactionData, fetchFactionRanges, fetchFirstWornItem, fetchFollower, fetchFollower, fetchFollowerOrder, fetchFromInventory, fetchHeldItem, fetchItem, fetchRandomAbility, fetchScript, fetchWieldedItem, fetchWornItems, findAbility, findItem, findItem, findItems, findItems, findTattoo, findTattooStartsWith, fixChannelColors, flagVariableEq, followers, freeWearPositions, genericName, getAbilityUsageCache, getAgeMinutes, getAttributesBitmap, getClanRole, getCodeNum, getCombatant, getDirectionToTarget, getExperience, getExpNeededDelevel, getExpNeededLevel, getExpNextLevel, getExpPrevLevel, getFactionListing, getGroupMembers, getGroupMembersAndRideables, getItem, getLiegeID, getMoney, getMoneyVariation, getMyDeity, getNaturalWeapon, getPeaceTime, getPractices, getQuestPoint, getRandomItem, getRideBuddies, getSaveStatIndex, getStartRoom, getStat, getStatCodes, getTickStatus, getTrains, getVictim, getWearPositions, getWimpHitPoint, getWorshipCharID, hasFaction, hasOnlyGoldInInventory, healthText, image, initializeClass, isAttributeSet, isContent, isEitherOfUsDead, isFollowedBy, isGeneric, isInCombat, isMarriedToLiege, isMine, isMonster, isPermissableToFight, isPlayer, isPossessing, isRacialAbility, isSavable, isStat, items, killMeDead, L, lastTickedDateTime, location, makePeace, maxCarry, maxFollowers, maxItems, maxRange, maxState, mayIFight, mayPhysicallyAttack, minRange, miscTextFormat, moveItemTo, moveItemTo, name, Name, name, newInstance, numAbilities, numAllAbilities, numAllEffects, numBehaviors, numEffects, numFollowers, numItems, numScripts, personalEffects, phyStats, playerStats, prequeCommand, prequeCommands, racialEffects, rangeToTarget, rawImage, recoverCharStats, recoverMaxState, recoverPhyStats, removeFaction, removeFromGame, resetToMaxState, riding, sameAs, scripts, session, setActions, setAgeMinutes, setAttribute, setAttributesBitmap, setBaseCharStats, setBasePhyStats, setBaseState, setClan, setCombatant, setDatabaseID, setDescription, setDisplayText, setExperience, setExpirationDate, setFollowing, setImage, setLiegeID, setLocation, setMiscText, setMoney, setMoneyVariation, setName, setPlayerStats, setPractices, setQuestPoint, setRangeToTarget, setRiding, setSavable, setSession, setSoulMate, setStartRoom, setStat, setTrains, setVictim, setWimpHitPoint, setWorshipCharID, soulMate, tattoos, tell, tell, text, titledName, totalFollowers, willFollowOrdersOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.ShopKeeper
addSoldType, doISellThis, 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
 
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.Contingent
amDestroyed, isSavable, setSavable
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, 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

shopApply

protected volatile boolean shopApply

lastShopTime

protected volatile long lastShopTime

curShop

protected volatile CoffeeShop curShop

overdueCharge

protected double overdueCharge

overdueChargePct

protected double overdueChargePct

dailyOverdueCharge

protected double dailyOverdueCharge

dailyOverdueChargePct

protected double dailyOverdueChargePct

minOverdueDays

protected int minOverdueDays

maxOverdueDays

protected int maxOverdueDays

maxBorrowedItems

protected int maxBorrowedItems

contributorMask

protected java.lang.String contributorMask
Constructor Detail

StdLibrarian

public StdLibrarian()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdShopKeeper
Returns:
the name of this class

getLibraryRecordKey

protected java.lang.String getLibraryRecordKey()

getLibraryShopKey

protected java.lang.String getLibraryShopKey()

getCheckedOutRecords

protected java.util.List<StdLibrarian.CheckedOutRecord> getCheckedOutRecords()

getAllMyRecords

public java.util.List<StdLibrarian.CheckedOutRecord> getAllMyRecords(java.lang.String name)

getRecord

public StdLibrarian.CheckedOutRecord getRecord(java.lang.String playerName,
                                               java.lang.String itemName)

getItemRecords

public java.util.List<StdLibrarian.CheckedOutRecord> getItemRecords(java.lang.String itemName)

getTotalOverdueCharges

protected double getTotalOverdueCharges(java.lang.String name)

updateCheckedOutRecords

protected void updateCheckedOutRecords()

libraryChain

public java.lang.String libraryChain()
Description copied from interface: Librarian
Gets the name of the library chain to which this librarian belongs.

Specified by:
libraryChain in interface Librarian
Returns:
the library chain name
See Also:
Librarian.setLibraryChain(String)

setLibraryChain

public void setLibraryChain(java.lang.String name)
Description copied from interface: Librarian
Sets the name of the library chain to which this librarian belongs.

Specified by:
setLibraryChain in interface Librarian
Parameters:
name - the library chain name
See Also:
Librarian.libraryChain()

getOverdueCharge

public double getOverdueCharge()
Description copied from interface: Librarian
Gets the minimum base currency charge due the moment a withdrawn item becomes overdue.

Specified by:
getOverdueCharge in interface Librarian
Returns:
the base charge
See Also:
Librarian.setOverdueCharge(double)

setOverdueCharge

public void setOverdueCharge(double charge)
Description copied from interface: Librarian
Sets the minimum base currency charge due the moment a withdrawn item becomes overdue.

Specified by:
setOverdueCharge in interface Librarian
Parameters:
charge - the base charge
See Also:
Librarian.setOverdueCharge(double)

getDailyOverdueCharge

public double getDailyOverdueCharge()
Description copied from interface: Librarian
Gets the daily base currency charge due every day a withdrawn item remains overdue.

Specified by:
getDailyOverdueCharge in interface Librarian
Returns:
the daily charge from 0-1
See Also:
Librarian.setDailyOverdueCharge(double)

setDailyOverdueCharge

public void setDailyOverdueCharge(double charge)
Description copied from interface: Librarian
Sets the daily base currency charge due every day a withdrawn item remains overdue. Value 0-1.

Specified by:
setDailyOverdueCharge in interface Librarian
Parameters:
charge - the daily charge from 0-1
See Also:
Librarian.setDailyOverdueCharge(double)

getOverdueChargePct

public double getOverdueChargePct()
Description copied from interface: Librarian
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.

Specified by:
getOverdueChargePct in interface Librarian
Returns:
the base charge as pct of item value from 0-1
See Also:
Librarian.setOverdueChargePct(double)

setOverdueChargePct

public void setOverdueChargePct(double pct)
Description copied from interface: Librarian
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.

Specified by:
setOverdueChargePct in interface Librarian
Parameters:
pct - the base charge as pct of item value from 0-1
See Also:
Librarian.setOverdueChargePct(double)

getDailyOverdueChargePct

public double getDailyOverdueChargePct()
Description copied from interface: Librarian
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.

Specified by:
getDailyOverdueChargePct in interface Librarian
Returns:
the base charge as pct of item value from 0-1
See Also:
Librarian.setDailyOverdueChargePct(double)

setDailyOverdueChargePct

public void setDailyOverdueChargePct(double pct)
Description copied from interface: Librarian
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.

Specified by:
setDailyOverdueChargePct in interface Librarian
Parameters:
pct - the base charge as pct of item value from 0-1
See Also:
Librarian.setDailyOverdueChargePct(double)

getMinOverdueDays

public int getMinOverdueDays()
Description copied from interface: Librarian
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.

Specified by:
getMinOverdueDays in interface Librarian
Returns:
mud-days before its overdue
See Also:
Librarian.setMinOverdueDays(int), Librarian.getMaxOverdueDays(), Librarian.setMaxOverdueDays(int)

setMinOverdueDays

public void setMinOverdueDays(int days)
Description copied from interface: Librarian
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.

Specified by:
setMinOverdueDays in interface Librarian
Parameters:
days - mud-days before its overdue
See Also:
Librarian.getMinOverdueDays(), Librarian.getMaxOverdueDays(), Librarian.setMaxOverdueDays(int)

getMaxOverdueDays

public int getMaxOverdueDays()
Description copied from interface: Librarian
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.

Specified by:
getMaxOverdueDays in interface Librarian
Returns:
mud-days to be overdue
See Also:
Librarian.setMaxOverdueDays(int), Librarian.getMinOverdueDays(), Librarian.setMinOverdueDays(int)

setMaxOverdueDays

public void setMaxOverdueDays(int days)
Description copied from interface: Librarian
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.

Specified by:
setMaxOverdueDays in interface Librarian
Parameters:
days - mud-days to be overdue
See Also:
Librarian.getMaxOverdueDays(), Librarian.getMinOverdueDays(), Librarian.setMinOverdueDays(int)

contributorMask

public java.lang.String contributorMask()
Description copied from interface: Librarian
Returns the mask used to determine if a contributor is ignored by the Librarian for contribution.

Specified by:
contributorMask in interface Librarian
Returns:
the mask used
See Also:
MaskingLibrary, Librarian#finalContributorMask(), Librarian.setContributorMask(String)

setContributorMask

public void setContributorMask(java.lang.String mask)
Description copied from interface: Librarian
Sets the mask used to determine if a contributor is ignored by the Librarian for contribution.

Specified by:
setContributorMask in interface Librarian
Parameters:
mask - the mask to use
See Also:
MaskingLibrary, Librarian#finalContributorMask(), Librarian.contributorMask()

cloneFix

protected void cloneFix(MOB E)
Overrides:
cloneFix in class StdShopKeeper

getMyClock

protected TimeClock getMyClock()

getRecordChangeIndexes

protected long[] getRecordChangeIndexes()

getBaseLibrary

public CoffeeShop getBaseLibrary()
Description copied from interface: Librarian
Returns the underlying basic book stock of the library, as opposed to the current shop, which reflects only what is there at the moment.

Specified by:
getBaseLibrary in interface Librarian

doInventoryReset

protected void doInventoryReset()
Overrides:
doInventoryReset in class StdShopKeeper

getShop

public CoffeeShop getShop()
Description copied from interface: ShopKeeper
the CoffeeShop method to access the shopkeepers store of goods

Specified by:
getShop in interface ShopKeeper
Overrides:
getShop in class StdShopKeeper
Returns:
the CoffeeShop object
See Also:
CoffeeShop

destroy

public void destroy()
Description copied from interface: Contingent
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. Containers, rooms. and mobs who have their destroy() method called will also call the destroy() methods on all items and other objects listed as content, recursively.

Specified by:
destroy in interface Contingent
Overrides:
destroy in class StdShopKeeper

tick

public boolean tick(Tickable ticking,
                    int tickID)
Description copied from interface: Tickable
this is the method which is called periodically by the threading engine. How often it is called depends on the parameters passed to the threadding engine when it is submitted for thread access. Typically the period is once per TIME_TICK period, but that is determined when the object is submitted to the thread engine.

Specified by:
tick in interface Tickable
Overrides:
tick in class StdShopKeeper
Parameters:
ticking - a reference to this Tickable object
tickID - the TICKID_ constant describing this periodic call, as defined in Tickable
Returns:
true always, unless this object no longer wishes to ever tick again, in which case false
See Also:
Tickable, ServiceEngine, TickableGroup

processCheckedOutRecord

protected boolean processCheckedOutRecord(StdLibrarian.CheckedOutRecord rec)

autoGive

public void autoGive(MOB src,
                     MOB tgt,
                     Item I)

executeMsg

public void executeMsg(Environmental myHost,
                       CMMsg msg)
Description copied from interface: MsgListener
The general message event handler for the object. Messages passed herein may not necessarily be FOR this object, or from it, but will almost always represent events happening in the same room. The messages have already been through an approval process, so this method is called only to affect the final execution of the meaning of the message. Every game event goes through these methods.

Specified by:
executeMsg in interface MsgListener
Overrides:
executeMsg in class StdShopKeeper
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that needs to be executed
See Also:
CMMsg

okMessage

public boolean okMessage(Environmental myHost,
                         CMMsg msg)
Description copied from interface: MsgListener
The general message event previewer for the object. Messages passed herein are in a pending state, and may be safely modified or rejected without fear that they might be in the middle of being executed. Messages passed herein may not necessarily be FOR or FROM this object, but will almost always represent events which want to happen in the same rom. This method should always always return true UNLESS this message needs to be canceled, in which case it is necessary to tell the mob initiating the event (CMMsg.source()) why it is being cancelled. Every game event goes through these methods.

Specified by:
okMessage in interface MsgListener
Overrides:
okMessage in class StdShopKeeper
Parameters:
myHost - either the initiator of the event, or the host of this object
msg - the CMMsg that wants to be executed
Returns:
whether this message is allowed to execute
See Also:
CMMsg, CMMsg.source()

getMaxBorrowed

public int getMaxBorrowed()
Description copied from interface: Librarian
Gets the maximum number of items that one person can have checked out at any given time.

Specified by:
getMaxBorrowed in interface Librarian
Returns:
number of items
See Also:
Librarian.setMaxBorrowed(int)

setMaxBorrowed

public void setMaxBorrowed(int items)
Description copied from interface: Librarian
Sets the maximum number of items that one person can have checked out at any given time.

Specified by:
setMaxBorrowed in interface Librarian
Parameters:
items - number of items
See Also:
Librarian.getMaxBorrowed()