Space Engineers

Space Engineers

评价数不足
Configurable Pistons
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
428.494 KB
2021 年 8 月 14 日 下午 8:37
2024 年 1 月 4 日 上午 1:08
3 项改动说明 ( 查看 )

订阅以下载
Configurable Pistons

描述
---------------------------------------------------------------------------------
This is an in-game script for use with programmable blocks
---------------------------------------------------------------------------------

Configurable Pistons

@Author: Gate
@Date: 2023/05/22

@Version: 1.4

@Change-Log:
v1.4: Fixed logic bug, cause i'm an idiot
Auto retract and extend should now work for everyone
and not just our specific uses
v1.3: Fixed Documentation Spelling Error >.<
v1.2: Added Auto Retract and Extend support
v1.1: Bug-fix INI related
v1.0: Initial Release

@Arguments:
This script understands the following arguments
reset - This resets all internal caches.
Run this if you add/remove or change piston settings

@Usage:
Add (and edit) the following to the custom data of any piston you wish to add script functionality

[Piston Settings]
Ignore=False
RetractSpeed=1
ExtendSpeed=1
AutoRetract=False
AutoExtend=False

@Note:
Ignore - If this is set to True, this piston will be (actively)ignored.
- Useful for preconfiguring a piston for "future" use.
RetractSpeed - The speed (in m/s) the piston should move during Retraction
ExtendSpeed - The speed (in m/s) the piston should move during Extension
AutoRetract - Should the piston automatically retract once at full extension
AutoExtend - Should the piston automatically extend once at full retraction


You MUST either recompile the script,
or run with argument "reset"
to populate piston cache


Script (C)opyright 2021 Gate
Some Rights Reserved.

@License:
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/
or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.


Space Engineers is (C)opyright Keen Software House
https://www.spaceengineersgame.com/


Created using the MDK-SE SDK
Malware's Development Kit for Space Engineers
https://github.com/malware-dev/MDK-SE


To Contribute to this Project, please visit:
https://github.com/tgkgate/Configurable-Pistons
2 条留言
Gate  [作者] 2021 年 12 月 30 日 下午 9:09 
@Zia Asuna

Yea, that's a typo in the instructions, it should be " AutoRetract " and not AutoRectract

If you alter the following line
[code]data.Piston.Velocity = data.AutoRetract ? -data.RetractSpeed : -data.RetractSpeed;[/code]
to
[code]data.Piston.Velocity = data.AutoRetract ? -data.RetractSpeed : data.RetractSpeed;[/code]

it should no longer autoretract on full extension, yet still prepare the piston for the alternate speed. my build environment is currently broken, so an mdk-deploy stopped working (nggggh). This will have to suffice for the moment.
Zia Asuna 2021 年 12 月 30 日 下午 4:31 
Script not working right " Pistons will always AutoRectract "

if set to " AutoRectract=True " tjek that will work :selike:
but if set to " AutoRectract=False " the piston´s will still Rectract