Exemplo n.º 1
0
        // Function from file: slime_extracts.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            Obj_Item_Stack_Sheet_Metal    M = null;
            Obj_Item_Stack_Sheet_Plasteel P = null;

            GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type);
            M        = new Obj_Item_Stack_Sheet_Metal();
            M.amount = 15;
            M.loc    = GlobalFuncs.get_turf(holder.my_atom);
            P        = new Obj_Item_Stack_Sheet_Plasteel();
            P.amount = 5;
            P.loc    = GlobalFuncs.get_turf(holder.my_atom);
            return;
        }
Exemplo n.º 2
0
        // Function from file: mecha_construction_paths.dm
        public override bool custom_action(int?index = null, dynamic diff = null, dynamic used_atom = null, dynamic user = null)
        {
            Obj_Item_Stack_CableCoil      coil = null;
            Obj_Item_Stack_Sheet_Plasteel MS   = null;
            Obj_Item_Stack_Sheet_Plasteel MS2  = null;
            Obj_Item_Stack_Sheet_Plasteel MS3  = null;


            if (!base.custom_action(index, (object)(diff), (object)(used_atom), (object)(user)))
            {
                return(false);
            }

            switch ((int?)(index))
            {
            case 15:
                ((Ent_Static)user).visible_message("" + user + " connects the " + this.holder + " hydraulic systems", "<span class='notice'>You connect the " + this.holder + " hydraulic systems.</span>");
                ((dynamic)this.holder).icon_state = "fireripley1";
                break;

            case 14:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " activates the " + this.holder + " hydraulic systems.", "<span class='notice'>You activate the " + this.holder + " hydraulic systems.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley2";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " disconnects the " + this.holder + " hydraulic systems", "<span class='notice'>You disconnect the " + this.holder + " hydraulic systems.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley0";
                }
                break;

            case 13:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " adds the wiring to the " + this.holder + ".", "<span class='notice'>You add the wiring to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley3";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " deactivates the " + this.holder + " hydraulic systems.", "<span class='notice'>You deactivate the " + this.holder + " hydraulic systems.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley1";
                }
                break;

            case 12:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " adjusts the wiring of the " + this.holder + ".", "<span class='notice'>You adjust the wiring of the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley4";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the wiring from the " + this.holder + ".", "<span class='notice'>You remove the wiring from the " + this.holder + ".</span>");
                    coil        = new Obj_Item_Stack_CableCoil(GlobalFuncs.get_turf(this.holder));
                    coil.amount = 4;
                    ((dynamic)this.holder).icon_state = "fireripley2";
                }
                break;

            case 11:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the central control module into the " + this.holder + ".", "<span class='notice'>You install the central computer mainboard into the " + this.holder + ".</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "fireripley5";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " disconnects the wiring of the " + this.holder + ".", "<span class='notice'>You disconnect the wiring of the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley3";
                }
                break;

            case 10:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the mainboard.", "<span class='notice'>You secure the mainboard.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley6";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the central control module from the " + this.holder + ".", "<span class='notice'>You remove the central computer mainboard from the " + this.holder + ".</span>");
                    new Obj_Item_Weapon_Circuitboard_Mecha_Ripley_Main(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "fireripley4";
                }
                break;

            case 9:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the peripherals control module into the " + this.holder + ".", "<span class='notice'>You install the peripherals control module into the " + this.holder + ".</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "fireripley7";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the mainboard.", "<span class='notice'>You unfasten the mainboard.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley5";
                }
                break;

            case 8:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the peripherals control module.", "<span class='notice'>You secure the peripherals control module.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley8";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the peripherals control module from the " + this.holder + ".", "<span class='notice'>You remove the peripherals control module from the " + this.holder + ".</span>");
                    new Obj_Item_Weapon_Circuitboard_Mecha_Ripley_Peripherals(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "fireripley6";
                }
                break;

            case 7:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the internal armor layer to the " + this.holder + ".", "<span class='notice'>You install the internal armor layer to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley9";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley7";
                }
                break;

            case 6:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the internal armor layer.", "<span class='notice'>You secure the internal armor layer.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley10";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " pries internal armor layer from the " + this.holder + ".", "<span class='notice'>You pry internal armor layer from the " + this.holder + ".</span>");
                    MS        = new Obj_Item_Stack_Sheet_Plasteel(GlobalFuncs.get_turf(this.holder));
                    MS.amount = 5;
                    ((dynamic)this.holder).icon_state = "fireripley8";
                }
                break;

            case 5:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " welds the internal armor layer to the " + this.holder + ".", "<span class='notice'>You weld the internal armor layer to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley11";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the internal armor layer.", "<span class='notice'>You unfasten the internal armor layer.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley9";
                }
                break;

            case 4:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " starts to install the external armor layer to the " + this.holder + ".", "<span class='notice'>You install the external armor layer to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley12";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " cuts the internal armor layer from the " + this.holder + ".", "<span class='notice'>You cut the internal armor layer from the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley10";
                }
                break;

            case 3:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the external reinforced armor layer to the " + this.holder + ".", "<span class='notice'>You install the external reinforced armor layer to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "fireripley13";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the external armor from the " + this.holder + ".", "<span class='notice'>You remove the external armor from the " + this.holder + ".</span>");
                    MS2        = new Obj_Item_Stack_Sheet_Plasteel(GlobalFuncs.get_turf(this.holder));
                    MS2.amount = 5;
                    ((dynamic)this.holder).icon_state = "fireripley11";
                }
                break;

            case 2:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the external armor layer.", "<span class='notice'>You secure the external reinforced armor layer.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley14";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " pries external armor layer from the " + this.holder + ".", "<span class='notice'>You pry external armor layer from the " + this.holder + ".</span>");
                    MS3        = new Obj_Item_Stack_Sheet_Plasteel(GlobalFuncs.get_turf(this.holder));
                    MS3.amount = 5;
                    ((dynamic)this.holder).icon_state = "fireripley12";
                }
                break;

            case 1:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " welds the external armor layer to the " + this.holder + ".", "<span class='notice'>You weld the external armor layer to the " + this.holder + ".</span>");
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the external armor layer.", "<span class='notice'>You unfasten the external armor layer.</span>");
                    ((dynamic)this.holder).icon_state = "fireripley13";
                }
                break;
            }
            return(true);
        }
Exemplo n.º 3
0
        // Function from file: mecha_construction_paths.dm
        public override bool custom_action(int?index = null, dynamic diff = null, dynamic used_atom = null, dynamic user = null)
        {
            Obj_Item_Stack_CableCoil coil = null;
            dynamic I  = null;
            dynamic I2 = null;
            dynamic I3 = null;
            dynamic I4 = null;
            Obj_Item_Stack_Sheet_Plasteel MS = null;


            if (!base.custom_action(index, (object)(diff), (object)(used_atom), (object)(user)))
            {
                return(false);
            }

            switch ((int?)(index))
            {
            case 24:
                ((Ent_Static)user).visible_message("" + user + " connects the " + this.holder + " hydraulic systems", "<span class='notice'>You connect the " + this.holder + " hydraulic systems.</span>");
                ((dynamic)this.holder).icon_state = "phazon1";
                break;

            case 23:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " activates the " + this.holder + " hydraulic systems.", "<span class='notice'>You activate the " + this.holder + " hydraulic systems.</span>");
                    ((dynamic)this.holder).icon_state = "phazon2";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " disconnects the " + this.holder + " hydraulic systems", "<span class='notice'>You disconnect the " + this.holder + " hydraulic systems.</span>");
                    ((dynamic)this.holder).icon_state = "phazon0";
                }
                break;

            case 22:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " adds the wiring to the " + this.holder + ".", "<span class='notice'>You add the wiring to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon3";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " deactivates the " + this.holder + " hydraulic systems.", "<span class='notice'>You deactivate the " + this.holder + " hydraulic systems.</span>");
                    ((dynamic)this.holder).icon_state = "phazon1";
                }
                break;

            case 21:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " adjusts the wiring of the " + this.holder + ".", "<span class='notice'>You adjust the wiring of the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon4";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the wiring from the " + this.holder + ".", "<span class='notice'>You remove the wiring from the " + this.holder + ".</span>");
                    coil        = new Obj_Item_Stack_CableCoil(GlobalFuncs.get_turf(this.holder));
                    coil.amount = 4;
                    ((dynamic)this.holder).icon_state = "phazon2";
                }
                break;

            case 20:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the central control module into the " + this.holder + ".", "<span class='notice'>You install the central computer mainboard into the " + this.holder + ".</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "phazon5";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " disconnects the wiring of the " + this.holder + ".", "<span class='notice'>You disconnect the wiring of the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon3";
                }
                break;

            case 19:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the mainboard.", "<span class='notice'>You secure the mainboard.</span>");
                    ((dynamic)this.holder).icon_state = "phazon6";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the central control module from the " + this.holder + ".", "<span class='notice'>You remove the central computer mainboard from the " + this.holder + ".</span>");
                    new Obj_Item_Weapon_Circuitboard_Mecha_Phazon_Main(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "phazon4";
                }
                break;

            case 18:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the peripherals control module into the " + this.holder + ".", "<span class='notice'>You install the peripherals control module into the " + this.holder + ".</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "phazon7";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the mainboard.", "<span class='notice'>You unfasten the mainboard.</span>");
                    ((dynamic)this.holder).icon_state = "phazon5";
                }
                break;

            case 17:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the peripherals control module.", "<span class='notice'>You secure the peripherals control module.</span>");
                    ((dynamic)this.holder).icon_state = "phazon8";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the peripherals control module from the " + this.holder + ".", "<span class='notice'>You remove the peripherals control module from the " + this.holder + ".</span>");
                    new Obj_Item_Weapon_Circuitboard_Mecha_Phazon_Peripherals(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "phazon6";
                }
                break;

            case 16:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the weapon control module into the " + this.holder + ".", "<span class='notice'>You install the weapon control module into the " + this.holder + ".</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "phazon9";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the peripherals control module.", "<span class='notice'>You unfasten the peripherals control module.</span>");
                    ((dynamic)this.holder).icon_state = "phazon7";
                }
                break;

            case 15:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the weapon control module.", "<span class='notice'>You secure the weapon control module.</span>");
                    ((dynamic)this.holder).icon_state = "phazon10";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the weapon control module from the " + this.holder + ".", "<span class='notice'>You remove the weapon control module from the " + this.holder + ".</span>");
                    new Obj_Item_Weapon_Circuitboard_Mecha_Phazon_Targeting(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "phazon8";
                }
                break;

            case 14:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs phasic scanner module to the " + this.holder + ".", "<span class='notice'>You install scanner module to the " + this.holder + ".</span>");
                    I = used_atom;
                    ((Mob)user).unEquip(I);
                    I.loc = this.holder;
                    ((dynamic)this.holder).icon_state = "phazon11";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the weapon control module.", "<span class='notice'>You unfasten the weapon control module.</span>");
                    ((dynamic)this.holder).icon_state = "phazon9";
                }
                break;

            case 13:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the phasic scanner module.", "<span class='notice'>You secure the scanner module.</span>");
                    ((dynamic)this.holder).icon_state = "phazon12";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the phasic scanner module from the " + this.holder + ".", "<span class='notice'>You remove the scanner module from the " + this.holder + ".</span>");
                    I2     = Lang13.FindIn(typeof(Obj_Item_Weapon_StockParts_ScanningModule), this.holder);
                    I2.loc = GlobalFuncs.get_turf(this.holder);
                    ((dynamic)this.holder).icon_state = "phazon10";
                }
                break;

            case 12:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs super capacitor to the " + this.holder + ".", "<span class='notice'>You install capacitor to the " + this.holder + ".</span>");
                    I3 = used_atom;
                    ((Mob)user).unEquip(I3);
                    I3.loc = this.holder;
                    ((dynamic)this.holder).icon_state = "phazon13";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the phasic scanner module.", "<span class='notice'>You unfasten the scanner module.</span>");
                    ((dynamic)this.holder).icon_state = "phazon11";
                }
                break;

            case 11:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the super capacitor.", "<span class='notice'>You secure the capacitor.</span>");
                    ((dynamic)this.holder).icon_state = "phazon14";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the super capacitor from the " + this.holder + ".", "<span class='notice'>You remove the capacitor from the " + this.holder + ".</span>");
                    I4     = Lang13.FindIn(typeof(Obj_Item_Weapon_StockParts_Capacitor), this.holder);
                    I4.loc = GlobalFuncs.get_turf(this.holder);
                    ((dynamic)this.holder).icon_state = "phazon12";
                }
                break;

            case 10:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the bluespace crystal.", "<span class='notice'>You install the bluespace crystal.</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "phazon15";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unsecures the super capacitor from the " + this.holder + ".", "<span class='notice'>You unsecure the capacitor from the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon13";
                }
                break;

            case 9:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " connects the bluespace crystal.", "<span class='notice'>You connect the bluespace crystal.</span>");
                    ((dynamic)this.holder).icon_state = "phazon16";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " removes the bluespace crystal from the " + this.holder + ".", "<span class='notice'>You remove the bluespace crystal from the " + this.holder + ".</span>");
                    new Obj_Item_Weapon_Ore_BluespaceCrystal(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "phazon14";
                }
                break;

            case 8:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " engages the bluespace crystal.", "<span class='notice'>You engage the bluespace crystal.</span>");
                    ((dynamic)this.holder).icon_state = "phazon17";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " disconnects the bluespace crystal from the " + this.holder + ".", "<span class='notice'>You disconnect the bluespace crystal from the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon15";
                }
                break;

            case 7:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs the phase armor layer to the " + this.holder + ".", "<span class='notice'>You install the phase armor layer to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon18";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " disengages the bluespace crystal.", "<span class='notice'>You disengage the bluespace crystal.</span>");
                    ((dynamic)this.holder).icon_state = "phazon16";
                }
                break;

            case 6:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures the phase armor layer.", "<span class='notice'>You secure the phase armor layer.</span>");
                    ((dynamic)this.holder).icon_state = "phazon19";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " pries the phase armor layer from the " + this.holder + ".", "<span class='notice'>You pry the phase armor layer from the " + this.holder + ".</span>");
                    MS        = new Obj_Item_Stack_Sheet_Plasteel(GlobalFuncs.get_turf(this.holder));
                    MS.amount = 5;
                    ((dynamic)this.holder).icon_state = "phazon17";
                }
                break;

            case 5:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " welds the phase armor layer to the " + this.holder + ".", "<span class='notice'>You weld the phase armor layer to the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon20";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens the phase armor layer.", "<span class='notice'>You unfasten the phase armor layer.</span>");
                    ((dynamic)this.holder).icon_state = "phazon18";
                }
                break;

            case 4:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " installs Phazon Armor Plates to the " + this.holder + ".", "<span class='notice'>You install Phazon Armor Plates to the " + this.holder + ".</span>");
                    GlobalFuncs.qdel(used_atom);
                    ((dynamic)this.holder).icon_state = "phazon21";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " cuts phase armor layer from the " + this.holder + ".", "<span class='notice'>You cut the phase armor layer from the " + this.holder + ".</span>");
                    ((dynamic)this.holder).icon_state = "phazon19";
                }
                break;

            case 3:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " secures Phazon Armor Plates.", "<span class='notice'>You secure Phazon Armor Plates.</span>");
                    ((dynamic)this.holder).icon_state = "phazon22";
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " pries Phazon Armor Plates from the " + this.holder + ".", "<span class='notice'>You pry Phazon Armor Plates from the " + this.holder + ".</span>");
                    new Obj_Item_MechaParts_Part_PhazonArmor(GlobalFuncs.get_turf(this.holder));
                    ((dynamic)this.holder).icon_state = "phazon20";
                }
                break;

            case 2:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message("" + user + " welds Phazon Armor Plates to the " + this.holder + ".", "<span class='notice'>You weld Phazon Armor Plates to the " + this.holder + ".</span>");
                }
                else
                {
                    ((Ent_Static)user).visible_message("" + user + " unfastens Phazon Armor Plates.", "<span class='notice'>You unfasten Phazon Armor Plates.</span>");
                    ((dynamic)this.holder).icon_state = "phazon21";
                }
                break;

            case 1:

                if (diff == -1)
                {
                    ((Ent_Static)user).visible_message(new Txt().item(user).str(" carefully inserts the anomaly core into ").the(this.holder).item().str(" and secures it.").ToString(), "<span class='notice'>You slowly place the anomaly core into its socket and close its chamber.</span>");
                    GlobalFuncs.qdel(used_atom);
                }
                break;
            }
            return(true);
        }
Exemplo n.º 4
0
        // Function from file: equipment_locker.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            dynamic   I           = null;
            Base_Data inp         = null;
            dynamic   _out        = null;
            dynamic   desired     = null;
            dynamic   metalstack  = null;
            dynamic   plasmastack = null;
            dynamic   desired2    = null;
            Obj_Item_Stack_Sheet_Plasteel plasteelout = null;


            if (Lang13.Bool(base.Topic(href, href_list, (object)(hsrc))))
            {
                return(null);
            }

            if (Lang13.Bool(href_list["choice"]))
            {
                if (this.inserted_id is Obj_Item_Weapon_Card_Id)
                {
                    if (href_list["choice"] == "eject")
                    {
                        this.inserted_id.loc = this.loc;
                        this.inserted_id.__CallVerb("Pick up");
                        this.inserted_id = null;
                    }

                    if (href_list["choice"] == "claim")
                    {
                        if (Lang13.Bool(this.inserted_id.access.Contains(GlobalVars.access_mining_station)))
                        {
                            this.inserted_id.mining_points += this.points;
                            this.points = 0;
                        }
                        else
                        {
                            Task13.User.WriteMsg("<span class='warning'>Required access not found.</span>");
                        }
                    }
                }
                else if (href_list["choice"] == "insert")
                {
                    I = Task13.User.get_active_hand();

                    if (I is Obj_Item_Weapon_Card_Id)
                    {
                        if (!Task13.User.drop_item())
                        {
                            return(null);
                        }
                        I.loc            = this;
                        this.inserted_id = I;
                    }
                    else
                    {
                        Task13.User.WriteMsg("<span class='warning'>No valid ID.</span>");
                    }
                }
            }

            if (Lang13.Bool(href_list["release"]))
            {
                if (this.check_access(this.inserted_id) || this.allowed(Task13.User))
                {
                    if (!this.stack_list.Contains(Lang13.FindClass(href_list["release"])))
                    {
                        return(null);
                    }
                    inp         = this.stack_list[Lang13.FindClass(href_list["release"])];
                    _out        = Lang13.Call(inp.type);
                    desired     = Interface13.Input("How much?", "How much to eject?", 1, null, null, InputType.Num);
                    _out.amount = Num13.MinInt(Convert.ToInt32(desired), 50, Convert.ToInt32(((dynamic)inp).amount));

                    if (Convert.ToDouble(_out.amount) >= 1)
                    {
                        ((dynamic)inp).amount -= _out.amount;
                        this.unload_mineral(_out);
                    }

                    if (Convert.ToDouble(((dynamic)inp).amount) < 1)
                    {
                        this.stack_list.Remove(Lang13.FindClass(href_list["release"]));
                    }
                }
                else
                {
                    Task13.User.WriteMsg("<span class='warning'>Required access not found.</span>");
                }
            }

            if (Lang13.Bool(href_list["plasteel"]))
            {
                if (this.check_access(this.inserted_id) || this.allowed(Task13.User))
                {
                    if (!this.stack_list.Contains(typeof(Obj_Item_Stack_Sheet_Metal)))
                    {
                        return(null);
                    }

                    if (!this.stack_list.Contains(typeof(Obj_Item_Stack_Sheet_Mineral_Plasma)))
                    {
                        return(null);
                    }
                    metalstack         = this.stack_list[typeof(Obj_Item_Stack_Sheet_Metal)];
                    plasmastack        = this.stack_list[typeof(Obj_Item_Stack_Sheet_Mineral_Plasma)];
                    desired2           = Interface13.Input("How much?", "How much would you like to smelt?", 1, null, null, InputType.Num);
                    plasteelout        = new Obj_Item_Stack_Sheet_Plasteel();
                    plasteelout.amount = Num13.MinInt(Convert.ToInt32(desired2), 50, Convert.ToInt32(metalstack.amount), Convert.ToInt32(plasmastack.amount));

                    if ((plasteelout.amount ?? 0) >= 1)
                    {
                        metalstack.amount  -= plasteelout.amount;
                        plasmastack.amount -= plasteelout.amount;
                        this.unload_mineral(plasteelout);
                    }
                }
                else
                {
                    Task13.User.WriteMsg("<span class='warning'>Required access not found.</span>");
                }
            }
            this.updateUsrDialog();
            return(null);
        }