Exemple #1
0
        // Function from file: cloning.dm
        public override void RefreshParts(  )
        {
            Obj_Item_Weapon_StockParts_ScanningModule S = null;
            Obj_Item_Weapon_StockParts_Manipulator    P = null;

            this.speed_coeff = 0;
            this.efficiency  = 0;

            foreach (dynamic _a in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_ScanningModule)))
            {
                S = _a;

                this.efficiency += Convert.ToDouble(S.rating);
            }

            foreach (dynamic _b in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_Manipulator)))
            {
                P = _b;

                this.speed_coeff += Convert.ToDouble(P.rating);
            }
            this.heal_level = this.efficiency * 15 + 10;

            if (this.heal_level > 100)
            {
                this.heal_level = 100;
            }
            return;
        }
        // Function from file: experimentor.dm
        public override void RefreshParts(  )
        {
            Obj_Item_Weapon_StockParts_Manipulator    M  = null;
            Obj_Item_Weapon_StockParts_ScanningModule M2 = null;
            Obj_Item_Weapon_StockParts_MicroLaser     M3 = null;


            foreach (dynamic _a in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_Manipulator)))
            {
                M = _a;


                if (this.resetTime > 0 && this.resetTime - Convert.ToDouble(M.rating) >= 1)
                {
                    this.resetTime -= Convert.ToDouble(M.rating);
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_ScanningModule)))
            {
                M2 = _b;

                this.badThingCoeff += Convert.ToDouble(M2.rating * 2);
            }

            foreach (dynamic _c in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_MicroLaser)))
            {
                M3 = _c;

                this.badThingCoeff += Convert.ToDouble(M3.rating);
            }
            return;
        }
        // Function from file: dna_scanner.dm
        public override void RefreshParts(  )
        {
            Obj_Item_Weapon_StockParts_ScanningModule P  = null;
            Obj_Item_Weapon_StockParts_Manipulator    P2 = null;
            Obj_Item_Weapon_StockParts_MicroLaser     P3 = null;

            this.scan_level      = 0;
            this.damage_coeff    = 0;
            this.precision_coeff = 0;

            foreach (dynamic _a in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_ScanningModule)))
            {
                P = _a;

                this.scan_level += Convert.ToDouble(P.rating);
            }

            foreach (dynamic _b in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_Manipulator)))
            {
                P2 = _b;

                this.precision_coeff = P2.rating;
            }

            foreach (dynamic _c in Lang13.Enumerate(this.component_parts, typeof(Obj_Item_Weapon_StockParts_MicroLaser)))
            {
                P3 = _c;

                this.damage_coeff = P3.rating;
            }
            return;
        }