Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

[1.142] Generic problem

$
0
0
The following code works/compiled fine in 1.141.

Code:
public List < IMyTerminalBlock > GetTargetBlocks <T> (string Keyword = null) {
 List < IMyTerminalBlock > Output = new List < IMyTerminalBlock > ();
 List < IMyTerminalBlock > Blocks = new List < IMyTerminalBlock > ();
 GridTerminalSystem.GetBlocksOfType<T> (Blocks, (x => x.CubeGrid == Me.CubeGrid));
 for (int e = 0; e < Blocks.Count; e++) {
  if ((Keyword == null) || (Keyword != null && Blocks[e].CustomName.StartsWith(Keyword))) {...
[1.142] Generic problem

Viewing all articles
Browse latest Browse all 903

Trending Articles