diff --git a/plugins/autotrade.cpp b/plugins/autotrade.cpp index b2cc4cdc2..8fbc75b89 100644 --- a/plugins/autotrade.cpp +++ b/plugins/autotrade.cpp @@ -422,6 +422,15 @@ struct trade_hook : public df::viewscreen_dwarfmodest int left_margin = dims.menu_x1 + 1; int x = left_margin; int y = dims.y2 - 4; + + int links = 0; + links += sp->links.give_to_pile.size(); + links += sp->links.take_from_pile.size(); + links += sp->links.give_to_workshop.size(); + links += sp->links.take_from_workshop.size(); + if (links + 12 >= y) + y += 4; + OutputToggleString(x, y, "Auto trade", "T", monitor.isMonitored(sp), true, left_margin, COLOR_WHITE, COLOR_LIGHTRED); } }; diff --git a/plugins/stockflow.cpp b/plugins/stockflow.cpp index 5222d5ec9..257680682 100644 --- a/plugins/stockflow.cpp +++ b/plugins/stockflow.cpp @@ -208,6 +208,14 @@ public: int x = left_margin; int y = dims.y2 - 3; + int links = 0; + links += sp->links.give_to_pile.size(); + links += sp->links.take_from_pile.size(); + links += sp->links.give_to_workshop.size(); + links += sp->links.take_from_workshop.size(); + if (links + 12 >= y) + y += 1; + OutputHotkeyString(x, y, current_job, "j", true, left_margin, COLOR_WHITE, COLOR_LIGHTRED); if (*current_trigger) OutputHotkeyString(x, y, current_trigger, " J", true, left_margin, COLOR_WHITE, COLOR_LIGHTRED); diff --git a/plugins/stocks.cpp b/plugins/stocks.cpp index 356cc44e7..64e4d4dba 100644 --- a/plugins/stocks.cpp +++ b/plugins/stocks.cpp @@ -1377,6 +1377,14 @@ struct stocks_stockpile_hook : public df::viewscreen_dwarfmodest int left_margin = dims.menu_x1 + 1; int x = left_margin; int y = dims.y2 - 5; + + int links = 0; + links += sp->links.give_to_pile.size(); + links += sp->links.take_from_pile.size(); + links += sp->links.give_to_workshop.size(); + links += sp->links.take_from_workshop.size(); + if (links + 12 >= y) + y = 3; OutputHotkeyString(x, y, "Show Inventory", "i", true, left_margin, COLOR_WHITE, COLOR_LIGHTRED); }