示例#1
0
        // Function from file: ripley.dm
        public Obj_Mecha_Working_Ripley_Mining(dynamic loc = null) : base((object)(loc))
        {
            Obj_Item_MechaParts_MechaEquipment_Drill_Diamonddrill D    = null;
            Obj_Item_MechaParts_MechaEquipment_Drill D2                = null;
            Obj_Item_MechaParts_MechaEquipment_Weapon_Energy_Plasma M  = null;
            Obj_Item_MechaParts_MechaEquipment_HydraulicClamp       HC = null;
            Obj_Item_MechaParts_MechaTracking B = null;
            Obj_Item_MechaParts_MechaEquipment_MiningScanner scanner = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;

            if (Rand13.PercentChance(25))
            {
                D = new Obj_Item_MechaParts_MechaEquipment_Drill_Diamonddrill();
                D.attach(this);
            }
            else
            {
                D2 = new Obj_Item_MechaParts_MechaEquipment_Drill();
                D2.attach(this);
            }

            if (Rand13.PercentChance(25))
            {
                M = new Obj_Item_MechaParts_MechaEquipment_Weapon_Energy_Plasma();
                M.attach(this);
            }
            this.cargo.Add(new Obj_Structure_OreBox(this));
            HC = new Obj_Item_MechaParts_MechaEquipment_HydraulicClamp();
            HC.attach(this);

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

                GlobalFuncs.qdel(B);
            }
            scanner = new Obj_Item_MechaParts_MechaEquipment_MiningScanner();
            scanner.attach(this);
            return;
        }
示例#2
0
        // Function from file: ripley.dm
        public void update_pressure(  )
        {
            dynamic    T           = null;
            GasMixture environment = null;
            double     pressure    = 0;
            Obj_Item_MechaParts_MechaEquipment_Drill drill  = null;
            Obj_Item_MechaParts_MechaEquipment_Drill drill2 = null;

            T           = GlobalFuncs.get_turf(this.loc);
            environment = ((Ent_Static)T).return_air();
            pressure    = environment.return_pressure();

            if (pressure < 20)
            {
                this.step_in = 3;

                foreach (dynamic _a in Lang13.Enumerate(this.equipment, typeof(Obj_Item_MechaParts_MechaEquipment_Drill)))
                {
                    drill = _a;

                    drill.equip_cooldown = Lang13.Initial(drill, "equip_cooldown") / 2;
                }
            }
            else
            {
                this.step_in = 5;

                foreach (dynamic _b in Lang13.Enumerate(this.equipment, typeof(Obj_Item_MechaParts_MechaEquipment_Drill)))
                {
                    drill2 = _b;

                    drill2.equip_cooldown = Lang13.Initial(drill2, "equip_cooldown");
                }
            }
            return;
        }