mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Use encode_string and support multiple instances
This commit is contained in:
1 parent
c62eae0009
commit
5b9f650946
3 files changed
+93
-60
No files matched your search
@@ -34,7 +34,9 @@ local function dump_chunk_chart(chunk_position)
|
||||
for _, surface in pairs(surfaces) do
|
||||
local chart_data = force.get_chunk_chart(surface, chunk_position)
|
||||
if chart_data then
|
||||
table.insert(data, {surface = surface.name, force = force.name, chart_data = chart_data})
|
||||
-- Use Factorio's built-in deflate compression and base64 encoding
|
||||
local encoded_data = helpers.encode_string(chart_data)
|
||||
table.insert(data, {surface = surface.name, force = force.name, chart_data = encoded_data})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user