From 18f48dc488b4a501c3449411ad368c30638d5466 Mon Sep 17 00:00:00 2001 From: Eldresh <32151068+Eldresh@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:37:23 -0600 Subject: [PATCH 1/2] Convert age argument to number in rejuvenate.lua due to the less than comparison, age must be converted to a number or else any attempt to use that argument causes the script to fail with "attempt to compare string with number". --- rejuvenate.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rejuvenate.lua b/rejuvenate.lua index 04c79cdf5f..a2e36c86e2 100644 --- a/rejuvenate.lua +++ b/rejuvenate.lua @@ -84,7 +84,7 @@ local function main(args) table.insert(units, dfhack.gui.getSelectedUnit(true) or qerror("Please select a unit in the UI.")) end for _, u in ipairs(units) do - rejuvenate(u, false, args.force, args['dry-run'], args.age) + rejuvenate(u, false, args.force, args['dry-run'], tonumber(args.age)) end end From dbfa74b8d698d5b16fe9e4af5693b719b671713c Mon Sep 17 00:00:00 2001 From: Eldresh <32151068+Eldresh@users.noreply.github.com> Date: Tue, 26 Nov 2024 23:21:49 -0600 Subject: [PATCH 2/2] Updated changelog.txt with fix to rejuvenate.lua --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index fc7ee69c19..ac0ad32eca 100644 --- a/changelog.txt +++ b/changelog.txt @@ -41,6 +41,7 @@ Template for new versions: - `control-panel`: fix setting numeric preferences from the commandline - `gui/quickfort`: fix build mode evluation rules to allow placement of various furniture and constructions on tiles with stair shapes or without orthagonal floor. - `emigration`: save-and-reload no longer resets the emigration cycle timeout, making gameplay more consistent +- `rejuvenate`: ``--age`` no longer throws the error ``attempt to compare string with number`` ## Misc Improvements - `control-panel`: Add realistic-melting tweak to control-panel registry