All Packages Class Hierarchy This Package Previous Next Index
Class sso.Thing
java.lang.Object
|
+----sso.Persistant
|
+----sso.GameObject
|
+----sso.Thing
- public class Thing
- extends GameObject
Thing represents an object in the game that can be carried, used, or moves.
-
base_rating
-
-
base_value
-
-
capacity
-
-
cur_rating
-
-
key
-
-
weight
-
-
Thing()
- Constructor.
-
accept(GameObject)
- OVERRIDE METHOD.
-
createRows()
- Create the row needed to store this object.
-
createThing()
- Factory method for creating a new Thing.
-
getBaseCapacity()
- Get base capacity.
-
getBaseRating()
- Get base rating.
-
getBaseValue()
- Gets the base value.
-
getBaseWeight()
- Get base weight.
-
getCapacity()
- Get total capacity.
-
getCarriedWeight()
- Get carried weight.
-
getKey()
- Get key.
-
getRating()
- Get rating.
-
getValue()
- Get value.
-
getWeight()
- Get weight.
-
init()
- New Thing initializer method.
-
isDroppable()
- Can this object be dropped by holder?
-
isTakeableBy(PC)
- Can this object be taken by the spec?
-
load()
- Load the data into this instance.
-
loadThing(int)
- Load a thing by ID.
-
main(String[])
- Tester method.
-
move(GameObject)
- OVERRIDE METHOD.
-
setBaseRating(int)
- Set base rating.
-
setBaseValue(int)
- Set value.
-
setCapacity(int)
- Set base capacity.
-
setKey(GameObject)
- Set key.
-
setRating(int)
- Set current rating.
-
setWeight(int)
- Set weight.
-
store()
- Store the Thing.
-
unregister()
- Remove the object from the database and registry.
weight
protected int weight
base_value
protected int base_value
capacity
protected int capacity
base_rating
protected int base_rating
cur_rating
protected int cur_rating
key
protected GameObject key
Thing
protected Thing()
- Constructor. Do not call directly.
createThing
public static Thing createThing()
- Factory method for creating a new Thing.
init
protected void init()
- New Thing initializer method.
- Overrides:
- init in class GameObject
getWeight
public int getWeight()
- Get weight.
getBaseWeight
public final int getBaseWeight()
- Get base weight.
setWeight
public void setWeight(int weight)
- Set weight.
getValue
public int getValue()
- Get value.
This may be overriden by child objects to incorporate value increases
or decreases based on rating.
getBaseValue
public final int getBaseValue()
- Gets the base value.
setBaseValue
public void setBaseValue(int base_value)
- Set value.
Sets the base value.
getCapacity
public int getCapacity()
- Get total capacity.
This should be overriden by children (like PC).
getBaseCapacity
public final int getBaseCapacity()
- Get base capacity.
setCapacity
public void setCapacity(int capacity)
- Set base capacity.
getRating
public int getRating()
- Get rating.
This can be overriden in child objects.
getBaseRating
public final int getBaseRating()
- Get base rating.
setBaseRating
public void setBaseRating(int rating)
- Set base rating.
setRating
public void setRating(int rating)
- Set current rating.
getCarriedWeight
public int getCarriedWeight()
- Get carried weight.
getKey
public GameObject getKey()
- Get key.
setKey
public void setKey(GameObject key)
- Set key.
isDroppable
public boolean isDroppable()
- Can this object be dropped by holder?
isTakeableBy
public boolean isTakeableBy(PC pc)
- Can this object be taken by the spec?
move
public boolean move(GameObject destination)
- OVERRIDE METHOD.
Check to see if the Thing is takable or droppable.
- Overrides:
- move in class GameObject
accept
public boolean accept(GameObject spec)
- OVERRIDE METHOD.
Only accept objects when sufficient capacity exists.
- Overrides:
- accept in class GameObject
createRows
protected void createRows()
- Create the row needed to store this object.
- Overrides:
- createRows in class GameObject
store
public void store()
- Store the Thing.
- Overrides:
- store in class GameObject
loadThing
public static Thing loadThing(int id)
- Load a thing by ID. Factory method.
load
protected void load()
- Load the data into this instance.
- Overrides:
- load in class GameObject
unregister
public void unregister()
- Remove the object from the database and registry.
- Overrides:
- unregister in class GameObject
main
public static void main(String args[])
- Tester method.
All Packages Class Hierarchy This Package Previous Next Index