This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SoundDesc Id="TtsDockedBay1" SoundName="Base sounds: Docked, Bay 1" /> | |
<SoundDesc Id="TtsDockedBay2" SoundName="Base sounds: Docked, Bay 2" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Sound> | |
<Id> | |
<TypeId>AudioDefinition</TypeId> | |
<SubtypeId>SoundId</SubtypeId> | |
</Id> | |
<Category>Sb</Category> | |
<MaxDistance>100</MaxDistance> | |
<Volume>1.00</Volume> | |
<Loopable>false</Loopable> | |
<Waves> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<SoundCategories> | |
<SoundCategory> | |
<Id> | |
<TypeId>SoundCategoryDefinition</TypeId> | |
<SubtypeId>MyModId</SubtypeId> | |
</Id> | |
<Sounds> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ITerminalAction> actions = new List<ITerminalAction>(); | |
block.GetActions(actions); | |
foreach (var action in actions) | |
{ | |
Echo(action.Id + " " + action.Name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TimeSpan LastElapsedTime; | |
void Main(string argument) | |
{ | |
if (ElapsedTime.TotalSeconds == 0) | |
{ | |
// First run. The script has just been created/compiled, or the game was loaded. | |
SetupThings(); | |
} | |
else if (LastElapsedTime == null || ElapsedTime < LastElapsedTime.Add(TimeSpan.FromSeconds(10))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main(string argument) | |
{ | |
Echo("Time since last run: " + ElapsedTime.TotalSeconds); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main(string argument) | |
{ | |
var blocks = new List<IMyTerminalBlock>(); | |
GridTerminalSystem.GetBlocksOfType<IMyRadioAntenna>(blocks); | |
blocks[0].SetCustomName("Received argument: " + argument); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main(string argument) | |
{ | |
var block = GridTerminalSystem.GetBlockWithName("Beacon"); | |
// Verbose way: | |
block.GetActionWithName("OnOff").Apply(block); | |
// Better way: | |
block.ApplyAction("OnOff"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main(string argument) | |
{ | |
var info = GridTerminalSystem.GetBlockWithName("Solar Panel").DetailedInfo; | |
var lines = info.Split('\n'); | |
var output = lines[2].Split(':')[1].Trim(); // output = "110 kW" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main(string argument) | |
{ | |
// Read some persisted data from Storage | |
Echo("Argument from last time was " + Storage); | |
// Write some data to Storage | |
Storage = argument; | |
} |
NewerOlder