Exemple #1
0
    void _initThusters()
    {
        atmThs.Clear();
        hyThs.Clear();
        ionThs.Clear();
        pg.GridTerminalSystem.GetBlocksOfType <IMyThrust> (
            l, x => x.CubeGrid == pg.Me.CubeGrid);
        MatrixD  m = pg.Me.CubeGrid.WorldMatrix;
        Thruster t;

        for (int i = 0; i < l.Count; i++)
        {
            t = new Thruster((IMyThrust)l[i], m, pg);
            if (t.get_type() == Thruster.ATM)
            {
                atmThs.Add(t);
            }
            else if (t.get_type() == Thruster.HY)
            {
                hyThs.Add(t);
            }
            else if (t.get_type() == Thruster.ION)
            {
                ionThs.Add(t);
            }
            else
            {
            }
        }
        forceMapDict.Clear();
        _addOrDictList(atmThs);
        _addOrDictList(ionThs);
        _addOrDictList(hyThs);
    }