예제 #1
0
        // Function from file: computer.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            Obj_Structure_Computerframe A2 = null;
            Obj C = null;


            if (A is Obj_Item_Weapon_Screwdriver && Lang13.Bool(this.circuit) && !Lang13.Bool(this.flags & 128))
            {
                GlobalFuncs.playsound(this.loc, "sound/items/Screwdriver.ogg", 50, 1);
                user.WriteMsg("<span class='notice'> You start to disconnect the monitor...</span>");

                if (GlobalFuncs.do_after(user, 20 / A.toolspeed, null, this))
                {
                    A2           = new Obj_Structure_Computerframe(this.loc);
                    A2.circuit   = this.circuit;
                    A2.anchored  = 1;
                    this.circuit = null;

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

                        C.loc = this.loc;
                    }

                    if ((this.stat & 1) != 0)
                    {
                        user.WriteMsg("<span class='notice'>The broken glass falls out.</span>");
                        new Obj_Item_Weapon_Shard(this.loc);
                        A2.state      = 3;
                        A2.icon_state = "3";
                    }
                    else
                    {
                        user.WriteMsg("<span class='notice'>You disconnect the monitor.</span>");
                        A2.state      = 4;
                        A2.icon_state = "4";
                    }
                    GlobalFuncs.qdel(this);
                }
            }
            return(null);
        }
        // Function from file: solar.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            Obj_Structure_Computerframe A2 = null;
            Obj_Item_Weapon_Circuitboard_SolarControl M = null;
            Obj C = null;
            Obj_Structure_Computerframe A3 = null;
            Obj_Item_Weapon_Circuitboard_SolarControl M2 = null;
            Obj C2 = null;


            if (A is Obj_Item_Weapon_Screwdriver)
            {
                GlobalFuncs.playsound(this.loc, "sound/items/Screwdriver.ogg", 50, 1);

                if (GlobalFuncs.do_after(user, 20 / A.toolspeed, null, this))
                {
                    if ((this.stat & 1) != 0)
                    {
                        user.WriteMsg("<span class='notice'>The broken glass falls out.</span>");
                        A2 = new Obj_Structure_Computerframe(this.loc);
                        new Obj_Item_Weapon_Shard(this.loc);
                        M = new Obj_Item_Weapon_Circuitboard_SolarControl(A2);

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

                            C.loc = this.loc;
                        }
                        A2.circuit    = M;
                        A2.state      = 3;
                        A2.icon_state = "3";
                        A2.anchored   = 1;
                        GlobalFuncs.qdel(this);
                    }
                    else
                    {
                        user.WriteMsg("<span class='notice'>You disconnect the monitor.</span>");
                        A3 = new Obj_Structure_Computerframe(this.loc);
                        M2 = new Obj_Item_Weapon_Circuitboard_SolarControl(A3);

                        foreach (dynamic _b in Lang13.Enumerate(this, typeof(Obj)))
                        {
                            C2 = _b;

                            C2.loc = this.loc;
                        }
                        A3.circuit    = M2;
                        A3.state      = 4;
                        A3.icon_state = "4";
                        A3.anchored   = 1;
                        GlobalFuncs.qdel(this);
                    }
                }
            }
            else
            {
                this.attack_hand(user);
            }
            return(null);
        }