From 9a7a692ea82d50fc70c1ea1f4c3ef520e548cbff Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 19 Jul 2021 13:54:22 -0700 Subject: [PATCH] ensure restored orders start at index 0 so the manager_order_next_id state can be set to #orders --- test/plugins/orders.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/test/plugins/orders.lua b/test/plugins/orders.lua index 0982de807..bb84b9166 100644 --- a/test/plugins/orders.lua +++ b/test/plugins/orders.lua @@ -17,6 +17,7 @@ local function test_wrapper(test_fn) function() -- clear test orders, restore original orders, remove temp files dfhack.run_command_silent{'orders', 'clear'} + df.global.world.manager_order_next_id = 0 dfhack.run_command_silent{'orders', 'import', BACKUP_FILE_NAME} df.global.world.manager_order_next_id = #df.global.world.manager_orders