Beispiel #1
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);
        }
Beispiel #2
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);
        }
Beispiel #3
0
        // Function from file: objs.dm
        public override bool storage_contents_dump_act(Obj_Item_Weapon_Storage src_object = null, Mob user = null)
        {
            dynamic T = null;

            T = GlobalFuncs.get_turf(this);
            return(((Ent_Static)T).storage_contents_dump_act(src_object, user));
        }
 // Function from file: lockbox.dm
 public override bool storage_contents_dump_act(Obj_Item_Weapon_Storage src_object = null, Mob user = null)
 {
     if (this.locked)
     {
         user.WriteMsg("<span class='warning'>It's locked!</span>");
         return(false);
     }
     return(base.storage_contents_dump_act(src_object, user));
 }
Beispiel #5
0
        // Function from file: storage.dm
        public ByTable return_inv(  )
        {
            ByTable L = null;
            Obj_Item_Weapon_Storage S = null;

            L = new ByTable();
            L.Add(this.contents);

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

                L.Add(S.return_inv());
            }
            return(L);
        }
        // Function from file: disposal-unit.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);
                    }
                }
                src_object.remove_from_storage(I, this);
            }
            return(true);
        }
Beispiel #7
0
 // Function from file: items.dm
 public void on_exit_storage(Obj_Item_Weapon_Storage S = null)
 {
     return;
 }
Beispiel #8
0
 // Function from file: door.dm
 public override bool storage_contents_dump_act(Obj_Item_Weapon_Storage src_object = null, Mob user = null)
 {
     return(false);
 }
Beispiel #9
0
        // Function from file: storage.dm
        public virtual bool remove_from_storage(dynamic W = null, dynamic new_location = null, bool?burn = null)
        {
            burn = burn ?? false;

            Obj_Item_Weapon_Storage F = null;
            dynamic    M  = null;
            Ent_Static M2 = null;


            if (!(W is Obj_Item))
            {
                return(false);
            }

            if (this is Obj_Item_Weapon_Storage_Fancy)
            {
                F = this;
                F.update_icon(1);
            }

            foreach (dynamic _a in Lang13.Enumerate(this.can_see_contents()))
            {
                M = _a;


                if (Lang13.Bool(M.client))
                {
                    M.client.screen -= W;
                }
            }

            if (this.loc is Mob)
            {
                M2 = this.loc;
                ((Obj_Item)W).dropped(M2);
            }
            W.layer = Lang13.Initial(W, "layer");
            W.loc   = new_location;

            if (Task13.User != null)
            {
                this.orient2hud(Task13.User);

                if (Task13.User.s_active != null)
                {
                    Task13.User.s_active.show_to(Task13.User);
                }
            }

            if (Lang13.Bool(W.maptext))
            {
                W.maptext = "";
            }
            ((Obj_Item)W).on_exit_storage(this);
            this.update_icon();
            W.mouse_opacity = Lang13.Initial(W, "mouse_opacity");

            if (burn == true)
            {
                ((Ent_Static)W).fire_act();
            }
            return(true);
        }