net.kolls.railworld.play.script
Interface Script

All Superinterfaces:
SaveLoad

public interface Script
extends SaveLoad

The methods a plug-in must implement. Many may be implemented with empty methods.

Author:
Steve Kollmansberger

Method Summary
 void init(PlayFrame pf)
          Setup the script.
 boolean playFrameAction(java.lang.String action)
          Informs the script that a PlayFrame button has been pressed and allows it to cancel the normal action.
 java.lang.String toString()
          Called before game start to give a selection list of possible plugins to the user.
 
Methods inherited from interface net.kolls.railworld.io.SaveLoad
load, newInstance, save
 

Method Detail

toString

java.lang.String toString()
Called before game start to give a selection list of possible plugins to the user.

Specified by:
toString in interface SaveLoad
Overrides:
toString in class java.lang.Object
Returns:
The user displayed name or title for this script.

init

void init(PlayFrame pf)
Setup the script. Called once when the game begins.

Parameters:
pf - The PlayFrame for this game

playFrameAction

boolean playFrameAction(java.lang.String action)
Informs the script that a PlayFrame button has been pressed and allows it to cancel the normal action.

Parameters:
action - The name of the command executed
Returns:
Should the action be cancelled? (false is default, continue)