[#12622] 为所有逻辑传感器选项添加描述
变更摘要
解决逻辑编辑器中传感器选择器缺少工具提示或显示错误提示的问题。为所有剩余的可感知 LAccess 值添加了英文描述,措辞基于相关组件的实现。
状态 Open · 目标 master ← logic-sensor-descriptions
文件 1 · 代码变化 +57 / -0
类型 文本更新 · UI/UX
主要变更
- 为所有剩余的可感知 LAccess 值添加 laccess.<name> 描述。
- 修复部分传感器因回退到 lenum.* 而显示无关字符串的问题。
- 描述措辞参考了 BuildingComp、UnitComp、BulletComp 及炮塔方块的 sense() / senseObject() 实现。
- 仅更新英文基础语言包,其他语言翻译交由常规本地化流程处理。
影响范围
- 逻辑编辑器
- 传感器系统
- 本地化
可能影响
- 修复传感器悬停无提示或提示错误的问题
- 提升逻辑编辑器中传感器选择的用户体验
以上影响分析根据 PR 描述及代码修改推断,不代表维护者正式结论。
重点文件
core/assets/bundles/bundle.properties
修改 · +57 / -0
- 添加了多个 laccess.* 属性的英文描述(如 totalitems, firstitem, totalliquids, totalpower 等)。
- 补充了物品、液体、电力容量及电网相关传感器的提示文本。
作者说明
- 我已阅读贡献指南。
- 我已确保代码可以编译。
- 我已确保其在游戏内正常运行。
解决 Anuken/Mindustry-Suggestions#5222。
逻辑编辑器中的传感器选择器通过 LCanvas.tooltip 为每个选项提供工具提示,该函数会查找 laccess.<name>(并回退到 lenum.<name>)。只有大约 15 个可感知的 LAccess 值具有对应条目,因此其余值在悬停或长按时不会显示工具提示。此外,还有少数选项拾取了同名的无关 lenum.* 字符串——例如 @building 会显示“特定组中的建筑”。
本次更新为所有剩余的可感知值添加了 laccess.<name> 行,包括特权的摄像头传感器。措辞遵循 BuildingComp、UnitComp、BulletComp 和炮塔方块中的 sense() / senseObject() 实现。
仅修改了英文基础语言包;其他语言的翻译留给常规的区域设置工作流处理。
GitHub 原文
- I have read the contribution guidelines.
- I have ensured that my code compiles.
- I have ensured that this functions correctly in-game.
Resolves Anuken/Mindustry-Suggestions#5222.
The sensor picker in the logic editor gives each choice a tooltip via LCanvas.tooltip, which looks up laccess.<name> (falling back to lenum.<name>). Only ~15 of the senseable LAccess values had an entry, so the rest showed no tooltip on hover / long-press. A few also picked up an unrelated lenum.* string of the same name — e.g. @building showed "Building in a specific group".
This adds a laccess.<name> line for every remaining senseable value, including the privileged camera sensors. Wording follows the sense() / senseObject() implementations in BuildingComp, UnitComp, BulletComp and the turret blocks.
Only the English base bundle is touched; translations are left for the usual locale workflow.
由 MDT GitHub 同步机器人自动同步。中文翻译、摘要及代码影响分析由 AI 生成,仅供参考。