Skip to content

Commit 3f31da2

Browse files
authored
Merge pull request #47 from LoireLab/x5agea-codex/fix-nil-value-error-in-multihaul.lua
Fix multihaul forward declaration
2 parents c799c3f + d910921 commit 3f31da2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

multihaul.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ local itemtools = reqscript('item')
88

99
local GLOBAL_KEY = 'multihaul'
1010

11+
local finish_jobs_without_wheelbarrow -- forward declaration
12+
1113
local function get_default_state()
1214
return {
1315
enabled=false,
@@ -192,7 +194,7 @@ local function clear_job_items(job)
192194
job.items:resize(0)
193195
end
194196

195-
local function finish_jobs_without_wheelbarrow()
197+
function finish_jobs_without_wheelbarrow()
196198
for _, job in utils.listpairs(df.global.world.jobs.list) do
197199
if job.job_type == df.job_type.StoreItemInStockpile and
198200
not find_attached_wheelbarrow(job) then

0 commit comments

Comments
 (0)