Skip to content

Commit

Permalink
Force data write & regenerate default data files
Browse files Browse the repository at this point in the history
  • Loading branch information
DerelictDrone committed Dec 10, 2023
1 parent 8f72574 commit 1ce00cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lua/wire/cpu_default_data_decompressor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local function ReadDir(root)
end

-- Uncomment and Rename this file to wire/lua/wire/default_data_files.lua to update it
-- file.Write("cpu_default_data_files.txt", "//"..util.TableToJSON(ReadDir("")))
-- file.Write("cpu_default_data_files.txt", "--"..util.TableToJSON(ReadDir("")))

-- Decompress the json string wire/lua/wire/default_data_files.lua into the corresponding 36+ default data files
local function WriteDir(tab)
Expand All @@ -38,8 +38,8 @@ local function WriteDir(tab)
end
end

-- Only expand the files if they aren't present already
if CLIENT and not file.Exists("cpuchip/examples/helloworld.txt", "DATA") then
-- Write the files to the data folder anyway, in case they get changed.
if CLIENT then
local compressed = file.Read("wire/cpu_default_data_files.lua","LUA")
-- The client cannot read lua files sent by the server (for security?), so clientside this'll only work
-- if the client actually has Wiremod installed, though with workshop autodownload that'll be common
Expand Down
2 changes: 1 addition & 1 deletion lua/wire/cpu_default_data_files.lua

Large diffs are not rendered by default.

0 comments on commit 1ce00cb

Please sign in to comment.