Space Engineers

Space Engineers

评价数不足
Connector Guard
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
610.336 KB
2022 年 11 月 15 日 下午 3:21
1 项改动说明 ( 查看 )

订阅以下载
Connector Guard

描述
Script to monitor connectors and run timer blocks when the connector is being connected/disconnected/approached, by Ich_73. View on GitHub[github.com].

v1.0 (initial release)

Prerequisites
  • Experimental mode must be enabled!
  • Build a programmable block and load this script

Instructions
  • Build a connector and 1-3 timer blocks (on the same construction as the programmable block)
  • In the custom data of the connector...
    • ... write "@ConnectorGuard" in the first line
    • (optional) ... add a line with "onConnect: <timer block>" to specify the timer block to run when the connector is being connected
    • (optional) ... add a line with "onDisconnect: <timer block>" to specify the timer block to run when the connector is being disconnected
    • (optional) ... add a line with "onApproach: <timer block>" to specify the timer block to run when the connector can connect (but is not yet connected) and was previously disconnected
  • In each timer block...
    • ... set the delay to 00:00:01
    • ... configure the actions to be executed when the timer block is being run
Note that you can specify any combination of onConnect, onDisconnect and onApproach, in any order. You can also use the same timer block for multiple actions.

Examples
A connector that runs "Timer Block 1" on connect and "Timer Block 2" on disconnect has custom data:
@ConnectorGuard onConnect: Timer Block 1 onDisconnect: Timer Block 2

A connector that runs "Timer Block 3" on connect and approach has custom data:
@ConnectorGuard onApproach: Timer Block 3 onConnect: Timer Block 3