net.sourceforge.worldsaver.rp
Class Adventure
java.lang.Object
|
+--net.sourceforge.worldsaver.rp.RpBase
|
+--net.sourceforge.worldsaver.rp.Action
|
+--net.sourceforge.worldsaver.rp.Adventure
- All Implemented Interfaces:
- MiscUtils, Saveable
- public class Adventure
- extends Action
- implements Saveable, MiscUtils
This class implements an adventure.
- Version:
- Feb 11 2001
- Author:
- Andreas Schmitz
- See Also:
Action,
RpBase
|
Constructor Summary |
Adventure(java.util.HashMap loaded)
Constructs a new adventure from loaded data. |
Adventure(RpBase father,
java.lang.String name)
The standard constructor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Adventure
public Adventure(RpBase father,
java.lang.String name)
- The standard constructor.
- Parameters:
father - the fathername - the name- See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String),
Action.Action(net.sourceforge.worldsaver.rp.RpBase, java.lang.String)
Adventure
public Adventure(java.util.HashMap loaded)
- Constructs a new adventure from loaded data.
- Parameters:
loaded - the loaded values- See Also:
RpBase.RpBase(net.sourceforge.worldsaver.rp.RpBase, java.lang.String),
Loader
getReferencesRight
public void getReferencesRight(java.util.HashMap pool,
IDGenerator gen)
- Gets the references right after loading.
- Specified by:
getReferencesRight in interface Saveable- Overrides:
getReferencesRight in class Action
- Parameters:
pool - all objectsgen - the id-Generator- See Also:
RpBase.getReferencesRight(java.util.HashMap, net.sourceforge.worldsaver.util.IDGenerator)
getSaveableString
public java.lang.String getSaveableString()
throws java.io.IOException
- Returns a saveable String.
- Specified by:
getSaveableString in interface Saveable- Overrides:
getSaveableString in class Action
- Returns:
- the String
- Throws:
java.io.IOException - if objects are not valid- See Also:
RpBase.getSaveableString(),
Saveable
execute
public void execute()
- Prepares the adventure for execution.
- Overrides:
execute in class Action
- See Also:
Action.execute()
step
public void step(int index)
- Makes a step in the adventure.
- Overrides:
step in class Action
- Parameters:
index - the index of the chosen step- See Also:
Action.step(int)
isRunnable
public boolean isRunnable()
- Returns whether the action is runnable.
- Overrides:
isRunnable in class Action
- Returns:
- true if runnable
- See Also:
Action.isRunnable()
createActionTree
public void createActionTree(ActionParticle p)
- Creates a new ActionTree.
- Overrides:
createActionTree in class Action
- Parameters:
p - the top of the action tree- See Also:
Action.createActionTree(net.sourceforge.worldsaver.rp.ActionParticle)
copy
public RpBase copy(boolean childs,
boolean full)
- Returns a copy of this Adventure.
- Overrides:
copy in class RpBase
- Parameters:
childs - whether the childs should be copied, toofull - whether the childs of the childs should be copied,
too, etc.