游戏《太空工程师》常用代码集
普普通通上个网的话 Github 太不稳定了,索性直接收集整理一些常用框架的放B站当字典查。

获取所有的 Blocks
Gets all the available blocks the Grid Terminal System has access to. Requires a target list of the base
IMyTerminalBlocktype.

获取某个特定类型的 Blocks
Allows you to retrieve a list of blocks of a specific type, optionally filtered by a given collect predicate.

通过名字获取(模糊检索)
Searches through all the blocks, returning those whose name contains the entered name. Meaning, a block named "Mynoch" would be returned if you search for "no". Also provides the ability to use a collect predicate, just like
GetBlocksOfType. Unfortunately, this method can only accept a target list of the baseIMyTerminalBlocktype.Note: This method is rather inefficiently implemented. You can do everything this method can do, in a better way, simply using the filter of GetBlocksOfType.

通过名字获取(精确检索)
Allows you to retrieve a single block having a specific name. Note that the name must be exact, case sensitive and including any spacing.

获取所有组
Fetches a list of block groups, optionally filtered by a given collect predicate.

通过组合的名字获取组
Returns a block group by its name. Note that the name must be exact, case sensitive and including any spacing.

区分两个被比较组是否在同一个机械组内

使子类也具备操作权

获取在运行的编程块
使编程块持续运行
多种方式唤醒程序块
UpdateType.Trigger: Called from a button, timer, sensor or other simple trigger. An argument will be passed with this flag.UpdateType.Script: Called from another programmable block. An argument will be passed with this flag.UpdateType.Terminal: Called manually through the Terminal. An argument will be passed with this flag.UpdateType.Mod: Called from a mod. An argument will be passed with this flag.UpdateType.IGC: A message has been received through the communications system. The argument will be the callback identifier for the transmission channel.UpdateType.Once: Called automatically by the programmable block because the was set to . This flag does not support arguments (but arguments might be passed if another flag is set)Runtime.UpdateFrequencyUpdateFrequency.OnceUpdateType.Update1:Called automatically by the programmable block because the was set to . This flag does not support arguments (but arguments might be passed if another flag is set)
Runtime.UpdateFrequencyUpdateFrequency.Update1UpdateType.Update10: Called automatically by the programmable block because the was set to . This flag does not support arguments (but arguments might be passed if another flag is set)Runtime.UpdateFrequencyUpdateFrequency.Update10UpdateType.Update100: Called automatically by the programmable block because the was set to . This flag does not support arguments (but arguments might be passed if another flag is set)Runtime.UpdateFrequencyUpdateFrequency.Update100另外一种唤醒程序块的方式

获取组
通过名称获取
通过类型获取

参考网站

