AbilityContainer, Affectable, Behavable, CMObject, Combatant, Contingent, DBIdentifiable, Economics, Environmental, Expireable, FactionMember, Followable<MOB>, ItemCollection, ItemPossessor, Modifiable, MsgListener, MUDCmdProcessor, Physical, PhysicalAgent, Rider, ShopKeeper, StatsAffecting, Tattooable, Tickable, Librarian, MOB, java.lang.Cloneable, java.lang.Comparable<CMObject>GenLibrarianpublic class StdLibrarian extends StdShopKeeper implements Librarian
ItemPossessor.Expire, ItemPossessor.Find, ItemPossessor.MoveLibrarian.CheckedOutRecordMOB.AttribShopKeeper.ShopPrice, ShopKeeper.ViewTypeStdMOB.ApplyAffectCharState<T extends StatsAffecting>, StdMOB.ApplyAffectCharStats<T extends StatsAffecting>, StdMOB.ApplyRecAffectPhyStats<T extends StatsAffecting>| Modifier and Type | Field | Description |
|---|---|---|
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 |
idConverterDEFAULT_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_DAILYAGE_MILLIS_THRESHOLD, END_SHEATH_TIME, START_SHEATH_TIMEMETAFLAG_AS, METAFLAG_ASMESSAGE, METAFLAG_FORCED, METAFLAG_INORDER, METAFLAG_MPFORCED, METAFLAG_ORDER, METAFLAG_POSSESSED, METAFLAG_QUIETLY, METAFLAG_REVERSED, METAFLAG_SNOOPEDDEAL_ALCHEMIST, DEAL_ANYTECHNOLOGY, DEAL_ANYTHING, DEAL_ARMOR, DEAL_AUCTIONEER, DEAL_BANKER, DEAL_BOOKS, DEAL_BUTCHER, DEAL_CASTER, DEAL_CLANBANKER, DEAL_CLANDSELLER, DEAL_CLANPOSTMAN, DEAL_CLOTHSPINNER, 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_name, 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, speedAdj, tattoos, tickAgeCounter, tickStatus, trains, triggerer, validChkCounter, victim, wimpHitPoint, xtraValuesbudget, budgetMax, budgetRemaining, budgetTickDown, currency, devalueRate, invResetRate, invResetTickDown, itemZapperMask, pricingAdjustments, shop, viewTypes, whatIsSoldMaskSTATUS_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 |
|---|---|
StdLibrarian() |
| Modifier and Type | Method | Description |
|---|---|---|
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<Librarian.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<Librarian.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<Librarian.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.
|
Librarian.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(Librarian.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() |
copyOf, initializeClass, newInstanceamDestroyed, isSavable, setSavablegetFinalBudget, getFinalCurrency, getFinalDevalueRate, getFinalIgnoreMask, getFinalInvResetRate, getFinalItemPricingAdjustments, getFinalPrejudiceFactors, getRawBbudget, getRawCurrency, getRawDevalueRate, getRawIgnoreMask, getRawInvResetRate, getRawItemPricingAdjustments, getRawPrejudiceFactors, setBudget, setCurrency, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactorsdescription, displayText, image, isGeneric, L, maxRange, minRange, miscTextFormat, Name, rawImage, sameAs, setDescription, setDisplayText, setImage, setMiscText, setName, textexpirationDate, setExpirationDategetSaveStatIndex, getStat, getStatCodes, isStat, setStatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddSoldType, doISellThis, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setWhatIsSoldMask, setWhatIsSoldZappermask, storeKeeperString, viewFlagsaffectCharState, affectCharStats, affectPhyStatsabilities, 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, checkCommandCancel, clanEffects, clans, clearCommandQueue, commandQueSize, compareTo, confirmLocation, copyFactions, copyOf, counItemsWornAt, 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, getContextName, getDirectionToTarget, getExperience, getExpNeededDelevel, getExpNeededLevel, getExpNextLevel, getExpPrevLevel, getFactionListing, getGroupMembers, getGroupMembersAndRideables, getItem, getLiegeID, getMoney, getMoneyVariation, getNaturalWeapon, getPeaceTime, getPractices, getQuestPoint, getRandomItem, getRideBuddies, getSaveStatIndex, getStartRoom, getStat, getStatCodes, getTickStatus, getTopCommand, getTrains, getVictim, getWearPositions, getWimpHitPoint, 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, setDestroyed, setDisplayText, setExperience, setExpirationDate, setFollowing, setImage, setLiegeID, setLocation, setMiscText, setMoney, setMoneyVariation, setName, setPlayerStats, setPractices, setQuestPoint, setRangeToTarget, setRiding, setSavable, setSession, setSoulMate, setStartRoom, setStat, setTrains, setTriggerer, setVictim, setWimpHitPoint, soulMate, tattoos, tell, tell, text, titledName, titledName, totalFollowers, triggerer, willFollowOrdersOfaddSoldType, doBudgetReset, doISellThis, getFinalBudget, getFinalCurrency, getFinalDevalueRate, getFinalIgnoreMask, getFinalInvResetRate, getFinalItemPricingAdjustments, getFinalPrejudiceFactors, getRawBbudget, getRawCurrency, getRawDevalueRate, getRawIgnoreMask, getRawInvResetRate, getRawItemPricingAdjustments, getRawPrejudiceFactors, getStartArea, getWhatIsSoldMask, getWhatIsSoldZappermask, isSold, setBudget, setCurrency, setDevalueRate, setIgnoreMask, setInvResetRate, setItemPricingAdjustments, setPrejudiceFactors, setWhatIsSoldMask, setWhatIsSoldZappermask, stdokMessage, storeKeeperString, viewFlagsgetTickStatus, nameprotected volatile boolean shopApply
protected volatile long lastShopTime
protected volatile CoffeeShop curShop
protected double overdueCharge
protected double overdueChargePct
protected double dailyOverdueCharge
protected double dailyOverdueChargePct
protected int minOverdueDays
protected int maxOverdueDays
protected int maxBorrowedItems
protected java.lang.String contributorMask
public java.lang.String ID()
CMObjectID in interface CMObjectID in class StdShopKeeperprotected java.lang.String getLibraryRecordKey()
protected java.lang.String getLibraryShopKey()
protected java.util.List<Librarian.CheckedOutRecord> getCheckedOutRecords()
public java.util.List<Librarian.CheckedOutRecord> getAllMyRecords(java.lang.String name)
public Librarian.CheckedOutRecord getRecord(java.lang.String playerName, java.lang.String itemName)
public java.util.List<Librarian.CheckedOutRecord> getItemRecords(java.lang.String itemName)
protected double getTotalOverdueCharges(java.lang.String name)
protected void updateCheckedOutRecords()
public java.lang.String libraryChain()
LibrarianlibraryChain in interface LibrarianLibrarian.setLibraryChain(String)public void setLibraryChain(java.lang.String name)
LibrariansetLibraryChain in interface Librarianname - the library chain nameLibrarian.libraryChain()public double getOverdueCharge()
LibrariangetOverdueCharge in interface LibrarianLibrarian.setOverdueCharge(double)public void setOverdueCharge(double charge)
LibrariansetOverdueCharge in interface Librariancharge - the base chargeLibrarian.setOverdueCharge(double)public double getDailyOverdueCharge()
LibrariangetDailyOverdueCharge in interface LibrarianLibrarian.setDailyOverdueCharge(double)public void setDailyOverdueCharge(double charge)
LibrariansetDailyOverdueCharge in interface Librariancharge - the daily charge from 0-1Librarian.setDailyOverdueCharge(double)public double getOverdueChargePct()
LibrariangetOverdueChargePct in interface LibrarianLibrarian.setOverdueChargePct(double)public void setOverdueChargePct(double pct)
LibrariansetOverdueChargePct in interface Librarianpct - the base charge as pct of item value from 0-1Librarian.setOverdueChargePct(double)public double getDailyOverdueChargePct()
LibrariangetDailyOverdueChargePct in interface LibrarianLibrarian.setDailyOverdueChargePct(double)public void setDailyOverdueChargePct(double pct)
LibrariansetDailyOverdueChargePct in interface Librarianpct - the base charge as pct of item value from 0-1Librarian.setDailyOverdueChargePct(double)public int getMinOverdueDays()
LibrariangetMinOverdueDays in interface LibrarianLibrarian.setMinOverdueDays(int),
Librarian.getMaxOverdueDays(),
Librarian.setMaxOverdueDays(int)public void setMinOverdueDays(int days)
LibrariansetMinOverdueDays in interface Librariandays - mud-days before its overdueLibrarian.getMinOverdueDays(),
Librarian.getMaxOverdueDays(),
Librarian.setMaxOverdueDays(int)public int getMaxOverdueDays()
LibrariangetMaxOverdueDays in interface LibrarianLibrarian.setMaxOverdueDays(int),
Librarian.getMinOverdueDays(),
Librarian.setMinOverdueDays(int)public void setMaxOverdueDays(int days)
LibrariansetMaxOverdueDays in interface Librariandays - mud-days to be overdueLibrarian.getMaxOverdueDays(),
Librarian.getMinOverdueDays(),
Librarian.setMinOverdueDays(int)public java.lang.String contributorMask()
LibrariancontributorMask in interface LibrarianMaskingLibrary,
Librarian.setContributorMask(String)public void setContributorMask(java.lang.String mask)
LibrariansetContributorMask in interface Librarianmask - the mask to useMaskingLibrary,
Librarian.contributorMask()protected void cloneFix(MOB E)
cloneFix in class StdShopKeeperprotected TimeClock getMyClock()
protected long[] getRecordChangeIndexes()
public CoffeeShop getBaseLibrary()
LibrariangetBaseLibrary in interface Librarianprotected void doInventoryReset()
doInventoryReset in class StdShopKeeperpublic CoffeeShop getShop()
ShopKeepergetShop in interface ShopKeepergetShop in class StdShopKeeperCoffeeShoppublic void destroy()
Contingentdestroy in interface Contingentdestroy in class StdShopKeeperpublic boolean tick(Tickable ticking, int tickID)
Tickabletick in interface Tickabletick in class StdShopKeeperticking - a reference to this Tickable objecttickID - the TICKID_ constant describing this periodic call, as defined in TickableTickable,
ServiceEngine,
TickableGroupprotected boolean processCheckedOutRecord(Librarian.CheckedOutRecord rec)
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListenerexecuteMsg in interface MsgListenerexecuteMsg in class StdShopKeepermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that needs to be executedCMMsgpublic boolean okMessage(Environmental myHost, CMMsg msg)
MsgListenerokMessage in interface MsgListenerokMessage in class StdShopKeepermyHost - either the initiator of the event, or the host of this objectmsg - the CMMsg that wants to be executedCMMsg,
CMMsg.source()public int getMaxBorrowed()
LibrariangetMaxBorrowed in interface LibrarianLibrarian.setMaxBorrowed(int)public void setMaxBorrowed(int items)
LibrariansetMaxBorrowed in interface Librarianitems - number of itemsLibrarian.getMaxBorrowed()