Example #1
0
        // Function from file: airalarm.dm
        public void apply_danger_level(  )
        {
            dynamic A = null;
            int     new_area_danger_level = 0;
            dynamic R = null;
            Obj_Machinery_Airalarm AA = null;

            A = GlobalFuncs.get_area_master(this);
            new_area_danger_level = 0;

            foreach (dynamic _b in Lang13.Enumerate(A.related))
            {
                R = _b;


                foreach (dynamic _a in Lang13.Enumerate(R, typeof(Obj_Machinery_Airalarm)))
                {
                    AA = _a;


                    if (!((AA.stat & 3) != 0) && !Lang13.Bool(AA.shorted))
                    {
                        new_area_danger_level = Num13.MaxInt(new_area_danger_level, AA.danger_level);
                    }
                }
            }

            if (((Zone)A).atmosalert(new_area_danger_level, this))
            {
                this.post_alert(new_area_danger_level);
            }
            this.update_icon();
            return;
        }
Example #2
0
 // Function from file: airalarm.dm
 public Wires_Airalarm(Obj_Machinery_Airalarm holder = null) : base(holder)
 {
     this.wires = new ByTable(new object [] { "power", "idscan", "ai", "panic", "alarm" });
     this.add_duds(3);
     // Warning: Super call was HERE! If anything above HERE is needed by the super call, it might break!;
     return;
 }
Example #3
0
        // Function from file: blueprints.dm
        public void set_area_machinery_title(Ent_Static A = null, string title = null, string oldtitle = null)
        {
            dynamic RA = null;
            Obj_Machinery_Airalarm  M  = null;
            Obj_Machinery_Power_Apc M2 = null;
            Obj_Machinery_Atmospherics_Components_Unary_VentScrubber M3 = null;
            Obj_Machinery_Atmospherics_Components_Unary_VentPump     M4 = null;
            Obj_Machinery_Door M5 = null;


            if (!Lang13.Bool(oldtitle))
            {
                return;
            }

            foreach (dynamic _f in Lang13.Enumerate(((dynamic)A).related))
            {
                RA = _f;


                foreach (dynamic _a in Lang13.Enumerate(RA, typeof(Obj_Machinery_Airalarm)))
                {
                    M = _a;

                    M.name = GlobalFuncs.replacetext(M.name, oldtitle, title);
                }

                foreach (dynamic _b in Lang13.Enumerate(RA, typeof(Obj_Machinery_Power_Apc)))
                {
                    M2 = _b;

                    M2.name = GlobalFuncs.replacetext(M2.name, oldtitle, title);
                }

                foreach (dynamic _c in Lang13.Enumerate(RA, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentScrubber)))
                {
                    M3 = _c;

                    M3.name = GlobalFuncs.replacetext(M3.name, oldtitle, title);
                }

                foreach (dynamic _d in Lang13.Enumerate(RA, typeof(Obj_Machinery_Atmospherics_Components_Unary_VentPump)))
                {
                    M4 = _d;

                    M4.name = GlobalFuncs.replacetext(M4.name, oldtitle, title);
                }

                foreach (dynamic _e in Lang13.Enumerate(RA, typeof(Obj_Machinery_Door)))
                {
                    M5 = _e;

                    M5.name = GlobalFuncs.replacetext(M5.name, oldtitle, title);
                }
            }
            return;
        }