游戲《太空工程師》常用代碼集
????????普普通通上個網(wǎng)的話 Github 太不穩(wěn)定了,索性直接收集整理一些常用框架的放B站當字典查。

獲取所有的 Blocks
Gets?all?the available blocks the Grid Terminal System has access to. Requires a target list of the base?
IMyTerminalBlock
?type.

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

通過名字獲?。:龣z索)
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 base?IMyTerminalBlock
?type.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.

區(qū)分兩個被比較組是否在同一個機械組內

使子類也具備操作權

獲取在運行的編程塊
使編程塊持續(xù)運行
多種方式喚醒程序塊
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.UpdateFrequency
UpdateFrequency.Once
UpdateType.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.UpdateFrequency
UpdateFrequency.Update1
UpdateType.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.UpdateFrequency
UpdateFrequency.Update10
UpdateType.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.UpdateFrequency
UpdateFrequency.Update100
另外一種喚醒程序塊的方式

獲取組
通過名稱獲取
通過類型獲取

參考網(wǎng)站