Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
PAM stops working if there is no one on the server
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1134945036
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=936622135
Thanks for making it!
string tosclTag = "[TOSCL]";
Add [TOSCL] to your timer block for triggering on loss of control.
Yes, I know it's not very pretty, nor is it optomized. I don't claim to be a coder. I just try to patch bits of code together and pray it works..
replace if ((shipControllers as IMyShipController).IsUnderControl) with:
if ((shipControllers as IMyShipController).IsUnderControl)
{
List<IMyTerminalBlock> tosclTimer = new List<IMyTerminalBlock>();
GridTerminalSystem.GetBlocksOfType<IMyTimerBlock>(tosclTimer);
for (int j = 0; j < tosclTimer.Count; j++)
{
if ((tosclTimer[j].CustomName.Contains(tosclTag)))
(tosclTimer[j] as IMyTerminalBlock).GetActionWithName("Stop").Apply(tosclTimer[j] as IMyTerminalBlock);
}
return true;
}
In the correct indentation for us humans to read :)
Replace the void TriggerOnShipControlLost() with:
void TriggerOnShipControlLost()
{
List<IMyTimerBlock> tosclTimer = new List<IMyTimerBlock>();
GridTerminalSystem.GetBlocksOfType<IMyTimerBlock>(tosclTimer);
for (int i = 0; i < tosclTimer.Count; i++)
{
if ((tosclTimer .CustomName.Contains(tosclTag)))
{
if (!(tosclTimer as IMyTimerBlock).IsCountingDown)
{
(tosclTimer as IMyTerminalBlock).GetActionWithName("Start").Apply(tosclTimer as IMyTerminalBlock);
}
}
}
}
// DisableGyroscopeOverrides();
Gravity drive management would require a far more complex script.
- Turn on a beacon or an antenna and increase their radii to maximum.
- Toggle some blocks on/off for power saving, so the lost ship stays working and broadcasting longer.
- Turn on an auto-pilot for flying your ship to a predefined GPS location.
- Turn off gravity drives but leave other gravity generators working (comment out the DisableGravityDrives();).