Exemple #1
0
        // Function from file: syndicatebomb.dm
        public override dynamic attack_self(dynamic user = null, dynamic flag = null, bool?emp = null)
        {
            Obj_Machinery_Syndicatebomb B = null;
            dynamic T       = null;
            dynamic A       = null;
            string  log_str = null;


            if (!this.cooldown)
            {
                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Syndicatebomb)))
                {
                    B = _a;


                    if (B.active)
                    {
                        B.timer = 0;
                        this.detonated++;
                    }
                    this.existant++;
                }
                GlobalFuncs.playsound(user, "sound/machines/click.ogg", 20, 1);
                user.WriteMsg("<span class='notice'>" + this.existant + " found, " + this.detonated + " triggered.</span>");

                if (this.detonated != 0)
                {
                    T = GlobalFuncs.get_turf(this);
                    A = GlobalFuncs.get_area(T);
                    this.detonated--;
                    log_str = new Txt().item(GlobalFuncs.key_name_admin(user)).str("<A HREF='?_src_=holder;adminmoreinfo=").Ref(user).str("'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=").Ref(user).str("'>FLW</A>) has remotely detonated ").item((this.detonated != 0 ? "syndicate bombs" : "a syndicate bomb")).str(" using a ").item(this.name).str(" at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=").item(T.x).str(";Y=").item(T.y).str(";Z=").item(T.z).str("'>").item(A.name).str(" (JMP)</a>.").ToString();
                    GlobalVars.bombers.Add(log_str);
                    GlobalFuncs.message_admins(log_str);
                    GlobalFuncs.log_game("" + GlobalFuncs.key_name(user) + " has remotely detonated " + (this.detonated != 0 ? "syndicate bombs" : "a syndicate bomb") + " using a " + this.name + " at " + A.name + "(" + T.x + "," + T.y + "," + T.z + ")");
                }
                this.detonated = 0;
                this.existant  = 0;
                this.cooldown  = true;
                Task13.Schedule(30, (Task13.Closure)(() => {
                    this.cooldown = false;
                    return;
                }));
            }
            return(null);
        }
 // Function from file: syndicatebomb.dm
 public Wires_Syndicatebomb(Obj_Machinery_Syndicatebomb holder = null) : base(holder)
 {
     this.wires = new ByTable(new object [] { "boom", "unbolt", "activate", "delay", "proceed" });
     // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
     return;
 }