安裝 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(越南文)
Українська(烏克蘭文)
回報翻譯問題
/************************************************************************************
EasyAPI - Documentation: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=381043
*************************************************************************************/
// This script was made for the LKS_Hydros but can be applied to similar ships
// That means just one group for outer doors, one for inner doors, and one for all the doors
// Feel free to rename the groups accordingly.
//
public static string AIRLOCK_DOORS = "HY 1- Doors"; // your doors group
public static string AIRLOCK_OUTER_DOORS = "HY 1- Doors (Outer)"; // your outer doors group
public static string AIRLOCK_INNER_DOORS = "HY 1- Doors (Inner)"; // your inner doors group
public static bool AIRLOCK_AUTOCLOSE = true; // set it to true if you want the door closing automaticaly after a delay
public static long AIRLOCK_AUTOCLOSEDELAY = 3 * EasyAPI.Seconds; // autoclose delay set to 3 seconds, change it if you want
public class Example : EasyAPI
{
public Example(IMyGridTerminalSystem grid, IMyProgrammableBlock me, Action<string> echo, TimeSpan elapsedTime) : base(grid, me, echo, elapsedTime)
{
// if an outer door is open we close all the other (outer/inner) doors
Blocks.InGroupsNamed(AIRLOCK_OUTER_DOORS).AddEvent(
delegate(EasyBlock thisdoor)
{
return thisdoor.Open();
},
delegate(EasyBlock thisdoor)
{
Blocks.InGroupsNamed(AIRLOCK_DOORS).Minus(thisdoor).ApplyAction("Open_Off");
if(AIRLOCK_AUTOCLOSE) // autoclose the outer door that was open, if any
{
In(AIRLOCK_AUTOCLOSEDELAY, delegate()
{
thisdoor.ApplyAction("Open_Off");
});
}
return true;
},
true
);
// if an inner door is open we close all the other (outer/inner) doors
Blocks.InGroupsNamed(AIRLOCK_INNER_DOORS).AddEvent(
delegate(EasyBlock thisdoor)
{
return thisdoor.Open();
},
delegate(EasyBlock thisdoor)
{
Blocks.InGroupsNamed(AIRLOCK_DOORS).Minus(thisdoor).ApplyAction("Open_Off");
if(AIRLOCK_AUTOCLOSE) // autoclose the inner door that was open, if any
{
In(AIRLOCK_AUTOCLOSEDELAY, delegate()
{
thisdoor.ApplyAction("Open_Off");
});
}
return true;
},
true
);
}
}
/*********************************************/
/*** Advanced users only beyond this point ***/
/*********************************************/
...
Enjoy,
LKS
LKS
By default it will auto close any door after 2-3sec.
If you name two or more doors with exactly same name this script will make sure only one door of the same name can be open at one time by turning off the other(s).
This is your code, not mine ;)
LKS