Esempio n. 1
0
        // Function from file: areas.dm
        public virtual void poweralert(bool state = false, Obj_Machinery_Power_Apc source = null)
        {
            ByTable cameras                       = null;
            Obj_Machinery_Camera C                = null;
            Mob_Living_Silicon   aiPlayer         = null;
            Obj_Machinery_Computer_StationAlert a = null;
            Mob_Living_SimpleAnimal_Drone       D = null;


            if (state != this.poweralm)
            {
                this.poweralm = state;

                if (source is Obj)
                {
                    cameras = new ByTable();

                    foreach (dynamic _a in Lang13.Enumerate(this, typeof(Obj_Machinery_Camera)))
                    {
                        C = _a;

                        cameras.Add(C);
                    }

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


                        if (state)
                        {
                            aiPlayer.cancelAlarm("Power", this, source);
                        }
                        else
                        {
                            aiPlayer.triggerAlarm("Power", this, cameras, source);
                        }
                    }

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


                        if (state)
                        {
                            a.cancelAlarm("Power", this, source);
                        }
                        else
                        {
                            a.triggerAlarm("Power", this, cameras, source);
                        }
                    }

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


                        if (state)
                        {
                            D.cancelAlarm("Power", this, source);
                        }
                        else
                        {
                            D.triggerAlarm("Power", this, cameras, source);
                        }
                    }
                }
            }
            return;
        }
Esempio n. 2
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;
        }
Esempio n. 3
0
        // Function from file: areas.dm
        public bool atmosalert(int danger_level = 0, Obj source = null)
        {
            ByTable cameras                        = null;
            dynamic RA                             = null;
            Obj_Machinery_Camera C                 = null;
            Mob_Living_Silicon   aiPlayer          = null;
            Obj_Machinery_Computer_StationAlert a  = null;
            Mob_Living_SimpleAnimal_Drone       D  = null;
            Mob_Living_Silicon aiPlayer2           = null;
            Obj_Machinery_Computer_StationAlert a2 = null;
            Mob_Living_SimpleAnimal_Drone       D2 = null;


            if (danger_level != this.atmosalm)
            {
                if (danger_level == 2)
                {
                    cameras = new ByTable();

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


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

                            cameras.Add(C);
                        }
                    }

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

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

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

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

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

                        D.triggerAlarm("Atmosphere", this, cameras, source);
                    }
                }
                else if (this.atmosalm == 2)
                {
                    foreach (dynamic _f in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon)))
                    {
                        aiPlayer2 = _f;

                        aiPlayer2.cancelAlarm("Atmosphere", this, source);
                    }

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

                        a2.cancelAlarm("Atmosphere", this, source);
                    }

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

                        D2.cancelAlarm("Atmosphere", this, source);
                    }
                }
                this.atmosalm = danger_level;
                return(true);
            }
            return(false);
        }
Esempio n. 4
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;
        }