com.planet_ink.coffee_mud.core.interfaces
Interface Drink

All Superinterfaces:
Affectable, Behavable, java.lang.Cloneable, CMObject, java.lang.Comparable<CMObject>, Contingent, Decayable, Environmental, Modifiable, MsgListener, Physical, PhysicalAgent, StatsAffecting, Tickable
All Known Subinterfaces:
Potion
All Known Implementing Classes:
Cow, GenDrink, GenFountain, GenLiquidResource, GenMultiPotion, GenPerfume, GenPotion, GenTub, GenWater, IndoorShallowWater, IndoorUnderWater, IndoorWaterSurface, LifeFountain, OilFlask, Pan, Pot, SaltWaterSurface, SaltWaterThinSurface, ShallowWater, Spring, StdDrink, StdPerfume, StdPotion, StdTub, UnderSaltWater, UnderWater, Waterskin, WaterSurface, WaterThinSurface, Wineskin

public interface Drink
extends PhysicalAgent, Decayable

A Drinkable object containing its own liquid material type, and liquid capacity management.

Author:
Bo Zimmerman

Field Summary
 
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_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_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 int amountTakenToFillMe(Drink theSource)
          Given the liquid source, the amount of liquid which would need to be taken from the source liquid source to fill up THIS liquid source.
 boolean containsDrink()
          Whether this liquid container still contains any liquid.
 boolean disappearsAfterDrinking()
          Settable only internally, this method returns whether this entire object is destroyed immediately after it is drank from -- like a potion.
 int liquidHeld()
          The total amount of liquid possible to be contained in this liquid container.
 int liquidRemaining()
          The amount of liquid remaining in this liquid container.
 int liquidType()
          The material type of the liquid in this container.
 void setLiquidHeld(int amount)
          Sets the total amount of liquid possible to be contained in this liquid container.
 void setLiquidRemaining(int amount)
          Sets the amount of liquid remaining in this liquid container.
 void setLiquidType(int newLiquidType)
          Sets the material type of the liquid in this container.
 void setThirstQuenched(int amount)
          Set the amount of thirst points quenched every time this item is drank from.
 int thirstQuenched()
          The amount of thirst points quenched every time this item is drank from.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Environmental
description, displayText, expirationDate, image, isGeneric, 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
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Affectable
addEffect, addNonUninvokableEffect, basePhyStats, delAllEffects, delEffect, eachEffect, effects, fetchEffect, fetchEffect, numEffects, phyStats, recoverPhyStats, setBasePhyStats
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Behavable
addBehavior, addScript, behaviors, delAllBehaviors, delAllScripts, delBehavior, delScript, eachBehavior, eachScript, fetchBehavior, fetchBehavior, fetchScript, numBehaviors, numScripts, scripts
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Decayable
decayTime, setDecayTime
 

Method Detail

thirstQuenched

int thirstQuenched()
The amount of thirst points quenched every time this item is drank from.

Returns:
amount of thirst quenched
See Also:
CharState

liquidHeld

int liquidHeld()
The total amount of liquid possible to be contained in this liquid container.

Returns:
total liquid contained herein.

liquidRemaining

int liquidRemaining()
The amount of liquid remaining in this liquid container. Will always be less less than liquidHeld();

Returns:
amount of liquid remaining in this liquid container.
See Also:
liquidHeld()

liquidType

int liquidType()
The material type of the liquid in this container. Although a class implementing the Drink interface can sometimes be a liquid itself (like GenLiquidResource), most often, a Drink interface implementing class is a mob without a material to draw from or an Item having its own non-liquid material (like a leather waterskin containing milk). Either way, this is necessary. The material types are constants in RawMaterial.

Returns:
the type of liquid contained herein
See Also:
RawMaterial

setLiquidType

void setLiquidType(int newLiquidType)
Sets the material type of the liquid in this container. Although a class implementing the Drink interface can sometimes be a liquid itself (like GenLiquidResource), most often, a Drink interface implementing class is a mob without a material to draw from or an Item having its own non-liquid material (like a leather waterskin containing milk). Either way, this is necessary. The material types are constants in RawMaterial.

Parameters:
newLiquidType - the type of liquid contained herein
See Also:
RawMaterial

setThirstQuenched

void setThirstQuenched(int amount)
Set the amount of thirst points quenched every time this item is drank from.

Parameters:
amount - of thirst quenched
See Also:
CharState

setLiquidHeld

void setLiquidHeld(int amount)
Sets the total amount of liquid possible to be contained in this liquid container.

Parameters:
amount - total liquid contained herein.

setLiquidRemaining

void setLiquidRemaining(int amount)
Sets the amount of liquid remaining in this liquid container. Will always be less less than liquidHeld();

Parameters:
amount - amount of liquid remaining in this liquid container.
See Also:
setLiquidHeld(int)

containsDrink

boolean containsDrink()
Whether this liquid container still contains any liquid.

Returns:
whether any liquid is left.

disappearsAfterDrinking

boolean disappearsAfterDrinking()
Settable only internally, this method returns whether this entire object is destroyed immediately after it is drank from -- like a potion.

Returns:
Whether the item survives after drinking.

amountTakenToFillMe

int amountTakenToFillMe(Drink theSource)
Given the liquid source, the amount of liquid which would need to be taken from the source liquid source to fill up THIS liquid source.

Parameters:
theSource - the liquid source to fill up from
Returns:
the amount to take from the liquid source