Added modular description system (limited scope to 170 fully automateable items)

This commit is contained in:
Wofsauge committed 2026-01-13 19:50:52 +01:00
1 parent 411be3d8a7
commit d98397ec26
27 files changed
+3807 -3

No files matched your search

+9 -1
View File
@@ -93,7 +93,9 @@ end
--- Attempts to load all language packs from a given game version
function EID:LoadLanguagePacks(gameVersion)
--transformation infos
--modular item informations
local _, _ = pcall(require, "descriptions." .. gameVersion .. ".item_data")
--transformation informations
local _, _ = pcall(require, "descriptions." .. gameVersion .. ".transformations")
--load languages
for _, languageCode in ipairs(EID.Languages) do
@@ -108,6 +110,12 @@ function EID:LoadLanguagePacks(gameVersion)
EID:WriteErrorMsg("Loading Languagepack '" .. languageCode .. "' (Names) failed: " ..
tostring(err))
end
-- load modular descriptions
wasSuccessful, err = pcall(require, "descriptions.modular." .. languageCode)
if not wasSuccessful and not string.find(err, "not found") then
EID:WriteErrorMsg("Loading Languagepack '" .. languageCode .. "' (modular) failed: " ..
tostring(err))
end
end
end