Example #1
0
        // Function from file: areas.dm
        public void burglaralert(Obj trigger = null)
        {
            ByTable cameras = null;
            dynamic RA      = null;
            Obj_Machinery_Door_Airlock DOOR    = null;
            Obj_Machinery_Camera       C       = null;
            Mob_Living_Silicon         SILICON = null;


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

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

                ((Zone)RA).set_fire_alarm_effect();

                foreach (dynamic _a in Lang13.Enumerate(RA, typeof(Obj_Machinery_Door_Airlock)))
                {
                    DOOR = _a;

                    Task13.Schedule(0, (Task13.Closure)(() => {
                        DOOR.close();

                        if (DOOR.density)
                        {
                            DOOR.locked = true;
                            DOOR.update_icon();
                        }
                        return;
                    }));
                }

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

                    cameras.Add(C);
                }
            }

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


                if (SILICON.triggerAlarm("Burglar", this, cameras, trigger))
                {
                    Task13.Schedule(600, (Task13.Closure)(() => {
                        SILICON.cancelAlarm("Burglar", this, trigger);
                        return;
                    }));
                }
            }
            return;
        }
Example #2
0
        // Function from file: camera.dm
        public void cancelCameraAlarm(  )
        {
            Mob_Living_Silicon S = null;

            this.alarm_on = false;

            foreach (dynamic _a in Lang13.Enumerate(GlobalVars.mob_list, typeof(Mob_Living_Silicon)))
            {
                S = _a;

                S.cancelAlarm("Camera", GlobalFuncs.get_area(this), this);
            }
            return;
        }
Example #3
0
        // Function from file: motion.dm
        public bool cancelAlarm(  )
        {
            Mob_Living_Silicon aiPlayer = null;


            if (this.detectTime == -1)
            {
                foreach (dynamic _a in Lang13.Enumerate(GlobalVars.player_list, typeof(Mob_Living_Silicon)))
                {
                    aiPlayer = _a;


                    if (this.status)
                    {
                        aiPlayer.cancelAlarm("Motion", GlobalFuncs.get_area(this), this);
                    }
                }
            }
            this.detectTime = 0;
            return(true);
        }
Example #4
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;
        }
Example #5
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);
        }
Example #6
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;
        }