コード例 #1
0
        // Function from file: ed209bot.dm
        public void shootAt(dynamic target = null)
        {
            Ent_Static T = null;
            dynamic    U = null;
            dynamic    A = null;


            if (this.lastfired != 0 && Game13.time - this.lastfired < this.shot_delay)
            {
                return;
            }
            this.lastfired = Game13.time;
            T = this.loc;
            U = (target is Ent_Dynamic ? ((dynamic)(target.loc)) : target);

            if (!Lang13.Bool(U) || !(T != null))
            {
                return;
            }

            while (!(U is Tile))
            {
                U = U.loc;
            }

            if (!(T is Tile))
            {
                return;
            }

            if (!(this.projectile != null))
            {
                return;
            }

            if (!(U is Tile))
            {
                return;
            }
            A = Lang13.Call(this.projectile, this.loc);
            GlobalFuncs.playsound(this.loc, this.shoot_sound, 50, 1);
            A.current = U;
            A.yo      = Convert.ToDouble(U.y - T.y);
            A.xo      = Convert.ToDouble(U.x - T.x);
            ((Obj_Item_Projectile)A).fire();
            return;
        }
        // Function from file: hivemind.dm
        public override dynamic sting_action(Mob user = null, Ent_Static target = null)
        {
            Changeling        changeling      = null;
            ByTable           names           = null;
            Changelingprofile prof            = null;
            dynamic           S               = null;
            Base_Data         chosen_prof     = null;
            dynamic           downloaded_prof = null;

            changeling = user.mind.changeling;
            names      = new ByTable();

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.hivemind_bank, typeof(Changelingprofile)))
            {
                prof = _a;


                if (!changeling.stored_profiles.Contains(prof))
                {
                    names[prof.name] = prof;
                }
            }

            if (names.len <= 0)
            {
                user.WriteMsg("<span class='notice'>There's no new DNA to absorb from the air.</span>");
                return(null);
            }
            S = Interface13.Input("Select a DNA absorb from the air: ", "Absorb DNA", null, null, names, InputType.Null | InputType.Any);

            if (!Lang13.Bool(S))
            {
                return(null);
            }
            chosen_prof = names[S];

            if (!(chosen_prof != null))
            {
                return(null);
            }
            downloaded_prof = Lang13.Call(chosen_prof.type);
            ((dynamic)chosen_prof).copy_profile(downloaded_prof);
            changeling.add_profile(downloaded_prof);
            user.WriteMsg("<span class='notice'>We absorb the DNA of " + S + " from the air.</span>");
            GlobalFuncs.feedback_add_details("changeling_powers", "HD");
            return(1);
        }
コード例 #3
0
        // Function from file: hivemind.dm
        public override dynamic sting_action(Mob user = null, Ent_Static target = null)
        {
            Changeling        changeling   = null;
            ByTable           names        = null;
            Changelingprofile prof         = null;
            dynamic           chosen_name  = null;
            Changelingprofile chosen_dna   = null;
            dynamic           uploaded_dna = null;

            changeling = user.mind.changeling;
            names      = new ByTable();

            foreach (dynamic _a in Lang13.Enumerate(changeling.stored_profiles, typeof(Changelingprofile)))
            {
                prof = _a;


                if (!GlobalVars.hivemind_bank.Contains(prof))
                {
                    names.Add(prof.name);
                }
            }

            if (names.len <= 0)
            {
                user.WriteMsg("<span class='notice'>The airwaves already have all of our DNA.</span>");
                return(null);
            }
            chosen_name = Interface13.Input("Select a DNA to channel: ", "Channel DNA", null, null, names, InputType.Null | InputType.Any);

            if (!Lang13.Bool(chosen_name))
            {
                return(null);
            }
            chosen_dna = changeling.get_dna(chosen_name);

            if (!(chosen_dna != null))
            {
                return(null);
            }
            uploaded_dna = Lang13.Call(chosen_dna.type);
            chosen_dna.copy_profile(uploaded_dna);
            GlobalVars.hivemind_bank.Add(uploaded_dna);
            user.WriteMsg("<span class='notice'>We channel the DNA of " + chosen_name + " to the air.</span>");
            GlobalFuncs.feedback_add_details("changeling_powers", "HU");
            return(1);
        }
コード例 #4
0
        public override bool f_action(dynamic target = null)
        {
            dynamic O = null;


            if (!this.action_checks(target))
            {
                return(false);
            }
            O = Lang13.Call(this.projectile, this.chassis.loc);
            GlobalFuncs.playsound(this.chassis, this.fire_sound, 50, 1);
            this.log_message("Launched a " + O.name + " from " + this.name + ", targeting " + target + ".");
            this.projectiles--;
            this.proj_init(O);
            ((Ent_Dynamic)O).throw_at_fast(target, this.missile_range, this.missile_speed, null, false);
            return(true);
        }
コード例 #5
0
        // Function from file: race.dm
        public override bool start(  )
        {
            bool    all_the_same      = false;
            ByTable all_species       = null;
            dynamic speciestype       = null;
            dynamic S                 = null;
            dynamic new_species       = null;
            Mob_Living_Carbon_Human H = null;

            all_the_same = false;
            all_species  = new ByTable();

            foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Species)) - typeof(Species)))
            {
                speciestype = _a;

                S = Lang13.Call(speciestype);

                if (!S.dangerous_existence)
                {
                    all_species.Add(speciestype);
                }
            }
            new_species = Rand13.PickFromTable(all_species);

            if (Rand13.PercentChance(50))
            {
                all_the_same = true;
            }

            foreach (dynamic _b in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Carbon_Human)))
            {
                H = _b;

                H.set_species(new_species);
                H.real_name          = ((Species)new_species).random_name(H.gender, true);
                H.dna.unique_enzymes = H.dna.generate_unique_enzymes();
                H.WriteMsg("<span class='notice'>You feel somehow... different?</span>");

                if (!all_the_same)
                {
                    new_species = Rand13.PickFromTable(all_species);
                }
            }
            return(false);
        }
コード例 #6
0
        // Function from file: port_gen.dm
        public Obj_Machinery_Power_PortGen_Pacman(dynamic loc = null) : base((object)(loc))
        {
            dynamic sheet = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            this.component_parts = new ByTable();
            this.component_parts.Add(new Obj_Item_Weapon_StockParts_MatterBin(this));
            this.component_parts.Add(new Obj_Item_Weapon_StockParts_MicroLaser(this));
            this.component_parts.Add(new Obj_Item_Stack_CableCoil(this, 1));
            this.component_parts.Add(new Obj_Item_Stack_CableCoil(this, 1));
            this.component_parts.Add(new Obj_Item_Weapon_StockParts_Capacitor(this));
            this.component_parts.Add(Lang13.Call(this.board_path, this));
            sheet           = Lang13.Call(this.sheet_path, null);
            this.sheet_name = sheet.name;
            this.RefreshParts();
            return;
        }
        // Function from file: grown.dm
        public virtual void squish(dynamic target = null)
        {
            dynamic    T = null;
            Ent_Static A = null;

            T = GlobalFuncs.get_turf(target);
            Lang13.Call(this.splat, T);
            this.visible_message("The " + this.name + " has been squashed.", "<span class='italics'>You hear a smack.</span>");

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_turf(target), typeof(Ent_Static)))
            {
                A = _a;

                this.reagents.reaction(A);
            }
            return;
        }
コード例 #8
0
        // Function from file: slime_extracts.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic paints = null;
            dynamic chosen = null;
            dynamic P      = null;

            GlobalFuncs.feedback_add_details("slime_cores_used", "" + this.type);
            paints = Lang13.GetTypes(typeof(Obj_Item_Weapon_Paint)) - typeof(Obj_Item_Weapon_Paint);
            chosen = Rand13.PickFromTable(paints);
            P      = Lang13.Call(chosen);

            if (Lang13.Bool(P))
            {
                P.loc = GlobalFuncs.get_turf(holder.my_atom);
            }
            return;
        }
コード例 #9
0
        // Function from file: critter.dm
        public override dynamic Destroy(  )
        {
            dynamic T = null;
            double  i = 0;

            T             = GlobalFuncs.get_turf(this);
            this.tank.loc = T;
            this.tank     = null;

            foreach (dynamic _a in Lang13.IterateRange(1, Rand13.Int(2, 5)))
            {
                i = _a;

                Lang13.Call(this.material_drop, T);
            }
            return(base.Destroy());
        }
        // Function from file: mecha_pilot.dm
        public Mob_Living_SimpleAnimal_Hostile_Syndicate_MechaPilot(dynamic loc = null) : base((object)(loc))
        {
            dynamic M = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;

            if (this.spawn_mecha_type != null)
            {
                M = Lang13.Call(this.spawn_mecha_type, GlobalFuncs.get_turf(this));

                if (M is Obj_Mecha)
                {
                    this.enter_mecha(M);
                }
            }
            return;
        }
コード例 #11
0
        // Function from file: recipe.dm
        public dynamic make(Ent_Static container = null)
        {
            dynamic result_obj = null;
            Obj     O          = null;

            result_obj = Lang13.Call(this.result, container);

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

                O.reagents.trans_to(result_obj, O.reagents.total_volume);
                GlobalFuncs.qdel(O);
            }
            container.reagents.clear_reagents();
            return(result_obj);
        }
コード例 #12
0
        // Function from file: uplink_item.dm
        public override dynamic spawn_item(dynamic loc = null, Obj_Item_Device_Uplink U = null)
        {
            ByTable uplink_items       = null;
            ByTable possible_items     = null;
            dynamic category           = null;
            dynamic item               = null;
            UplinkItem_Badass_Random I = null;
            dynamic I2 = null;

            uplink_items   = GlobalFuncs.get_uplink_items();
            possible_items = new ByTable();

            foreach (dynamic _b in Lang13.Enumerate(uplink_items))
            {
                category = _b;


                foreach (dynamic _a in Lang13.Enumerate(uplink_items[category]))
                {
                    item = _a;

                    I = uplink_items[category][item];

                    if (this == I || !Lang13.Bool(I.item))
                    {
                        continue;
                    }

                    if (Convert.ToDouble(U.telecrystals) < I.cost)
                    {
                        continue;
                    }
                    possible_items.Add(I);
                }
            }

            if (possible_items.len != 0)
            {
                I2                    = Rand13.PickFromTable(possible_items);
                U.telecrystals       -= I2.cost;
                U.spent_telecrystals += Convert.ToDouble(I2.cost);
                GlobalFuncs.feedback_add_details("traitor_uplink_items_bought", "RN");
                return(Lang13.Call(I2.item, loc));
            }
            return(null);
        }
コード例 #13
0
        // Function from file: spawnergrenade.dm
        public override void prime(  )
        {
            dynamic           T = null;
            Mob_Living_Carbon C = null;
            int?    i           = null;
            dynamic x           = null;
            int?    j           = null;

            this.update_mob();

            if (this.spawner_type != null && Lang13.Bool(this.deliveryamt))
            {
                T = GlobalFuncs.get_turf(this);
                GlobalFuncs.playsound(T, "sound/effects/phasein.ogg", 100, 1);

                foreach (dynamic _a in Lang13.Enumerate(Map13.FetchViewers(null, T), typeof(Mob_Living_Carbon)))
                {
                    C = _a;

                    C.flash_eyes();
                }
                i = null;
                i = 1;

                while ((i ?? 0) <= (this.deliveryamt ?? 0))
                {
                    x     = Lang13.Call(this.spawner_type);
                    x.loc = T;

                    if (Rand13.PercentChance(50))
                    {
                        j = null;
                        j = 1;

                        while ((j ?? 0) <= Rand13.Int(1, 3))
                        {
                            Map13.Step(x, Convert.ToInt32(Rand13.Pick(new object [] { GlobalVars.NORTH, GlobalVars.SOUTH, GlobalVars.EAST, GlobalVars.WEST })));
                            j++;
                        }
                    }
                    i++;
                }
            }
            GlobalFuncs.qdel(this);
            return;
        }
コード例 #14
0
        // Function from file: briefcase.dm
        public Obj_Item_Weapon_Storage_Briefcase(dynamic loc = null) : base((object)(loc))
        {
            dynamic folder = null;
            double  i      = 0;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            new Obj_Item_Weapon_Pen(this);
            folder = Lang13.Call(this.folder_path, this);

            foreach (dynamic _a in Lang13.IterateRange(1, 6))
            {
                i = _a;

                new Obj_Item_Weapon_Paper(folder);
            }
            return;
        }
コード例 #15
0
        // Function from file: robot_modules.dm
        public dynamic get_or_create_estorage(Type storage_type = null)
        {
            RobotEnergyStorage S = null;


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


                if (Lang13.Bool(((dynamic)storage_type).IsInstanceOfType(S)))
                {
                    return(S);
                }
            }
            return(Lang13.Call(storage_type, this));
        }
コード例 #16
0
 // Function from file: changeling.dm
 public void copy_profile(dynamic newprofile = null)
 {
     newprofile.name        = this.name;
     newprofile.v_protected = this.v_protected;
     newprofile.dna         = Lang13.Call(this.dna.type);
     ((Dna)this.dna).copy_dna(newprofile.dna);
     newprofile.name_list        = this.name_list.Copy();
     newprofile.appearance_list  = this.appearance_list.Copy();
     newprofile.flags_cover_list = this.flags_cover_list.Copy();
     newprofile.exists_list      = this.exists_list.Copy();
     newprofile.item_color_list  = this.item_color_list.Copy();
     newprofile.item_state_list  = this.item_state_list.Copy();
     newprofile.underwear        = this.underwear;
     newprofile.undershirt       = this.undershirt;
     newprofile.socks            = this.socks;
     return;
 }
コード例 #17
0
        // Function from file: __main.dm
        public double countRunAndMakeAscending(double?lo = null, double?hi = null)
        {
            double? runHi   = null;
            dynamic last    = null;
            dynamic current = null;

            runHi = (lo ?? 0) + 1;

            if ((runHi ?? 0) >= (hi ?? 0))
            {
                return(1);
            }
            last    = (this.associative ? this.L[this.L[lo]] : this.L[lo]);
            current = (this.associative ? this.L[this.L[runHi++]] : this.L[runHi++]);

            if (Convert.ToDouble(Lang13.Call(this.cmp, current, last)) < 0)
            {
                while ((runHi ?? 0) < (hi ?? 0))
                {
                    last    = current;
                    current = (this.associative ? this.L[this.L[runHi]] : this.L[runHi]);

                    if (Convert.ToDouble(Lang13.Call(this.cmp, current, last)) >= 0)
                    {
                        break;
                    }
                    runHi++;
                }
                GlobalFuncs.reverseRange(this.L, lo, runHi);
            }
            else
            {
                while ((runHi ?? 0) < (hi ?? 0))
                {
                    last    = current;
                    current = (this.associative ? this.L[this.L[runHi]] : this.L[runHi]);

                    if (Convert.ToDouble(Lang13.Call(this.cmp, current, last)) < 0)
                    {
                        break;
                    }
                    runHi++;
                }
            }
            return((runHi ?? 0) - (lo ?? 0));
        }
コード例 #18
0
        // Function from file: simple_animal.dm
        public override bool death(bool?gibbed = null, bool?toast = null)
        {
            dynamic i = null;


            if (this.nest != null)
            {
                this.nest.spawned_mobs.Remove(this);
                this.nest = null;
            }

            if (this.loot.len != 0)
            {
                foreach (dynamic _a in Lang13.Enumerate(this.loot))
                {
                    i = _a;

                    Lang13.Call(i, this.loc);
                }
            }

            if (Lang13.Bool(this.deathmessage) && !(gibbed == true))
            {
                this.visible_message("<span class='danger'>" + this.deathmessage + "</span>");
            }
            else if (!this.del_on_death)
            {
                this.visible_message(new Txt("<span class='danger'>").the(this).item().str(" stops moving...</span>").ToString());
            }

            if (this.del_on_death)
            {
                this.ghostize();
                GlobalFuncs.qdel(this);
            }
            else
            {
                this.health     = 0;
                this.icon_state = this.icon_dead;
                this.stat       = 2;
                this.density    = false;
            }
            base.death(gibbed, toast);
            return(false);
        }
コード例 #19
0
        // Function from file: __main.dm
        public void mergeAt2(int i = 0)
        {
            double? cursor1 = null;
            double? cursor2 = null;
            double? end1    = null;
            double? end2    = null;
            dynamic val1    = null;
            dynamic val2    = null;

            cursor1 = Lang13.DoubleNullable(this.runBases[i]);
            cursor2 = Lang13.DoubleNullable(this.runBases[i + 1]);
            end1    = (cursor1 ?? 0) + Convert.ToDouble(this.runLens[i]);
            end2    = (cursor2 ?? 0) + Convert.ToDouble(this.runLens[i + 1]);
            val1    = (this.associative ? this.L[this.L[cursor1]] : this.L[cursor1]);
            val2    = (this.associative ? this.L[this.L[cursor2]] : this.L[cursor2]);

            while (true)
            {
                if (Convert.ToDouble(Lang13.Call(this.cmp, val1, val2)) < 0)
                {
                    if ((++cursor1 ?? 0) >= (end1 ?? 0))
                    {
                        break;
                    }
                    val1 = (this.associative ? this.L[this.L[cursor1]] : this.L[cursor1]);
                }
                else
                {
                    GlobalFuncs.moveElement(this.L, cursor2, cursor1);
                    cursor2++;

                    if ((++cursor2 ?? 0) >= (end2 ?? 0))
                    {
                        break;
                    }
                    end1++;
                    cursor1++;
                    val2 = (this.associative ? this.L[this.L[cursor2]] : this.L[cursor2]);
                }
            }
            this.runLens[i] += this.runLens[i + 1];
            this.runLens.Cut(i + 1, i + 2);
            this.runBases.Cut(i + 1, i + 2);
            return;
        }
コード例 #20
0
        // Function from file: advance.dm
        public Disease_Advance(bool?process = null, Disease_Advance D = null) : base(  )
        {
            process = process ?? true;

            dynamic symp = null;
            dynamic S    = null;
            Symptom S2   = null;


            if (!(GlobalVars.dictionary_symptoms.len != 0))
            {
                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.list_symptoms))
                {
                    symp = _a;

                    S = Lang13.Call(symp);
                    GlobalVars.dictionary_symptoms[S.id] = symp;
                }
            }

            if (!(D is Disease_Advance))
            {
                D = null;
            }

            if (!(this.symptoms != null) || !(this.symptoms.len != 0))
            {
                if (!(D != null) || !(D.symptoms != null) || !(D.symptoms.len != 0))
                {
                    this.symptoms = this.GenerateSymptoms(0, 2);
                }
                else
                {
                    foreach (dynamic _b in Lang13.Enumerate(D.symptoms, typeof(Symptom)))
                    {
                        S2 = _b;

                        this.symptoms.Add(Lang13.Call(S2.type));
                    }
                }
            }
            this.Refresh();
            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            return;
        }
コード例 #21
0
        // Function from file: transit_tube.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            Obj_Structure_TransitTubePod pod = null;
            dynamic R = null;
            Obj_Structure_TransitTubePod pod2 = null;


            if (A is Obj_Item_Weapon_Wrench)
            {
                if (String13.SubStr(this.icon_state, 1, 3) != "D-")
                {
                    foreach (dynamic _a in Lang13.Enumerate(this.loc, typeof(Obj_Structure_TransitTubePod)))
                    {
                        pod = _a;

                        user.WriteMsg("<span class='warning'>Remove the pod first!</span>");
                        return(null);
                    }
                    ((Ent_Static)user).visible_message(new Txt().item(user).str(" starts to deattach ").the(this).item().str(".").ToString(), "<span class='notice'>You start to deattach the " + this.name + "...</span>");
                    GlobalFuncs.playsound(this.loc, "sound/items/ratchet.ogg", 50, 1);

                    if (GlobalFuncs.do_after(user, 35 / A.toolspeed, null, this))
                    {
                        user.WriteMsg("<span class='notice'>You deattach the " + this.name + ".</span>");
                        R            = Lang13.Call(this.tube_construction, this.loc);
                        R.icon_state = this.icon_state;
                        this.transfer_fingerprints_to(R);
                        ((Ent_Static)R).add_fingerprint(user);
                        this.destroy_diagonals();
                        GlobalFuncs.qdel(this);
                    }
                }
            }

            if (A is Obj_Item_Weapon_Crowbar)
            {
                foreach (dynamic _b in Lang13.Enumerate(this.loc, typeof(Obj_Structure_TransitTubePod)))
                {
                    pod2 = _b;

                    pod2.attackby(A, user);
                }
            }
            return(null);
        }
コード例 #22
0
        // Function from file: observer.dm
        public override void ClickOn(Ent_Static A = null, string _params = null)
        {
            ByTable modifiers = null;


            if (this.client.click_intercept != null)
            {
                if (Lang13.Bool(Lang13.Call(Lang13.BindFunc(this.client.click_intercept, "ClickOn"), this, _params, A)))
                {
                    return;
                }
            }
            modifiers = String13.ParseUrlParams(_params);

            if (Lang13.Bool(modifiers["middle"]))
            {
                this.MiddleClickOn(A);
                return;
            }

            if (Lang13.Bool(modifiers["shift"]))
            {
                this.ShiftClickOn(A);
                return;
            }

            if (Lang13.Bool(modifiers["alt"]))
            {
                this.AltClickOn(A);
                return;
            }

            if (Lang13.Bool(modifiers["ctrl"]))
            {
                this.CtrlClickOn(A);
                return;
            }

            if (Game13.time <= this.next_move)
            {
                return;
            }
            A.attack_ghost(this);
            return;
        }
コード例 #23
0
        // Function from file: changeling.dm
        public override void forge_changeling_objectives(Mind changeling = null, bool?team_mode = null)
        {
            dynamic team_objective = null;


            if (Lang13.Bool(this.changeling_team_objective_type))
            {
                team_objective       = Lang13.Call(this.changeling_team_objective_type);
                team_objective.owner = changeling;
                changeling.objectives.Add(team_objective);
                base.forge_changeling_objectives(changeling, true);
            }
            else
            {
                base.forge_changeling_objectives(changeling, false);
            }
            return;
        }
コード例 #24
0
        // Function from file: solar.dm
        public void give_glass(int device_broken = 0)
        {
            dynamic S = null;


            if (device_broken != 0)
            {
                new Obj_Item_Weapon_Shard(this.loc);
                new Obj_Item_Weapon_Shard(this.loc);
            }
            else if (this.glass_type != null)
            {
                S        = Lang13.Call(this.glass_type, this.loc);
                S.amount = 2;
            }
            this.glass_type = null;
            return;
        }
コード例 #25
0
ファイル: Obj_Effect_Rend.cs プロジェクト: Somnium13/SS13
        // Function from file: artefact.dm
        public override int?process(dynamic seconds = null)
        {
            if (!this.spawn_fast)
            {
                if (Lang13.Bool(Lang13.FindIn(typeof(Mob), this.loc)))
                {
                    return(null);
                }
            }
            Lang13.Call(this.spawn_path, this.loc);
            this.spawn_amt_left--;

            if (this.spawn_amt_left <= 0)
            {
                GlobalFuncs.qdel(this);
            }
            return(null);
        }
コード例 #26
0
        // Function from file: effects_smoke.dm
        public override void start(  )
        {
            dynamic S = null;


            if (Lang13.Bool(this.holder))
            {
                this.location = GlobalFuncs.get_turf(this.holder);
            }
            S        = Lang13.Call(this.effect_type, this.location);
            S.amount = this.amount;

            if (Lang13.Bool(S.amount))
            {
                ((Obj_Effect_ParticleEffect_Smoke)S).spread_smoke();
            }
            return;
        }
コード例 #27
0
        // Function from file: toggles.dm
        public void MakeHelmet(  )
        {
            dynamic W = null;


            if (!(this.helmettype != null))
            {
                return;
            }

            if (!Lang13.Bool(this.helmet))
            {
                W           = Lang13.Call(this.helmettype, this);
                W.suit      = this;
                this.helmet = W;
            }
            return;
        }
コード例 #28
0
        // Function from file: grown.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            dynamic planted = null;


            if (user.loc is Tile_Space)
            {
                return(null);
            }
            planted           = Lang13.Call(this.effect_path, user.loc);
            planted.delay     = planted.delay - (this.production ?1:0) * 100;
            planted.endurance = this.endurance;
            planted.yield     = this.yield;
            planted.potency   = this.potency;
            user.WriteMsg("<span class='notice'>You plant " + this + ".</span>");
            GlobalFuncs.qdel(this);
            return(null);
        }
コード例 #29
0
ファイル: Mob_Camera_God.cs プロジェクト: Somnium13/SS13
        public void disaster(  )
        {
            dynamic _event = null;


            if (!this.ability_cost(300, false, true))
            {
                return;
            }
            _event = Rand13.Pick(new object [] { typeof(RoundEvent_MeteorWave), typeof(RoundEvent_CommunicationsBlackout), typeof(RoundEvent_RadiationStorm), typeof(RoundEvent_CarpMigration), typeof(RoundEvent_Spacevine), typeof(RoundEvent_VentClog), typeof(RoundEvent_Wormholes) });

            if (Lang13.Bool(_event))
            {
                Lang13.Call(_event);
                this.add_faith(-300);
            }
            return;
        }
コード例 #30
0
        // Function from file: chameleon.dm
        public Obj_Item_Clothing_Under_Chameleon_All(dynamic loc = null) : base((object)(loc))
        {
            ByTable blocked = null;
            dynamic U       = null;
            dynamic V       = null;

            // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
            blocked = new ByTable(new object [] { typeof(Obj_Item_Clothing_Under_Chameleon), typeof(Obj_Item_Clothing_Under_Chameleon_All) });

            foreach (dynamic _a in Lang13.Enumerate(Lang13.GetTypes(typeof(Obj_Item_Clothing_Under)) - blocked))
            {
                U = _a;

                V = Lang13.Call(U);
                this.clothing_choices.Add(V);
            }
            return;
        }