Exemplo n.º 1
0
        // Function from file: brigdoors.dm
        public bool timer_end(int?forced = null)
        {
            forced = forced ?? GlobalVars.FALSE;

            Obj_Machinery_Door_Window_Brigdoor     door = null;
            Obj_Structure_Closet_SecureCloset_Brig C    = null;


            if ((this.stat & 3) != 0)
            {
                return(false);
            }

            if (!Lang13.Bool(forced))
            {
                this.Radio.set_frequency(GlobalVars.SEC_FREQ);
                this.Radio.talk_into(this, "Timer has expired. Releasing prisoner.", GlobalVars.SEC_FREQ);
            }
            this.timing          = GlobalVars.FALSE;
            this.activation_time = null;
            this.set_timer(0);
            this.update_icon();

            foreach (dynamic _a in Lang13.Enumerate(this.targets, typeof(Obj_Machinery_Door_Window_Brigdoor)))
            {
                door = _a;


                if (!door.density)
                {
                    continue;
                }
                Task13.Schedule(0, (Task13.Closure)(() => {
                    door.open();
                    return;
                }));
            }

            foreach (dynamic _b in Lang13.Enumerate(this.targets, typeof(Obj_Structure_Closet_SecureCloset_Brig)))
            {
                C = _b;


                if (C.broken)
                {
                    continue;
                }

                if (C.opened)
                {
                    continue;
                }
                C.locked = false;
                C.update_icon();
            }
            return(true);
        }
Exemplo n.º 2
0
        // Function from file: brigdoors.dm
        public override void initialize(  )
        {
            Obj_Machinery_Door_Window_Brigdoor M = null;
            Obj_Machinery_Flasher F = null;
            Obj_Structure_Closet_SecureCloset_Brig C = null;


            foreach (dynamic _a in Lang13.Enumerate(GlobalFuncs.ultra_range(20, this), typeof(Obj_Machinery_Door_Window_Brigdoor)))
            {
                M = _a;


                if (M.id == this.id)
                {
                    this.targets.Add(M);
                }
            }

            foreach (dynamic _b in Lang13.Enumerate(GlobalFuncs.ultra_range(20, this), typeof(Obj_Machinery_Flasher)))
            {
                F = _b;


                if (F.id == this.id)
                {
                    this.targets.Add(F);
                }
            }

            foreach (dynamic _c in Lang13.Enumerate(GlobalFuncs.ultra_range(20, this), typeof(Obj_Structure_Closet_SecureCloset_Brig)))
            {
                C = _c;


                if (C.id == this.id)
                {
                    this.targets.Add(C);
                }
            }

            if (!(this.targets.len != 0))
            {
                this.stat |= 1;
            }
            this.update_icon();
            return;
        }
Exemplo n.º 3
0
        // Function from file: brigdoors.dm
        public bool timer_start(  )
        {
            Obj_Machinery_Door_Window_Brigdoor     door = null;
            Obj_Structure_Closet_SecureCloset_Brig C    = null;


            if ((this.stat & 3) != 0)
            {
                return(false);
            }
            this.activation_time = Game13.time;
            this.timing          = GlobalVars.TRUE;

            foreach (dynamic _a in Lang13.Enumerate(this.targets, typeof(Obj_Machinery_Door_Window_Brigdoor)))
            {
                door = _a;


                if (door.density)
                {
                    continue;
                }
                Task13.Schedule(0, (Task13.Closure)(() => {
                    door.close();
                    return;
                }));
            }

            foreach (dynamic _b in Lang13.Enumerate(this.targets, typeof(Obj_Structure_Closet_SecureCloset_Brig)))
            {
                C = _b;


                if (C.broken)
                {
                    continue;
                }

                if (C.opened && !C.close())
                {
                    continue;
                }
                C.locked = true;
                C.update_icon();
            }
            return(true);
        }