Ejemplo n.º 1
0
        // Function from file: runes.dm
        public override void invoke(dynamic user = null)
        {
            Mob_Living_Carbon C = null;

            this.visible_message("<span class='warning'>" + this + " emits a blinding red flash!</span>");

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


                if (!GlobalFuncs.iscultist(C) && !Lang13.Bool(C.null_rod_check()))
                {
                    C.WriteMsg("<span class='cultlarge'>You feel oily shadows cover your senses.</span>");
                    C.adjustEarDamage(0, 50);
                    C.flash_eyes(1, true);
                    C.adjust_blurriness(50);
                    C.adjust_blindness(20);
                    C.silent += 10;
                }
            }
            GlobalFuncs.qdel(this);
            return;
        }
        // Function from file: plasmamen.dm
        public void Extinguish(Mob_Living H = null)
        {
            if (!(H is Mob_Living_Carbon_Human))
            {
                return;
            }

            if (H.fire_stacks != 0)
            {
                if (this.extinguishes_left != 0)
                {
                    if (this.next_extinguish > Game13.time)
                    {
                        return;
                    }
                    this.next_extinguish = Game13.time + this.extinguish_cooldown;
                    this.extinguishes_left--;
                    H.visible_message("<span class='warning'>" + H + "'s suit automatically extinguishes them!</span>", "<span class='warning'>Your suit automatically extinguishes you.</span>");
                    H.ExtinguishMob();
                    GlobalFuncs.PoolOrNew(typeof(Obj_Effect_ParticleEffect_Water), GlobalFuncs.get_turf(H));
                }
            }
            return;
        }
Ejemplo n.º 3
0
        // Function from file: mouse.dm
        public override bool death(bool?gibbed = null, bool?toast = null)
        {
            Obj_Item_Trash_Deadmouse M = null;


            if (!Lang13.Bool(this.ckey))
            {
                base.death(true, toast);
                M            = new Obj_Item_Trash_Deadmouse(this.loc);
                M.icon_state = this.icon_dead;

                if (toast == true)
                {
                    M.color = "#3A3A3A";
                    M.desc  = "It's toast.";
                }
                GlobalFuncs.qdel(this);
            }
            else
            {
                base.death(gibbed, toast);
            }
            return(false);
        }
Ejemplo n.º 4
0
        // Function from file: pyrotechnics.dm
        public override void on_reaction(Reagents holder = null, double?created_volume = null)
        {
            dynamic location           = null;
            EffectSystem_SparkSpread s = null;
            Mob_Living_Carbon        C = null;


            if (Lang13.Bool(holder.has_reagent("stabilizing_agent")))
            {
                return;
            }
            location = GlobalFuncs.get_turf(holder.my_atom);
            s        = new EffectSystem_SparkSpread();
            s.set_up(2, 1, location);
            s.start();

            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.get_hearers_in_view((created_volume ?? 0) / 10, location), typeof(Mob_Living_Carbon)))
            {
                C = _a;


                if (C.flash_eyes())
                {
                    if (Map13.GetDistance(C, location) < 4)
                    {
                        C.Weaken(5);
                    }
                    else
                    {
                        C.Stun(5);
                    }
                }
            }
            holder.remove_reagent("flash_powder", created_volume);
            return;
        }
Ejemplo n.º 5
0
        // Function from file: pipe_dispenser.dm
        public override bool MouseDrop_T(Ent_Static dropping = null, Mob user = null)
        {
            if (!user.canmove || user.stat != 0 || user.restrained())
            {
                return(false);
            }

            if (!(dropping is Obj_Structure_Disposalconstruct) && !(dropping is Obj_Structure_CTransitTube) && !(dropping is Obj_Structure_CTransitTubePod))
            {
                return(false);
            }

            if (Map13.GetDistance(user, this) > 1 || Map13.GetDistance(this, dropping) > 1)
            {
                return(false);
            }

            if (Lang13.Bool(((dynamic)dropping).anchored))
            {
                return(false);
            }
            GlobalFuncs.qdel(dropping);
            return(false);
        }
Ejemplo n.º 6
0
        // Function from file: Hallucination.dm
        public void Expand(  )
        {
            dynamic T = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.circlerangeturfs(this.loc, this.radius)))
            {
                T = _a;


                if (this.flood_turfs.Contains(T) || T.blocks_air)
                {
                    continue;
                }
                this.flood_images.Add(new Image(this.image_icon, T, this.image_state, GlobalVars.MOB_LAYER));
                this.flood_turfs.Add(T);
            }

            if (Lang13.Bool(((dynamic)this.target).client))
            {
                ((dynamic)this.target).client.images.Or(this.flood_images);
            }
            return;
        }
Ejemplo n.º 7
0
        // Function from file: spacevine.dm
        public override bool start(  )
        {
            ByTable turfs           = null;
            Obj_Effect_Spacevine SV = null;
            Zone_Hallway         A  = null;
            Tile_Simulated       F  = null;
            dynamic T = null;

            turfs = new ByTable();
            SV    = new Obj_Effect_Spacevine();

            foreach (dynamic _b in Lang13.Enumerate(typeof(Game13), typeof(Zone_Hallway)))
            {
                A = _b;


                foreach (dynamic _a in Lang13.Enumerate(A, typeof(Tile_Simulated)))
                {
                    F = _a;


                    if (F.Enter(SV))
                    {
                        turfs.Add(F);
                    }
                }
            }
            GlobalFuncs.qdel(SV);

            if (turfs.len != 0)
            {
                T = Rand13.PickFromTable(turfs);
                new Obj_Effect_SpacevineController(T);
            }
            return(false);
        }
Ejemplo n.º 8
0
        // Function from file: theblob.dm
        public dynamic blob_attack_animation(dynamic A = null, Mob_Camera_Blob controller = null)
        {
            dynamic         O  = null;
            Mob_Camera_Blob BO = null;

            O = GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Blob), this.loc);

            if (controller != null)
            {
                BO      = controller;
                O.color = BO.blob_reagent_datum.color;
                O.alpha = 200;
            }
            else if (this.overmind != null)
            {
                O.color = this.overmind.blob_reagent_datum.color;
            }

            if (Lang13.Bool(A))
            {
                ((Ent_Dynamic)O).do_attack_animation(A);
            }
            return(O);
        }
Ejemplo n.º 9
0
        // Function from file: morgue.dm
        public override bool CanPass(dynamic mover = null, dynamic target = null, double?height = null, bool?air_group = null)
        {
            height = height ?? 0;


            if (height == 0)
            {
                return(true);
            }

            if (mover is Ent_Dynamic && ((Ent_Dynamic)mover).checkpass(1) != 0)
            {
                return(true);
            }

            if (Lang13.Bool(Lang13.FindIn(typeof(Obj_Structure_Table), GlobalFuncs.get_turf(mover))))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 10
0
        // Function from file: changeling.dm
        public void remove_profile(Mob H = null, bool?force = null)
        {
            force = force ?? false;

            Changelingprofile prof = null;


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


                if (H.real_name == prof.name)
                {
                    if (prof.v_protected == true && !(force == true))
                    {
                        continue;
                    }
                    this.stored_profiles.Remove(prof);
                    GlobalFuncs.qdel(prof);
                }
            }
            return;
        }
        // Function from file: tgstation.dme
        public void send_signal(string message = null)
        {
            message = message ?? "ACTIVATE";

            string  time   = null;
            dynamic T      = null;
            Signal  signal = null;


            if (this.last_transmission != 0 && Game13.time < this.last_transmission + 5)
            {
                return;
            }
            this.last_transmission = Game13.time;
            time = String13.FormatTime(Game13.realtime, "hh:mm:ss");
            T    = GlobalFuncs.get_turf(this);
            GlobalVars.lastsignalers.Add("" + time + " <B>:</B> " + Task13.User.key + " used " + this + " @ location (" + T.x + "," + T.y + "," + T.z + ") <B>:</B> " + GlobalFuncs.format_frequency(this.frequency) + "/" + this.code);
            signal                 = new Signal();
            signal.source          = this;
            signal.encryption      = this.code;
            signal.data["message"] = message;
            this.radio_connection.post_signal(this, signal);
            return;
        }
Ejemplo n.º 12
0
        // Function from file: snacks.dm
        public virtual void On_Consume(  )
        {
            dynamic TrashItem  = null;
            dynamic TrashItem2 = null;


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

            if (!Lang13.Bool(this.reagents.total_volume))
            {
                Task13.User.unEquip(this);

                if (this.trash != null)
                {
                    if (Lang13.Bool(((dynamic)this.trash).IsSubclassOf(typeof(Obj_Item_Weapon_Grown))))
                    {
                        TrashItem = Lang13.Call(this.trash, Task13.User, this.potency);
                        Task13.User.put_in_hands(TrashItem);
                    }
                    else if (Lang13.Bool(((dynamic)this.trash).IsSubclassOf(typeof(Obj_Item))))
                    {
                        TrashItem2 = Lang13.Call(this.trash, Task13.User);
                        Task13.User.put_in_hands(TrashItem2);
                    }
                    else if (this.trash is Obj_Item)
                    {
                        Task13.User.put_in_hands(this.trash);
                    }
                }
                GlobalFuncs.qdel(this);
            }
            return;
        }
Ejemplo n.º 13
0
        // Function from file: dominator.dm
        public override bool ex_act(double?severity = null, dynamic target = null)
        {
            if (target == this)
            {
                GlobalFuncs.qdel(this);
                return(false);
            }

            switch ((int?)(severity))
            {
            case 1:
                GlobalFuncs.qdel(this);
                break;

            case 2:
                this.healthcheck(120);
                break;

            case 3:
                this.healthcheck(30);
                break;
            }
            return(false);
        }
        // Function from file: vent_pump.dm
        public bool broadcast_status(  )
        {
            Signal  signal = null;
            dynamic A      = null;


            if (!(this.radio_connection != null))
            {
                return(false);
            }
            signal = new Signal();
            signal.transmission_method = 1;
            signal.source = this;
            signal.data   = new ByTable()
                            .Set("tag", this.id_tag)
                            .Set("frequency", this.frequency)
                            .Set("device", "VP")
                            .Set("timestamp", Game13.time)
                            .Set("power", this.on)
                            .Set("direction", (Lang13.Bool(this.pump_direction) ? "release" : "siphon"))
                            .Set("checks", this.pressure_checks)
                            .Set("internal", this.internal_pressure_bound)
                            .Set("external", this.external_pressure_bound)
                            .Set("sigtype", "status")
            ;
            A = GlobalFuncs.get_area_master(this);

            if (!Lang13.Bool(A.air_vent_names[this.id_tag]))
            {
                this.name = new Txt().improper().item(A.name).str(" vent pump #").item(A.air_vent_names.len + 1).ToString();
                A.air_vent_names[this.id_tag] = this.name;
            }
            A.air_vent_info[this.id_tag] = signal.data;
            this.radio_connection.post_signal(this, signal, this.radio_filter_out);
            return(true);
        }
Ejemplo n.º 15
0
        // Function from file: ripley.dm
        public void update_pressure(  )
        {
            dynamic    T           = null;
            GasMixture environment = null;
            double     pressure    = 0;
            Obj_Item_MechaParts_MechaEquipment_Drill drill  = null;
            Obj_Item_MechaParts_MechaEquipment_Drill drill2 = null;

            T           = GlobalFuncs.get_turf(this.loc);
            environment = ((Ent_Static)T).return_air();
            pressure    = environment.return_pressure();

            if (pressure < 20)
            {
                this.step_in = 3;

                foreach (dynamic _a in Lang13.Enumerate(this.equipment, typeof(Obj_Item_MechaParts_MechaEquipment_Drill)))
                {
                    drill = _a;

                    drill.equip_cooldown = Lang13.Initial(drill, "equip_cooldown") / 2;
                }
            }
            else
            {
                this.step_in = 5;

                foreach (dynamic _b in Lang13.Enumerate(this.equipment, typeof(Obj_Item_MechaParts_MechaEquipment_Drill)))
                {
                    drill2 = _b;

                    drill2.equip_cooldown = Lang13.Initial(drill2, "equip_cooldown");
                }
            }
            return;
        }
Ejemplo n.º 16
0
 // Function from file: doppler_array.dm
 public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
 {
     if (A is Obj_Item_Weapon_Wrench)
     {
         if (!Lang13.Bool(this.anchored) && !this.isinspace())
         {
             this.anchored = 1;
             this.power_change();
             user.WriteMsg("<span class='notice'>You fasten " + this + ".</span>");
         }
         else if (Lang13.Bool(this.anchored))
         {
             this.anchored = 0;
             this.power_change();
             user.WriteMsg("<span class='notice'>You unfasten " + this + ".</span>");
         }
         GlobalFuncs.playsound(this.loc, "sound/items/ratchet.ogg", 50, 1);
     }
     else
     {
         base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
     }
     return(null);
 }
Ejemplo n.º 17
0
        // Function from file: structures.dm
        public override dynamic attack_hand(dynamic a = null, bool?b = null, bool?c = null)
        {
            dynamic H = null;

            base.attack_hand((object)(a), b, c);
            H = Lang13.FindIn(typeof(Mob_Living_Carbon_Human), GlobalFuncs.get_turf(this));

            if (!GlobalFuncs.is_handofgod_cultist(a))
            {
                a.WriteMsg("<span class='notice'>You try to use it, but unfortunately you don't know any rituals.</span>");
                return(null);
            }

            if (!Lang13.Bool(H))
            {
                return(null);
            }

            if (!Lang13.Bool(H.mind))
            {
                a.WriteMsg("<span class='danger'>Only sentients may serve your deity.</span>");
                return(null);
            }

            if (this.side == "red" && GlobalFuncs.is_handofgod_redcultist(a) && !GlobalFuncs.is_handofgod_redcultist(H) || this.side == "blue" && GlobalFuncs.is_handofgod_bluecultist(a) && !GlobalFuncs.is_handofgod_bluecultist(H))
            {
                a.WriteMsg("<span class='notice'>You invoke the conversion ritual.</span>");
                ((GameMode)GlobalVars.ticker.mode).add_hog_follower(H.mind, this.side);
            }
            else
            {
                a.WriteMsg("<span class='notice'>You invoke the conversion ritual.</span>");
                a.WriteMsg("<span class='danger'>But the altar ignores your words...</span>");
            }
            return(null);
        }
        // Function from file: special.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            dynamic S = null;


            if (A is Obj_Item_Stack_Sheet_Mineral_Plasma)
            {
                S = A;
                ((Obj_Item_Stack)S).use(1);
                ((Obj_Item_Weapon_StockParts_Cell)this.power_supply).give(1000);
                user.WriteMsg("<span class='notice'>You insert " + A + " in " + this + ", recharging it.</span>");
            }
            else if (A is Obj_Item_Weapon_Ore_Plasma)
            {
                GlobalFuncs.qdel(A);
                ((Obj_Item_Weapon_StockParts_Cell)this.power_supply).give(500);
                user.WriteMsg("<span class='notice'>You insert " + A + " in " + this + ", recharging it.</span>");
            }
            else
            {
                base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
            }
            return(null);
        }
        // Function from file: augments_internal.dm
        public override double emp_act(int severity = 0)
        {
            if (!Lang13.Bool(this.owner) || this.overloaded)
            {
                return(0);
            }

            if (this.v_out)
            {
                ((Mob)this.owner).unEquip(this.holder, 1);
                this.holder.loc = null;
                this.v_out      = false;
                this.owner.WriteMsg("<span class='warning'>" + this.holder + " forcibly retracts into your arm.</span>");
            }
            ((Ent_Static)this.owner).visible_message("<span class='danger'>A loud bang comes from " + this.owner + "...</span>");
            GlobalFuncs.playsound(GlobalFuncs.get_turf(this.owner), "sound/weapons/flashbang.ogg", 100, 1);
            this.owner.WriteMsg("<span class='warning'>You feel an explosion erupt inside you as your chest implant breaks. Is it hot in here?</span>");
            ((Mob_Living)this.owner).adjust_fire_stacks(20);
            this.owner.IgniteMob();
            ((Ent_Dynamic)this.owner).say("AUUUUUUUUUUUUUUUUUUGH!!");
            ((Mob_Living)this.owner).adjustFireLoss(25);
            this.overloaded = true;
            return(0);
        }
Ejemplo n.º 20
0
        // Function from file: tools.dm
        public override bool attack(dynamic M = null, dynamic user = null, bool?def_zone = null)
        {
            dynamic affecting = null;


            if (!(M is Mob_Living_Carbon_Human))
            {
                return(base.attack((object)(M), (object)(user), def_zone));
            }
            affecting = ((Mob_Living_Carbon_Human)M).get_organ(GlobalFuncs.check_zone(user.zone_selected));

            if (Convert.ToInt32(affecting.status) == 2 && user.a_intent != "harm")
            {
                if (this.remove_fuel(1))
                {
                    GlobalFuncs.playsound(this.loc, "sound/items/welder.ogg", 50, 1);
                    ((Ent_Static)user).visible_message("<span class='notice'>" + user + " starts to fix some of the dents on " + M + "'s " + ((Obj_Item_Organ_Limb)affecting).getDisplayName() + ".</span>", "<span class='notice'>You start fixing some of the dents on " + M + "'s " + ((Obj_Item_Organ_Limb)affecting).getDisplayName() + ".</span>");

                    if (!GlobalFuncs.do_mob(user, M, 50))
                    {
                        return(false);
                    }
                    GlobalFuncs.item_heal_robotic(M, user, 5, 0);
                    return(false);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(base.attack((object)(M), (object)(user), def_zone));
            }
            return(false);
        }
Ejemplo n.º 21
0
        // Function from file: mines.dm
        public override void mineEffect(Ent_Dynamic victim = null)
        {
            dynamic old_color  = null;
            ByTable red_splash = null;
            ByTable pure_red   = null;
            Obj_Item_Weapon_Twohanded_Required_Chainsaw chainsaw = null;


            if (!Lang13.Bool(((dynamic)victim).client) || !(victim is Mob_Living_Carbon))
            {
                return;
            }
            ((dynamic)victim).WriteMsg("<span class='reallybig redtext'>KILL EM ALL</span>");
            old_color  = ((dynamic)victim).client.color;
            red_splash = new ByTable(new object [] { 1, 0, 0, 0.8, 0.2, 0, 0.8, 0, 0.2, 0.1, 0, 0 });
            pure_red   = new ByTable(new object [] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 });
            Task13.Schedule(0, (Task13.Closure)(() => {
                new Obj_Effect_Hallucination_Delusion(victim.loc, victim, "demon", this.duration, false);
                return;
            }));
            chainsaw        = new Obj_Item_Weapon_Twohanded_Required_Chainsaw(victim.loc);
            chainsaw.flags |= 2;
            ((Mob)victim).drop_r_hand();
            ((Mob)victim).drop_l_hand();
            ((dynamic)victim).put_in_hands(chainsaw);
            victim.reagents.add_reagent("adminordrazine", 25);
            ((dynamic)victim).client.color = pure_red;
            Icon13.Animate(new ByTable().Set(1, ((dynamic)victim).client).Set("color", red_splash).Set("time", 10).Set("easing", 129));
            Task13.Sleep(10);
            Icon13.Animate(new ByTable().Set(1, ((dynamic)victim).client).Set("color", old_color).Set("time", this.duration));
            Task13.Sleep(this.duration ?? 0);
            ((dynamic)victim).WriteMsg("<span class='notice'>You feel calm again.<span>");
            GlobalFuncs.qdel(chainsaw);
            GlobalFuncs.qdel(this);
            return;
        }
Ejemplo n.º 22
0
        // Function from file: windowdoor.dm
        public override bool close(int?surpress_send = null)
        {
            surpress_send = surpress_send ?? 0;


            if (this.operating)
            {
                return(false);
            }

            if (!Lang13.Bool(surpress_send))
            {
                if (!this.hasPower())
                {
                    return(false);
                }
            }

            if ((surpress_send ?? 0) < 2)
            {
                if (Lang13.Bool(this.emagged))
                {
                    return(false);
                }
            }
            this.operating = true;
            Icon13.Flick("" + this.base_state + "closing", this);
            GlobalFuncs.playsound(this.loc, "sound/machines/windowdoor.ogg", 100, 1);
            this.icon_state = this.base_state;
            this.density    = true;
            this.air_update_turf(true);
            this.update_freelook_sight();
            Task13.Sleep(10);
            this.operating = false;
            return(true);
        }
Ejemplo n.º 23
0
        // Function from file: revolver.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            int     num_unloaded = 0;
            dynamic CB           = null;


            if (!this.spun && Lang13.Bool(this.can_shoot()))
            {
                ((Ent_Static)user).visible_message("" + user + " spins the chamber of the revolver.", "<span class='notice'>You spin the revolver's chamber.</span>");
                this.Spin();
            }
            else
            {
                num_unloaded = 0;

                while (this.get_ammo() > 0)
                {
                    CB             = null;
                    CB             = ((Obj_Item_AmmoBox)this.magazine).get_round();
                    this.chambered = null;
                    CB.loc         = GlobalFuncs.get_turf(this.loc);
                    CB.update_icon();
                    num_unloaded++;
                }

                if (num_unloaded != 0)
                {
                    user.WriteMsg(new Txt("<span class='notice'>You unload ").item(num_unloaded).str(" shell").s().str(" from ").item(this).str(".</span>").ToString());
                }
                else
                {
                    user.WriteMsg("<span class='notice'>" + this + " is empty.</span>");
                }
            }
            return(null);
        }
        // Function from file: guardian.dm
        public override bool AttackingTarget(  )
        {
            dynamic M = null;


            if (base.AttackingTarget())
            {
                if (Rand13.PercentChance(45))
                {
                    if (this.target is Ent_Dynamic)
                    {
                        M = this.target;

                        if (!Lang13.Bool(M.anchored) && M != this.summoner)
                        {
                            GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Guardian_Phase_Out), GlobalFuncs.get_turf(M));
                            GlobalFuncs.do_teleport(M, M, 10);
                            GlobalFuncs.PoolOrNew(typeof(Obj_Effect_Overlay_Temp_Guardian_Phase), GlobalFuncs.get_turf(M));
                        }
                    }
                }
            }
            return(false);
        }
Ejemplo n.º 25
0
        // Function from file: work_tools.dm
        public override dynamic Topic(string href = null, ByTable href_list = null, dynamic hsrc = null)
        {
            double?m = null;
            Obj_Item_Stack_CableCoil CC = null;

            base.Topic(href, href_list, (object)(hsrc));

            if (Lang13.Bool(href_list["toggle"]))
            {
                this.set_ready_state(!this.equip_ready);
                this.occupant_message("" + this + " " + (this.equip_ready ? "dea" : "a") + "ctivated.");
                this.log_message("" + (this.equip_ready ? "Dea" : "A") + "ctivated.");
                return(null);
            }

            if (Lang13.Bool(href_list["cut"]))
            {
                if (this.cable != null && Lang13.Bool(this.cable.amount))
                {
                    m = Num13.Round(Convert.ToDouble(Interface13.Input(this.chassis.occupant, "Please specify the length of cable to cut", "Cut cable", Num13.MinInt(((int)(this.cable.amount ?? 0)), 30), null, InputType.Num)), 1);
                    m = Num13.MinInt(((int)(m ?? 0)), ((int)(this.cable.amount ?? 0)));

                    if (Lang13.Bool(m))
                    {
                        this.use_cable(m);
                        CC        = new Obj_Item_Stack_CableCoil(GlobalFuncs.get_turf(this.chassis));
                        CC.amount = m;
                    }
                }
                else
                {
                    this.occupant_message("There's no more cable on the reel.");
                }
            }
            return(null);
        }
Ejemplo n.º 26
0
        // Function from file: chair.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            dynamic SK = null;
            Obj_Structure_Bed_Chair_EChair E = null;

            base.attackby((object)(A), (object)(user), _params, silent, replace_spent);

            if (A is Obj_Item_Assembly_ShockKit)
            {
                if (!Lang13.Bool(user.drop_item()))
                {
                    return(null);
                }
                SK = A;
                E  = new Obj_Structure_Bed_Chair_EChair(this.loc);
                GlobalFuncs.playsound(this.loc, "sound/items/Deconstruct.ogg", 50, 1);
                E.dir     = this.dir;
                E.part    = SK;
                SK.loc    = E;
                SK.master = E;
                GlobalFuncs.qdel(this);
            }
            return(null);
        }
        // Function from file: lightning.dm
        public void StartChargeup(Mob user = null)
        {
            user = user ?? Task13.User;

            this.ready = true;
            user.WriteMsg("<span class='notice'>You start gathering the power.</span>");
            this.Snd  = new Sound("sound/magic/lightning_chargeup.ogg", null, null, 7);
            this.halo = new Image("icons/effects/effects.dmi", null, "electricity", GlobalVars.EFFECTS_LAYER);
            user.overlays.Add(this.halo);
            GlobalFuncs.playsound(GlobalFuncs.get_turf(user), this.Snd, 50, 0);

            if (GlobalFuncs.do_mob(user, user, 100, true))
            {
                if (this.ready && this.cast_check(true))
                {
                    this.choose_targets();
                }
                else
                {
                    this.Reset(user);
                }
            }
            return;
        }
        // Function from file: construction.dm
        public override dynamic attackby(dynamic A = null, dynamic user = null, string _params = null, bool?silent = null, bool?replace_spent = null)
        {
            Obj_Item_Weapon_ToolboxTiles B = null;


            if (!(A is Obj_Item_Stack_Tile_Plasteel))
            {
                base.attackby((object)(A), (object)(user), _params, silent, replace_spent);
                return(null);
            }

            if (this.contents.len >= 1)
            {
                user.WriteMsg("<span class='warning'>They won't fit in, as there is already stuff inside!</span>");
                return(null);
            }

            if (((Obj_Item_Stack)A).use(10) != 0)
            {
                if (Lang13.Bool(user.s_active))
                {
                    user.s_active.close(user);
                }
                B = new Obj_Item_Weapon_ToolboxTiles();
                ((Mob)user).put_in_hands(B);
                user.WriteMsg("<span class='notice'>You add the tiles into the empty toolbox. They protrude from the top.</span>");
                ((Mob)user).unEquip(this, 1);
                GlobalFuncs.qdel(this);
            }
            else
            {
                user.WriteMsg("<span class='warning'>You need 10 floor tiles to start building a floorbot!</span>");
                return(null);
            }
            return(null);
        }
Ejemplo n.º 29
0
        // Function from file: cult.dm
        public override bool pre_setup(  )
        {
            double  cultists_number = 0;
            dynamic cultist         = null;


            if (GlobalVars.config.protect_roles_from_antagonist)
            {
                this.restricted_jobs.Add(this.protected_jobs);
            }

            if (GlobalVars.config.protect_assistant_from_antagonist)
            {
                this.restricted_jobs.Add("Assistant");
            }
            this.recommended_enemies = Num13.Floor(this.num_players() / 8) + 1;
            this.orbs_needed         = this.recommended_enemies;

            foreach (dynamic _a in Lang13.IterateRange(1, this.recommended_enemies))
            {
                cultists_number = _a;


                if (!(this.antag_candidates.len != 0))
                {
                    break;
                }
                cultist = Rand13.PickFromTable(this.antag_candidates);
                this.antag_candidates.Remove(cultist);
                this.cult.Add(cultist);
                cultist.special_role     = "Cultist";
                cultist.restricted_roles = this.restricted_jobs;
                GlobalFuncs.log_game("" + cultist.key + " (ckey) has been selected as a cultist");
            }
            return(this.cult.len >= this.required_enemies);
        }
Ejemplo n.º 30
0
        // Function from file: Operating.dm
        public string get_patient_info(  )
        {
            string  dat          = null;
            Surgery procedure    = null;
            dynamic surgery_step = null;

            dat = "\n				<div class='statusLabel'>Patient:</div> "+ (this.patient.stat != 0 ? "<span class='bad'>Non-Responsive</span>" : "<span class='good'>Stable</span>") + "<BR>\n				<div class='statusLabel'>Blood Type:</div> "+ ((dynamic)this.patient).dna.blood_type + "\n\n				<BR>\n				<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(Convert.ToInt32(this.patient.health), 0) + "%;' class='progressFill good'></div></div><div class='statusValue'>" + this.patient.health + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Brute Damage:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(((int)(this.patient.getBruteLoss())), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getBruteLoss() + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Resp. Damage:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(Convert.ToInt32(this.patient.getOxyLoss()), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getOxyLoss() + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Toxin Content:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(Convert.ToInt32(this.patient.getToxLoss()), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getToxLoss() + "%</div></div>\n				<div class='line'><div class='statusLabel'>&gt; Burn Severity:</div><div class='progressBar'><div style='width: "+ Num13.MaxInt(((int)(this.patient.getFireLoss())), 0) + "%;' class='progressFill bad'></div></div><div class='statusValue'>" + this.patient.getFireLoss() + "%</div></div>\n\n				";

            if (this.patient.surgeries.len != 0)
            {
                dat += "<BR><BR><B>Initiated Procedures</B><div class='statusDisplay'>";

                foreach (dynamic _a in Lang13.Enumerate(this.patient.surgeries, typeof(Surgery)))
                {
                    procedure = _a;

                    dat         += "" + GlobalFuncs.capitalize(procedure.name) + "<BR>";
                    surgery_step = procedure.get_surgery_step();
                    dat         += "Next step: " + GlobalFuncs.capitalize(surgery_step.name) + "<BR>";
                }
                dat += "</div>";
            }
            return(dat);
        }