Skip to content

Commit

Permalink
Update to 0.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ZwerOxotnik committed Oct 31, 2023
1 parent 921e232 commit f8a1596
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
---------------------------------------------------------------------------------------------------
Version: 0.15.4
Date: 31. 10. 2023
Scripting:
- Updated /static-libs
Bugfixes:
- Fixed type issues with EasyAPI during data:extend
---------------------------------------------------------------------------------------------------
Version: 0.15.3
Date: 31. 10. 2023
Scripting:
Expand Down
12 changes: 7 additions & 5 deletions experimental/lazyAPI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ lazyAPI.deleted_data = {} -- Deleted prototypes
for key in pairs(data_raw) do
lazyAPI.deleted_data[key] = {}
end
lazyAPI.deleted_data.sound = lazyAPI.deleted_data.sound or {}
lazyAPI.deleted_data.animation = lazyAPI.deleted_data.animation or {}


---@type table<table, string>
lazyAPI.prototypes_mod_source = {}
Expand Down Expand Up @@ -1071,11 +1074,10 @@ data.extend = function(self, new_prototypes, ...)
for k, prototype in pairs(new_prototypes) do
if type(k) == "number" and type(prototype) == "table" and prototype.type then
local _type = prototype.type
local name = prototype.name
if data_raw[_type] == nil then -- Fix for https://mods.factorio.com/mod/Better-TrainHorn
data_raw[_type] = {}
lazyAPI.deleted_data[_type] = lazyAPI.deleted_data[_type] or {}
end
local name = prototype.name
data_raw[_type] = data_raw[_type] or {}
lazyAPI.deleted_data[_type] = lazyAPI.deleted_data[_type] or {}

local prev_instance = data_raw[_type][name]
-- Perhaps it should verify this case later instead
if prev_instance and prev_instance ~= prototype then
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zk-lib",
"version": "0.15.3",
"version": "0.15.4",
"factorio_version": "1.1",
"title": "ZwerOxotnik's extendable mod with 8 addons",
"author": "ZwerOxotnik",
Expand Down
2 changes: 1 addition & 1 deletion static-libs

0 comments on commit f8a1596

Please sign in to comment.