2014-06-14 22:40:12 -06:00
|
|
|
package RemoteFortressReader;
|
|
|
|
|
|
|
|
//Attempts to provide a complete framework for reading everything from a fortress needed for vizualization
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
|
|
|
2014-06-17 10:17:16 -06:00
|
|
|
//We use shapes, etc, because the actual tiletypes may differ between DF versions.
|
2014-07-15 06:18:12 -06:00
|
|
|
enum TiletypeShape
|
|
|
|
{
|
2014-06-17 10:17:16 -06:00
|
|
|
NO_SHAPE = -1;
|
|
|
|
EMPTY = 0;
|
|
|
|
FLOOR = 1;
|
|
|
|
BOULDER = 2;
|
|
|
|
PEBBLES = 3;
|
|
|
|
WALL = 4;
|
|
|
|
FORTIFICATION = 5;
|
|
|
|
STAIR_UP = 6;
|
|
|
|
STAIR_DOWN = 7;
|
|
|
|
STAIR_UPDOWN = 8;
|
|
|
|
RAMP = 9;
|
|
|
|
RAMP_TOP = 10;
|
|
|
|
BROOK_BED = 11;
|
|
|
|
BROOK_TOP = 12;
|
2014-07-17 06:16:00 -06:00
|
|
|
TREE_SHAPE = 13;
|
2014-06-17 10:17:16 -06:00
|
|
|
SAPLING = 14;
|
|
|
|
SHRUB = 15;
|
|
|
|
ENDLESS_PIT = 16;
|
2014-07-17 06:16:00 -06:00
|
|
|
BRANCH = 17;
|
|
|
|
TRUNK_BRANCH = 18;
|
|
|
|
TWIG = 19;
|
2014-06-17 10:17:16 -06:00
|
|
|
}
|
|
|
|
|
2014-07-15 06:18:12 -06:00
|
|
|
enum TiletypeSpecial
|
|
|
|
{
|
2014-06-17 10:17:16 -06:00
|
|
|
NO_SPECIAL = -1;
|
|
|
|
NORMAL = 0;
|
|
|
|
RIVER_SOURCE = 1;
|
|
|
|
WATERFALL = 2;
|
|
|
|
SMOOTH = 3;
|
|
|
|
FURROWED = 4;
|
|
|
|
WET = 5;
|
|
|
|
DEAD = 6;
|
|
|
|
WORN_1 = 7;
|
|
|
|
WORN_2 = 8;
|
|
|
|
WORN_3 = 9;
|
|
|
|
TRACK = 10;
|
2014-07-17 06:16:00 -06:00
|
|
|
SMOOTH_DEAD = 11;
|
2014-06-17 10:17:16 -06:00
|
|
|
};
|
2014-07-15 06:18:12 -06:00
|
|
|
enum TiletypeMaterial
|
|
|
|
{
|
2014-06-17 10:17:16 -06:00
|
|
|
NO_MATERIAL = -1;
|
|
|
|
AIR = 0;
|
|
|
|
SOIL = 1;
|
|
|
|
STONE = 2;
|
|
|
|
FEATURE = 3;
|
|
|
|
LAVA_STONE = 4;
|
|
|
|
MINERAL = 5;
|
|
|
|
FROZEN_LIQUID = 6;
|
|
|
|
CONSTRUCTION = 7;
|
|
|
|
GRASS_LIGHT = 8;
|
|
|
|
GRASS_DARK = 9;
|
|
|
|
GRASS_DRY = 10;
|
|
|
|
GRASS_DEAD = 11;
|
|
|
|
PLANT = 12;
|
|
|
|
HFS = 13;
|
|
|
|
CAMPFIRE = 14;
|
|
|
|
FIRE = 15;
|
|
|
|
ASHES = 16;
|
|
|
|
MAGMA = 17;
|
|
|
|
DRIFTWOOD = 18;
|
|
|
|
POOL = 19;
|
|
|
|
BROOK = 20;
|
|
|
|
RIVER = 21;
|
2014-07-17 06:16:00 -06:00
|
|
|
ROOT = 22;
|
|
|
|
TREE_MATERIAL = 23;
|
|
|
|
MUSHROOM = 24;
|
|
|
|
UNDERWORLD_GATE = 25;
|
2014-06-17 10:17:16 -06:00
|
|
|
}
|
2014-07-15 06:18:12 -06:00
|
|
|
enum TiletypeVariant
|
|
|
|
{
|
|
|
|
NO_VARIANT = -1;
|
|
|
|
VAR_1 = 0;
|
|
|
|
VAR_2 = 1;
|
2014-07-17 06:16:00 -06:00
|
|
|
VAR_3 = 2;
|
|
|
|
VAR_4 = 3;
|
2014-07-15 06:18:12 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
message Tiletype
|
|
|
|
{
|
|
|
|
required int32 id = 1;
|
|
|
|
optional string name = 2;
|
|
|
|
optional string caption = 3;
|
|
|
|
optional TiletypeShape shape = 4;
|
|
|
|
optional TiletypeSpecial special = 5;
|
|
|
|
optional TiletypeMaterial material = 6;
|
|
|
|
optional TiletypeVariant variant = 7;
|
|
|
|
optional uint32 direction = 8;
|
|
|
|
};
|
|
|
|
|
|
|
|
message TiletypeList
|
|
|
|
{
|
|
|
|
repeated Tiletype tiletype_list = 1;
|
|
|
|
}
|
2014-06-17 10:17:16 -06:00
|
|
|
|
|
|
|
message MapBlock
|
|
|
|
{
|
|
|
|
required int32 map_x = 1;
|
|
|
|
required int32 map_y = 2;
|
|
|
|
required int32 map_z = 3;
|
2014-07-15 06:18:12 -06:00
|
|
|
repeated int32 tiles = 4;
|
2014-08-08 09:05:57 -06:00
|
|
|
repeated MatPair materials = 5;
|
2014-06-17 10:17:16 -06:00
|
|
|
}
|
|
|
|
|
2014-06-14 22:40:12 -06:00
|
|
|
message MatPair {
|
|
|
|
required int32 mat_type = 1;
|
|
|
|
required int32 mat_index = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ColorDefinition {
|
|
|
|
required int32 red = 1;
|
|
|
|
required int32 green = 2;
|
|
|
|
required int32 blue = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MaterialDefinition{
|
|
|
|
required MatPair mat_pair = 1;
|
|
|
|
optional string id = 2;
|
|
|
|
optional string name = 3;
|
|
|
|
optional ColorDefinition state_color = 4; //Simplifying colors to assume room temperature.
|
|
|
|
}
|
|
|
|
|
|
|
|
message MaterialList{
|
|
|
|
repeated MaterialDefinition material_list = 1;
|
2014-06-17 10:17:16 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
message BlockRequest
|
|
|
|
{
|
|
|
|
optional int32 blocks_needed = 1;
|
|
|
|
optional int32 min_x = 2;
|
|
|
|
optional int32 max_x = 3;
|
|
|
|
optional int32 min_y = 4;
|
|
|
|
optional int32 max_y = 5;
|
|
|
|
optional int32 min_z = 6;
|
|
|
|
optional int32 max_z = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BlockList
|
|
|
|
{
|
|
|
|
repeated MapBlock map_blocks = 1;
|
|
|
|
optional int32 map_x = 2;
|
|
|
|
optional int32 map_y = 3;
|
2014-07-23 08:27:47 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
message PlantDef
|
|
|
|
{
|
|
|
|
required int32 pos_x = 1;
|
|
|
|
required int32 pos_y = 2;
|
|
|
|
required int32 pos_z = 3;
|
|
|
|
required int32 index = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PlantList
|
|
|
|
{
|
|
|
|
repeated PlantDef plant_list = 1;
|
2014-06-14 22:40:12 -06:00
|
|
|
}
|