// Function from file: equipment_locker.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            Tile_Simulated_Mineral M = null;


            foreach (dynamic _a in Lang13.Enumerate(typeof(Game13), typeof(Tile_Simulated_Mineral)))
            {
                M = _a;


                if (Lang13.Bool(M.scan_state))
                {
                    M.icon_state = M.scan_state;
                }
            }
            GlobalFuncs.qdel(this);
            return(null);
        }
        // Function from file: mine_turfs.dm
        public Tile_Simulated_Mineral_Random(dynamic loc = null) : base((object)(loc))
        {
            dynamic mName            = null;
            Tile_Simulated_Mineral M = null;

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

            if (Rand13.PercentChance(this.mineralChance))
            {
                mName = GlobalFuncs.pickweight(this.mineralSpawnChanceList);

                if (Lang13.Bool(mName))
                {
                    dynamic _a = mName;                     // Was a switch-case, sorry for the mess.
                    if (_a == "Uranium")
                    {
                        M = new Tile_Simulated_Mineral_Uranium(this);
                    }
                    else if (_a == "Iron")
                    {
                        M = new Tile_Simulated_Mineral_Iron(this);
                    }
                    else if (_a == "Diamond")
                    {
                        M = new Tile_Simulated_Mineral_Diamond(this);
                    }
                    else if (_a == "Gold")
                    {
                        M = new Tile_Simulated_Mineral_Gold(this);
                    }
                    else if (_a == "Silver")
                    {
                        M = new Tile_Simulated_Mineral_Silver(this);
                    }
                    else if (_a == "Plasma")
                    {
                        M = new Tile_Simulated_Mineral_Plasma(this);
                    }
                    else if (_a == "Cave")
                    {
                        new Tile_Simulated_Floor_Plating_Asteroid_Airless_Cave(this);
                    }
                    else if (_a == "Gibtonite")
                    {
                        M = new Tile_Simulated_Mineral_Gibtonite(this);
                    }
                    else if (_a == "Bananium")
                    {
                        M = new Tile_Simulated_Mineral_Clown(this);
                    }
                    else if (_a == "BScrystal")
                    {
                        M = new Tile_Simulated_Mineral_Bscrystal(this);
                    }

                    if (M != null)
                    {
                        M.mineralAmt       = Rand13.Int(1, 5);
                        M.environment_type = this.environment_type;
                        M.turf_type        = this.turf_type;
                        M.baseturf         = this.baseturf;
                        Task13.Source      = M;
                        M.levelupdate();
                    }
                }
            }
            return;
        }
        public override bool f_action(dynamic target = null)
        {
            dynamic target_obj          = null;
            Tile_Simulated_Mineral M    = null;
            dynamic             ore_box = null;
            Obj_Item_Weapon_Ore ore     = null;
            Tile_Simulated_Floor_Plating_Asteroid M2 = null;
            dynamic             ore_box2             = null;
            Obj_Item_Weapon_Ore ore2 = null;


            if (!this.action_checks(target))
            {
                return(false);
            }

            if (target is Tile && !(target is Tile_Simulated))
            {
                return(false);
            }

            if (target is Obj)
            {
                target_obj = target;

                if (target_obj.unacidable)
                {
                    return(false);
                }
            }
            ((Ent_Static)target).visible_message("<span class='warning'>" + this.chassis + " starts to drill " + target + ".</span>", "<span class='userdanger'>" + this.chassis + " starts to drill " + target + "...</span>", "<span class='italics'>You hear drilling.</span>");

            if (this.do_after_cooldown(target))
            {
                if (target is Tile_Simulated_Wall_RWall)
                {
                    if (this is Obj_Item_MechaParts_MechaEquipment_Drill_Diamonddrill)
                    {
                        if (this.do_after_cooldown(target))
                        {
                            this.log_message("Drilled through " + target);
                            ((Ent_Static)target).ex_act(3);
                        }
                    }
                    else
                    {
                        this.occupant_message("<span class='danger'>" + target + " is too durable to drill through.</span>");
                    }
                }
                else if (target is Tile_Simulated_Mineral)
                {
                    foreach (dynamic _a in Lang13.Enumerate(Map13.FetchInRange(1, this.chassis), typeof(Tile_Simulated_Mineral)))
                    {
                        M = _a;


                        if ((Map13.GetDistance(this.chassis, M) & this.chassis.dir) != 0)
                        {
                            M.gets_drilled(this.chassis.occupant);
                        }
                    }
                    this.log_message("Drilled through " + target);

                    if (Lang13.Bool(Lang13.FindIn(typeof(Obj_Item_MechaParts_MechaEquipment_HydraulicClamp), this.chassis.equipment)))
                    {
                        ore_box = Lang13.FindIn(typeof(Obj_Structure_OreBox), ((dynamic)this.chassis).cargo);

                        if (Lang13.Bool(ore_box))
                        {
                            foreach (dynamic _b in Lang13.Enumerate(Map13.FetchInRange(this.chassis, 1), typeof(Obj_Item_Weapon_Ore)))
                            {
                                ore = _b;


                                if ((Map13.GetDistance(this.chassis, ore) & this.chassis.dir) != 0)
                                {
                                    ore.Move(ore_box);
                                }
                            }
                        }
                    }
                }
                else if (target is Tile_Simulated_Floor_Plating_Asteroid)
                {
                    foreach (dynamic _c in Lang13.Enumerate(Map13.FetchInRange(this.chassis, 1), typeof(Tile_Simulated_Floor_Plating_Asteroid)))
                    {
                        M2 = _c;


                        if ((Map13.GetDistance(this.chassis, M2) & this.chassis.dir) != 0)
                        {
                            M2.gets_dug();
                        }
                    }
                    this.log_message("Drilled through " + target);

                    if (Lang13.Bool(Lang13.FindIn(typeof(Obj_Item_MechaParts_MechaEquipment_HydraulicClamp), this.chassis.equipment)))
                    {
                        ore_box2 = Lang13.FindIn(typeof(Obj_Structure_OreBox), ((dynamic)this.chassis).cargo);

                        if (Lang13.Bool(ore_box2))
                        {
                            foreach (dynamic _d in Lang13.Enumerate(Map13.FetchInRange(this.chassis, 1), typeof(Obj_Item_Weapon_Ore)))
                            {
                                ore2 = _d;


                                if ((Map13.GetDistance(this.chassis, ore2) & this.chassis.dir) != 0)
                                {
                                    ore2.Move(ore_box2);
                                }
                            }
                        }
                    }
                }
                else
                {
                    this.log_message("Drilled through " + target);

                    if (target is Mob_Living)
                    {
                        if (this is Obj_Item_MechaParts_MechaEquipment_Drill_Diamonddrill)
                        {
                            this.drill_mob(target, this.chassis.occupant, 120);
                        }
                        else
                        {
                            this.drill_mob(target, this.chassis.occupant);
                        }
                    }
                    else
                    {
                        ((Ent_Static)target).ex_act(2);
                    }
                }
            }
            return(false);
        }