diff --git a/NEWS b/NEWS index ec0b663fa..406b2c6a3 100644 --- a/NEWS +++ b/NEWS @@ -74,6 +74,7 @@ DFHack Future - farm-plot-select: Fixed issues with selecting undiscovered crops workflow: Improved handling of plant reactions Removed + embark-tools nano: 1x1 embarks are now possible in vanilla 0.40.24 DFHack 0.40.24-r3 Internals diff --git a/Readme.rst b/Readme.rst index cd2c3717f..84fc475a5 100644 --- a/Readme.rst +++ b/Readme.rst @@ -2155,7 +2155,6 @@ Tools: * ``anywhere``: Allows embarking anywhere (including sites, mountain-only biomes, and oceans). Use with caution. * ``mouse``: Implements mouse controls (currently in the local embark region only) -* ``nano``: An implementation of nano embark - allows resizing below 2x2 when enabled. * ``sand``: Displays an indicator when sand is present in the currently-selected area, similar to the default clay/stone indicators. * ``sticky``: Maintains the selected local area while navigating the world map diff --git a/plugins/embark-tools.cpp b/plugins/embark-tools.cpp index 13884dc2d..37794c875 100644 --- a/plugins/embark-tools.cpp +++ b/plugins/embark-tools.cpp @@ -61,37 +61,6 @@ void set_embark_pos (df::viewscreen_choose_start_sitest * screen, int a, b, c, d, e, f; \ get_embark_pos(screen, a, b, c, d, e, f); -void resize_embark (df::viewscreen_choose_start_sitest * screen, int dx, int dy) -{ - /* Reproduces DF's embark resizing functionality - * Local area resizes up and to the right, unless it's already touching the edge - */ - GET_EMBARK_POS(screen, x1, x2, y1, y2, width, height); - if (x1 == x2 && dx == -1) - dx = 0; - if (y1 == y2 && dy == -1) - dy = 0; - - x2 += dx; // Resize right - while (x2 > 15) - { - x2--; - x1--; - } - x1 = std::max(0, x1); - - y1 -= dy; // Resize up - while (y1 < 0) - { - y1++; - y2++; - } - y2 = std::min(15, y2); - - set_embark_pos(screen, x1, x2, y1, y2); - update_embark_sidebar(screen); -} - typedef df::viewscreen_choose_start_sitest start_sitest; typedef std::set ikey_set; @@ -160,47 +129,6 @@ public: }; }; -class NanoEmbark : public EmbarkTool -{ -public: - virtual std::string getId() { return "nano"; } - virtual std::string getName() { return "Nano embark"; } - virtual std::string getDesc() { return "Allows the embark size to be decreased below 2x2"; } - virtual df::interface_key getToggleKey() { return df::interface_key::CUSTOM_N; } - virtual void before_feed(start_sitest* screen, ikey_set* input, bool &cancel) - { - for (auto iter = input->begin(); iter != input->end(); iter++) - { - df::interface_key key = *iter; - bool is_resize = true; - int dx = 0, dy = 0; - switch (key) - { - case df::interface_key::SETUP_LOCAL_Y_UP: - dy = 1; - break; - case df::interface_key::SETUP_LOCAL_Y_DOWN: - dy = -1; - break; - case df::interface_key::SETUP_LOCAL_X_UP: - dx = 1; - break; - case df::interface_key::SETUP_LOCAL_X_DOWN: - dx = -1; - break; - default: - is_resize = false; - } - if (is_resize) - { - cancel = true; - resize_embark(screen, dx, dy); - return; - } - } - }; -}; - class SandIndicator : public EmbarkTool { protected: @@ -816,7 +744,6 @@ DFhackCExport command_result plugin_init (color_ostream &out, std::vector