Expand compat to 0.17 (#711)

This commit is contained in:
Cooldude2606 authored and GitHub committed 2024-12-13 13:48:52 +00:00
1 parent 87746edbf5
commit ff9ba0271f
8 files changed
+138 -89

No files matched your search

@@ -2,8 +2,7 @@ local compat = require("modules/clusterio/compat")
--- @param no_early_return boolean? True to always setup data
return function(no_early_return)
local script_data = compat.script_data()
local inventory_sync = script_data.inventory_sync
local inventory_sync = compat.script_data.inventory_sync
if inventory_sync and not no_early_return then
return inventory_sync
end
@@ -17,6 +16,6 @@ return function(no_early_return)
inventory_sync.finished_downloads = inventory_sync.finished_downloads or {}
inventory_sync.active_uploads = inventory_sync.active_uploads or {}
script_data.inventory_sync = inventory_sync
compat.script_data.inventory_sync = inventory_sync
return inventory_sync
end