Package worldBuilder
Class LuaWriter
- java.lang.Object
-
- worldBuilder.LuaWriter
-
public class LuaWriter extends java.lang.Object
Exporter to render a Cartesian map w/JSON descriptions of each point.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
LuaWriter.EntryPoint
Foundation needs to know the coordinates of the entry and exit points for each city/village.class
LuaWriter.MapInfo
class
LuaWriter.Position
Most of the items on the map are defined by (x,y,z) positionsclass
LuaWriter.ResourceInfo
for reasons I don't understand, it also needs to now a reference position for each resource (even tho the map shows the position)
-
Constructor Summary
Constructors Constructor Description LuaWriter(java.lang.String dirname)
create a new Foundation exporter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
write out the closing braces and close the filevoid
comment(java.lang.String text)
boolean
endDensities()
boolean
entrypoints(LuaWriter.EntryPoint[] places)
boolean
fileHeader(int min_altitude, int max_altitude, java.lang.String[] resource_maps)
write out a mod.lua file headerboolean
map(java.lang.String name, java.lang.String comment, double density, LuaWriter.MapInfo[] maps, boolean last)
boolean
startDensities()
-
-
-
Method Detail
-
fileHeader
public boolean fileHeader(int min_altitude, int max_altitude, java.lang.String[] resource_maps)
write out a mod.lua file header- Parameters:
min_altitude
-max_altitude
-resource_maps
-- Returns:
-
comment
public void comment(java.lang.String text)
-
close
public void close()
write out the closing braces and close the file
-
entrypoints
public boolean entrypoints(LuaWriter.EntryPoint[] places)
-
startDensities
public boolean startDensities()
-
map
public boolean map(java.lang.String name, java.lang.String comment, double density, LuaWriter.MapInfo[] maps, boolean last)
-
endDensities
public boolean endDensities()
-
-