安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题
You're better off using the group based renaming one linked in the description.
How odd. I was using it myself quite recently. I will have a look.
And to the best of my knowledge you can't grab the name of a ship.
It was made before you could run scripts with arguments, or use Echo but that is a good idea for an upgrade.
Just getting the ship name in this case would give me a page full of"Large Cargo Freighter ..." entries, and I wouldn't see the full name until I clicked on the block.
I'd say you could just make it use a string from the argument box, and that would work fine.
If you wanted the full ship name, you'd only have to type it in once, and you wouldn't need to open up the script editor, just change the text in the argument box.
I then made a few more tweaks to generally update and clean up the code, but I didn't touch the core logic of it.
I replaced line 9 with this:
List<IMyTerminalBlock> blocks = new List<IMyTerminalBlock>();
GridTerminalSystem.GetBlocksOfType<IMyTerminalBlock>(blocks);
After that, I changed the list index variable to " i " instead of " j " because " i " for index makes more sense to me.
Finally, I replaced the call to "Print()" with "Echo()", and deleted the code defining "Print()".
The Echo function actually works better here because it prints out text directly to the programmable block's menu, and because it's a default function you don't need to define it, saving program space.
Oh yeah, I also re-whitespaced the whole thing, as I prefer al my curly brakets to be on their own lines.
This script is a bit outdated. I use a group based renaming script now.
By using a group based renaming system you can run the same script on any programable block and set a group to decide what to rename target blocks connected to that grid so no editing of the script is needed.