From d8afb6c6827a637f750d2aeb76648300a685455a Mon Sep 17 00:00:00 2001 From: silverflyone Date: Wed, 15 Feb 2023 15:31:50 +1100 Subject: [PATCH 1/4] Update Buildings.cpp Changed the StockpileIterator::operator++ to checks block based on <= 16 rather than <16. Previously it was not returning items at stockpile tiles at the block boundary. Identified as part of combine.lua changes. --- library/modules/Buildings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/modules/Buildings.cpp b/library/modules/Buildings.cpp index 389113483..2b6fc8ec8 100644 --- a/library/modules/Buildings.cpp +++ b/library/modules/Buildings.cpp @@ -1643,10 +1643,10 @@ StockpileIterator& StockpileIterator::operator++() { while (current >= block->items.size()) { // Out of items in this block; find the next block to search. - if (block->map_pos.x + 16 < stockpile->x2) { + if (block->map_pos.x + 16 <= stockpile->x2) { block = Maps::getTileBlock(block->map_pos.x + 16, block->map_pos.y, stockpile->z); current = 0; - } else if (block->map_pos.y + 16 < stockpile->y2) { + } else if (block->map_pos.y + 16 <= stockpile->y2) { block = Maps::getTileBlock(stockpile->x1, block->map_pos.y + 16, stockpile->z); current = 0; } else { From 8f190247e95052566eae7ac93489a88155a4f87a Mon Sep 17 00:00:00 2001 From: silverflyone Date: Thu, 16 Feb 2023 14:55:00 +1100 Subject: [PATCH 2/4] Buildings::StockpileIterator operator change added to FIxes. --- docs/changelog.txt | 1 + scripts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 66a136d1f..f3a2c0d25 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -41,6 +41,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: -@ `seedwatch`: fix saving and loading of seed stock targets - `autodump`: changed behaviour to only change ``dump`` and ``forbid`` flags if an item is successfully dumped. -@ `autochop`: generate default names for burrows with no assigned names +- ``Buildings::StockpileIterator``: check for stockpile items on block boundary. ## Misc Improvements - DFHack tool windows that capture mouse clicks (and therefore prevent you from clicking on the "pause" button) now unconditionally pause the game when they open (but you can still unpause with the keyboard if you want to). Examples of this behavior: `gui/quickfort`, `gui/blueprint`, `gui/liquids` diff --git a/scripts b/scripts index b13f351b2..3b23f3adf 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit b13f351b22de50210b9b71d34806ebc2b84351ca +Subproject commit 3b23f3adfeeb3e7e9541320d3fed4259ee12093d From 80972466a4f8393ae61e94bce2767b4cc8c0fa88 Mon Sep 17 00:00:00 2001 From: silverflyone Date: Thu, 16 Feb 2023 15:01:11 +1100 Subject: [PATCH 3/4] Revert "Buildings::StockpileIterator operator change added to FIxes." This reverts commit 8f190247e95052566eae7ac93489a88155a4f87a. --- docs/changelog.txt | 1 - scripts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index f3a2c0d25..66a136d1f 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -41,7 +41,6 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: -@ `seedwatch`: fix saving and loading of seed stock targets - `autodump`: changed behaviour to only change ``dump`` and ``forbid`` flags if an item is successfully dumped. -@ `autochop`: generate default names for burrows with no assigned names -- ``Buildings::StockpileIterator``: check for stockpile items on block boundary. ## Misc Improvements - DFHack tool windows that capture mouse clicks (and therefore prevent you from clicking on the "pause" button) now unconditionally pause the game when they open (but you can still unpause with the keyboard if you want to). Examples of this behavior: `gui/quickfort`, `gui/blueprint`, `gui/liquids` diff --git a/scripts b/scripts index 3b23f3adf..b13f351b2 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 3b23f3adfeeb3e7e9541320d3fed4259ee12093d +Subproject commit b13f351b22de50210b9b71d34806ebc2b84351ca From 648af1c81c5ac007ac6490ef3198d7afd213afed Mon Sep 17 00:00:00 2001 From: silverflyone Date: Thu, 16 Feb 2023 15:03:09 +1100 Subject: [PATCH 4/4] Buildings::StockpileIterator operator change added to FIxes. --- docs/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.txt b/docs/changelog.txt index 66a136d1f..f3a2c0d25 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -41,6 +41,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: -@ `seedwatch`: fix saving and loading of seed stock targets - `autodump`: changed behaviour to only change ``dump`` and ``forbid`` flags if an item is successfully dumped. -@ `autochop`: generate default names for burrows with no assigned names +- ``Buildings::StockpileIterator``: check for stockpile items on block boundary. ## Misc Improvements - DFHack tool windows that capture mouse clicks (and therefore prevent you from clicking on the "pause" button) now unconditionally pause the game when they open (but you can still unpause with the keyboard if you want to). Examples of this behavior: `gui/quickfort`, `gui/blueprint`, `gui/liquids`