Exemple #1
0
        // Function from file: backpack.dm
        public override bool handle_item_insertion(dynamic W = null, bool?prevent_warning = null, dynamic user = null)
        {
            prevent_warning = prevent_warning ?? false;

            string          safety  = null;
            Obj_Singularity singulo = null;


            if (W is Obj_Item_Weapon_Storage_Backpack_Holding && !W.crit_fail)
            {
                safety = Interface13.Alert(user, "You feel this may not be the best idea.", "Put in " + this.name + "?", "Proceed", "Abort");

                if (safety == "Abort" || !(Map13.GetDistance(this, user) <= 1) || !(this != null) || !Lang13.Bool(W) || ((Mob)user).incapacitated())
                {
                    return(false);
                }
                this.investigate_log("has become a singularity. Caused by " + user.key, "singulo");
                user.WriteMsg("<span class='danger'>The Bluespace interfaces of the two devices catastrophically malfunction!</span>");
                GlobalFuncs.qdel(W);
                singulo        = new Obj_Singularity(GlobalFuncs.get_turf(this));
                singulo.energy = 300;
                GlobalFuncs.message_admins("" + GlobalFuncs.key_name_admin(user) + " detonated a bag of holding");
                GlobalFuncs.log_game("" + GlobalFuncs.key_name(user) + " detonated a bag of holding");
                GlobalFuncs.qdel(this);
                singulo.process();
                return(false);
            }
            base.handle_item_insertion((object)(W), prevent_warning, (object)(user));
            return(false);
        }