Linked Chest And Linked Pipe Space


基于 LinkedChestAndPipe:不同星球独立共享库存;并加入切换星球ui。 原版能力:关联箱、关联管(可开关, 兼容太空)、背包共享区、自动设置关联箱关联管ID、自动同步共享区与关联箱/管内物品数量、自动满足物流请求、自动回收背包回收区、同步频率可在线修改。 提示:增加物品堆叠、降低同步频率可相对提升性能。

Content
6 hours ago
2.0
13
Storage Cheats
Owner:
imyourfather
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
3 days ago
Latest Version:
1.0.11 (6 hours ago)
Factorio version:
2.0
Downloaded by:
13 users

旧存档直接迁移会丢失库存流体,所以要在迁移前在旧存档执行命令
/c 下划线下划线LinkedChestAndPipe下划线下划线 local p=game.player local f=p.force local s=p.physical_surface or p.surface for ,t in pairs(f.find_chart_tags(s)) do if t.text and t.text:sub(1,5)=="LCPF|" then t.destroy() end end local payload={v=1,fluids={},pipes={}} for fn,fd in pairs(storage.force_datas or {}) do local fl={} for n,d in pairs(fd.fluid_data or {}) do if (d.count or 0)~=0 then fl[n]=d.count end end for ,sc in pairs(fd.scopes or {}) do for n,d in pairs(sc.fluid_data or {}) do if (d.count or 0)~=0 then fl[n]=(fl[n] or 0)+(d.count or 0) end end end if next(fl) then payload.fluids[fn]=fl end end for fn,fp in pairs(storage.linked_pipes_entity or {}) do local pipes={} for un,d in pairs(fp) do if d.link_id and d.link_id>0 then pipes[tostring(un)]={link_id=d.link_id,limit=d.limit,storage=d.storage,mode=d.mode,update=d.update,old=d.old and d.old.name,new=d.new and d.new.name} end end if next(pipes) then payload.pipes[fn]=pipes end end local enc=helpers.table_to_json(payload) local chunk=150 local total=math.max(1,math.ceil(#enc/chunk)) f.add_chart_tag(s,{position={-1000000,-1000000},text="LCPF|0|"..total,icon={type="virtual",name="signal-info"}}) local i=1 for n=1,total do local part=enc:sub(i,i+chunk-1) f.add_chart_tag(s,{position={-1000000+n,-1000000},text="LCPF|"..n.."|"..part,icon={type="virtual",name="signal-info"}}) i=i+chunk end p.print("LCPF导出完成 chunks="..total.." 请保存后禁用LinkedChestAndPipe并启用LinkedChestAndPipeSpace")
执行后保存存档,禁用原LinkedChestAndPipe模组,启用本模组后加载存档,自动导入流体库存