public interface LuxMapGenerator
Modifier and Type | Method and Description |
---|---|
boolean |
canCache()
Is Lux allowed to create and cache maps from this generator.
|
java.lang.String |
description()
A description of your generator.
|
boolean |
generate(java.io.PrintWriter out,
java.lang.String choice,
int seed,
MapLoader loader)
Generate a map of the given 'choice' and output it to the given PrintWriter.
|
java.util.List |
getChoices()
Return a List of Strings giving the different map styles this generator can do.
|
java.lang.String |
message(java.lang.String message,
java.lang.Object data)
This method is not currently used.
|
java.lang.String |
name()
A name for your generator.
|
float |
version()
The version of your generator.
|
boolean canCache()
java.lang.String description()
boolean generate(java.io.PrintWriter out, java.lang.String choice, int seed, MapLoader loader)
void print(String s)
void println(String s)
The given MapLoader has two methods of interest.
void setLoadText(String text) - will display words where the board will go when not using a cached-map.
static String getMapGeneratorPath() - can be used to obtain the folder path of where MapGenerators are stored on the local filesystem.
This method should return true on success. If an error ocurs then false should be returned and a message to stdout should be printed.
PrintWriter
,
MapLoader
java.util.List getChoices()
public List getChoices() { if (choices == null) { choices = new Vector(); choices.add("tiny"); choices.add("small"); choices.add("medium"); choices.add("large"); choices.add("huge"); } return choices; }
List
java.lang.String message(java.lang.String message, java.lang.Object data)
java.lang.String name()
float version()