ComputerCraft 内置编辑器几乎无法使用——屏幕极小,且不支持复制粘贴、撤销和重做。实际开发 ComputerCraft 代码时,大家通常会借助外部编辑器(如 VS Code)。
本模组旨在解决这一问题:多人游戏中使用外部编辑器较为困难,而提供一个专为 ComputerCraft 代码设计的内置编辑器,将极大提升快速编辑的体验。例如:右键点击函数名可尝试跳转到该函数在文件中的定义位置;右键点击 ComputerCraft(或 Lua)函数可在游戏内打开对应 Wiki 页面;此外还包含文件树等功能。
当前已实现的功能:
- 上下文相关的变量自动补全(不会推荐 300 行前 for 循环内部声明的变量)
- 完整可用的文件/文件夹树,并支持缩放
- 右键点击变量/函数名可跳转至其在当前文件中的定义处
- 若外设被包装为某个变量,右键点击该变量可跳转至该外设的 Wiki 页面;但若外设未硬编码则无效(计算机侧边包装除外,此类情况会正确显示对应 Wiki 页面)
默认情况下,仅高级计算机(Advanced Computer)具备此功能,并通过 Shift+右键点击计算机来打开。但也可通过配置文件将其应用于所有计算机类型。
本模组尚未完全完善,但相比 ComputerCraft 原生编辑器,你将获得更佳的体验。如果发现任何问题(例如不应出现时被建议了变量,或应出现时未出现),欢迎在问题追踪器中提交 Issue。
需要 CC:Tweaked。Lua 及 CC 函数的 Wiki 信息已内置,其他内容未内置。
如需添加自定义自动补全,请参阅示例模组,该模组同时提供了自动补全和 Wiki 条目入口 点击此处查看示例模组
In-game editor for computer craft is practically unusable - very small screen, no copy and paste, no undo and redo. Anyone that is actually busy with computer craft use an external editor, like VSC.
This mod aims to rectify such problem as multiplayer makes using an external editor hard and giving a proper editor for computer craft code would make quick editing much easier. Right clicking a function name will try to jump to where its defined in the file, right clicking computer craft (or lua) functions will open a wiki in game. a file tree, and so on.
What is currently working:
- variable autocomplete in a given context (Wont offer you the variable that is declared inside a for loop 300 lines up
- fully functional file/folder tree, paired with zoom
- right clicking a variable / function name will jump to its definition in that file
- Peripherals that is wrapped in a variable will send you to the wiki of that peripheral if the variable is right clicked, doesnt work if the peripheral is not hardcoded, with the exception being of wrapping sides of the computer - that will correctly give you the wiki page.
By default, only Advanced computer is given such functionality, and is opened by shift-right clicking the PC. But can be given to all computers via config.
Its not feature complete, but you'll likely have a better experience than the Computer craft editor, if you find any issues (Like a variable being suggested when it shouldn't be or otherwise should be when it isn't) feel free to make an issue report on the issue tracker.
Requires CC:Tweaked. Lua and CC functions for wiki are baked in, everything else is not.
For adding your own autocomplete, read the example mod that adds both autocomplete and a wiki entry Click me for example mod
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
下载 CIDE-CC
- 利用 Lua 钩子实现调试器:你可以添加断点,代码将在该处暂停执行,显示当前变量、逐步执行到下一行,并提供其他一些极其有用的功能。由于此更改的性质,这是一个 Alpha 版本,如果你发现任何错误,请向我们报告。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧