// Function from file: robot_modules.dm
 public Obj_Item_Weapon_RobotModule(dynamic loc = null) : base((object)(loc))
 {
     this.modules.Add(new Obj_Item_Device_Assembly_Flash_Cyborg(this));
     this.emag      = new Obj_Item_Toy_Sword(this);
     this.emag.name = "Placeholder Emag Item";
     return;
 }
 // Function from file: robot_modules.dm
 public override dynamic Destroy(  )
 {
     this.modules.Cut();
     this.emag = null;
     this.storages.Cut();
     return(base.Destroy());
 }
Beispiel #3
0
        // Function from file: wires.dm
        public void interact(dynamic user = null)
        {
            dynamic  A = null;
            Obj_Item I = null;


            if (!Lang13.Bool(this.interactable(user)))
            {
                return;
            }
            this.ui_interact(user);

            foreach (dynamic _a in Lang13.Enumerate(this.assemblies))
            {
                A = _a;

                I = this.assemblies[A];

                if (I is Obj_Item && I.on_found(user))
                {
                    return;
                }
            }
            return;
        }
Beispiel #4
0
        // Function from file: machinery.dm
        public virtual bool default_deconstruction_crowbar(dynamic C = null, bool?ignore_panel = null)
        {
            ignore_panel = ignore_panel ?? false;

            bool _default = false;

            Obj_Machinery_ConstructableFrame_MachineFrame M = null;
            Obj_Item I = null;

            _default = C is Obj_Item_Weapon_Crowbar && (Lang13.Bool(this.panel_open) || ignore_panel == true) && !Lang13.Bool(this.flags & 128);

            if (_default)
            {
                this.deconstruction();
                GlobalFuncs.playsound(this.loc, "sound/items/Crowbar.ogg", 50, 1);
                M = new Obj_Machinery_ConstructableFrame_MachineFrame(this.loc);
                this.transfer_fingerprints_to(M);
                M.state      = 2;
                M.icon_state = "box_1";

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


                    if (I.reliability != 100 && this.crit_fail)
                    {
                        I.crit_fail = true;
                    }
                    I.loc = this.loc;
                }
                GlobalFuncs.qdel(this);
            }
            return(_default);
        }
Beispiel #5
0
        // Function from file: pneumaticCannon.dm
        public override double examine(dynamic user = null)
        {
            Obj_Item I = null;

            base.examine((object)(user));

            if (!(Map13.GetDistance(user, this) <= 1))
            {
                user.WriteMsg("<span class='notice'>You'll need to get closer to see any more.</span>");
                return(0);
            }

            foreach (dynamic _a in Lang13.Enumerate(this.loadedItems, typeof(Obj_Item)))
            {
                I = _a;

                user.WriteMsg(new Txt("<span class='info'> ").icon(I).str(" It has ").the(I).item().str(" loaded.</span>").ToString());
            }

            if (Lang13.Bool(this.tank))
            {
                user.WriteMsg(new Txt("<span class='notice'> ").icon(this.tank).str(" It has ").the(this.tank).item().str(" mounted onto it.</span>").ToString());
            }
            return(0);
        }
Beispiel #6
0
        // Function from file: tanks.dm
        public override int suicide_act(Mob_Living_Carbon_Human user = null)
        {
            Mob      H = null;
            Obj_Item W = null;

            H = user;
            user.visible_message("<span class='suicide'>" + user + " is putting the " + this + "'s valve to their lips! I don't think they're gonna stop!</span>");
            GlobalFuncs.playsound(this.loc, "sound/effects/spray.ogg", 10, 1, -3);

            if (H != null && !Lang13.Bool(GlobalFuncs.qdeleted(H)))
            {
                foreach (dynamic _a in Lang13.Enumerate(H, typeof(Obj_Item)))
                {
                    W = _a;

                    H.unEquip(W);

                    if (Rand13.PercentChance(50))
                    {
                        Map13.Step(W, Convert.ToInt32(Rand13.PickFromTable(GlobalVars.alldirs)));
                    }
                }
                ((dynamic)H).hair_style = "Bald";
                H.update_hair();
                ((dynamic)H).blood_max = 5;
                GlobalFuncs.gibs(H.loc, H.viruses, ((dynamic)H).dna);
                ((dynamic)H).adjustBruteLoss(1000);
            }
            return(1);
        }
Beispiel #7
0
        // Function from file: customizables.dm
        public virtual void initialize_custom_food(Obj_Item BASE = null, dynamic I = null, dynamic user = null)
        {
            Obj_Item RC = null;
            Obj      O  = null;


            if (BASE is Obj_Item_Weapon_ReagentContainers)
            {
                RC = BASE;
                RC.reagents.trans_to(this, RC.reagents.total_volume);
            }

            foreach (dynamic _a in Lang13.Enumerate(BASE.contents, typeof(Obj)))
            {
                O = _a;

                this.contents.Add(O);
            }

            if (Lang13.Bool(I) && Lang13.Bool(user))
            {
                this.attackby(I, user);
            }
            ((Mob)user).unEquip(BASE);
            GlobalFuncs.qdel(BASE);
            return;
        }
Beispiel #8
0
        // Function from file: storage.dm
        public override bool storage_contents_dump_act(Obj_Item_Weapon_Storage src_object = null, Mob user = null)
        {
            Obj_Item I = null;


            foreach (dynamic _a in Lang13.Enumerate(src_object, typeof(Obj_Item)))
            {
                I = _a;


                if (user.s_active != src_object)
                {
                    if (I.on_found(user))
                    {
                        return(false);
                    }
                }

                if (this.can_be_inserted(I, false, user))
                {
                    src_object.remove_from_storage(I, this);
                }
            }
            this.orient2hud(user);
            src_object.orient2hud(user);

            if (user.s_active != null)
            {
                user.s_active.close(user);
                user.s_active.show_to(user);
            }
            return(true);
        }
        // Function from file: shadowling_abilities.dm
        public double extinguishItem(Obj_Item I = null)
        {
            Obj_Item F = null;
            Obj_Item P = null;


            if (I is Obj_Item_Device_Flashlight)
            {
                F = I;

                if (Lang13.Bool(((dynamic)F).on))
                {
                    if (GlobalFuncs.is_type_in_list(I, this.blacklisted_lights))
                    {
                        I.visible_message("<span class='danger'>" + I + " dims slightly before scattering the shadows around it.</span>");
                        return(Convert.ToDouble(((dynamic)F).brightness_on));
                    }
                    ((dynamic)F).on = 0;
                    ((dynamic)F).update_brightness();
                }
            }
            else if (I is Obj_Item_Device_Pda)
            {
                P = I;
                ((dynamic)P).fon = 0;
            }
            I.SetLuminosity(0);
            return(I.luminosity);
        }
Beispiel #10
0
        // Function from file: storage.dm
        public virtual void show_to(dynamic user = null)
        {
            Obj_Item I = null;


            if (!Lang13.Bool(user.client))
            {
                return;
            }

            if (user.s_active != this && Lang13.Bool(user.stat) == false)
            {
                foreach (dynamic _a in Lang13.Enumerate(this, typeof(Obj_Item)))
                {
                    I = _a;


                    if (I.on_found(user))
                    {
                        return;
                    }
                }
            }

            if (Lang13.Bool(user.s_active))
            {
                ((Obj_Item_Weapon_Storage)user.s_active).hide_from(user);
            }
            user.client.screen |= this.boxes;
            user.client.screen |= this.closer;
            user.client.screen |= this.contents;
            user.s_active       = this;
            this.is_seeing.Or(user);
            return;
        }
Beispiel #11
0
        // Function from file: cavity_implant.dm
        public override int preop(dynamic user = null, Mob target = null, string target_zone = null, dynamic tool = null, Surgery surgery = null)
        {
            Obj_Item I = null;


            foreach (dynamic _a in Lang13.Enumerate(((dynamic)target).internal_organs, typeof(Obj_Item)))
            {
                I = _a;


                if (!(I is Obj_Item_Organ))
                {
                    this.IC = I;
                    break;
                }
            }

            if (Lang13.Bool(tool))
            {
                ((Ent_Static)user).visible_message("" + user + " begins to insert " + tool + " into " + target + "'s " + target_zone + ".", "<span class='notice'>You begin to insert " + tool + " into " + target + "'s " + target_zone + "...</span>");
            }
            else
            {
                ((Ent_Static)user).visible_message("" + user + " checks for items in " + target + "'s " + target_zone + ".", "<span class='notice'>You check for items in " + target + "'s " + target_zone + "...</span>");
            }
            return(0);
        }
Beispiel #12
0
        // Function from file: bins.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            dynamic  T = null;
            Obj_Item O = null;


            if (A is Obj_Item_Weapon_Storage_Bag_Trash)
            {
                T = A;
                user.WriteMsg("<span class='notice'>You fill the bag.</span>");

                foreach (dynamic _a in Lang13.Enumerate(this, typeof(Obj_Item)))
                {
                    O = _a;


                    if (((Obj_Item_Weapon_Storage)T).can_be_inserted(O, true))
                    {
                        O.loc = T;
                    }
                }
                T.update_icon();
                this.do_animate();
            }
            else if (A is Obj_Item_Weapon_Wrench)
            {
                this.anchored = !Lang13.Bool(this.anchored);
                GlobalFuncs.playsound(this.loc, "sound/items/ratchet.ogg", 75, 1);
            }
            else
            {
                base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
            }
            return(null);
        }
Beispiel #13
0
        // Function from file: turf.dm
        public override bool storage_contents_dump_act(Obj_Item_Weapon_Storage src_object = null, Mob user = null)
        {
            Obj_Item I = null;


            if (src_object.contents.len != 0)
            {
                Task13.User.WriteMsg("<span class='notice'>You start dumping out the contents...</span>");

                if (!GlobalFuncs.do_after(Task13.User, 20, null, src_object))
                {
                    return(false);
                }
            }

            foreach (dynamic _a in Lang13.Enumerate(src_object, typeof(Obj_Item)))
            {
                I = _a;


                if (user.s_active != src_object)
                {
                    if (I.on_found(user))
                    {
                        return(false);
                    }
                }
                src_object.remove_from_storage(I, this);
            }
            return(true);
        }
 // Function from file: interactive.dm
 public override bool attacked_by(Obj_Item I = null, dynamic user = null, bool?def_zone = null)
 {
     base.attacked_by(I, (object)(user), def_zone);
     this.retal        = true;
     this.retal_target = user;
     return(false);
 }
Beispiel #15
0
        // Function from file: uplink_item.dm
        public bool buy(Mob user = null, Obj_Item_Device_Uplink U = null)
        {
            dynamic  A = null;
            dynamic  B = null;
            Obj_Item I = null;
            Mob      H = null;


            if (!(U is Obj_Item_Device_Uplink))
            {
                return(false);
            }

            if (!(user != null) || user.incapacitated())
            {
                return(false);
            }

            if (Convert.ToDouble(U.telecrystals) < this.cost)
            {
                return(false);
            }
            else
            {
                U.telecrystals       -= this.cost;
                U.spent_telecrystals += this.cost;
            }
            A = this.spawn_item(GlobalFuncs.get_turf(user), U);
            B = A;

            if (B is Obj_Item_Weapon_Storage_Box && B.contents.len > 0)
            {
                foreach (dynamic _a in Lang13.Enumerate(B, typeof(Obj_Item)))
                {
                    I = _a;

                    U.purchase_log += new Txt("<big>").icon(I).str("</big>").ToString();
                }
            }
            else
            {
                U.purchase_log += new Txt("<big>").icon(A).str("</big>").ToString();
            }

            if (user is Mob_Living_Carbon_Human && A is Obj_Item)
            {
                H = user;

                if (H.put_in_hands(A))
                {
                    H.WriteMsg("" + A + " materializes into your hands!");
                }
                else
                {
                    H.WriteMsg(new Txt().The(A).item().str(" materializes onto the floor.").ToString());
                }
            }
            return(true);
        }
Beispiel #16
0
 // Function from file: secbot.dm
 public bool check_for_weapons(Obj_Item slot_item = null)
 {
     if (slot_item != null && slot_item.needs_permit)
     {
         return(true);
     }
     return(false);
 }
Beispiel #17
0
        // Function from file: soulstone.dm
        public bool getCultGhost(Obj_Item_Device_Soulstone C = null, dynamic T = null, dynamic U = null)
        {
            dynamic           chosen_ghost          = null;
            Mob_Dead_Observer ghost                 = null;
            ByTable           consenting_candidates = null;
            Obj_Item          W = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Dead_Observer)))
            {
                ghost = _a;


                if (ghost.mind != null && ghost.mind.current == T && ghost.client != null)
                {
                    chosen_ghost = ghost;
                    break;
                }
            }

            if (!Lang13.Bool(chosen_ghost))
            {
                consenting_candidates = GlobalFuncs.pollCandidates("Would you like to play as a Shade?", "Cultist", null, "cultist", 100);

                if (consenting_candidates.len != 0)
                {
                    chosen_ghost = Rand13.PickFromTable(consenting_candidates);
                }
            }

            if (!Lang13.Bool(T))
            {
                return(false);
            }

            if (!Lang13.Bool(chosen_ghost))
            {
                U.WriteMsg("<span class='danger'>The ghost has fled beyond your grasp.</span>");
                return(false);
            }

            if (C.contents.len != 0)
            {
                return(false);
            }
            T.ckey = chosen_ghost.ckey;

            foreach (dynamic _b in Lang13.Enumerate(T, typeof(Obj_Item)))
            {
                W = _b;

                ((Mob)T).unEquip(W);
            }
            this.init_shade(C, T, U);
            GlobalFuncs.qdel(T);
            return(true);
        }
Beispiel #18
0
        // Function from file: recycler.dm
        public void eat(dynamic L = null)
        {
            bool     gib = false;
            Obj_Item I   = null;

            L.loc = this.loc;

            if (L is Mob_Living_Silicon)
            {
                GlobalFuncs.playsound(this.loc, "sound/items/welder.ogg", 50, 1);
            }
            else
            {
                GlobalFuncs.playsound(this.loc, "sound/effects/splat.ogg", 50, 1);
            }
            gib = true;

            if (L is Mob_Living_Carbon)
            {
                gib = false;

                if (Lang13.Bool(L.stat) == false)
                {
                    ((Ent_Dynamic)L).say("ARRRRRRRRRRRGH!!!");
                }
                this.add_blood(L);
            }

            if (!this.blood && !(L is Mob_Living_Silicon))
            {
                this.blood = true;
                this.update_icon();
            }

            foreach (dynamic _a in Lang13.Enumerate(((Mob)L).get_equipped_items(), typeof(Obj_Item)))
            {
                I = _a;


                if (((Mob)L).unEquip(I))
                {
                    this.recycle(I, false);
                }
            }
            ((Mob)L).Paralyse(5);

            if (gib || this.emagged == 2)
            {
                ((Mob)L).gib();
            }
            else if (this.emagged == 1)
            {
                ((Mob_Living)L).adjustBruteLoss(1000);
            }
            return;
        }
Beispiel #19
0
 // Function from file: storage.dm
 public NumberedDisplay(Obj_Item sample = null)
 {
     if (!(sample is Obj_Item))
     {
         GlobalFuncs.qdel(this);
     }
     this.sample_object = sample;
     this.number        = 1;
     return;
 }
Beispiel #20
0
        // Function from file: guardian.dm
        public override bool Life(  )
        {
            Obj_Item W = null;

            base.Life();

            if (Lang13.Bool(this.summoner))
            {
                if (Convert.ToInt32(this.summoner.stat) == 2)
                {
                    this.WriteMsg("<span class='danger'>Your summoner has died!</span>");
                    this.visible_message("<span class='danger'><B>The " + this + " dies along with its user!</B></span>");
                    ((Ent_Static)this.summoner).visible_message("<span class='danger'><B>" + this.summoner + "'s body is completely consumed by the strain of sustaining " + this + "!</B></span>");

                    foreach (dynamic _a in Lang13.Enumerate(this.summoner, typeof(Obj_Item)))
                    {
                        W = _a;


                        if (!((Mob)this.summoner).unEquip(W))
                        {
                            GlobalFuncs.qdel(W);
                        }
                    }
                    ((Mob)this.summoner).dust();
                    this.ghostize();
                    GlobalFuncs.qdel(this);
                }
            }
            else
            {
                this.WriteMsg("<span class='danger'>Your summoner has died!</span>");
                this.visible_message("<span class='danger'><B>The " + this + " dies along with its user!</B></span>");
                this.ghostize();
                GlobalFuncs.qdel(this);
            }

            if (Lang13.Bool(this.summoner))
            {
                if (Map13.GetDistance(GlobalFuncs.get_turf(this.summoner), GlobalFuncs.get_turf(this)) <= this.range)
                {
                    return(false);
                }
                else
                {
                    this.WriteMsg("You moved out of range, and were pulled back! You can only move " + this.range + " meters from " + this.summoner.real_name);
                    this.visible_message("<span class='danger'>The " + this + " jumps back to its user.</span>");
                    GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Guardian_Phase_Out), GlobalFuncs.get_turf(this));
                    this.forceMove(GlobalFuncs.get_turf(this.summoner));
                    GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Guardian_Phase), GlobalFuncs.get_turf(this));
                }
            }
            return(false);
        }
Beispiel #21
0
        // Function from file: storage.dm
        public virtual void orient2hud(dynamic user = null)
        {
            int             adjusted_contents = 0;
            ByTable         numbered_contents = null;
            Obj_Item        I         = null;
            bool            found     = false;
            NumberedDisplay ND        = null;
            int             row_num   = 0;
            int             col_count = 0;

            adjusted_contents = this.contents.len;

            if (this.display_contents_with_number)
            {
                numbered_contents = new ByTable();
                adjusted_contents = 0;

                foreach (dynamic _b in Lang13.Enumerate(this.contents, typeof(Obj_Item)))
                {
                    I = _b;

                    found = false;

                    foreach (dynamic _a in Lang13.Enumerate(numbered_contents, typeof(NumberedDisplay)))
                    {
                        ND = _a;


                        if (ND.sample_object.type == I.type)
                        {
                            ND.number++;
                            found = true;
                            break;
                        }
                    }

                    if (!found)
                    {
                        adjusted_contents++;
                        numbered_contents.Add(new NumberedDisplay(I));
                    }
                }
            }
            row_num   = 0;
            col_count = Num13.MinInt(7, ((int)(this.storage_slots ?? 0))) - 1;

            if (adjusted_contents > 7)
            {
                row_num = Num13.Floor((adjusted_contents - 1) / 7);
            }
            this.standard_orient_objs(row_num, col_count, numbered_contents);
            return;
        }
Beispiel #22
0
        // Function from file: nuclear.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            Obj_Item_Clothing_Suit_Space_Hardsuit suit = null;
            Obj_Item helmet = null;

            base.post_equip(H, visualsOnly);
            suit = ((dynamic)H).wear_suit;
            suit.ToggleHelmet();
            helmet = ((dynamic)H).head;
            helmet.attack_self(H);
            ((dynamic)H).v_internal = ((dynamic)H).r_store;
            return;
        }
Beispiel #23
0
        // Function from file: storage.dm
        public override void empty_object_contents(bool?burn = null, dynamic new_loc = null)
        {
            Obj_Item Item = null;


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

                this.remove_from_storage(Item, this.loc, burn);
            }
            return;
        }
        // Function from file: bags.dm
        public void rebuild_overlays(  )
        {
            Obj_Item I = null;

            this.overlays.Cut();

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

                this.overlays.Add(new Image(I.icon, null, I.icon_state, -1));
            }
            return;
        }
Beispiel #25
0
        // Function from file: machinery.dm
        public void display_parts(dynamic user = null)
        {
            Obj_Item C = null;

            user.WriteMsg("<span class='notice'>Following parts detected in the machine:</span>");

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

                user.WriteMsg(new Txt("<span class='notice'>").icon(C).str(" ").item(C.name).str("</span>").ToString());
            }
            return;
        }
Beispiel #26
0
        // Function from file: mimic.dm
        public override void initialize(  )
        {
            Obj_Item I = null;

            base.initialize();

            foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Obj_Item)))
            {
                I = _a;

                I.loc = this;
            }
            return;
        }
		// Function from file: reagentgrinder.dm
		public dynamic get_allowed_by_id( Obj_Item O = null ) {
			dynamic i = null;

			
			foreach (dynamic _a in Lang13.Enumerate( this.blend_items )) {
				i = _a;
				

				if ( Lang13.Bool( i.IsInstanceOfType( O ) ) ) {
					return this.blend_items[i];
				}
			}
			return null;
		}
Beispiel #28
0
        // Function from file: changeling.dm
        public Changelingprofile create_profile(dynamic H = null, bool?user = null, bool?protect = null)
        {
            protect = protect ?? false;

            Changelingprofile prof    = null;
            dynamic           new_dna = null;
            ByTable           slots   = null;
            dynamic           slot    = null;
            Obj_Item          I       = null;

            prof            = new Changelingprofile();
            H.dna.real_name = H.real_name;
            new_dna         = Lang13.Call(H.dna.type);
            ((Dna)H.dna).copy_dna(new_dna);
            prof.dna         = new_dna;
            prof.name        = H.real_name;
            prof.v_protected = protect;
            prof.underwear   = H.underwear;
            prof.undershirt  = H.undershirt;
            prof.socks       = H.socks;
            slots            = new ByTable(new object [] { "head", "wear_mask", "back", "wear_suit", "w_uniform", "shoes", "belt", "gloves", "glasses", "ears", "wear_id", "s_store" });

            foreach (dynamic _a in Lang13.Enumerate(slots))
            {
                slot = _a;


                if (H.vars.Contains(slot))
                {
                    I = H.vars[slot];

                    if (!(I != null))
                    {
                        continue;
                    }
                    prof.name_list[slot]        = I.name;
                    prof.appearance_list[slot]  = I.appearance;
                    prof.flags_cover_list[slot] = I.flags_cover;
                    prof.item_color_list[slot]  = I.item_color;
                    prof.item_state_list[slot]  = I.item_state;
                    prof.exists_list[slot]      = 1;
                }
                else
                {
                    continue;
                }
            }
            return(prof);
        }
Beispiel #29
0
        // Function from file: standard.dm
        public override void post_equip(Mob H = null, int?visualsOnly = null)
        {
            visualsOnly = visualsOnly ?? GlobalVars.FALSE;

            Obj_Item_Clothing_Under U              = null;
            dynamic                 sec_briefcase  = null;
            Obj_Item                briefcase_item = null;
            int?                    i              = null;
            Obj_Item_Device_Pda     pda            = null;
            Obj_Item_Weapon_Card_Id W              = null;

            U = ((dynamic)H).w_uniform;
            U.attachTie(new Obj_Item_Clothing_Tie_Waistcoat(H));

            if (Lang13.Bool(visualsOnly))
            {
                return;
            }
            sec_briefcase = H.l_hand;

            foreach (dynamic _a in Lang13.Enumerate(sec_briefcase, typeof(Obj_Item)))
            {
                briefcase_item = _a;

                GlobalFuncs.qdel(briefcase_item);
            }
            i = null;
            i = 3;

            while ((i ?? 0) > 0)
            {
                ((Obj_Item_Weapon_Storage)sec_briefcase).handle_item_insertion(new Obj_Item_Stack_Spacecash_C1000(), true);
                i--;
            }
            ((Obj_Item_Weapon_Storage)sec_briefcase).handle_item_insertion(new Obj_Item_Weapon_Gun_Energy_KineticAccelerator_Crossbow(), true);
            ((Obj_Item_Weapon_Storage)sec_briefcase).handle_item_insertion(new Obj_Item_Weapon_Gun_Projectile_Revolver_Mateba(), true);
            ((Obj_Item_Weapon_Storage)sec_briefcase).handle_item_insertion(new Obj_Item_AmmoBox_A357(), true);
            ((Obj_Item_Weapon_Storage)sec_briefcase).handle_item_insertion(new Obj_Item_Weapon_C4(), true);
            pda        = ((dynamic)H).belt;
            pda.owner  = H.real_name;
            pda.ownjob = "Reaper";
            pda.update_label();
            W                 = ((dynamic)H).wear_id;
            W.access          = GlobalFuncs.get_all_accesses();
            W.assignment      = "Reaper";
            W.registered_name = H.real_name;
            W.update_label(H.real_name);
            return;
        }
        // Function from file: bags.dm
        public override bool attack(dynamic M = null, dynamic user = null, bool?def_zone = null)
        {
            ByTable  oldContents = null;
            Obj_Item I           = null;
            int?     i           = null;

            base.attack((object)(M), (object)(user), def_zone);
            oldContents = this.contents.Copy();
            this.__CallVerb("Empty Contents");

            foreach (dynamic _a in Lang13.Enumerate(oldContents, typeof(Obj_Item)))
            {
                I = _a;

                Task13.Schedule(0, (Task13.Closure)(() => {
                    i = null;
                    i = 1;

                    while ((i ?? 0) <= Rand13.Int(1, 2))
                    {
                        if (I != null)
                        {
                            Map13.Step(I, Convert.ToInt32(Rand13.Pick(new object [] { GlobalVars.NORTH, GlobalVars.SOUTH, GlobalVars.EAST, GlobalVars.WEST })));
                            Task13.Sleep(Rand13.Int(2, 4));
                        }
                        i++;
                    }
                    return;
                }));
            }

            if (Rand13.PercentChance(50))
            {
                GlobalFuncs.playsound(M, "sound/items/trayhit1.ogg", 50, 1);
            }
            else
            {
                GlobalFuncs.playsound(M, "sound/items/trayhit2.ogg", 50, 1);
            }

            if (M is Mob_Living_Carbon_Human || M is Mob_Living_Carbon_Monkey)
            {
                if (Rand13.PercentChance(10))
                {
                    ((Mob)M).Weaken(2);
                }
            }
            return(false);
        }