From 8f434bf9a697a81b5b0635023248903fdda0f9b3 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Fri, 13 Jan 2023 12:36:16 -0800 Subject: [PATCH] add blueprint back to the build (dig and build phases only) --- docs/plugins/blueprint.rst | 9 ++++++++- plugins/CMakeLists.txt | 2 +- plugins/blueprint.cpp | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/plugins/blueprint.rst b/docs/plugins/blueprint.rst index aa2d0fa03..3b63719cb 100644 --- a/docs/plugins/blueprint.rst +++ b/docs/plugins/blueprint.rst @@ -3,7 +3,7 @@ blueprint .. dfhack-tool:: :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 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 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 ----- diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 727df63c5..1166caae7 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -86,7 +86,7 @@ dfhack_plugin(autofarm autofarm.cpp) #dfhack_plugin(automelt automelt.cpp) #dfhack_plugin(autonestbox autonestbox.cpp LINK_LIBRARIES lua) #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(building-hacks building-hacks.cpp LINK_LIBRARIES lua) #add_subdirectory(buildingplan) diff --git a/plugins/blueprint.cpp b/plugins/blueprint.cpp index 509b1e6bc..3d34f592e 100644 --- a/plugins/blueprint.cpp +++ b/plugins/blueprint.cpp @@ -850,6 +850,7 @@ static const char * get_tile_build(const df::coord &pos, return add_expansion_syntax(ctx, keys); } +/* TODO: understand how this changes for v50 static const char * get_place_keys(const tile_context &ctx) { df::building_stockpilest* sp = virtual_cast(ctx.b); @@ -1086,6 +1087,7 @@ static const char * get_tile_rooms(const df::coord &, const tile_context &ctx) { str << "r{+ " << (max_dim - 3) << "}&"; return cache(str); } +*/ static bool create_output_dir(color_ostream &out, const blueprint_options &opts) { @@ -1326,6 +1328,7 @@ static bool do_transform(color_ostream &out, get_tile_construct, ensure_building); add_processor(processors, opts, "build", "build", opts.build, get_tile_build, ensure_building); +/* TODO: understand how this changes for v50 add_processor(processors, opts, "place", "place", opts.place, get_tile_place, ensure_building); 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); add_processor(processors, opts, "query", "rooms", opts.rooms, 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()) { out.printerr("no phases requested! nothing to do!\n");