Ejemplo n.º 1
0
        // Function from file: monkeyrecycler.dm
        public override void RefreshParts(  )
        {
            double  req_grind  = 0;
            dynamic cubes_made = null;
            Obj_Item_Weapon_StockParts_Manipulator B = null;
            Obj_Item_Weapon_StockParts_MatterBin   M = null;

            req_grind  = 5;
            cubes_made = 1;

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

                req_grind -= Convert.ToDouble(B.rating);
            }

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

                cubes_made = M.rating;
            }
            this.cube_production = cubes_made;
            this.required_grind  = req_grind;
            this.desc            = "A machine used for recycling dead monkeys into monkey cubes. It currently produces " + cubes_made + " cube(s) for every " + this.required_grind + " monkey(s) inserted.";
            return;
        }
        // Function from file: circuitprinter.dm
        public override void RefreshParts(  )
        {
            double T = 0;
            Obj_Item_Weapon_ReagentContainers_Glass G  = null;
            Obj_Item_Weapon_StockParts_MatterBin    M  = null;
            Obj_Item_Weapon_StockParts_Manipulator  M2 = null;

            T = 0;

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

                this.reagents.maximum_volume += G.volume;
                G.reagents.trans_to(this, G.reagents.total_volume);
            }

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

                T += Convert.ToDouble(M.rating);
            }
            this.max_material_amount = T * 75000;
            T = 0;

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

                T += Convert.ToDouble(M2.rating);
            }
            this.efficiency_coeff = Math.Pow(2, T - 1);
            return;
        }
Ejemplo n.º 3
0
        // Function from file: recycler.dm
        public override void RefreshParts(  )
        {
            dynamic amt_made = null;
            dynamic mat_mod  = null;
            Obj_Item_Weapon_StockParts_MatterBin   B = null;
            Obj_Item_Weapon_StockParts_Manipulator M = null;

            amt_made = 0;
            mat_mod  = 0;

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

                mat_mod = B.rating * 2;
            }
            mat_mod *= 50000;

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

                amt_made = M.rating * 25;
            }
            this.materials.max_amount = mat_mod;
            this.amount_produced      = Num13.MinInt(100, Convert.ToInt32(amt_made));
            return;
        }
Ejemplo n.º 4
0
        // Function from file: microwave.dm
        public override void RefreshParts(  )
        {
            dynamic E         = null;
            dynamic max_items = null;
            Obj_Item_Weapon_StockParts_MicroLaser M  = null;
            Obj_Item_Weapon_StockParts_MatterBin  M2 = null;

            max_items = 10;

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

                E += M.rating;
            }

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

                max_items = M2.rating * 10;
            }
            this.efficiency     = Lang13.BoolNullable(E);
            this.max_n_of_items = max_items;
            return;
        }
Ejemplo n.º 5
0
        // Function from file: autolathe.dm
        public override void RefreshParts(  )
        {
            double tot_rating = 0;
            Obj_Item_Weapon_StockParts_MatterBin   MB = null;
            Obj_Item_Weapon_StockParts_Manipulator M  = null;

            tot_rating      = 0;
            this.prod_coeff = 0;

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

                tot_rating += Convert.ToDouble(MB.rating);
            }
            tot_rating *= 25000;
            this.materials.max_amount = tot_rating * 3;

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

                this.prod_coeff += Convert.ToDouble(M.rating - 1);
            }
            return;
        }
Ejemplo n.º 6
0
        // Function from file: biogenerator.dm
        public override void RefreshParts(  )
        {
            double  E           = 0;
            double  P           = 0;
            dynamic max_storage = null;
            Obj_Item_Weapon_StockParts_MatterBin   B = null;
            Obj_Item_Weapon_StockParts_Manipulator M = null;

            E           = 0;
            P           = 0;
            max_storage = 40;

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

                P          += Convert.ToDouble(B.rating);
                max_storage = B.rating * 40;
            }

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

                E += Convert.ToDouble(M.rating);
            }
            this.efficiency   = E;
            this.productivity = P;
            this.max_items    = max_storage;
            return;
        }
Ejemplo n.º 7
0
        // Function from file: gibber.dm
        public override void RefreshParts(  )
        {
            double gib_time = 0;
            Obj_Item_Weapon_StockParts_MatterBin   B = null;
            Obj_Item_Weapon_StockParts_Manipulator M = null;

            gib_time = 40;

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

                this.meat_produced += Convert.ToDouble(B.rating * 3);
            }

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

                gib_time    -= Convert.ToDouble(M.rating * 5);
                this.gibtime = gib_time;

                if (Convert.ToDouble(M.rating) >= 2)
                {
                    this.ignore_clothing = true;
                }
            }
            return;
        }
Ejemplo n.º 8
0
        // Function from file: hydroponics.dm
        public override void RefreshParts(  )
        {
            double tmp_capacity = 0;
            Obj_Item_Weapon_StockParts_MatterBin   M  = null;
            Obj_Item_Weapon_StockParts_Manipulator M2 = null;

            tmp_capacity = 0;

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

                tmp_capacity += Convert.ToDouble(M.rating);
            }

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

                this.rating = M2.rating;
            }
            this.maxwater   = tmp_capacity * 50;
            this.maxnutri   = tmp_capacity * 5;
            this.waterlevel = this.maxwater;
            this.nutrilevel = 3;
            return;
        }
Ejemplo n.º 9
0
        // Function from file: chem_dispenser.dm
        public override void RefreshParts(  )
        {
            double time        = 0;
            double temp_energy = 0;
            int    i           = 0;
            Obj_Item_Weapon_StockParts_MatterBin   M  = null;
            Obj_Item_Weapon_StockParts_Capacitor   C  = null;
            Obj_Item_Weapon_StockParts_Cell        P  = null;
            Obj_Item_Weapon_StockParts_Manipulator M2 = null;

            time        = 0;
            temp_energy = 0;

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

                temp_energy += Convert.ToDouble(M.rating);
            }
            temp_energy--;
            this.max_energy = temp_energy * 5;

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

                time += Convert.ToDouble(C.rating);
            }

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

                time += Num13.Round(P.maxcharge ?? 0, 10000) / 10000;
            }
            this.recharge_delay /= time / 2;

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

                i = 1;

                while (i <= Convert.ToDouble(M2.rating))
                {
                    this.dispensable_reagents |= this.dispensable_reagent_tiers[i];
                    i++;
                }
            }
            this.dispensable_reagents = GlobalFuncs.sortList(this.dispensable_reagents);
            return;
        }
Ejemplo n.º 10
0
        // Function from file: smartfridge.dm
        public override void RefreshParts(  )
        {
            Obj_Item_Weapon_StockParts_MatterBin B = null;


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

                this.max_n_of_items = B.rating * 1500;
            }
            return;
        }
Ejemplo n.º 11
0
        // Function from file: thermomachine.dm
        public override void RefreshParts(  )
        {
            dynamic B = null;
            Obj_Item_Weapon_StockParts_MatterBin M = null;


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

                B += M.rating;
            }
            this.heat_capacity = Math.Pow(Convert.ToDouble(B - 1), 2) * 5000;
            return;
        }
Ejemplo n.º 12
0
        // Function from file: teleporter.dm
        public override void RefreshParts(  )
        {
            double A = 0;
            Obj_Item_Weapon_StockParts_MatterBin M = null;

            A = 0;

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

                A += Convert.ToDouble(M.rating);
            }
            this.accurate = A;
            return;
        }
Ejemplo n.º 13
0
        // Function from file: cryo.dm
        public override void RefreshParts(  )
        {
            dynamic C = null;
            Obj_Item_Weapon_StockParts_MatterBin M = null;


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

                C += M.rating;
            }
            this.efficiency             = Lang13.Initial(this, "efficiency") * C;
            this.sleep_factor           = Lang13.Initial(this, "sleep_factor") * C;
            this.paralyze_factor        = Lang13.Initial(this, "paralyze_factor") * C;
            this.heat_capacity          = Lang13.Initial(this, "heat_capacity") / C;
            this.conduction_coefficient = Lang13.Initial(this, "conduction_coefficient") * C;
            return;
        }
Ejemplo n.º 14
0
        // Function from file: processor.dm
        public override void RefreshParts(  )
        {
            Obj_Item_Weapon_StockParts_MatterBin   B = null;
            Obj_Item_Weapon_StockParts_Manipulator M = null;


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

                this.rating_amount = B.rating;
            }

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

                this.rating_speed = M.rating;
            }
            return;
        }
Ejemplo n.º 15
0
        // Function from file: seed_extractor.dm
        public override void RefreshParts(  )
        {
            Obj_Item_Weapon_StockParts_MatterBin   B = null;
            Obj_Item_Weapon_StockParts_Manipulator M = null;


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

                this.max_seeds = B.rating * 1000;
            }

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

                this.seed_multiplier = M.rating;
            }
            return;
        }
Ejemplo n.º 16
0
        // Function from file: equipment_locker.dm
        public override void RefreshParts(  )
        {
            dynamic ore_pickup_rate_temp             = null;
            dynamic point_upgrade_temp               = null;
            dynamic sheet_per_ore_temp               = null;
            Obj_Item_Weapon_StockParts_MatterBin   B = null;
            Obj_Item_Weapon_StockParts_Manipulator M = null;
            Obj_Item_Weapon_StockParts_MicroLaser  L = null;

            ore_pickup_rate_temp = 15;
            point_upgrade_temp   = 1;
            sheet_per_ore_temp   = 1;

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

                sheet_per_ore_temp = B.rating;
            }

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

                ore_pickup_rate_temp = M.rating * 15;
            }

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

                point_upgrade_temp = L.rating;
            }
            this.ore_pickup_rate = ore_pickup_rate_temp;
            this.point_upgrade   = point_upgrade_temp;
            this.sheet_per_ore   = sheet_per_ore_temp;
            return;
        }
        // Function from file: mech_fabricator.dm
        public override void RefreshParts(  )
        {
            double T = 0;
            Obj_Item_Weapon_StockParts_MatterBin   M  = null;
            Obj_Item_Weapon_StockParts_MicroLaser  Ma = null;
            Obj_Item_Weapon_StockParts_Manipulator Ml = null;

            T = 0;

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

                T += Convert.ToDouble(M.rating);
            }
            this.res_max_amount = T * 37500 + 187000;
            T = -1;

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

                T += Convert.ToDouble(Ma.rating);
            }
            this.resource_coeff = Num13.Round(Convert.ToDouble(Lang13.Initial(this, "resource_coeff") - Lang13.Initial(this, "resource_coeff") * T / 8), 0.01);
            T = -1;

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

                T += Convert.ToDouble(Ml.rating);
            }
            this.time_coeff = Num13.Round(Convert.ToDouble(Lang13.Initial(this, "time_coeff") - Lang13.Initial(this, "time_coeff") * T / 5), 0.01);
            return;
        }
Ejemplo n.º 18
0
        // Function from file: Sleeper.dm
        public override void RefreshParts(  )
        {
            dynamic E = null;
            Obj_Item_Weapon_StockParts_MatterBin B = null;
            double I = 0;
            Obj_Item_Weapon_StockParts_Manipulator M = null;
            double i = 0;


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

                E += B.rating;
            }

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

                I += M.rating;
            }


            this.efficiency      = Lang13.Initial(this, "efficiency") * E;
            this.min_health      = Lang13.Initial(this, "min_health") * E;
            this.available_chems = new ByTable();

            foreach (dynamic _c in Lang13.IterateRange(1, I))
            {
                i = _c;

                this.available_chems.Or(this.possible_chems[i]);
            }
            return;
        }