CC: Wireless Peripheral Sable
在移动的机械装置中铺设调制解调器线缆通常很不方便。CC: Wireless Peripheral 允许 CC:Tweaked 计算机通过持久的无线链路连接到远程外围设备,这样你的 Lua 程序就可以通过熟悉的 peripheral API 使用它们,而无需物理有线调制解调器网络。
这个想法受到 Drive-By-Wire 的启发,并在此重新构想为专门针对 CC:Tweaked 计算机和外设。这是一个围绕 CC:Tweaked 的外围系统构建的独立实现,支持稳定的设备名称、保存的链接以及可移动的 Sable 组件。
选择一台带有 Wireless Peripheral Linker(无线外设链接器)的计算机,将其用于某个外设的侧面,该设备即可对该选定的计算机可用。链接的外设在世界保存期间保持其分配的名称,并且当受支持的 Sable 组件移动时可以重新映射,这使得该模组非常适合于车辆、移动工厂、控制系统以及其他 Create 或 Sable 构建,在这些场景中布线会显得笨拙或不可能。
功能
- CC:Tweaked 计算机与外设之间的持久无线链接
- 与标准 CC:Tweaked
peripheral API 集成
- 为链接的外设提供稳定且防冲突的名称
- 对受支持的移动 Sable 组件进行自动重映射
- 手持链接器时显示可视化链接覆盖层
- 可配置的创建链接物品消耗
- 每台计算机的可配置链接上限,包括无限链接
- 使用链接器安全移除链接时退还物品
- 英文和俄文本地化
要求
- NeoForge
- CC:Tweaked
- Create
- Sable
该模组必须同时安装在客户端和服务端上。
入门指南
- 制作一个 Wireless Peripheral Linker(无线外设链接器)。
- 对其选中的一台 CC:Tweaked 计算机使用该工具以选定该计算机。
- 对你想要连接的外设侧面使用该工具。
- 通过正常的
peripheral API 从 Lua 访问链接的设备。
潜行状态下使用已链接的外设可移除该链接并收回配置的链接成本物品。
在空中潜行使用可清除链接器的选定计算机,而不会移除任何现有链接。潜行使用被选定的计算机本身可移除其虚拟无线集线器及所有关联链接,并返回任何可回收的链接成本物品。
配置
服务器所有者和整合包作者可以配置创建链接是否消耗物品、使用哪种物品,以及单台计算机最多可以链接多少外设。
配置文件为每个世界单独创建:
<world>/serverconfig/cc-wireless-peripheral-sable-server.toml
重要提示
链接的外设仅在其所在的区块加载时有效。该模组不会自行强制加载区块。
破坏或替换链接的外设会移除其链接,但不会退还存储的链接成本物品。如果你希望退回物品,请在破坏外设之前使用 Wireless Peripheral Linker(无线外设链接器)移除链接。
CC: Wireless Peripheral Sable
Running modem cables through a moving contraption is rarely convenient. CC: Wireless Peripheral lets CC:Tweaked computers connect to remote peripherals through persistent wireless links, so your Lua programs can use them through the familiar peripheral API without a physical wired-modem network.
The idea was inspired by Drive-By-Wire, reimagined here specifically for CC:Tweaked computers and peripherals. This is a separate implementation built around CC:Tweaked's peripheral system, with support for stable device names, saved links, and moving Sable assemblies.
Select a computer with the Wireless Peripheral Linker, use it on the side of a peripheral, and that device becomes available to the selected computer. Linked peripherals keep their assigned names across world saves and can be remapped when supported Sable assemblies move, making the mod a natural fit for vehicles, mobile factories, control systems, and other Create or Sable builds where cables would be awkward or impossible.
Features
- Persistent wireless links between CC:Tweaked computers and peripherals
- Integration with the standard CC:Tweaked
peripheral API
- Stable, collision-safe names for linked peripherals
- Automatic remapping for supported moving Sable assemblies
- A visual link overlay while holding the linker
- Configurable item costs for creating links
- A configurable link limit per computer, including unlimited links
- Item refunds when links are removed safely with the linker
- English and Russian localization
Requirements
- NeoForge
- CC:Tweaked
- Create
- Sable
The mod must be installed on both the client and the server.
Getting started
- Craft a Wireless Peripheral Linker.
- Use it on a CC:Tweaked computer to select that computer.
- Use it on the side of the peripheral you want to connect.
- Access the linked device from Lua through the normal
peripheral API.
Sneak-use a linked peripheral with the linker to remove that link and recover the configured link-cost item.
Sneak-use in the air to clear the linker’s selected computer without removing any existing links. Sneak-use the selected computer itself to remove its virtual wireless hub and all associated links, returning any recoverable link-cost items.
Configuration
Server owners and modpack authors can configure whether creating a link consumes an item, which item is used, and how many peripherals may be linked to a single computer.
The configuration file is created separately for each world:
<world>/serverconfig/cc-wireless-peripheral-sable-server.toml
Important notes
Linked peripherals only work while their chunks are loaded. The mod does not force-load chunks on its own.
Breaking or replacing a linked peripheral removes its link without refunding the stored link-cost item. Remove the link with the Wireless Peripheral Linker before breaking the peripheral when you want the item returned.
评论 0
登录后参与评分
还没有评论,来抢沙发吧