功能: 添加服务器版本管理器(下载/更新/降级 Factorio 服务端)#2
Conversation
|
@BAYUNZIYUE Hi friend, I tried to merge your project with mine, but apparently after you forked it, a lot of changes happened and now they don't merge. That's why I'd like to put your fork down and study it. Tell me how exactly you get it up and running so I don't waste time searching. |
|
嘿bro 我现在在想办法给从存档加载mod这里加文件大小和进度 但是很头疼文件大小获取 因为多线程下载文件头锁定有点难😭 |
|
Show me how you get the size, or post the files. I'll see if I can figure out how to help you. Before starting the threads, make one quick request to the mod portal API to get the mod metadata (the exact file size in bytes is usually written in JSON format for each mod version). Write these sizes into a data structure. Run a multithreaded loader that will take a predefined total_size from memory and silently calculate the percentage complete (current_bytes / total_size * 100). Friend, I've rewritten the translation logic a bit. I'll be at my computer this evening and compile the release. I think you'll like it. |
为 FSM 添加完整的 Factorio 服务端版本管理功能。
功能:
详见 PR OpenFactorioServerManager#443 完整说明:OpenFactorioServerManager#443