Exemplo n.º 1
0
        // Function from file: areas.dm
        public void firealert(Obj_Machinery source = null)
        {
            ByTable cameras = null;
            dynamic RA      = null;
            Obj_Machinery_Door_Firedoor         D  = null;
            Obj_Machinery_Firealarm             F  = null;
            Obj_Machinery_Camera                C  = null;
            Obj_Machinery_Computer_StationAlert a  = null;
            Mob_Living_Silicon            aiPlayer = null;
            Mob_Living_SimpleAnimal_Drone D2       = null;


            if (this.always_unpowered)
            {
                return;
            }
            cameras = new ByTable();

            foreach (dynamic _d in Lang13.Enumerate(this.related))
            {
                RA = _d;


                if (!RA.fire)
                {
                    ((Zone)RA).set_fire_alarm_effect();

                    foreach (dynamic _a in Lang13.Enumerate(RA, typeof(Obj_Machinery_Door_Firedoor)))
                    {
                        D = _a;


                        if (!D.blocked)
                        {
                            if (D.operating)
                            {
                                D.nextstate = GlobalVars.CLOSED;
                            }
                            else if (!D.density)
                            {
                                Task13.Schedule(0, (Task13.Closure)(() => {
                                    D.close();
                                    return;
                                }));
                            }
                        }
                    }

                    foreach (dynamic _b in Lang13.Enumerate(RA, typeof(Obj_Machinery_Firealarm)))
                    {
                        F = _b;

                        F.update_icon();
                    }
                }

                foreach (dynamic _c in Lang13.Enumerate(RA, typeof(Obj_Machinery_Camera)))
                {
                    C = _c;

                    cameras.Add(C);
                }
            }

            foreach (dynamic _e in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Computer_StationAlert)))
            {
                a = _e;

                a.triggerAlarm("Fire", this, cameras, source);
            }

            foreach (dynamic _f in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon)))
            {
                aiPlayer = _f;

                aiPlayer.triggerAlarm("Fire", this, cameras, source);
            }

            foreach (dynamic _g in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_SimpleAnimal_Drone)))
            {
                D2 = _g;

                D2.triggerAlarm("Fire", this, cameras, source);
            }
            return;
        }
Exemplo n.º 2
0
        // Function from file: areas.dm
        public void firereset(Obj_Machinery source = null)
        {
            dynamic RA = null;
            Obj_Machinery_Door_Firedoor         D        = null;
            Obj_Machinery_Firealarm             F        = null;
            Mob_Living_Silicon                  aiPlayer = null;
            Obj_Machinery_Computer_StationAlert a        = null;
            Mob_Living_SimpleAnimal_Drone       D2       = null;


            foreach (dynamic _c in Lang13.Enumerate(this.related))
            {
                RA = _c;


                if (RA.fire)
                {
                    RA.fire          = false;
                    RA.mouse_opacity = 0;
                    ((Zone)RA).updateicon();

                    foreach (dynamic _a in Lang13.Enumerate(RA, typeof(Obj_Machinery_Door_Firedoor)))
                    {
                        D = _a;


                        if (!D.blocked)
                        {
                            if (D.operating)
                            {
                                D.nextstate = 1;
                            }
                            else if (D.density)
                            {
                                Task13.Schedule(0, (Task13.Closure)(() => {
                                    D.open();
                                    return;
                                }));
                            }
                        }
                    }

                    foreach (dynamic _b in Lang13.Enumerate(RA, typeof(Obj_Machinery_Firealarm)))
                    {
                        F = _b;

                        F.update_icon();
                    }
                }
            }

            foreach (dynamic _d in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon)))
            {
                aiPlayer = _d;

                aiPlayer.cancelAlarm("Fire", this, source);
            }

            foreach (dynamic _e in Lang13.Enumerate(GlobalVars.machines, typeof(Obj_Machinery_Computer_StationAlert)))
            {
                a = _e;

                a.cancelAlarm("Fire", this, source);
            }

            foreach (dynamic _f in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_SimpleAnimal_Drone)))
            {
                D2 = _f;

                D2.cancelAlarm("Fire", this, source);
            }
            return;
        }