add blueprint back to the build (dig and build phases only)

develop
Myk Taylor 2023-01-13 12:36:16 -08:00
parent 99350bdb73
commit 8f434bf9a6
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
3 changed files with 20 additions and 2 deletions

@ -3,7 +3,7 @@ blueprint
.. dfhack-tool:: .. dfhack-tool::
:summary: Record a live game map in a quickfort blueprint. :summary: Record a live game map in a quickfort blueprint.
:tags: untested fort design buildings map stockpiles :tags: fort design buildings map stockpiles
With ``blueprint``, you can export the structure of a portion of your fortress With ``blueprint``, you can export the structure of a portion of your fortress
in a blueprint file that you (or anyone else) can later play back with in a blueprint file that you (or anyone else) can later play back with
@ -15,6 +15,13 @@ selected interactively with the ``gui/blueprint`` command or, if the GUI is not
used, starts at the active cursor location and extends right and down for the used, starts at the active cursor location and extends right and down for the
requested width and height. requested width and height.
.. admonition:: Note
blueprint is still in the process of being updated for the new version of
DF. Stockpiles (the "place" phase), zones (the "zone" phase), building
(the "query" phase), and game configuration (the "config" phase) are not
yet supported.
Usage Usage
----- -----

@ -86,7 +86,7 @@ dfhack_plugin(autofarm autofarm.cpp)
#dfhack_plugin(automelt automelt.cpp) #dfhack_plugin(automelt automelt.cpp)
#dfhack_plugin(autonestbox autonestbox.cpp LINK_LIBRARIES lua) #dfhack_plugin(autonestbox autonestbox.cpp LINK_LIBRARIES lua)
#dfhack_plugin(autotrade autotrade.cpp) #dfhack_plugin(autotrade autotrade.cpp)
#dfhack_plugin(blueprint blueprint.cpp LINK_LIBRARIES lua) dfhack_plugin(blueprint blueprint.cpp LINK_LIBRARIES lua)
#dfhack_plugin(burrows burrows.cpp LINK_LIBRARIES lua) #dfhack_plugin(burrows burrows.cpp LINK_LIBRARIES lua)
#dfhack_plugin(building-hacks building-hacks.cpp LINK_LIBRARIES lua) #dfhack_plugin(building-hacks building-hacks.cpp LINK_LIBRARIES lua)
#add_subdirectory(buildingplan) #add_subdirectory(buildingplan)

@ -850,6 +850,7 @@ static const char * get_tile_build(const df::coord &pos,
return add_expansion_syntax(ctx, keys); return add_expansion_syntax(ctx, keys);
} }
/* TODO: understand how this changes for v50
static const char * get_place_keys(const tile_context &ctx) { static const char * get_place_keys(const tile_context &ctx) {
df::building_stockpilest* sp = df::building_stockpilest* sp =
virtual_cast<df::building_stockpilest>(ctx.b); virtual_cast<df::building_stockpilest>(ctx.b);
@ -1086,6 +1087,7 @@ static const char * get_tile_rooms(const df::coord &, const tile_context &ctx) {
str << "r{+ " << (max_dim - 3) << "}&"; str << "r{+ " << (max_dim - 3) << "}&";
return cache(str); return cache(str);
} }
*/
static bool create_output_dir(color_ostream &out, static bool create_output_dir(color_ostream &out,
const blueprint_options &opts) { const blueprint_options &opts) {
@ -1326,6 +1328,7 @@ static bool do_transform(color_ostream &out,
get_tile_construct, ensure_building); get_tile_construct, ensure_building);
add_processor(processors, opts, "build", "build", opts.build, add_processor(processors, opts, "build", "build", opts.build,
get_tile_build, ensure_building); get_tile_build, ensure_building);
/* TODO: understand how this changes for v50
add_processor(processors, opts, "place", "place", opts.place, add_processor(processors, opts, "place", "place", opts.place,
get_tile_place, ensure_building); get_tile_place, ensure_building);
add_processor(processors, opts, "zone", "zone", opts.zone, get_tile_zone); add_processor(processors, opts, "zone", "zone", opts.zone, get_tile_zone);
@ -1333,6 +1336,14 @@ static bool do_transform(color_ostream &out,
get_tile_query, ensure_building); get_tile_query, ensure_building);
add_processor(processors, opts, "query", "rooms", opts.rooms, add_processor(processors, opts, "query", "rooms", opts.rooms,
get_tile_rooms, ensure_building); get_tile_rooms, ensure_building);
*/ if (opts.place)
out.printerr("'place' blueprints are not yet supported for the current version of DF\n");
if (opts.zone)
out.printerr("'zone' blueprints are not yet supported for the current version of DF\n");
if (opts.query)
out.printerr("'query' blueprints are not yet supported for the current version of DF\n");
if (opts.rooms)
out.printerr("'rooms' blueprints are not yet supported for the current version of DF\n");
if (processors.empty()) { if (processors.empty()) {
out.printerr("no phases requested! nothing to do!\n"); out.printerr("no phases requested! nothing to do!\n");