|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.planet_ink.coffee_mud.MOBS.StdMOB
com.planet_ink.coffee_mud.MOBS.StdShopKeeper
com.planet_ink.coffee_mud.MOBS.StdLibrarian
public class StdLibrarian
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.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 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 |
---|
protected 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
Constructor Detail |
---|
public StdLibrarian()
Method Detail |
---|
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdShopKeeper
protected java.lang.String getLibraryRecordKey()
protected java.lang.String getLibraryShopKey()
protected java.util.List<StdLibrarian.CheckedOutRecord> getCheckedOutRecords()
public java.util.List<StdLibrarian.CheckedOutRecord> getAllMyRecords(java.lang.String name)
public StdLibrarian.CheckedOutRecord getRecord(java.lang.String playerName, java.lang.String itemName)
public java.util.List<StdLibrarian.CheckedOutRecord> getItemRecords(java.lang.String itemName)
protected double getTotalOverdueCharges(java.lang.String name)
protected void updateCheckedOutRecords()
public java.lang.String libraryChain()
Librarian
libraryChain
in interface Librarian
Librarian.setLibraryChain(String)
public void setLibraryChain(java.lang.String name)
Librarian
setLibraryChain
in interface Librarian
name
- the library chain nameLibrarian.libraryChain()
public double getOverdueCharge()
Librarian
getOverdueCharge
in interface Librarian
Librarian.setOverdueCharge(double)
public void setOverdueCharge(double charge)
Librarian
setOverdueCharge
in interface Librarian
charge
- the base chargeLibrarian.setOverdueCharge(double)
public double getDailyOverdueCharge()
Librarian
getDailyOverdueCharge
in interface Librarian
Librarian.setDailyOverdueCharge(double)
public void setDailyOverdueCharge(double charge)
Librarian
setDailyOverdueCharge
in interface Librarian
charge
- the daily charge from 0-1Librarian.setDailyOverdueCharge(double)
public double getOverdueChargePct()
Librarian
getOverdueChargePct
in interface Librarian
Librarian.setOverdueChargePct(double)
public void setOverdueChargePct(double pct)
Librarian
setOverdueChargePct
in interface Librarian
pct
- the base charge as pct of item value from 0-1Librarian.setOverdueChargePct(double)
public double getDailyOverdueChargePct()
Librarian
getDailyOverdueChargePct
in interface Librarian
Librarian.setDailyOverdueChargePct(double)
public void setDailyOverdueChargePct(double pct)
Librarian
setDailyOverdueChargePct
in interface Librarian
pct
- the base charge as pct of item value from 0-1Librarian.setDailyOverdueChargePct(double)
public int getMinOverdueDays()
Librarian
getMinOverdueDays
in interface Librarian
Librarian.setMinOverdueDays(int)
,
Librarian.getMaxOverdueDays()
,
Librarian.setMaxOverdueDays(int)
public void setMinOverdueDays(int days)
Librarian
setMinOverdueDays
in interface Librarian
days
- mud-days before its overdueLibrarian.getMinOverdueDays()
,
Librarian.getMaxOverdueDays()
,
Librarian.setMaxOverdueDays(int)
public int getMaxOverdueDays()
Librarian
getMaxOverdueDays
in interface Librarian
Librarian.setMaxOverdueDays(int)
,
Librarian.getMinOverdueDays()
,
Librarian.setMinOverdueDays(int)
public void setMaxOverdueDays(int days)
Librarian
setMaxOverdueDays
in interface Librarian
days
- mud-days to be overdueLibrarian.getMaxOverdueDays()
,
Librarian.getMinOverdueDays()
,
Librarian.setMinOverdueDays(int)
public java.lang.String contributorMask()
Librarian
contributorMask
in interface Librarian
MaskingLibrary
,
Librarian#finalContributorMask()
,
Librarian.setContributorMask(String)
public void setContributorMask(java.lang.String mask)
Librarian
setContributorMask
in interface Librarian
mask
- the mask to useMaskingLibrary
,
Librarian#finalContributorMask()
,
Librarian.contributorMask()
protected void cloneFix(MOB E)
cloneFix
in class StdShopKeeper
protected TimeClock getMyClock()
protected long[] getRecordChangeIndexes()
public CoffeeShop getBaseLibrary()
Librarian
getBaseLibrary
in interface Librarian
protected void doInventoryReset()
doInventoryReset
in class StdShopKeeper
public CoffeeShop getShop()
ShopKeeper
getShop
in interface ShopKeeper
getShop
in class StdShopKeeper
CoffeeShop
public void destroy()
Contingent
destroy
in interface Contingent
destroy
in class StdShopKeeper
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdShopKeeper
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in Tickable
Tickable
,
ServiceEngine
,
TickableGroup
protected boolean processCheckedOutRecord(StdLibrarian.CheckedOutRecord rec)
public void autoGive(MOB src, MOB tgt, Item I)
public void executeMsg(Environmental myHost, CMMsg msg)
MsgListener
executeMsg
in interface MsgListener
executeMsg
in class StdShopKeeper
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that needs to be executedCMMsg
public boolean okMessage(Environmental myHost, CMMsg msg)
MsgListener
okMessage
in interface MsgListener
okMessage
in class StdShopKeeper
myHost
- either the initiator of the event, or the host of this objectmsg
- the CMMsg that wants to be executed
CMMsg
,
CMMsg.source()
public int getMaxBorrowed()
Librarian
getMaxBorrowed
in interface Librarian
Librarian.setMaxBorrowed(int)
public void setMaxBorrowed(int items)
Librarian
setMaxBorrowed
in interface Librarian
items
- number of itemsLibrarian.getMaxBorrowed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |