Skip to content

Commit

Permalink
Updated path to copy game files into.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonsimantov committed Feb 6, 2025
1 parent 02edfb9 commit e661a30
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions achievements/achievements.lua
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,26 @@ local function export_images(gameID, current_build_nr)

-- otherwise, the structure should be copied

local shared_path = achievements.paths.get_shared_images_path(gameID)
local shared_images_path = achievements.paths.get_shared_images_path(gameID)
-- This is a set, so the iteration is a little different than usual.
for filename, _ in pairs(crawlImagePaths("icon", "iconLocked")) do
copy_file(filename, shared_path .. filename)
copy_file(filename, shared_images_path .. filename)
end
for _, metadata_asset in ipairs{"defaultIcon", "defaultIconLocked", "secretIcon", "iconPath", "cardPath"} do
for _, metadata_asset in ipairs{"defaultIcon", "defaultIconLocked", "secretIcon"} do
local asset_path = achievements.gameData[metadata_asset]
if asset_path then
asset_path = force_extension(asset_path, ".pdi")
copy_file(asset_path, shared_path .. asset_path)
copy_file(asset_path, shared_images_path .. asset_path)
end
end
-- These files go in the top-level shared game files directory,
-- not in the AchievementImages subdirectory.
local shared_game_data_path = achievements.paths.get_achievement_folder_root_path(gameID)
for _, metadata_asset in ipairs{"iconPath", "cardPath"} do
local asset_path = achievements.gameData[metadata_asset]
if asset_path then
asset_path = force_extension(asset_path, ".pdi")
copy_file(asset_path, shared_game_data_path .. asset_path)
end
end

Expand Down

0 comments on commit e661a30

Please sign in to comment.