com.planet_ink.coffee_mud.Libraries
Class CoffeeShops

java.lang.Object
  extended by com.planet_ink.coffee_mud.Libraries.StdLibrary
      extended by com.planet_ink.coffee_mud.Libraries.CoffeeShops
All Implemented Interfaces:
CMObject, Tickable, CMLibrary, ShoppingLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class CoffeeShops
extends StdLibrary
implements ShoppingLibrary


Field Summary
 
Fields inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary
isDebugging, name, serviceClient, tickStatus
 
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
 
Constructor Summary
CoffeeShops()
           
 
Method Summary
 java.util.List<Environmental> addRealEstateTitles(java.util.List<Environmental> V, MOB buyer, CoffeeShop shop, Room myRoom)
           
protected  Pair<java.lang.Double,java.lang.String>[] alternateParseItemPricingAdjustments(java.lang.String factors)
           
 void auctionNotify(MOB M, java.lang.String resp, java.lang.String regardingItem)
           
 java.lang.String[] bid(MOB mob, double bid, java.lang.String bidCurrency, AuctionData auctionData, Item I, java.util.List<java.lang.String> auctionAnnounces)
           
 void cancelAuction(java.lang.String auctionHouse, AuctionData data)
           
 double devalue(ShopKeeper shop, Environmental product, double number)
           
 boolean doISellThis(Environmental thisThang, ShopKeeper shop)
           
 java.lang.String findInnRoom(InnKey key, java.lang.String addThis, Room R)
           
 java.util.List<Environmental> getAllShopkeepers(Room here, MOB notMOB)
           
 java.lang.String getAuctionInventory(MOB seller, MOB buyer, Auctioneer auction, java.lang.String mask)
           
 java.util.List<AuctionData> getAuctions(java.lang.Object ofLike, java.lang.String auctionHouse)
           
 AuctionData getEnumeratedAuction(java.lang.String named, java.lang.String auctionHouse)
           
 java.lang.String getListForMask(java.lang.String targetMessage)
           
 java.lang.String getListInventory(MOB seller, MOB buyer, java.util.List<? extends Environmental> rawInventory, int limit, ShopKeeper shop, java.lang.String mask)
           
protected  double getProductCount(Environmental product)
           
 double getSalesTax(Room homeRoom, MOB seller)
           
protected  java.lang.String getSellableElectronicsName(MOB viewerM, Electronics E)
           
 ShopKeeper getShopKeeper(Environmental E)
           
protected  Ability getTrainableAbility(MOB teacher, Ability A)
           
 java.lang.String getViewDescription(MOB viewerM, Environmental E)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 boolean ignoreIfNecessary(MOB mob, java.lang.String ignoreMask, MOB whoIgnores)
           
protected  boolean isLotTooLarge(ShopKeeper shop, Environmental product)
           
protected  double itemPriceFactor(Environmental E, Room R, java.lang.String[] priceFactors, boolean pawnTo)
           
 Pair<java.lang.Long,TimeClock.TimePeriod> parseBudget(java.lang.String budget)
           
 MOB parseBuyingFor(MOB buyer, java.lang.String message)
           
 double[] parseDevalueRate(java.lang.String factors)
           
 java.lang.String[] parseItemPricingAdjustments(java.lang.String factors)
           
 java.lang.String[] parsePrejudiceFactors(java.lang.String factors)
           
 ShopKeeper.ShopPrice pawningPrice(MOB seller, MOB buyer, Environmental product, ShopKeeper shopKeeper, CoffeeShop shop)
           
 double prejudiceFactor(MOB customer, java.lang.String factors, boolean pawnTo)
           
 double prejudiceValueFromPart(MOB customer, boolean pawnTo, java.lang.String part)
           
 void purchaseAbility(Ability A, MOB seller, ShopKeeper shop, MOB mobFor)
           
 boolean purchaseItems(Item baseProduct, java.util.List<Environmental> products, MOB seller, MOB mobFor)
           
 boolean purchaseMOB(MOB product, MOB seller, ShopKeeper shop, MOB mobFor)
           
 double rawSpecificGoldPrice(Environmental product, CoffeeShop shop)
           
 void returnMoney(MOB to, java.lang.String currency, double amt)
           
 void saveAuction(AuctionData data, java.lang.String auctionHouse, boolean updateOnly)
           
 ShopKeeper.ShopPrice sellingPrice(MOB seller, MOB buyer, Environmental product, ShopKeeper shopKeeper, CoffeeShop shop, boolean includeSalesTax)
           
protected  boolean shopKeeperItemTypeCheck(Environmental E, int dealCode, ShopKeeper shopKeeper)
           
protected  boolean shownInInventory(MOB seller, MOB buyer, Environmental product, ShopKeeper shopKeeper)
           
 boolean standardBuyEvaluation(MOB seller, MOB buyer, Environmental product, ShopKeeper shop, boolean buyNotView)
           
 boolean standardSellEvaluation(MOB seller, MOB buyer, Environmental product, ShopKeeper shop, double maxToPay, double maxEverPaid, boolean sellNotValue)
           
 java.lang.String storeKeeperString(CoffeeShop shop, ShopKeeper keeper)
           
 void transactMoneyOnly(MOB seller, MOB buyer, ShopKeeper shop, Environmental product, boolean sellerGetsPaid)
           
 double transactPawn(MOB shopkeeper, MOB pawner, ShopKeeper shop, Environmental product)
           
 
Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary
activate, checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus, shutdown, tick
 
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.Libraries.interfaces.CMLibrary
activate, getServiceClient, L, propertiesLoaded, shutdown
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CoffeeShops

public CoffeeShops()
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 StdLibrary
Returns:
the name of this class

getShopKeeper

public ShopKeeper getShopKeeper(Environmental E)
Specified by:
getShopKeeper in interface ShoppingLibrary

getAllShopkeepers

public java.util.List<Environmental> getAllShopkeepers(Room here,
                                                       MOB notMOB)
Specified by:
getAllShopkeepers in interface ShoppingLibrary

getSellableElectronicsName

protected java.lang.String getSellableElectronicsName(MOB viewerM,
                                                      Electronics E)

getViewDescription

public java.lang.String getViewDescription(MOB viewerM,
                                           Environmental E)
Specified by:
getViewDescription in interface ShoppingLibrary

getTrainableAbility

protected Ability getTrainableAbility(MOB teacher,
                                      Ability A)

shownInInventory

protected boolean shownInInventory(MOB seller,
                                   MOB buyer,
                                   Environmental product,
                                   ShopKeeper shopKeeper)

rawSpecificGoldPrice

public double rawSpecificGoldPrice(Environmental product,
                                   CoffeeShop shop)

prejudiceValueFromPart

public double prejudiceValueFromPart(MOB customer,
                                     boolean pawnTo,
                                     java.lang.String part)
Specified by:
prejudiceValueFromPart in interface ShoppingLibrary

prejudiceFactor

public double prejudiceFactor(MOB customer,
                              java.lang.String factors,
                              boolean pawnTo)
Specified by:
prejudiceFactor in interface ShoppingLibrary

itemPriceFactor

protected double itemPriceFactor(Environmental E,
                                 Room R,
                                 java.lang.String[] priceFactors,
                                 boolean pawnTo)

sellingPrice

public ShopKeeper.ShopPrice sellingPrice(MOB seller,
                                         MOB buyer,
                                         Environmental product,
                                         ShopKeeper shopKeeper,
                                         CoffeeShop shop,
                                         boolean includeSalesTax)
Specified by:
sellingPrice in interface ShoppingLibrary

parseItemPricingAdjustments

public java.lang.String[] parseItemPricingAdjustments(java.lang.String factors)
Specified by:
parseItemPricingAdjustments in interface ShoppingLibrary

parsePrejudiceFactors

public java.lang.String[] parsePrejudiceFactors(java.lang.String factors)
Specified by:
parsePrejudiceFactors in interface ShoppingLibrary

alternateParseItemPricingAdjustments

protected Pair<java.lang.Double,java.lang.String>[] alternateParseItemPricingAdjustments(java.lang.String factors)

parseBudget

public Pair<java.lang.Long,TimeClock.TimePeriod> parseBudget(java.lang.String budget)
Specified by:
parseBudget in interface ShoppingLibrary

parseDevalueRate

public double[] parseDevalueRate(java.lang.String factors)
Specified by:
parseDevalueRate in interface ShoppingLibrary

devalue

public double devalue(ShopKeeper shop,
                      Environmental product,
                      double number)

isLotTooLarge

protected boolean isLotTooLarge(ShopKeeper shop,
                                Environmental product)

getProductCount

protected double getProductCount(Environmental product)

pawningPrice

public ShopKeeper.ShopPrice pawningPrice(MOB seller,
                                         MOB buyer,
                                         Environmental product,
                                         ShopKeeper shopKeeper,
                                         CoffeeShop shop)
Specified by:
pawningPrice in interface ShoppingLibrary

getSalesTax

public double getSalesTax(Room homeRoom,
                          MOB seller)
Specified by:
getSalesTax in interface ShoppingLibrary

standardSellEvaluation

public boolean standardSellEvaluation(MOB seller,
                                      MOB buyer,
                                      Environmental product,
                                      ShopKeeper shop,
                                      double maxToPay,
                                      double maxEverPaid,
                                      boolean sellNotValue)
Specified by:
standardSellEvaluation in interface ShoppingLibrary

standardBuyEvaluation

public boolean standardBuyEvaluation(MOB seller,
                                     MOB buyer,
                                     Environmental product,
                                     ShopKeeper shop,
                                     boolean buyNotView)
Specified by:
standardBuyEvaluation in interface ShoppingLibrary

getListInventory

public java.lang.String getListInventory(MOB seller,
                                         MOB buyer,
                                         java.util.List<? extends Environmental> rawInventory,
                                         int limit,
                                         ShopKeeper shop,
                                         java.lang.String mask)
Specified by:
getListInventory in interface ShoppingLibrary

findInnRoom

public java.lang.String findInnRoom(InnKey key,
                                    java.lang.String addThis,
                                    Room R)
Specified by:
findInnRoom in interface ShoppingLibrary

parseBuyingFor

public MOB parseBuyingFor(MOB buyer,
                          java.lang.String message)
Specified by:
parseBuyingFor in interface ShoppingLibrary

transactPawn

public double transactPawn(MOB shopkeeper,
                           MOB pawner,
                           ShopKeeper shop,
                           Environmental product)
Specified by:
transactPawn in interface ShoppingLibrary

transactMoneyOnly

public void transactMoneyOnly(MOB seller,
                              MOB buyer,
                              ShopKeeper shop,
                              Environmental product,
                              boolean sellerGetsPaid)
Specified by:
transactMoneyOnly in interface ShoppingLibrary

purchaseItems

public boolean purchaseItems(Item baseProduct,
                             java.util.List<Environmental> products,
                             MOB seller,
                             MOB mobFor)
Specified by:
purchaseItems in interface ShoppingLibrary

purchaseMOB

public boolean purchaseMOB(MOB product,
                           MOB seller,
                           ShopKeeper shop,
                           MOB mobFor)
Specified by:
purchaseMOB in interface ShoppingLibrary

purchaseAbility

public void purchaseAbility(Ability A,
                            MOB seller,
                            ShopKeeper shop,
                            MOB mobFor)
Specified by:
purchaseAbility in interface ShoppingLibrary

addRealEstateTitles

public java.util.List<Environmental> addRealEstateTitles(java.util.List<Environmental> V,
                                                         MOB buyer,
                                                         CoffeeShop shop,
                                                         Room myRoom)
Specified by:
addRealEstateTitles in interface ShoppingLibrary

ignoreIfNecessary

public boolean ignoreIfNecessary(MOB mob,
                                 java.lang.String ignoreMask,
                                 MOB whoIgnores)
Specified by:
ignoreIfNecessary in interface ShoppingLibrary

storeKeeperString

public java.lang.String storeKeeperString(CoffeeShop shop,
                                          ShopKeeper keeper)
Specified by:
storeKeeperString in interface ShoppingLibrary

shopKeeperItemTypeCheck

protected boolean shopKeeperItemTypeCheck(Environmental E,
                                          int dealCode,
                                          ShopKeeper shopKeeper)

doISellThis

public boolean doISellThis(Environmental thisThang,
                           ShopKeeper shop)
Specified by:
doISellThis in interface ShoppingLibrary

returnMoney

public void returnMoney(MOB to,
                        java.lang.String currency,
                        double amt)
Specified by:
returnMoney in interface ShoppingLibrary

bid

public java.lang.String[] bid(MOB mob,
                              double bid,
                              java.lang.String bidCurrency,
                              AuctionData auctionData,
                              Item I,
                              java.util.List<java.lang.String> auctionAnnounces)
Specified by:
bid in interface ShoppingLibrary

getEnumeratedAuction

public AuctionData getEnumeratedAuction(java.lang.String named,
                                        java.lang.String auctionHouse)
Specified by:
getEnumeratedAuction in interface ShoppingLibrary

saveAuction

public void saveAuction(AuctionData data,
                        java.lang.String auctionHouse,
                        boolean updateOnly)
Specified by:
saveAuction in interface ShoppingLibrary

getAuctions

public java.util.List<AuctionData> getAuctions(java.lang.Object ofLike,
                                               java.lang.String auctionHouse)
Specified by:
getAuctions in interface ShoppingLibrary

getListForMask

public java.lang.String getListForMask(java.lang.String targetMessage)
Specified by:
getListForMask in interface ShoppingLibrary

getAuctionInventory

public java.lang.String getAuctionInventory(MOB seller,
                                            MOB buyer,
                                            Auctioneer auction,
                                            java.lang.String mask)
Specified by:
getAuctionInventory in interface ShoppingLibrary

auctionNotify

public void auctionNotify(MOB M,
                          java.lang.String resp,
                          java.lang.String regardingItem)
Specified by:
auctionNotify in interface ShoppingLibrary

cancelAuction

public void cancelAuction(java.lang.String auctionHouse,
                          AuctionData data)
Specified by:
cancelAuction in interface ShoppingLibrary