Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Database IO Test 数据化仓储

【查看中文介绍,请下翻页面】
# Database IO Test

#How is this works?
Tired of too many items causing your FPS to plummet? Try this mod now!
This mod allows you to store all your items in a DatabaseTerminal instead of steel cabinets or Items IO!

We provide an interactive DatabaseTerminal for accessing and storing items, capable of holding every type of item in the game. This significantly reduces the number of active Items on the server or locally, thereby optimizing your game's frame rate. Players can deposit items through the DatabaseInterface and interact with the terminal to withdraw them.

The mod also allows for automatic restocking from the database to crafting tables, enabling rapid manufacturing. Additionally, with the auto-reloader, turrets can achieve uninterrupted firing!

Status
- Core gameplay logic and UI are implemented in C# (LuaCs).
- Terminal interaction is currently C# UI + XML CustomInterface.
- Data model and interaction flow are still evolving.

What This Mod Adds
- `DatabaseStorageAnchor`
- Persistence anchor for shared database storage.
- `DatabaseInterface` (handheld) and `DatabaseInterfaceFixed` (stationary)
- Ingest items and serialize them into the shared database.
- `DatabaseUnpackInterface` (handheld) and `DatabaseUnpackInterfaceFixed` (stationary)
- Automatically unpacks containers placed inside, extracting and storing all contained items into the shared database.
- `DatabaseTerminal` (handheld), `DatabaseTerminalFixed` (stationary) and `DatabaseCraftTerminal` (fabricator-hybrid)
- Atomic access to database items (no session lock).
- Multiple terminals can be opened simultaneously without conflicting.
- Paging, search, sort and compact actions via C# UI.
- `DatabaseAutoRestocker`
- Pulls configured items from database and refills linked targets.
- Fabricator integration (`DB Fill` button via override)
- Pulls recipe materials from database into fabricator input.

Runtime Requirements
- Install LuaCsForBarotrauma.
- Open LuaCs Settings (top-right in game) and enable Enable CSharp Scripting.
- Enable this mod in your content package list.

Inspiration And References
- Applied Energistics 2 (AE2): https://appliedenergistics.org/
- Item IO Framework: https://steamcommunity.com/sharedfiles/filedetails/?id=2950383008
- IO Storage: https://steamcommunity.com/sharedfiles/filedetails/?id=3646358075
- UI reference Super Terminal: https://steamcommunity.com/sharedfiles/filedetails/?id=3670545214&searchtext=superterminal

These projects are design/implementation references only. This mod is not affiliated with them.

Future Plans
1. Codebase Cleanup: Refactor and clean up the legacy code.
2. API Safety: Expose core mechanisms as safe, external-facing APIs.
3. Precompiled Release: Transition to releasing precompiled DLL versions.
4. Gameplay Expansion: Design custom missions, events, and automated machines to enrich gameplay content.
5. DLC Compatibility: Update and adapt to upcoming game DLCs.

Save Compatibility Warning
- Future updates may change internal database serialization format.
- Old campaign saves may be affected (missing items, duplicated items, or reset database state are possible in breaking updates).
- Always backup saves before updating this mod.

Recommended Update Procedure
1. Close any active terminal session.
2. End round / save campaign normally.
3. Backup your save files.
4. Update mod files.
5. Re-test with a non-critical save first.

【Please scroll up to view the English introduction.】
# 数据化仓储(测试版)

#这是做什么的?
厌倦了若干的物品让你的帧率暴跌?快试试这个模组吧!
本模组允许你将拥有的所有物品都放到数据化终端、而非钢柜或者IO箱中!
我们提供一个可以交互、存取物品的数据终端,可容纳游戏中的全部类型物品,从而大大减少服务器/本地正在运行的Items数量,进而优化游戏帧率。玩家可以通过数据库接口来存入物品,再与终端进行交互从而进行物品的取出。
模组同时可从数据库取物自动补充到加工台,从而实现快速制造;也可以通过自动补货器也可以让炮塔实现不间断射击!

当前状态
- 核心逻辑和交互界面由 C#(LuaCs) 实现。
- 当前终端界面为 C# UI + XML CustomInterface。
- 数据结构和交互行为仍在迭代中。
- 终端模型说明:`NO_SESSION_MODEL.zh-CN.md`(无会话原子模式)。

模组内容
- `DatabaseStorageAnchor`(数据库存储器/锚点)
- 承载数据库持久化存储。
- `DatabaseInterface`(手持)与 `DatabaseInterfaceFixed`(固定式)
- 吸收物品并序列化写入共享数据库。
- `DatabaseUnpackInterface`(手持解包接口)与 `DatabaseUnpackInterfaceFixed`(固定式解包接口)
- 可以自动解包放入其中的容器,并将容器内的所有物品递归存入数据库。
- `DatabaseTerminal`(手持)、`DatabaseTerminalFixed`(固定式)与 `DatabaseCraftTerminal`(数据库合成终端)
- 已彻底移除旧版独占会话机制,采用无会话原子模式访问数据库。
- 支持多玩家、多终端同时打开进行独立操作,互不抢占。
- 本地 UI 快照只读,取物通过原子请求写入终端输出缓冲区。
- 支持分类、搜索、排序、变体分格与可调 cell 大小(C# UI)。
- `DatabaseAutoRestocker`(自动补货器)
- 从数据库取物并补充到链接目标。
- 加工台联动(`DB Fill` 按钮,基于 override)
- 从数据库拉取配方原料到加工台输入槽。

运行前置
- 需要安装 LuaCsForBarotrauma。
- 在游戏右上角 LuaCs Settings 中打开 Enable CSharp Scripting。
- 在内容包中启用本模组。

灵感与参考
- Applied Energistics 2(AE2):https://appliedenergistics.org/
- Item IO Framework:https://steamcommunity.com/sharedfiles/filedetails/?id=2950383008
- IO Storage:https://steamcommunity.com/sharedfiles/filedetails/?id=3646358075
- UI 参考 Super Terminal:https://steamcommunity.com/sharedfiles/filedetails/?id=3670545214&searchtext=superterminal

以上项目仅作为设计与实现参考,本模组与其无隶属关系。

未来计划
1. 代码清理: 重构并清理旧版遗留代码。
2. API 安全化: 将内部方法改造为安全的外部调用接口。
3. 预编译发布: 未来计划改为发布预编译(DLL)版本。
4. 扩展游戏性: 为本模组设计专属任务、事件、自动化机器,丰富游戏内容。
5. DLC 适配: 等待官方 DLC 更新后进行适配。

存档兼容性警告
- 后续更新可能调整数据库序列化结构。
- 旧战役存档可能受到影响(例如:数据库物品丢失、重复、重置等破坏性变化)。
- 更新前请务必备份存档。

推荐更新流程
1. 正常结束本轮并保存战役。
2. 备份存档文件。
3. 更新模组后先用非关键存档进行回归测试。