Space Engineers

Space Engineers

Taleden's Inventory Manager
Decker_MMIV 28 Feb, 2017 @ 12:31pm
Code size reduction ideas/suggestions
This suggestion below might not bring 'TIM the Enchanter' back, but should reduce code size by ~1000 characters:
void Main(string argument) { ... Func<string,bool> cycle=(string txt)=> { bool b = cycleStep == step++ * cycleLength / MAX_CYCLE_STEPS; if (b && cycleLength > 1) { Echo(txt); debugText.Add(txt); } return b; }; if (cycle("Scanning grid connectors ...")) { ... if (cycle("Scanning inventories ...")) { ... if (cycle("Scanning tags ...")) { ...