ZwerOxotnik's multipurpose mod with 8 addons [zk-lib][WIP]


Multipurpose mod with switchable addons. Also, supports auto-generated mods etc. I'll add a universal command widget in the next major update. New experimental framework: lazyAPI + easyTemplates + simpleTiers New experimental libraries: ZKSettings, SPD

Internal
5 months ago
0.17 - 1.1
11.6K

b [FIXED, I guess] Bug with AI Ironclad mod

1 year, 2 months ago

Could you apply following patch:

Index: mods/zk-lib_0.12.4/experimental/lazyAPI.lua
MY DESCRIPTION: mods conflict fix: aai-vehicles-ironclad_0.6.6.zip
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/mods/zk-lib_0.12.4/experimental/lazyAPI.lua b/mods/zk-lib_0.12.4/experimental/lazyAPI.lua
--- a/mods/zk-lib_0.12.4/experimental/lazyAPI.lua   (revision 978cb15dfbf6032925fb572bb31d74ad5a13d3cd)
+++ b/mods/zk-lib_0.12.4/experimental/lazyAPI.lua   (date 1675596936355)
@@ -1038,9 +1038,12 @@
                data_raw[_type] = {}
                lazyAPI.deleted_data[_type] = lazyAPI.deleted_data[_type] or {}
            end
-           local prev_instance = data_raw[_type][name]
+           local prev_instance = data_raw[_type] and data_raw[_type][name]
            -- Perhaps it should verify this case later instead
            if prev_instance and prev_instance ~= prototype then
+               if not lazyAPI.deleted_data[_type] then
+                   lazyAPI.deleted_data[_type] = {}
+               end
                lazyAPI.deleted_data[_type][prototype.name] = prototype -- TODO: recheck, perhaps I should use a metamethod instead

                local event_data = {prototype = prototype, prev_instance = prev_instance}
@@ -1067,7 +1070,7 @@
            local name = prototype.name
            local is_added = (data_raw[prototype_type][name] == prototype)
            if is_added then
-               local removed_prot = lazyAPI.deleted_data[prototype_type][name]
+               local removed_prot = lazyAPI.deleted_data[prototype_type] and lazyAPI.deleted_data[prototype_type][name]
                if removed_prot == prot then
                    lazyAPI.deleted_data[prototype_type][name] = nil
                end
1 year, 2 months ago

or just fix issues above with your way

1 year, 2 months ago

Um, does zk-lib_0.12.4 crash with aai-vehicles-ironclad_0.6.6?

1 year, 2 months ago

hmm, it was issue in 0.12.0-3 if I remember, I need check it on pure 0.12.4

1 year, 2 months ago
(updated 1 year, 2 months ago)

I had a similar bug report for <0.12.2, but I fixed it in 0.12.2

1 year, 2 months ago

looks like it fixed, at least it starts the factorio app with a full pack of mods and it loads old saves without a crash.
Let me return to this patch/topic if it'll lead to this issue in the game

1 year, 2 months ago
(updated 1 year, 2 months ago)

Well, you could do that and the issue is more broadly. data.raw doesn't have some types by default, but, apparently, it supports some undocumented types.

1 year, 2 months ago

or someone messing around

New response